diff options
author | Ted Gould <ted@gould.cx> | 2011-03-03 10:31:22 -0600 |
---|---|---|
committer | Ted Gould <ted@gould.cx> | 2011-03-03 10:31:22 -0600 |
commit | 9dd7d767dfc3388d549e2b2ed6004618dcf84270 (patch) | |
tree | dc469bc66be19c747b616890b8f035b95763fbec | |
parent | 75eb455e972b3e04b2fc8b89ead2815dff070fa5 (diff) | |
download | libdbusmenu-9dd7d767dfc3388d549e2b2ed6004618dcf84270.tar.gz libdbusmenu-9dd7d767dfc3388d549e2b2ed6004618dcf84270.tar.bz2 libdbusmenu-9dd7d767dfc3388d549e2b2ed6004618dcf84270.zip |
Adding a signal for theme directories changing.
-rw-r--r-- | libdbusmenu-glib/client-marshal.list | 1 | ||||
-rw-r--r-- | libdbusmenu-glib/client.c | 15 | ||||
-rw-r--r-- | libdbusmenu-glib/client.h | 10 |
3 files changed, 21 insertions, 5 deletions
diff --git a/libdbusmenu-glib/client-marshal.list b/libdbusmenu-glib/client-marshal.list index 96f9302..980c5c3 100644 --- a/libdbusmenu-glib/client-marshal.list +++ b/libdbusmenu-glib/client-marshal.list @@ -1,3 +1,4 @@ VOID: OBJECT, UINT VOID: OBJECT, STRING, VARIANT, UINT, POINTER VOID: ENUM +VOID: POINTER diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c index 9954683..30fe1ba 100644 --- a/libdbusmenu-glib/client.c +++ b/libdbusmenu-glib/client.c @@ -62,6 +62,7 @@ enum { NEW_MENUITEM, ITEM_ACTIVATE, EVENT_RESULT, + ICON_THEME_DIRS, LAST_SIGNAL }; @@ -273,6 +274,20 @@ dbusmenu_client_class_init (DbusmenuClientClass *klass) NULL, NULL, _dbusmenu_client_marshal_VOID__OBJECT_STRING_VARIANT_UINT_POINTER, G_TYPE_NONE, 5, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_VARIANT, G_TYPE_UINT, G_TYPE_POINTER); + /** + DbusmenuClient::icon-theme-dirs-changed: + @arg0: The #DbusmenuClient object + @arg1: A #GStrv of theme directories + + Signaled when the theme directories are changed by the server. + */ + signals[ICON_THEME_DIRS] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED, + G_TYPE_FROM_CLASS (klass), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (DbusmenuClientClass, icon_theme_dirs), + NULL, NULL, + _dbusmenu_client_marshal_VOID__POINTER, + G_TYPE_NONE, 1, G_TYPE_POINTER); g_object_class_install_property (object_class, PROP_DBUSOBJECT, g_param_spec_string(DBUSMENU_CLIENT_PROP_DBUS_OBJECT, "DBus Object we represent", diff --git a/libdbusmenu-glib/client.h b/libdbusmenu-glib/client.h index 28d4dd3..f69270f 100644 --- a/libdbusmenu-glib/client.h +++ b/libdbusmenu-glib/client.h @@ -75,11 +75,11 @@ G_BEGIN_DECLS */ #define DBUSMENU_CLIENT_SIGNAL_EVENT_RESULT "event-result" /** - * DBUSMENU_CLIENT_SIGNAL_TEXT_DIRECTION_CHANGED: + * DBUSMENU_CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED: * - * String to attach to signal #DbusmenuClient::text-direction-changed + * String to attach to signal #DbusmenuClient::icon-theme-dirs-changed */ -#define DBUSMENU_CLIENT_SIGNAL_TEXT_DIRECTION_CHANGED "text-direction-changed" +#define DBUSMENU_CLIENT_SIGNAL_ICON_THEME_DIRS_CHANGED "icon-theme-dirs-changed" /** * DBUSMENU_CLIENT_PROP_DBUS_NAME: @@ -139,12 +139,12 @@ typedef struct _DbusmenuClientPrivate DbusmenuClientPrivate; @new_menuitem: Slot for #DbusmenuClient::new-menuitem. @item_activate: Slot for #DbusmenuClient::item-activate. @event_result: Slot for #DbusmenuClient::event-error. + @icon_theme_dirs: Slot for #DbusmenuClient::icon-theme-dirs-changed. @reserved1: Reserved for future use. @reserved2: Reserved for future use. @reserved3: Reserved for future use. @reserved4: Reserved for future use. @reserved5: Reserved for future use. - @reserved6: Reserved for future use. A simple class that takes all of the information from a #DbusmenuServer over DBus and makes the same set of @@ -159,6 +159,7 @@ struct _DbusmenuClientClass { void (*new_menuitem) (DbusmenuMenuitem * newitem); void (*item_activate) (DbusmenuMenuitem * item, guint timestamp); void (*event_result) (DbusmenuMenuitem * item, gchar * event, GVariant * data, guint timestamp, GError * error); + void (*icon_theme_dirs) (DbusmenuMenuitem * item, gpointer theme_dirs, GError * error); /*< Private >*/ void (*reserved1) (void); @@ -166,7 +167,6 @@ struct _DbusmenuClientClass { void (*reserved3) (void); void (*reserved4) (void); void (*reserved5) (void); - void (*reserved6) (void); }; /** |