aboutsummaryrefslogtreecommitdiff
path: root/src/indicator-application.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/indicator-application.c')
-rw-r--r--src/indicator-application.c15
1 files changed, 5 insertions, 10 deletions
diff --git a/src/indicator-application.c b/src/indicator-application.c
index fc7f56d..ef11179 100644
--- a/src/indicator-application.c
+++ b/src/indicator-application.c
@@ -304,6 +304,10 @@ application_added (DBusGProxy * proxy, const gchar * iconname, gint position, co
app->entry.label = NULL;
app->entry.menu = GTK_MENU(dbusmenu_gtkmenu_new((gchar *)dbusaddress, (gchar *)dbusobject));
+ /* Keep copies of these for ourself, just in case. */
+ g_object_ref(app->entry.image);
+ g_object_ref(app->entry.menu);
+
gtk_widget_show(GTK_WIDGET(app->entry.image));
priv->applications = g_list_insert(priv->applications, app, position);
@@ -383,18 +387,9 @@ get_applications (DBusGProxy *proxy, GPtrArray *OUT_applications, GError *error,
static void
get_applications_helper (gpointer data, gpointer user_data)
{
-#if 0
- GType structype = dbus_g_type_get_struct("GValueArray",
- G_TYPE_STRING,
- G_TYPE_INT,
- G_TYPE_STRING,
- DBUS_TYPE_G_OBJECT_PATH,
- G_TYPE_STRING,
- G_TYPE_INVALID);
-#endif
GValueArray * array = (GValueArray *)data;
- g_debug("Size: %d", array->n_values);
+ g_return_if_fail(array->n_values == 5);
const gchar * icon_name = g_value_get_string(g_value_array_get_nth(array, 0));
gint position = g_value_get_int(g_value_array_get_nth(array, 1));