summaryrefslogtreecommitdiff
path: root/src/shell-app-system.c
diff options
context:
space:
mode:
authorJasper St. Pierre <jstpierre@mecheye.net>2013-09-26 17:11:45 -0400
committerJasper St. Pierre <jstpierre@mecheye.net>2013-11-07 16:35:03 -0500
commite10d2a68f3d00d9df7ba37d77feb5356989ecafa (patch)
treeecf36b0c4f911a89d138b6d5a0d94565be4f1165 /src/shell-app-system.c
parent213ee8d3817c4ee10c0381c0649028ba01a70d00 (diff)
app-system: Put back support for the installed-changed signal
Use the new GAppInfoMonitor that Ryan added to glib to know when the set of apps has changed. https://bugzilla.gnome.org/show_bug.cgi?id=711631
Diffstat (limited to 'src/shell-app-system.c')
-rw-r--r--src/shell-app-system.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/shell-app-system.c b/src/shell-app-system.c
index 47629099..d9c57e0f 100644
--- a/src/shell-app-system.c
+++ b/src/shell-app-system.c
@@ -72,9 +72,19 @@ static void shell_app_system_class_init(ShellAppSystemClass *klass)
}
static void
+installed_changed (GAppInfoMonitor *monitor,
+ gpointer user_data)
+{
+ ShellAppSystem *self = user_data;
+
+ g_signal_emit (self, signals[INSTALLED_CHANGED], 0, NULL);
+}
+
+static void
shell_app_system_init (ShellAppSystem *self)
{
ShellAppSystemPrivate *priv;
+ GAppInfoMonitor *monitor;
self->priv = priv = G_TYPE_INSTANCE_GET_PRIVATE (self,
SHELL_TYPE_APP_SYSTEM,
@@ -86,6 +96,10 @@ shell_app_system_init (ShellAppSystem *self)
(GDestroyNotify)g_object_unref);
priv->startup_wm_class_to_id = g_hash_table_new (g_str_hash, g_str_equal);
+
+ monitor = g_app_info_monitor_get ();
+ g_signal_connect (monitor, "changed", G_CALLBACK (installed_changed), self);
+ installed_changed (monitor, self);
}
static void