apps: handle 'app-state-changed' move in shell-app-usage

commit 0af108211c 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
This commit is contained in:
Ray Strode 2011-09-07 15:20:10 -04:00
parent 45a1ceaa54
commit 98649f9397

View File

@ -307,9 +307,9 @@ increment_usage_for_app (ShellAppUsage *self,
} }
static void static void
on_app_state_changed (ShellWindowTracker *tracker, on_app_state_changed (ShellAppSystem *app_system,
ShellApp *app, ShellApp *app,
gpointer user_data) gpointer user_data)
{ {
ShellAppUsage *self = SHELL_APP_USAGE (user_data); ShellAppUsage *self = SHELL_APP_USAGE (user_data);
UsageData *usage; UsageData *usage;
@ -391,6 +391,7 @@ shell_app_usage_init (ShellAppUsage *self)
char *shell_userdata_dir, *path; char *shell_userdata_dir, *path;
GDBusConnection *session_bus; GDBusConnection *session_bus;
ShellWindowTracker *tracker; ShellWindowTracker *tracker;
ShellAppSystem *app_system;
global = shell_global_get (); global = shell_global_get ();
@ -398,7 +399,9 @@ shell_app_usage_init (ShellAppUsage *self)
tracker = shell_window_tracker_get_default (); tracker = shell_window_tracker_get_default ();
g_signal_connect (tracker, "notify::focus-app", G_CALLBACK (on_focus_app_changed), self); 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); session_bus = g_bus_get_sync (G_BUS_TYPE_SESSION, NULL, NULL);
self->session_proxy = g_dbus_proxy_new_sync (session_bus, self->session_proxy = g_dbus_proxy_new_sync (session_bus,