gtkwindow: Stop checking gtk-menu-bar-accel

This commit is contained in:
Timm Bäder 2016-10-13 15:26:03 +02:00 committed by Benjamin Otte
parent 7e16396cc5
commit b082fb598d

View File

@ -149,6 +149,7 @@
* widget that is added as a titlebar child. * widget that is added as a titlebar child.
*/ */
#define MENU_BAR_ACCEL "F10"
#define MNEMONICS_DELAY 300 /* ms */ #define MNEMONICS_DELAY 300 /* ms */
#define NO_CONTENT_CHILD_NAT 200 #define NO_CONTENT_CHILD_NAT 200
/* In case the content (excluding header bar and shadows) of the window /* In case the content (excluding header bar and shadows) of the window
@ -10545,28 +10546,17 @@ gtk_window_activate_menubar (GtkWindow *window,
GdkEventKey *event) GdkEventKey *event)
{ {
GtkWindowPrivate *priv = window->priv; GtkWindowPrivate *priv = window->priv;
gchar *accel = NULL;
guint keyval = 0; guint keyval = 0;
GdkModifierType mods = 0; GdkModifierType mods = 0;
g_object_get (gtk_widget_get_settings (GTK_WIDGET (window)), gtk_accelerator_parse (MENU_BAR_ACCEL, &keyval, &mods);
"gtk-menu-bar-accel", &accel,
NULL);
if (accel == NULL || *accel == 0)
return FALSE;
gtk_accelerator_parse (accel, &keyval, &mods);
if (keyval == 0) if (keyval == 0)
{ {
g_warning ("Failed to parse menu bar accelerator '%s'", accel); g_warning ("Failed to parse menu bar accelerator '%s'", MENU_BAR_ACCEL);
g_free (accel);
return FALSE; return FALSE;
} }
g_free (accel);
/* FIXME this is wrong, needs to be in the global accel resolution /* FIXME this is wrong, needs to be in the global accel resolution
* thing, to properly consider i18n etc., but that probably requires * thing, to properly consider i18n etc., but that probably requires
* AccelGroup changes etc. * AccelGroup changes etc.