File tree Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Expand file tree Collapse file tree 2 files changed +11
-7
lines changed Original file line number Diff line number Diff 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" });
Original file line number Diff line number Diff line change @@ -33,7 +33,7 @@ public class AppWindow : Gtk.Window {
3333 };
3434 var save_as_button = new Gtk .Button .from_icon_name (" document-save-as" ) {
3535 tooltip_markup = Granite.markup_accel_tooltip (
36- {"<Control >s "},
36+ {"<Control >< Shift > s "},
3737 _ ("Save as ")
3838 )
3939 };
You can’t perform that action at this time.
0 commit comments