Revision: 1039 http://svn.sourceforge.net/geany/?rev=1039&view=rev Author: ntrel Date: 2006-12-01 04:19:09 -0800 (Fri, 01 Dec 2006)
Log Message: ----------- Make the switch to vte menu shortcut override work before the VTE has been realized.
Modified Paths: -------------- trunk/ChangeLog trunk/src/vte.c
Modified: trunk/ChangeLog =================================================================== --- trunk/ChangeLog 2006-11-30 15:42:52 UTC (rev 1038) +++ trunk/ChangeLog 2006-12-01 12:19:09 UTC (rev 1039) @@ -1,3 +1,10 @@ +2006-12-01 Nick Treleaven nick.treleaven@btinternet.com + + * src/vte.c: + Make the switch to vte menu shortcut override work before the VTE + has been realized. + + 2006-11-30 Nick Treleaven nick.treleaven@btinternet.com
* src/main.c:
Modified: trunk/src/vte.c =================================================================== --- trunk/src/vte.c 2006-11-30 15:42:52 UTC (rev 1038) +++ trunk/src/vte.c 2006-12-01 12:19:09 UTC (rev 1039) @@ -100,6 +100,21 @@ }
+static void override_menu_key() +{ + if (gtk_menu_key_accel == NULL) // for restoring the default value + g_object_get(G_OBJECT(gtk_settings_get_default()), "gtk-menu-bar-accel", + >k_menu_key_accel, NULL); + + if (vc->ignore_menu_bar_accel) + gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", + "<Shift><Control><Mod1><Mod2><Mod3><Mod4><Mod5>F10", "Geany"); + else + gtk_settings_set_string_property(gtk_settings_get_default(), + "gtk-menu-bar-accel", gtk_menu_key_accel, "Geany"); +} + + void vte_init(void) {
@@ -172,8 +187,8 @@ // the vte widget has to be realised before color changes take effect g_signal_connect(G_OBJECT(vte), "realize", G_CALLBACK(vte_apply_user_settings), NULL);
- //gtk_widget_realize(vte); - //vte_apply_user_settings(); + // setup the f10 menu override (so it works before the widget is first realized). + override_menu_key(); }
@@ -289,16 +304,7 @@ vf->vte_terminal_set_color_foreground(VTE_TERMINAL(vc->vte), vc->colour_fore); vf->vte_terminal_set_color_background(VTE_TERMINAL(vc->vte), vc->colour_back);
- if (gtk_menu_key_accel == NULL) // for restoring the default value - g_object_get(G_OBJECT(gtk_settings_get_default()), "gtk-menu-bar-accel", - >k_menu_key_accel, NULL); - - if (vc->ignore_menu_bar_accel) - gtk_settings_set_string_property(gtk_settings_get_default(), "gtk-menu-bar-accel", - "<Shift><Control><Mod1><Mod2><Mod3><Mod4><Mod5>F10", "Geany"); - else - gtk_settings_set_string_property(gtk_settings_get_default(), - "gtk-menu-bar-accel", gtk_menu_key_accel, "Geany"); + override_menu_key(); }
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.