Skip to content

Commit 6d69302

Browse files
authored
Merge branch 'wpkelso:main' into cleanup-enhancements
2 parents 1463e3c + 59f6685 commit 6d69302

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

src/Application.vala

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,17 @@ public class Application : Gtk.Application {
4949
open_document_action.activate.connect (on_open_document);
5050
this.add_action (open_document_action);
5151

52-
//TODO: Vala complains about the method not existing
53-
/*SimpleAction saveas_action = new SimpleAction ("saveas", null);
54-
set_accels_for_action ("app.saveas", {"<Control>s"});
55-
add_action (saveas);
52+
SimpleAction saveas_action = new SimpleAction ("saveas", null);
53+
set_accels_for_action ("app.saveas", {"<Control><Shift>s"});
54+
add_action (saveas_action);
5655
saveas_action.activate.connect (() => {
57-
this.get_active_window ().on_save_as ();
58-
});*/
56+
unowned var window = this.get_active_window () as AppWindow;
57+
if (window == null) {
58+
return;
59+
}
60+
61+
window.on_save_as ();
62+
});
5963

6064
SimpleAction quit_action = new SimpleAction ("quit", null);
6165
set_accels_for_action ("app.quit", {"<Control>q"});

src/Window.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ public class AppWindow : Gtk.Window {
3434
};
3535
var save_as_button = new Gtk.Button.from_icon_name ("document-save-as") {
3636
tooltip_markup = Granite.markup_accel_tooltip (
37-
{"<Control>s"},
37+
{"<Control><Shift>s"},
3838
_("Save as")
3939
)
4040
};

0 commit comments

Comments
 (0)