Merge lp:~ted/indicator-appmenu/dash-is-now-Dash into lp:indicator-appmenu/0.4

Proposed by Ted Gould
Status: Merged
Merged at revision: 161
Proposed branch: lp:~ted/indicator-appmenu/dash-is-now-Dash
Merge into: lp:indicator-appmenu/0.4
Diff against target: 65 lines (+11/-0)
1 file modified
src/hud-search.c (+11/-0)
To merge this branch: bzr merge lp:~ted/indicator-appmenu/dash-is-now-Dash
Reviewer Review Type Date Requested Status
Indicator Applet Developers Pending
Review via email: mp+93229@code.launchpad.net

Description of the change

It seems that BAMF is reporting the name of dash differently now. So we need to handle the upper case case as well. Also some debug messages.

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/hud-search.c'
2--- src/hud-search.c 2012-02-14 03:05:03 +0000
3+++ src/hud-search.c 2012-02-15 16:01:23 +0000
4@@ -178,6 +178,7 @@
5 return;
6 }
7
8+ g_debug("Requesting menus for window %d", search->priv->active_xid);
9 GError * error = NULL;
10 GVariant * dbusinfo = g_dbus_proxy_call_sync(search->priv->appmenu,
11 "GetMenuForWindow",
12@@ -564,6 +565,7 @@
13 static void
14 active_window_changed (BamfMatcher * matcher, BamfView * oldview, BamfView * newview, gpointer user_data)
15 {
16+ g_debug("Switching windows");
17 HudSearch * self = HUD_SEARCH(user_data);
18
19 if (!BAMF_IS_WINDOW(newview)) { return; }
20@@ -579,6 +581,7 @@
21 /* If BAMF can't match it to an application we probably don't
22 want to be involved with it anyway. */
23 if (desktop == NULL) {
24+ g_debug("\tBlocked: No desktop file");
25 return;
26 }
27
28@@ -597,14 +600,18 @@
29 gint i;
30 for (i = 0; debug_list[i] != NULL; i++) {
31 if (debug_list[i][0] != '\0' && g_strstr_len(desktop, -1, debug_list[i]) != NULL) {
32+ g_debug("\tBlocked: Hit debug list item '%s'", debug_list[i]);
33 return;
34 }
35 }
36
37 /* Ignore the hud prototype window directly */
38 const gchar * window_name = bamf_view_get_name(newview);
39+ g_debug("\tWindow name: '%s'", window_name);
40+
41 if (g_strcmp0(window_name, "Hud Prototype Test") == 0
42 || g_strcmp0(window_name, "Hud") == 0) {
43+ g_debug("\tBlocked: HUD Window Name");
44 return;
45 }
46
47@@ -613,15 +620,19 @@
48 if (g_strcmp0(name, "DNDCollectionWindow") == 0
49 || g_strcmp0(name, "launcher") == 0
50 || g_strcmp0(name, "dash") == 0
51+ || g_strcmp0(name, "Dash") == 0
52 || g_strcmp0(name, "panel") == 0
53 || g_strcmp0(name, "hud") == 0
54 || g_strcmp0(name, "unity-2d-shell") == 0) {
55+ g_debug("\tBlocked: Unity Something");
56 return;
57 }
58
59 self->priv->active_xid = bamf_window_get_xid(window);
60 self->priv->active_app = app;
61
62+ g_debug("\tXID: %u", self->priv->active_xid);
63+
64 return;
65 }
66

Subscribers

People subscribed via source and target branches