diff options
author | Ted Gould <ted@canonical.com> | 2009-01-29 09:01:15 -0600 |
---|---|---|
committer | Ted Gould <ted@canonical.com> | 2009-01-29 09:01:15 -0600 |
commit | fea68aa76b35f2d7de5127847a4f326bafccbeee (patch) | |
tree | 560334add8a573ea08e3076ff7aa5ebe8a058729 | |
parent | 492652a6018874e3471bf4275c540bf9655392de (diff) | |
download | libayatana-indicator-fea68aa76b35f2d7de5127847a4f326bafccbeee.tar.gz libayatana-indicator-fea68aa76b35f2d7de5127847a4f326bafccbeee.tar.bz2 libayatana-indicator-fea68aa76b35f2d7de5127847a4f326bafccbeee.zip |
Making the signals use #defines to make everything a little more
predictable. I hate this part of GObject signals.
-rw-r--r-- | libindicate/listener.c | 10 | ||||
-rw-r--r-- | libindicate/listener.h | 6 |
2 files changed, 11 insertions, 5 deletions
diff --git a/libindicate/listener.c b/libindicate/listener.c index 78a85eb..ee4d543 100644 --- a/libindicate/listener.c +++ b/libindicate/listener.c @@ -59,35 +59,35 @@ indicate_listener_class_init (IndicateListenerClass * class) gobj->finalize = indicate_listener_finalize; - signals[INDICATOR_ADDED] = g_signal_new("indicator-added", + signals[INDICATOR_ADDED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_added), NULL, NULL, indicate_listener_marshal_VOID__POINTER_POINTER_STRING, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING); - signals[INDICATOR_REMOVED] = g_signal_new("indicator-removed", + signals[INDICATOR_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_removed), NULL, NULL, indicate_listener_marshal_VOID__POINTER_POINTER_STRING, G_TYPE_NONE, 3, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING); - signals[INDICATOR_MODIFIED] = g_signal_new("indicator-modified", + signals[INDICATOR_MODIFIED] = g_signal_new(INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, indicator_modified), NULL, NULL, indicate_listener_marshal_VOID__POINTER_POINTER_STRING_STRING, G_TYPE_NONE, 4, G_TYPE_POINTER, G_TYPE_POINTER, G_TYPE_STRING, G_TYPE_STRING); - signals[SERVER_ADDED] = g_signal_new("server-added", + signals[SERVER_ADDED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_ADDED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_added), NULL, NULL, g_cclosure_marshal_VOID__POINTER, G_TYPE_NONE, 1, G_TYPE_POINTER); - signals[SERVER_REMOVED] = g_signal_new("server-removed", + signals[SERVER_REMOVED] = g_signal_new(INDICATE_LISTENER_SIGNAL_SERVER_REMOVED, G_TYPE_FROM_CLASS (class), G_SIGNAL_RUN_LAST, G_STRUCT_OFFSET (IndicateListenerClass, server_removed), diff --git a/libindicate/listener.h b/libindicate/listener.h index 511cdd3..934f0fd 100644 --- a/libindicate/listener.h +++ b/libindicate/listener.h @@ -20,6 +20,12 @@ G_BEGIN_DECLS #define INDICATE_IS_LISTENER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), INDICATE_TYPE_LISTENER)) #define INDICATE_LISTENER_GET_CLASS(object) (G_TYPE_INSTANCE_GET_CLASS((object), INDICATE_TYPE_LISTENER, IndicateListenerClass)) +#define INDICATE_LISTENER_SIGNAL_INDICATOR_ADDED "indicator-added" +#define INDICATE_LISTENER_SIGNAL_INDICATOR_REMOVED "indicator-removed" +#define INDICATE_LISTENER_SIGNAL_INDICATOR_MODIFIED "indicator-modified" +#define INDICATE_LISTENER_SIGNAL_SERVER_ADDED "server-added" +#define INDICATE_LISTENER_SIGNAL_SERVER_REMOVED "server-removed" + typedef gchar IndicateListenerServer; typedef guint IndicateListenerIndicator; |