[libdazzle] shortcuts: take current theme into account
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcuts: take current theme into account
- Date: Wed, 14 Jun 2017 23:11:17 +0000 (UTC)
commit 14e28f48f885b24699ef13b721014d5f33eb63b8
Author: Christian Hergert <chergert redhat com>
Date: Wed Jun 14 16:11:08 2017 -0700
shortcuts: take current theme into account
priv->theme might not yet be set, and therefore we need to get the
effective theme by calling _get_theme().
src/shortcuts/dzl-shortcut-manager.c | 7 +++++--
1 files changed, 5 insertions(+), 2 deletions(-)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index ea346e2..1d1871f 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -1085,6 +1085,7 @@ dzl_shortcut_manager_add_shortcuts_to_window (DzlShortcutManager *self,
DzlShortcutsWindow *window)
{
DzlShortcutManagerPrivate *priv;
+ DzlShortcutTheme *theme;
GNode *parent;
g_return_if_fail (!self || DZL_IS_SHORTCUT_MANAGER (self));
@@ -1095,6 +1096,8 @@ dzl_shortcut_manager_add_shortcuts_to_window (DzlShortcutManager *self,
priv = dzl_shortcut_manager_get_instance_private (self);
+ theme = dzl_shortcut_manager_get_theme (self);
+
/*
* The GNode tree is in four levels. priv->root is the root of the tree and
* contains no data items itself. It is just our stable root. The children
@@ -1133,9 +1136,9 @@ dzl_shortcut_manager_add_shortcuts_to_window (DzlShortcutManager *self,
DzlShortcutsShortcut *shortcut;
if (data->type == DZL_SHORTCUT_NODE_ACTION)
- chord = dzl_shortcut_theme_get_chord_for_action (priv->theme, data->name);
+ chord = dzl_shortcut_theme_get_chord_for_action (theme, data->name);
else if (data->type == DZL_SHORTCUT_NODE_COMMAND)
- chord = dzl_shortcut_theme_get_chord_for_command (priv->theme, data->name);
+ chord = dzl_shortcut_theme_get_chord_for_command (theme, data->name);
accel = dzl_shortcut_chord_to_string (chord);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]