[gnome-builder] app: fix shortcut registration
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder] app: fix shortcut registration
- Date: Fri, 16 Nov 2018 22:43:46 +0000 (UTC)
commit fc5cb4c4e5cdbcc7e626d6c5532c88f2d916cca3
Author: Christian Hergert <chergert redhat com>
Date: Fri Nov 16 14:43:29 2018 -0800
app: fix shortcut registration
Themes can be reloaded during runtime as plugins are loaded, so you can't
just use the current theme to register actions. They need to be loaded
into the internal "base-layer" theme to be persistent.
src/libide/application/ide-application-shortcuts.c | 8 ++------
1 file changed, 2 insertions(+), 6 deletions(-)
---
diff --git a/src/libide/application/ide-application-shortcuts.c
b/src/libide/application/ide-application-shortcuts.c
index c07b18fb6..b02555960 100644
--- a/src/libide/application/ide-application-shortcuts.c
+++ b/src/libide/application/ide-application-shortcuts.c
@@ -30,14 +30,13 @@
void
_ide_application_init_shortcuts (IdeApplication *self)
{
- static const gchar *shortcuts_fallback[] = { "<Primary>F1", NULL };
DzlShortcutManager *manager;
DzlShortcutTheme *theme;
g_assert (IDE_IS_APPLICATION (self));
manager = dzl_application_get_shortcut_manager (DZL_APPLICATION (self));
- theme = g_object_ref (dzl_shortcut_manager_get_theme (manager));
+ theme = dzl_shortcut_manager_get_theme_by_name (manager, "internal");
dzl_shortcut_manager_add_action (manager,
I_("app.help"),
@@ -69,9 +68,6 @@ _ide_application_init_shortcuts (IdeApplication *self)
NULL);
dzl_shortcut_theme_set_accel_for_action (theme,
"app.shortcuts",
- "<Primary><Shift>question",
+ "<Primary>question",
DZL_SHORTCUT_PHASE_GLOBAL);
- gtk_application_set_accels_for_action (GTK_APPLICATION (self),
- "app.shortcuts",
- shortcuts_fallback);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]