mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-12-26 13:41:07 +00:00
shortcutcontroller: Separate trigger/action early returns
We take this early return in update_accel over 36k times when starting the widget factory and always because the action is not a named action.
This commit is contained in:
parent
8645773fc6
commit
1d6c6fc3b8
@ -461,11 +461,12 @@ update_accel (GtkShortcut *shortcut,
|
|||||||
if (!muxer)
|
if (!muxer)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
trigger = gtk_shortcut_get_trigger (shortcut);
|
|
||||||
action = gtk_shortcut_get_action (shortcut);
|
action = gtk_shortcut_get_action (shortcut);
|
||||||
|
if (!GTK_IS_NAMED_ACTION (action))
|
||||||
|
return;
|
||||||
|
|
||||||
if (!GTK_IS_NAMED_ACTION (action) ||
|
trigger = gtk_shortcut_get_trigger (shortcut);
|
||||||
!GTK_IS_KEYVAL_TRIGGER (trigger))
|
if (!GTK_IS_KEYVAL_TRIGGER (trigger))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
target = gtk_shortcut_get_arguments (shortcut);
|
target = gtk_shortcut_get_arguments (shortcut);
|
||||||
|
Loading…
Reference in New Issue
Block a user