Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Misc enhancements #96

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 10 additions & 0 deletions data/re.sonny.Commit.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,16 @@
<summary>Body lines maximum length (in characters)</summary>
</key>

<key name='window-height' type='i'>
<default>272</default>
<summary>The height of the commit message window.</summary>
</key>

<key name='window-width' type='i'>
<default>654</default>
<summary>The width of the commit message window.</summary>
</key>

<key name="color-scheme" type="i">
<default>0</default>
</key>
Expand Down
3 changes: 2 additions & 1 deletion src/welcome.js
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@ export default function Welcome({ application }) {
const command = getCommand();

const git_text = builder.get_object("git_text");
git_text.label = `<tt>git config --global core.editor "${command}"</tt>`;
git_text.label = `<tt>git config --global core.editor "${command}"\n` +
'git config --global --unset sequence.editor</tt>';
Comment on lines -39 to +40
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have 2 issues with this

  1. Commit isn't a very good rebase editor rfc: Add dedicated rebase UI? #81
  2. I don't want to make the command too complicated.

Slightly off-topic but now that Commit has read/write permissions to the user home directory, we could remove the commands and use buttons that run the commands directly.

Similar to Junction

image

I'll think about it for the next release.

const git_copy = builder.get_object("git_copy");
git_copy.connect("clicked", () => {
git_copy.get_clipboard().set(git_text.get_text());
Expand Down
14 changes: 14 additions & 0 deletions src/window.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
);

Comment on lines +30 to +43
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why do you want Commit to remember window size?

let title = GLib.path_get_basename(GLib.get_current_dir());
if (parsed.detail) title += ` (${parsed.detail})`;
window.set_title(title);
Expand Down