aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-26 10:34:33 -0500
committerTed Gould <ted@gould.cx>2010-08-26 10:34:33 -0500
commitffd29638de796d57380def939ef23c7ad8e892cd (patch)
treef552fd6ad2e50ece2d5ec0aaa3745bacfee55ec8
parent985ae78d54febec59f11ce58984d8adc59e84baf (diff)
downloadlibdbusmenu-ffd29638de796d57380def939ef23c7ad8e892cd.tar.gz
libdbusmenu-ffd29638de796d57380def939ef23c7ad8e892cd.tar.bz2
libdbusmenu-ffd29638de796d57380def939ef23c7ad8e892cd.zip
Creating a signal for the error situation on the signal.
-rw-r--r--libdbusmenu-glib/client-marshal.list1
-rw-r--r--libdbusmenu-glib/client.c19
-rw-r--r--libdbusmenu-glib/client.h1
3 files changed, 21 insertions, 0 deletions
diff --git a/libdbusmenu-glib/client-marshal.list b/libdbusmenu-glib/client-marshal.list
index 34e3956..f1d6a9f 100644
--- a/libdbusmenu-glib/client-marshal.list
+++ b/libdbusmenu-glib/client-marshal.list
@@ -1 +1,2 @@
VOID: OBJECT, UINT
+VOID: OBJECT, STRING, POINTER, UINT
diff --git a/libdbusmenu-glib/client.c b/libdbusmenu-glib/client.c
index d88478c..ac9561e 100644
--- a/libdbusmenu-glib/client.c
+++ b/libdbusmenu-glib/client.c
@@ -56,6 +56,7 @@ enum {
ROOT_CHANGED,
NEW_MENUITEM,
ITEM_ACTIVATE,
+ EVENT_ERROR,
LAST_SIGNAL
};
@@ -206,6 +207,24 @@ dbusmenu_client_class_init (DbusmenuClientClass *klass)
NULL, NULL,
_dbusmenu_client_marshal_VOID__OBJECT_UINT,
G_TYPE_NONE, 2, G_TYPE_OBJECT, G_TYPE_UINT);
+ /**
+ DbusmenuClient::event-error:
+ @arg0: The #DbusmenuClient object
+ @arg1: The #DbusmenuMenuitem sent an event
+ @arg2: The ID of the event sent
+ @arg3: The data sent along with the event
+ @arg4: A timestamp that the event happened at
+
+ Signal sent to show that there was an error in sending the event
+ to the server.
+ */
+ signals[ITEM_ACTIVATE] = g_signal_new(DBUSMENU_CLIENT_SIGNAL_EVENT_ERROR,
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (DbusmenuClientClass, event_error),
+ NULL, NULL,
+ _dbusmenu_client_marshal_VOID__OBJECT_STRING_POINTER_UINT,
+ G_TYPE_NONE, 4, G_TYPE_OBJECT, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_UINT);
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 dcbe5c2..24d8f57 100644
--- a/libdbusmenu-glib/client.h
+++ b/libdbusmenu-glib/client.h
@@ -47,6 +47,7 @@ G_BEGIN_DECLS
#define DBUSMENU_CLIENT_SIGNAL_ROOT_CHANGED "root-changed"
#define DBUSMENU_CLIENT_SIGNAL_NEW_MENUITEM "new-menuitem"
#define DBUSMENU_CLIENT_SIGNAL_ITEM_ACTIVATE "item-activate"
+#define DBUSMENU_CLIENT_SIGNAL_EVENT_ERROR "event-error"
#define DBUSMENU_CLIENT_PROP_DBUS_NAME "dbus-name"
#define DBUSMENU_CLIENT_PROP_DBUS_OBJECT "dbus-object"