From 45ae3241e9333f3cabf8aeacb2dfb92a7bd53ba3 Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Fri, 12 May 2023 11:30:46 -0700 Subject: [PATCH 1/2] welcome: Add instructions to unset sequence.editor A user's machine may have the sequence.editor set, which may configure a separate editor rebases. Add instructions to unset sequence.editor, making Commit the default editor. --- src/welcome.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/welcome.js b/src/welcome.js index 27cc7dc..ea8ec5a 100644 --- a/src/welcome.js +++ b/src/welcome.js @@ -36,7 +36,8 @@ export default function Welcome({ application }) { const command = getCommand(); const git_text = builder.get_object("git_text"); - git_text.label = `git config --global core.editor "${command}"`; + git_text.label = `git config --global core.editor "${command}"\n` + + 'git config --global --unset sequence.editor'; const git_copy = builder.get_object("git_copy"); git_copy.connect("clicked", () => { git_copy.get_clipboard().set(git_text.get_text()); From 74701778dfcc58d94ec34212d8c5f361148ef082 Mon Sep 17 00:00:00 2001 From: Corey Berla Date: Fri, 12 May 2023 13:23:30 -0700 Subject: [PATCH 2/2] window: Save width and height --- data/re.sonny.Commit.gschema.xml | 10 ++++++++++ src/window.js | 14 ++++++++++++++ 2 files changed, 24 insertions(+) diff --git a/data/re.sonny.Commit.gschema.xml b/data/re.sonny.Commit.gschema.xml index 614124b..a160ccf 100644 --- a/data/re.sonny.Commit.gschema.xml +++ b/data/re.sonny.Commit.gschema.xml @@ -13,6 +13,16 @@ Body lines maximum length (in characters) + + 272 + The height of the commit message window. + + + + 654 + The width of the commit message window. + + 0 diff --git a/src/window.js b/src/window.js index b50733a..244e9a6 100644 --- a/src/window.js +++ b/src/window.js @@ -27,6 +27,20 @@ export default function Window({ application, file, text, type, readonly }) { const window = builder.get_object("window"); if (__DEV__) window.add_css_class("devel"); + settings.bind( + "window-width", + window, + "default-width", + Gio.SettingsBindFlags.DEFAULT, + ); + + settings.bind( + "window-height", + window, + "default-height", + Gio.SettingsBindFlags.DEFAULT, + ); + let title = GLib.path_get_basename(GLib.get_current_dir()); if (parsed.detail) title += ` (${parsed.detail})`; window.set_title(title);