aboutsummaryrefslogtreecommitdiff
path: root/src/session-dbus.c
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-03-12 14:33:30 -0600
committerTed Gould <ted@gould.cx>2010-03-12 14:33:30 -0600
commit0d2c0778772b92815dd1a773f6a5e10ed3c80869 (patch)
treebb06136c1ae008b56cb7667b08835ed74c1d5a1c /src/session-dbus.c
parenta92cec4aa9f3b7a014f9ed0e3dc3b2617e4114be (diff)
downloadayatana-indicator-session-0d2c0778772b92815dd1a773f6a5e10ed3c80869.tar.gz
ayatana-indicator-session-0d2c0778772b92815dd1a773f6a5e10ed3c80869.tar.bz2
ayatana-indicator-session-0d2c0778772b92815dd1a773f6a5e10ed3c80869.zip
Build us a signal
Diffstat (limited to 'src/session-dbus.c')
-rw-r--r--src/session-dbus.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/session-dbus.c b/src/session-dbus.c
index cc12311..fd506ad 100644
--- a/src/session-dbus.c
+++ b/src/session-dbus.c
@@ -13,6 +13,14 @@ struct _SessionDbusPrivate {
gchar * name;
};
+/* Signals */
+enum {
+ ICON_UPDATED,
+ LAST_SIGNAL
+};
+
+static guint signals[LAST_SIGNAL] = { 0 };
+
#define SESSION_DBUS_GET_PRIVATE(o) \
(G_TYPE_INSTANCE_GET_PRIVATE ((o), SESSION_DBUS_TYPE, SessionDbusPrivate))
@@ -33,6 +41,14 @@ session_dbus_class_init (SessionDbusClass *klass)
object_class->dispose = session_dbus_dispose;
object_class->finalize = session_dbus_finalize;
+ signals[ICON_UPDATED] = g_signal_new ("icon-updated",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ G_STRUCT_OFFSET (SessionDbusClass, icon_updated),
+ NULL, NULL,
+ g_cclosure_marshal_VOID__STRING,
+ G_TYPE_NONE, 1, G_TYPE_STRING);
+
dbus_g_object_type_install_info(SESSION_DBUS_TYPE, &dbus_glib__session_dbus_server_object_info);
return;
@@ -90,5 +106,6 @@ session_dbus_set_name (SessionDbus * session, const gchar * name)
priv->name = NULL;
}
priv->name = g_strdup(name);
+ g_signal_emit(G_OBJECT(session), signals[ICON_UPDATED], 0, priv->name, TRUE);
return;
}