From 98649f9397513ecc8cc6598e0032cd0682c0bf5c Mon Sep 17 00:00:00 2001 From: Ray Strode Date: Wed, 7 Sep 2011 15:20:10 -0400 Subject: [PATCH] apps: handle 'app-state-changed' move in shell-app-usage commit 0af108211c4f5d3511b085313587e8d5541e51bb moved which object the app-state-changed signal is emitted from. This commit updates shell-app-usage.c to keep up with the times. https://bugzilla.gnome.org/show_bug.cgi?id=658503 --- src/shell-app-usage.c | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/src/shell-app-usage.c b/src/shell-app-usage.c index 698dc8f19..7b7fe96e8 100644 --- a/src/shell-app-usage.c +++ b/src/shell-app-usage.c @@ -307,9 +307,9 @@ increment_usage_for_app (ShellAppUsage *self, } static void -on_app_state_changed (ShellWindowTracker *tracker, - ShellApp *app, - gpointer user_data) +on_app_state_changed (ShellAppSystem *app_system, + ShellApp *app, + gpointer user_data) { ShellAppUsage *self = SHELL_APP_USAGE (user_data); UsageData *usage; @@ -391,6 +391,7 @@ shell_app_usage_init (ShellAppUsage *self) char *shell_userdata_dir, *path; GDBusConnection *session_bus; ShellWindowTracker *tracker; + ShellAppSystem *app_system; global = shell_global_get (); @@ -398,7 +399,9 @@ shell_app_usage_init (ShellAppUsage *self) tracker = shell_window_tracker_get_default (); g_signal_connect (tracker, "notify::focus-app", G_CALLBACK (on_focus_app_changed), self); - g_signal_connect (tracker, "app-state-changed", G_CALLBACK (on_app_state_changed), self); + + app_system = shell_app_system_get_default (); + g_signal_connect (app_system, "app-state-changed", G_CALLBACK (on_app_state_changed), self); session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL); self->session_proxy = g_dbus_proxy_new_sync (session_bus,