Merge lp:~mitya57/network-manager-applet/lp1440009 into lp:~network-manager/network-manager-applet/ubuntu

Proposed by Dmitry Shachnev
Status: Merged
Approved by: Mathieu Trudel-Lapierre
Approved revision: 454
Merged at revision: 454
Proposed branch: lp:~mitya57/network-manager-applet/lp1440009
Merge into: lp:~network-manager/network-manager-applet/ubuntu
Diff against target: 74 lines (+54/-0)
3 files modified
debian/changelog (+6/-0)
debian/patches/lp1440009_flashback.patch (+47/-0)
debian/patches/series (+1/-0)
To merge this branch: bzr merge lp:~mitya57/network-manager-applet/lp1440009
Reviewer Review Type Date Requested Status
Mathieu Trudel-Lapierre Approve
Network-manager Pending
Review via email: mp+255224@code.launchpad.net

Description of the change

We would like to have this patch in network-manager-applet *only for Vivid*. Please see LP: #1440009 for details.

As Alberts points out in that bug, the next version of gnome-flashback will set ShellVersion, which will make network-manager-applet think that the desktop is just old version of gnome-shell and behave correctly.

To post a comment you must log in.
Revision history for this message
Mathieu Trudel-Lapierre (cyphermox) wrote :

Full ack, looks fine.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'debian/changelog'
--- debian/changelog 2015-04-01 21:30:38 +0000
+++ debian/changelog 2015-04-04 09:40:36 +0000
@@ -1,3 +1,9 @@
1network-manager-applet (0.9.10.1-0ubuntu3) UNRELEASED; urgency=medium
2
3 * Do not misdetect GNOME Flashback as GNOME Shell (LP: #1440009).
4
5 -- Dmitry Shachnev <mitya57@ubuntu.com> Fri, 03 Apr 2015 15:04:29 +0300
6
1network-manager-applet (0.9.10.1-0ubuntu2) vivid; urgency=medium7network-manager-applet (0.9.10.1-0ubuntu2) vivid; urgency=medium
28
3 * debian/patches/nm-applet-use-indicator.patch: initialize GSList dupes var9 * debian/patches/nm-applet-use-indicator.patch: initialize GSList dupes var
410
=== added file 'debian/patches/lp1440009_flashback.patch'
--- debian/patches/lp1440009_flashback.patch 1970-01-01 00:00:00 +0000
+++ debian/patches/lp1440009_flashback.patch 2015-04-04 09:40:36 +0000
@@ -0,0 +1,47 @@
1Description: do not unregister the agent under GNOME Flashback
2 GNOME Flashback owns the org.gnome.Shell name, but does not (currently)
3 export ShellVersion, which is causing problems in nm-applet.
4Author: Dmitry Shachnev <mitya57@ubuntu.com>
5Forwarded: not-needed
6Last-Update: 2015-04-03
7
8--- a/src/applet.c
9+++ b/src/applet.c
10@@ -4113,6 +4113,28 @@
11 gtk_status_icon_set_visible (applet->status_icon, applet->visible);
12 }
13
14+static gboolean is_gnome_flashback ()
15+{
16+ const gchar *xdg_current_desktop;
17+ gchar **desktop_names;
18+ int i;
19+ gboolean result;
20+
21+ result = FALSE;
22+ xdg_current_desktop = g_getenv ("XDG_CURRENT_DESKTOP");
23+ if (xdg_current_desktop != NULL) {
24+ desktop_names = g_strsplit (xdg_current_desktop, ":", 0);
25+ for (i = 0; desktop_names[i]; ++i) {
26+ if (!g_strcmp0 (desktop_names[i], "GNOME-Flashback")) {
27+ result = TRUE;
28+ break;
29+ }
30+ }
31+ g_strfreev (desktop_names);
32+ }
33+ return result;
34+}
35+
36 static gboolean
37 initable_init (GInitable *initable, GCancellable *cancellable, GError **error)
38 {
39@@ -4221,7 +4243,7 @@
40 applet_embedded_cb (G_OBJECT (applet->status_icon), NULL, NULL);
41
42 /* Watch GNOME Shell so we can unregister our applet agent if it appears */
43- if (!shell_debug) {
44+ if (!shell_debug && !is_gnome_flashback ()) {
45 applet->shell_watcher = nm_shell_watcher_new ();
46 g_signal_connect (applet->shell_watcher,
47 "notify::shell-version",
048
=== modified file 'debian/patches/series'
--- debian/patches/series 2015-04-01 20:59:33 +0000
+++ debian/patches/series 2015-04-04 09:40:36 +0000
@@ -14,3 +14,4 @@
1411-user-connections.patch1411-user-connections.patch
15ubuntu_dont_autostart_under_GNOME.patch15ubuntu_dont_autostart_under_GNOME.patch
16hide_virtual_devices.patch16hide_virtual_devices.patch
17lp1440009_flashback.patch

Subscribers

People subscribed via source and target branches