ShellWindowTracker: Rename self variable for consistency

Historically it was monitor, now tracker.

(I want to move more things to self, but that's a different bug).

https://bugzilla.gnome.org/show_bug.cgi?id=648149
This commit is contained in:
Colin Walters 2011-08-11 06:37:24 -04:00
parent 2efcbaf206
commit d25610903a
2 changed files with 24 additions and 24 deletions

View File

@ -78,8 +78,8 @@ static void set_focus_app (ShellWindowTracker *tracker,
ShellApp *new_focus_app); ShellApp *new_focus_app);
static void on_focus_window_changed (MetaDisplay *display, GParamSpec *spec, ShellWindowTracker *tracker); static void on_focus_window_changed (MetaDisplay *display, GParamSpec *spec, ShellWindowTracker *tracker);
static void track_window (ShellWindowTracker *monitor, MetaWindow *window); static void track_window (ShellWindowTracker *tracker, MetaWindow *window);
static void disassociate_window (ShellWindowTracker *monitor, MetaWindow *window); static void disassociate_window (ShellWindowTracker *tracker, MetaWindow *window);
static void static void
@ -261,7 +261,7 @@ get_app_from_window_wmclass (MetaWindow *window)
* Return value: (transfer full): A newly-referenced #ShellApp, or %NULL * Return value: (transfer full): A newly-referenced #ShellApp, or %NULL
*/ */
static ShellApp* static ShellApp*
get_app_from_window_group (ShellWindowTracker *monitor, get_app_from_window_group (ShellWindowTracker *tracker,
MetaWindow *window) MetaWindow *window)
{ {
ShellApp *result; ShellApp *result;
@ -285,7 +285,7 @@ get_app_from_window_group (ShellWindowTracker *monitor,
if (meta_window_get_window_type (group_window) != META_WINDOW_NORMAL) if (meta_window_get_window_type (group_window) != META_WINDOW_NORMAL)
continue; continue;
result = g_hash_table_lookup (monitor->window_to_app, group_window); result = g_hash_table_lookup (tracker->window_to_app, group_window);
if (result) if (result)
break; break;
} }
@ -300,7 +300,7 @@ get_app_from_window_group (ShellWindowTracker *monitor,
/** /**
* get_app_from_window_pid: * get_app_from_window_pid:
* @monitor: a #ShellWindowTracker * @tracker: a #ShellWindowTracker
* @window: a #MetaWindow * @window: a #MetaWindow
* *
* Check if the pid associated with @window corresponds to an * Check if the pid associated with @window corresponds to an
@ -340,7 +340,7 @@ get_app_from_window_pid (ShellWindowTracker *tracker,
* Returns: (transfer full): a #ShellApp, or NULL if none is found * Returns: (transfer full): a #ShellApp, or NULL if none is found
*/ */
static ShellApp * static ShellApp *
get_app_for_window (ShellWindowTracker *monitor, get_app_for_window (ShellWindowTracker *tracker,
MetaWindow *window) MetaWindow *window)
{ {
ShellApp *result = NULL; ShellApp *result = NULL;
@ -352,7 +352,7 @@ get_app_for_window (ShellWindowTracker *monitor,
if (meta_window_get_window_type (window) == META_WINDOW_NORMAL if (meta_window_get_window_type (window) == META_WINDOW_NORMAL
|| meta_window_is_remote (window)) || meta_window_is_remote (window))
{ {
result = g_hash_table_lookup (monitor->window_to_app, window); result = g_hash_table_lookup (tracker->window_to_app, window);
if (result != NULL) if (result != NULL)
{ {
g_object_ref (result); g_object_ref (result);
@ -370,7 +370,7 @@ get_app_for_window (ShellWindowTracker *monitor,
if (result != NULL) if (result != NULL)
return result; return result;
result = get_app_from_window_pid (monitor, window); result = get_app_from_window_pid (tracker, window);
if (result != NULL) if (result != NULL)
return result; return result;
@ -380,7 +380,7 @@ get_app_for_window (ShellWindowTracker *monitor,
{ {
GSList *iter, *sequences; GSList *iter, *sequences;
sequences = shell_window_tracker_get_startup_sequences (monitor); sequences = shell_window_tracker_get_startup_sequences (tracker);
for (iter = sequences; iter; iter = iter->next) for (iter = sequences; iter; iter = iter->next)
{ {
ShellStartupSequence *sequence = iter->data; ShellStartupSequence *sequence = iter->data;
@ -401,7 +401,7 @@ get_app_for_window (ShellWindowTracker *monitor,
* any other windows in the group. * any other windows in the group.
*/ */
if (result == NULL) if (result == NULL)
result = get_app_from_window_group (monitor, window); result = get_app_from_window_group (tracker, window);
/* Our last resort - we create a fake app from the window */ /* Our last resort - we create a fake app from the window */
if (result == NULL) if (result == NULL)
@ -510,7 +510,7 @@ shell_window_tracker_on_window_removed (MetaWorkspace *workspace,
} }
static void static void
load_initial_windows (ShellWindowTracker *monitor) load_initial_windows (ShellWindowTracker *tracker)
{ {
GList *workspaces, *iter; GList *workspaces, *iter;
MetaScreen *screen = shell_global_get_screen (shell_global_get ()); MetaScreen *screen = shell_global_get_screen (shell_global_get ());
@ -525,7 +525,7 @@ load_initial_windows (ShellWindowTracker *monitor)
for (window_iter = windows; window_iter; window_iter = window_iter->next) for (window_iter = windows; window_iter; window_iter = window_iter->next)
{ {
MetaWindow *window = window_iter->data; MetaWindow *window = window_iter->data;
track_window (monitor, window); track_window (tracker, window);
} }
g_list_free (windows); g_list_free (windows);
@ -649,14 +649,14 @@ shell_window_tracker_finalize (GObject *object)
/** /**
* shell_window_tracker_get_window_app: * shell_window_tracker_get_window_app:
* @monitor: An app monitor instance * @tracker: An app monitor instance
* @metawin: A #MetaWindow * @metawin: A #MetaWindow
* *
* Returns: (transfer full): Application associated with window * Returns: (transfer full): Application associated with window
*/ */
ShellApp * ShellApp *
shell_window_tracker_get_window_app (ShellWindowTracker *monitor, shell_window_tracker_get_window_app (ShellWindowTracker *tracker,
MetaWindow *metawin) MetaWindow *metawin)
{ {
MetaWindow *transient_for; MetaWindow *transient_for;
ShellApp *app; ShellApp *app;
@ -665,7 +665,7 @@ shell_window_tracker_get_window_app (ShellWindowTracker *monitor,
if (transient_for != NULL) if (transient_for != NULL)
metawin = transient_for; metawin = transient_for;
app = g_hash_table_lookup (monitor->window_to_app, metawin); app = g_hash_table_lookup (tracker->window_to_app, metawin);
if (app) if (app)
g_object_ref (app); g_object_ref (app);
@ -718,7 +718,7 @@ shell_window_tracker_get_app_from_pid (ShellWindowTracker *self,
/** /**
* shell_window_tracker_get_running_apps: * shell_window_tracker_get_running_apps:
* @monitor: An app monitor instance * @tracker: An app monitor instance
* @context: Activity identifier * @context: Activity identifier
* *
* Returns the set of applications which currently have at least one open * Returns the set of applications which currently have at least one open
@ -728,21 +728,21 @@ shell_window_tracker_get_app_from_pid (ShellWindowTracker *self,
* Returns: (element-type ShellApp) (transfer full): Active applications * Returns: (element-type ShellApp) (transfer full): Active applications
*/ */
GSList * GSList *
shell_window_tracker_get_running_apps (ShellWindowTracker *monitor, shell_window_tracker_get_running_apps (ShellWindowTracker *tracker,
const char *context) const char *context)
{ {
gpointer key, value; gpointer key, value;
GSList *ret; GSList *ret;
GHashTableIter iter; GHashTableIter iter;
g_hash_table_iter_init (&iter, monitor->running_apps); g_hash_table_iter_init (&iter, tracker->running_apps);
ret = NULL; ret = NULL;
while (g_hash_table_iter_next (&iter, &key, &value)) while (g_hash_table_iter_next (&iter, &key, &value))
{ {
ShellApp *app = value; ShellApp *app = value;
if (strcmp (context, _shell_window_tracker_get_app_context (monitor, app)) != 0) if (strcmp (context, _shell_window_tracker_get_app_context (tracker, app)) != 0)
continue; continue;
ret = g_slist_prepend (ret, g_object_ref (app)); ret = g_slist_prepend (ret, g_object_ref (app));

View File

@ -31,12 +31,12 @@ GType shell_window_tracker_get_type (void) G_GNUC_CONST;
ShellWindowTracker* shell_window_tracker_get_default(void); ShellWindowTracker* shell_window_tracker_get_default(void);
GSList * shell_window_tracker_get_running_apps (ShellWindowTracker *monitor, GSList * shell_window_tracker_get_running_apps (ShellWindowTracker *tracker,
const char *context); const char *context);
ShellApp *shell_window_tracker_get_window_app (ShellWindowTracker *monitor, MetaWindow *metawin); ShellApp *shell_window_tracker_get_window_app (ShellWindowTracker *tracker, MetaWindow *metawin);
ShellApp *shell_window_tracker_get_app_from_pid (ShellWindowTracker *monitor, int pid); ShellApp *shell_window_tracker_get_app_from_pid (ShellWindowTracker *tracker, int pid);
gboolean shell_window_tracker_is_window_interesting (MetaWindow *window); gboolean shell_window_tracker_is_window_interesting (MetaWindow *window);