aboutsummaryrefslogtreecommitdiff
path: root/libqmenumodel/src/gtk
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-09-02 18:35:00 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-09-02 18:35:00 +0200
commit2641328dca5a7db154e5dbca7d9904d3c321974e (patch)
tree3f92b3b800ad4d3779da1d3048cb9f45feccc7ec /libqmenumodel/src/gtk
parentf58b7c76605623a171d2e6eba82cdbf7a788657d (diff)
downloadqmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.tar.gz
qmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.tar.bz2
qmenumodel-2641328dca5a7db154e5dbca7d9904d3c321974e.zip
Add UnityMenuModel::getAction
A method that returns a UnityMenuAction for a menu item. It must be used if the action name came from an attribute on the menu item so that the menu item's namespace can be prepended to the action name.
Diffstat (limited to 'libqmenumodel/src/gtk')
-rw-r--r--libqmenumodel/src/gtk/gtkmenutrackeritem.c6
-rw-r--r--libqmenumodel/src/gtk/gtkmenutrackeritem.h2
2 files changed, 8 insertions, 0 deletions
diff --git a/libqmenumodel/src/gtk/gtkmenutrackeritem.c b/libqmenumodel/src/gtk/gtkmenutrackeritem.c
index 3dc1d13..34e168a 100644
--- a/libqmenumodel/src/gtk/gtkmenutrackeritem.c
+++ b/libqmenumodel/src/gtk/gtkmenutrackeritem.c
@@ -649,6 +649,12 @@ gtk_menu_tracker_item_get_action_state (GtkMenuTrackerItem *self)
return NULL;
}
+const gchar *
+gtk_menu_tracker_item_get_action_namespace (GtkMenuTrackerItem *self)
+{
+ return self->action_namespace;
+}
+
static void
gtk_menu_tracker_item_set_submenu_shown (GtkMenuTrackerItem *self,
gboolean submenu_shown)
diff --git a/libqmenumodel/src/gtk/gtkmenutrackeritem.h b/libqmenumodel/src/gtk/gtkmenutrackeritem.h
index c0d61f0..dc62bf1 100644
--- a/libqmenumodel/src/gtk/gtkmenutrackeritem.h
+++ b/libqmenumodel/src/gtk/gtkmenutrackeritem.h
@@ -91,6 +91,8 @@ gchar * gtk_menu_tracker_item_get_action_name (GtkMen
GVariant * gtk_menu_tracker_item_get_action_state (GtkMenuTrackerItem *self);
+const gchar * gtk_menu_tracker_item_get_action_namespace (GtkMenuTrackerItem *self);
+
gboolean gtk_menu_tracker_item_get_attribute (GtkMenuTrackerItem *self,
const gchar *attribute,
const gchar *format,