aboutsummaryrefslogtreecommitdiff
path: root/libdbusmenu-glib
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2011-08-22 11:30:06 -0500
committerTed Gould <ted@gould.cx>2011-08-22 11:30:06 -0500
commit14bcf1b8a8ada10beee5f13a5bec9854d4e58a13 (patch)
tree0e4df07b6833803479b02282abf6c3ea456266e2 /libdbusmenu-glib
parent6a217805e685c47223da9513c31d2a26f0141ccf (diff)
downloadlibdbusmenu-14bcf1b8a8ada10beee5f13a5bec9854d4e58a13.tar.gz
libdbusmenu-14bcf1b8a8ada10beee5f13a5bec9854d4e58a13.tar.bz2
libdbusmenu-14bcf1b8a8ada10beee5f13a5bec9854d4e58a13.zip
Adding a disposition property in to the header and defaults
Diffstat (limited to 'libdbusmenu-glib')
-rw-r--r--libdbusmenu-glib/defaults.c1
-rw-r--r--libdbusmenu-glib/menuitem.h39
2 files changed, 40 insertions, 0 deletions
diff --git a/libdbusmenu-glib/defaults.c b/libdbusmenu-glib/defaults.c
index aa479b1..a5caf0b 100644
--- a/libdbusmenu-glib/defaults.c
+++ b/libdbusmenu-glib/defaults.c
@@ -87,6 +87,7 @@ dbusmenu_defaults_init (DbusmenuDefaults *self)
dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_TOGGLE_STATE, G_VARIANT_TYPE_INT32, NULL);
dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_SHORTCUT, G_VARIANT_TYPE("aas"), NULL);
dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY, G_VARIANT_TYPE_STRING, NULL);
+ dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_DEFAULT, DBUSMENU_MENUITEM_PROP_DISPOSITION, G_VARIANT_TYPE_STRING, g_variant_new_string(DBUSMENU_MENUITEM_DISPOSITION_NORMAL));
/* Separator defaults */
dbusmenu_defaults_default_set(self, DBUSMENU_CLIENT_TYPES_SEPARATOR, DBUSMENU_MENUITEM_PROP_VISIBLE, G_VARIANT_TYPE_BOOLEAN, g_variant_new_boolean(TRUE));
diff --git a/libdbusmenu-glib/menuitem.h b/libdbusmenu-glib/menuitem.h
index afd1d4e..96a780e 100644
--- a/libdbusmenu-glib/menuitem.h
+++ b/libdbusmenu-glib/menuitem.h
@@ -184,6 +184,13 @@ G_BEGIN_DECLS
* #DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU. Type: #G_VARIANT_TYPE_STRING
*/
#define DBUSMENU_MENUITEM_PROP_CHILD_DISPLAY "children-display"
+/**
+ * DBUSMENU_MENUITEM_PROP_DISPOSITION:
+ *
+ * #DbusmenuMenuitem property to tell what type of information that the
+ * menu item is displaying to the user. Type: #G_VARIANT_TYPE_STRING
+ */
+#define DBUSMENU_MENUITEM_PROP_DISPOSITION "disposition"
/**
* DBUSMENU_MENUITEM_TOGGLE_CHECK:
@@ -268,6 +275,38 @@ G_BEGIN_DECLS
#define DBUSMENU_MENUITEM_CHILD_DISPLAY_SUBMENU "submenu"
/**
+ * DBUSMENU_MENUITEM_DISPOSITION_NORMAL:
+ *
+ * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu
+ * item displayed in the normal manner. Default value.
+ */
+#define DBUSMENU_MENUITEM_DISPOSITION_NORMAL "normal"
+/**
+ * DBUSMENU_MENUITEM_DISPOSITION_INFORMATION:
+ *
+ * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu
+ * item displayed in a way that conveys it's giving additional
+ * information to the user.
+ */
+#define DBUSMENU_MENUITEM_DISPOSITION_INFORMATION "information"
+/**
+ * DBUSMENU_MENUITEM_DISPOSITION_WARNING:
+ *
+ * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu
+ * item displayed in a way that conveys it's giving a warning
+ * to the user.
+ */
+#define DBUSMENU_MENUITEM_DISPOSITION_WARNING "warning"
+/**
+ * DBUSMENU_MENUITEM_DISPOSITION_ALERT:
+ *
+ * Used in #DBUSMENU_MENUITEM_PROP_DISPOSITION to have a menu
+ * item displayed in a way that conveys it's giving an alert
+ * to the user.
+ */
+#define DBUSMENU_MENUITEM_DISPOSITION_ALERT "alert"
+
+/**
* DBUSMENU_MENUITEM_EVENT_ACTIVATED:
*
* String for the event identifier when a menu item is clicked