[libdazzle] shortcut: track action name as if it were a command
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [libdazzle] shortcut: track action name as if it were a command
- Date: Wed, 3 Oct 2018 06:45:33 +0000 (UTC)
commit b28f2ac84e3af31b4aa418616229b1eb627d491b
Author: Christian Hergert <chergert redhat com>
Date: Tue Oct 2 23:44:55 2018 -0700
shortcut: track action name as if it were a command
src/shortcuts/dzl-shortcut-manager.c | 5 +++++
1 file changed, 5 insertions(+)
---
diff --git a/src/shortcuts/dzl-shortcut-manager.c b/src/shortcuts/dzl-shortcut-manager.c
index fc5d569..66397cd 100644
--- a/src/shortcuts/dzl-shortcut-manager.c
+++ b/src/shortcuts/dzl-shortcut-manager.c
@@ -1301,6 +1301,7 @@ dzl_shortcut_manager_add_action (DzlShortcutManager *self,
const gchar *title,
const gchar *subtitle)
{
+ DzlShortcutManagerPrivate *priv;
DzlShortcutNodeData *data;
GNode *parent;
@@ -1311,6 +1312,8 @@ dzl_shortcut_manager_add_action (DzlShortcutManager *self,
if (self == NULL)
self = dzl_shortcut_manager_get_default ();
+ priv = dzl_shortcut_manager_get_instance_private (self);
+
section = g_intern_string (section);
group = g_intern_string (group);
title = g_intern_string (title);
@@ -1329,6 +1332,8 @@ dzl_shortcut_manager_add_action (DzlShortcutManager *self,
g_node_append_data (parent, data);
+ g_hash_table_insert (priv->command_id_to_node_data, (gpointer)data->name, data);
+
g_signal_emit (self, signals [CHANGED], 0);
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]