From 31a4e5589b182e234856fc9ec9deb32e23ae3bdd Mon Sep 17 00:00:00 2001 From: Ricardo Markiewicz Date: Tue, 27 Sep 2005 03:05:37 +0000 Subject: [PATCH 1/1] Agrego ShortCuts. --- viewer/main.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/viewer/main.cpp b/viewer/main.cpp index 12a80db..0c5d01a 100644 --- a/viewer/main.cpp +++ b/viewer/main.cpp @@ -71,9 +71,9 @@ int main(int argc, char *argv[]) actiongroup->add( Gtk::Action::create("Nuevo", Gtk::Stock::NEW), &nuevo_arbol); actiongroup->add( Gtk::Action::create("Salir", Gtk::Stock::QUIT), &Gtk::Main::quit); actiongroup->add( Gtk::Action::create("MenuZoom", "_Zoom")); - actiongroup->add( Gtk::Action::create("Alejar", "_Alejar"), &zoom_out ); - actiongroup->add( Gtk::Action::create("Acercar", "A_cercar"), &zoom_in); - actiongroup->add( Gtk::Action::create("100 %", "100 %"), &zoom_normal); + actiongroup->add( Gtk::Action::create("Alejar", Gtk::Stock::ZOOM_OUT), Gtk::AccelKey ("z"), &zoom_out ); + actiongroup->add( Gtk::Action::create("Acercar", Gtk::Stock::ZOOM_IN), Gtk::AccelKey ("x"), &zoom_in); + actiongroup->add( Gtk::Action::create("100 %", Gtk::Stock::ZOOM_100), Gtk::AccelKey ("1"), &zoom_normal); Glib::RefPtr m_refUIManager = Gtk::UIManager::create(); m_refUIManager->insert_action_group (actiongroup); @@ -85,6 +85,7 @@ int main(int argc, char *argv[]) vbox.pack_start (*menubar, false, true, 0); vbox.pack_end (hbox, true, true, 5); + window.add_accel_group (m_refUIManager->get_accel_group ()); window.add (vbox); window.set_size_request (640, 480); window.show_all (); -- 2.43.0