From: Ricardo Markiewicz Date: Tue, 27 Sep 2005 03:05:37 +0000 (+0000) Subject: Agrego ShortCuts. X-Git-Tag: 1_0-pre1~90 X-Git-Url: https://git.llucax.com/z.facultad/75.52/treemulator.git/commitdiff_plain/31a4e5589b182e234856fc9ec9deb32e23ae3bdd?hp=6f60a661cee84aa6962cdbe419dcfee0036f4170 Agrego ShortCuts. --- 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 ();