aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorTed Gould <ted@gould.cx>2010-08-04 12:49:54 -0500
committerTed Gould <ted@gould.cx>2010-08-04 12:49:54 -0500
commitd06c1026db12ff8da45a2f16e81768aaca90c1c7 (patch)
treec79a715a233654e30fe0e1f681f62f9a620caef9 /src
parent4dea77d518cd6b1106452735f265ff2366c4dc9c (diff)
downloadayatana-indicator-application-d06c1026db12ff8da45a2f16e81768aaca90c1c7.tar.gz
ayatana-indicator-application-d06c1026db12ff8da45a2f16e81768aaca90c1c7.tar.bz2
ayatana-indicator-application-d06c1026db12ff8da45a2f16e81768aaca90c1c7.zip
Adding in a base signal handler for the label change
Diffstat (limited to 'src')
-rw-r--r--src/indicator-application.c34
1 files changed, 34 insertions, 0 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c
index 32284d3..be47be6 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -107,6 +107,7 @@ static gboolean disconnected_kill (gpointer user_data);
static void disconnected_kill_helper (gpointer data, gpointer user_data);
static void application_added (DBusGProxy * proxy, const gchar * iconname, gint position, const gchar * dbusaddress, const gchar * dbusobject, const gchar * icon_path, const gchar * label, const gchar * guide, IndicatorApplication * application);
static void application_removed (DBusGProxy * proxy, gint position , IndicatorApplication * application);
+static void application_label_changed (DBusGProxy * proxy, gint position, const gchar * label, const gchar * guide, IndicatorApplication * application);
static void application_icon_changed (DBusGProxy * proxy, gint position, const gchar * iconname, IndicatorApplication * application);
static void get_applications (DBusGProxy *proxy, GPtrArray *OUT_applications, GError *error, gpointer userdata);
static void get_applications_helper (gpointer data, gpointer user_data);
@@ -145,6 +146,12 @@ indicator_application_class_init (IndicatorApplicationClass *klass)
G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_INVALID);
+ dbus_g_object_register_marshaller(_application_service_marshal_VOID__INT_STRING_STRING,
+ G_TYPE_NONE,
+ G_TYPE_INT,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_INVALID);
return;
}
@@ -282,6 +289,12 @@ connected (IndicatorApplication * application)
G_TYPE_INT,
G_TYPE_STRING,
G_TYPE_INVALID);
+ dbus_g_proxy_add_signal(priv->service_proxy,
+ "ApplicationLabelChanged",
+ G_TYPE_INT,
+ G_TYPE_STRING,
+ G_TYPE_STRING,
+ G_TYPE_INVALID);
/* Connect to them */
g_debug("Connect to them.");
@@ -300,6 +313,11 @@ connected (IndicatorApplication * application)
G_CALLBACK(application_icon_changed),
application,
NULL /* Disconnection Signal */);
+ dbus_g_proxy_connect_signal(priv->service_proxy,
+ "ApplicationLabelChanged",
+ G_CALLBACK(application_label_changed),
+ application,
+ NULL /* Disconnection Signal */);
}
/* Query it for existing applications */
@@ -516,6 +534,22 @@ application_removed (DBusGProxy * proxy, gint position, IndicatorApplication * a
return;
}
+/* The callback for the signal that the label for an application
+ has changed. */
+static void
+application_label_changed (DBusGProxy * proxy, gint position, const gchar * label, const gchar * guide, IndicatorApplication * application)
+{
+ IndicatorApplicationPrivate * priv = INDICATOR_APPLICATION_GET_PRIVATE(application);
+ ApplicationEntry * app = (ApplicationEntry *)g_list_nth_data(priv->applications, position);
+
+ if (app == NULL) {
+ g_warning("Unable to find application at position: %d", position);
+ return;
+ }
+
+ return;
+}
+
/* The callback for the signal that the icon for an application
has changed. */
static void