aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorLars Uebernickel <lars.uebernickel@canonical.com>2013-08-13 16:04:34 +0200
committerLars Uebernickel <lars.uebernickel@canonical.com>2013-08-13 16:04:34 +0200
commited16f39ed4e571bb75005453b5af33ab737deb6c (patch)
tree062f04b182d737a0ff4f3632c09928529b062ef3 /src
parent4fcb03be88fcd4ce0358db56f311f8c59dc85d44 (diff)
downloadayatana-indicator-messages-ed16f39ed4e571bb75005453b5af33ab737deb6c.tar.gz
ayatana-indicator-messages-ed16f39ed4e571bb75005453b5af33ab737deb6c.tar.bz2
ayatana-indicator-messages-ed16f39ed4e571bb75005453b5af33ab737deb6c.zip
application list: show non-running applications
Diffstat (limited to 'src')
-rw-r--r--src/im-application-list.c3
-rw-r--r--src/messages-service.c12
2 files changed, 14 insertions, 1 deletions
diff --git a/src/im-application-list.c b/src/im-application-list.c
index f87fcec..dd868df 100644
--- a/src/im-application-list.c
+++ b/src/im-application-list.c
@@ -861,6 +861,7 @@ im_application_list_unset_remote (Application *app)
g_action_muxer_insert (app->muxer, "msg-actions", G_ACTION_GROUP (app->message_sub_actions));
im_application_list_update_draws_attention (app->list);
+ g_action_group_change_action_state (G_ACTION_GROUP (app->muxer), "launch", g_variant_new_boolean (FALSE));
if (was_running)
g_signal_emit (app->list, signals[APP_STOPPED], 0, app->id);
@@ -904,6 +905,8 @@ im_application_list_proxy_created (GObject *source_object,
g_signal_connect_swapped (app->proxy, "message-added", G_CALLBACK (im_application_list_message_added), app);
g_signal_connect_swapped (app->proxy, "message-removed", G_CALLBACK (im_application_list_message_removed), app);
+ g_action_group_change_action_state (G_ACTION_GROUP (app->muxer), "launch", g_variant_new_boolean (TRUE));
+
g_bus_watch_name_on_connection (g_dbus_proxy_get_connection (G_DBUS_PROXY (app->proxy)),
g_dbus_proxy_get_name (G_DBUS_PROXY (app->proxy)),
G_BUS_NAME_WATCHER_FLAGS_NONE,
diff --git a/src/messages-service.c b/src/messages-service.c
index efe9602..3d4bcca 100644
--- a/src/messages-service.c
+++ b/src/messages-service.c
@@ -164,9 +164,19 @@ main (int argc, char ** argv)
g_signal_connect (messages_service, "handle-unregister-application",
G_CALLBACK (unregister_application), NULL);
+ applications = im_application_list_new ();
+
settings = g_settings_new ("com.canonical.indicator.messages");
+ {
+ gchar **app_ids;
+ gchar **id;
- applications = im_application_list_new ();
+ app_ids = g_settings_get_strv (settings, "applications");
+ for (id = app_ids; *id; id++)
+ im_application_list_add (applications, *id);
+
+ g_strfreev (app_ids);
+ }
menus = g_hash_table_new_full (g_str_hash, g_str_equal, NULL, g_object_unref);
g_hash_table_insert (menus, "phone", im_phone_menu_new (applications));