diff --git a/src/Application.vala b/src/Application.vala index bbc184a..44c9cfe 100644 --- a/src/Application.vala +++ b/src/Application.vala @@ -49,13 +49,17 @@ public class Application : Gtk.Application { open_document_action.activate.connect (on_open_document); this.add_action (open_document_action); - //TODO: Vala complains about the method not existing - /*SimpleAction saveas_action = new SimpleAction ("saveas", null); - set_accels_for_action ("app.saveas", {"s"}); - add_action (saveas); + SimpleAction saveas_action = new SimpleAction ("saveas", null); + set_accels_for_action ("app.saveas", {"s"}); + add_action (saveas_action); saveas_action.activate.connect (() => { - this.get_active_window ().on_save_as (); - });*/ + unowned var window = this.get_active_window () as AppWindow; + if (window == null) { + return; + } + + window.on_save_as (); + }); SimpleAction quit_action = new SimpleAction ("quit", null); set_accels_for_action ("app.quit", {"q"}); diff --git a/src/Window.vala b/src/Window.vala index c706767..592a241 100644 --- a/src/Window.vala +++ b/src/Window.vala @@ -33,7 +33,7 @@ public class AppWindow : Gtk.Window { }; var save_as_button = new Gtk.Button.from_icon_name ("document-save-as") { tooltip_markup = Granite.markup_accel_tooltip ( - {"s"}, + {"s"}, _("Save as") ) };