forked from AuroraMiddleware/gtk
Stop checking GtkSettings:gtk-enable-mnemonics
This commit is contained in:
parent
dd3c3b683f
commit
a9367b705e
@ -2015,9 +2015,6 @@ gtk_label_screen_changed (GtkWidget *widget,
|
||||
|
||||
if (! shortcuts_connected)
|
||||
{
|
||||
g_signal_connect (settings, "notify::gtk-enable-mnemonics",
|
||||
G_CALLBACK (label_shortcut_setting_changed),
|
||||
NULL);
|
||||
g_signal_connect (settings, "notify::gtk-enable-accels",
|
||||
G_CALLBACK (label_shortcut_setting_changed),
|
||||
NULL);
|
||||
@ -2684,10 +2681,6 @@ gtk_label_set_markup_internal (GtkLabel *label,
|
||||
gboolean enable_mnemonics = TRUE;
|
||||
gboolean auto_mnemonics = TRUE;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (label)),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
NULL);
|
||||
|
||||
if (!(enable_mnemonics && priv->mnemonics_visible &&
|
||||
(!auto_mnemonics ||
|
||||
(gtk_widget_is_sensitive (GTK_WIDGET (label)) &&
|
||||
@ -2906,7 +2899,6 @@ gtk_label_set_pattern_internal (GtkLabel *label,
|
||||
{
|
||||
GtkLabelPrivate *priv = label->priv;
|
||||
PangoAttrList *attrs;
|
||||
gboolean enable_mnemonics = TRUE;
|
||||
gboolean auto_mnemonics = TRUE;
|
||||
|
||||
if (priv->pattern_set)
|
||||
@ -2914,11 +2906,7 @@ gtk_label_set_pattern_internal (GtkLabel *label,
|
||||
|
||||
if (is_mnemonic)
|
||||
{
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (label)),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
NULL);
|
||||
|
||||
if (enable_mnemonics && priv->mnemonics_visible && pattern &&
|
||||
if (priv->mnemonics_visible && pattern &&
|
||||
(!auto_mnemonics ||
|
||||
(gtk_widget_is_sensitive (GTK_WIDGET (label)) &&
|
||||
(!priv->mnemonic_widget ||
|
||||
|
@ -940,7 +940,6 @@ gtk_menu_shell_key_press (GtkWidget *widget,
|
||||
{
|
||||
GtkMenuShell *menu_shell = GTK_MENU_SHELL (widget);
|
||||
GtkMenuShellPrivate *priv = menu_shell->priv;
|
||||
gboolean enable_mnemonics;
|
||||
|
||||
priv->keyboard_mode = TRUE;
|
||||
|
||||
@ -951,14 +950,7 @@ gtk_menu_shell_key_press (GtkWidget *widget,
|
||||
if (gtk_bindings_activate_event (G_OBJECT (widget), event))
|
||||
return TRUE;
|
||||
|
||||
g_object_get (gtk_widget_get_settings (widget),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
NULL);
|
||||
|
||||
if (enable_mnemonics)
|
||||
return gtk_menu_shell_activate_mnemonic (menu_shell, event);
|
||||
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
static gint
|
||||
|
@ -10773,7 +10773,6 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
GtkKeyHash *key_hash;
|
||||
GtkWindowKeyEntry *found_entry = NULL;
|
||||
gboolean enable_accels;
|
||||
gboolean enable_mnemonics;
|
||||
|
||||
g_return_val_if_fail (GTK_IS_WINDOW (window), FALSE);
|
||||
g_return_val_if_fail (event != NULL, FALSE);
|
||||
@ -10790,7 +10789,6 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
event->group);
|
||||
|
||||
g_object_get (gtk_widget_get_settings (GTK_WIDGET (window)),
|
||||
"gtk-enable-mnemonics", &enable_mnemonics,
|
||||
"gtk-enable-accels", &enable_accels,
|
||||
NULL);
|
||||
|
||||
@ -10798,13 +10796,10 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
{
|
||||
GtkWindowKeyEntry *entry = tmp_list->data;
|
||||
if (entry->is_mnemonic)
|
||||
{
|
||||
if( enable_mnemonics)
|
||||
{
|
||||
found_entry = entry;
|
||||
break;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (enable_accels && !found_entry)
|
||||
@ -10821,7 +10816,6 @@ gtk_window_activate_key (GtkWindow *window,
|
||||
{
|
||||
if (found_entry->is_mnemonic)
|
||||
{
|
||||
if( enable_mnemonics)
|
||||
return gtk_window_mnemonic_activate (window, found_entry->keyval,
|
||||
found_entry->modifiers);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user