From 3caed4762ba1ecf4c2ec09fb5e3fd9cd4d339f21 Mon Sep 17 00:00:00 2001 From: Tim Mayberry Date: Fri, 27 Jan 2006 10:17:34 +0000 Subject: [PATCH] fix stupid gtk design quirk and bad documentation...oh and rebinding accels at runtime should work git-svn-id: svn://localhost/trunk/ardour2@299 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/ardour_ui_ed.cc | 7 +++++++ libs/gtkmm2ext/gtk_ui.cc | 4 ---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/gtk2_ardour/ardour_ui_ed.cc b/gtk2_ardour/ardour_ui_ed.cc index fbe61775df..70b9c928bc 100644 --- a/gtk2_ardour/ardour_ui_ed.cc +++ b/gtk2_ardour/ardour_ui_ed.cc @@ -432,6 +432,13 @@ ARDOUR_UI::build_menu_bar () menu_bar = dynamic_cast (ActionManager::get_widget (X_("/Main"))); menu_bar->set_name ("MainMenuBar"); + /* + * This is needed because this property does not get installed + * until the Menu GObject class is registered, which happens + * when the first menu instance is created. + */ + Gtk::Settings::get_default()->property_gtk_can_change_accels() = true; + wall_clock_box.add (wall_clock_label); wall_clock_box.set_name ("WallClock"); wall_clock_label.set_name ("WallClock"); diff --git a/libs/gtkmm2ext/gtk_ui.cc b/libs/gtkmm2ext/gtk_ui.cc index 2ea82209bd..6b0326ab67 100644 --- a/libs/gtkmm2ext/gtk_ui.cc +++ b/libs/gtkmm2ext/gtk_ui.cc @@ -53,10 +53,6 @@ UI::UI (string name, int *argc, char ***argv, string rcfile) theMain = new Main (argc, argv); tips = new Tooltips; - // allow run-time rebinding of accels - - Settings::get_default()->property_gtk_can_change_accels() = true; - if (pthread_key_create (&thread_request_buffer_key, 0)) { cerr << _("cannot create thread request buffer key") << endl; throw failed_constructor();