Merge lp:~roadmr/checkbox/925603 into lp:checkbox

Proposed by Daniel Manrique
Status: Merged
Merged at revision: 1228
Proposed branch: lp:~roadmr/checkbox/925603
Merge into: lp:checkbox
Diff against target: 53 lines (+12/-7)
2 files modified
checkbox/user_interface.py (+6/-6)
debian/changelog (+6/-1)
To merge this branch: bzr merge lp:~roadmr/checkbox/925603
Reviewer Review Type Date Requested Status
Marc Tardif (community) Approve
Review via email: mp+91710@code.launchpad.net

Description of the change

Fixes the linked bug with a way of retrieving the user's preferred browser in a way that works better with Gnome3. The actual culprit is the Chromium package which assumes the user *wants* it as the default browser and configures itself in /etc/alternatives, which doesn't match up with Gnome's way of configuring the default browser.

To post a comment you must log in.
Revision history for this message
Marc Tardif (cr3) wrote :

Ugh, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
=== modified file 'checkbox/user_interface.py'
--- checkbox/user_interface.py 2011-12-15 15:55:25 +0000
+++ checkbox/user_interface.py 2012-02-06 20:08:46 +0000
@@ -1,7 +1,7 @@
1#1#
2# This file is part of Checkbox.2# This file is part of Checkbox.
3#3#
4# Copyright 2008 Canonical Ltd.4# Copyright 2008-2012 Canonical Ltd.
5#5#
6# Checkbox is free software: you can redistribute it and/or modify6# Checkbox is free software: you can redistribute it and/or modify
7# it under the terms of the GNU General Public License as published by7# it under the terms of the GNU General Public License as published by
@@ -27,6 +27,8 @@
27import gettext27import gettext
28from gettext import gettext as _28from gettext import gettext as _
2929
30from gi.repository import Gio
31
30from checkbox.contrib.REThread import REThread32from checkbox.contrib.REThread import REThread
3133
32from checkbox.lib.environ import add_variable, get_variable, remove_variable34from checkbox.lib.environ import add_variable, get_variable, remove_variable
@@ -177,11 +179,9 @@
177 if os.getenv("DISPLAY") and \179 if os.getenv("DISPLAY") and \
178 subprocess.call(["pgrep", "-x", "-u", str(uid), "gnome-panel|gconfd-2"],180 subprocess.call(["pgrep", "-x", "-u", str(uid), "gnome-panel|gconfd-2"],
179 stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0:181 stdout=subprocess.PIPE, stderr=subprocess.PIPE) == 0:
180 gct = subprocess.Popen(sudo_prefix + ["gconftool", "--get",182 preferred_xml_app = Gio.app_info_get_default_for_type("application/xml",False)
181 "/desktop/gnome/url-handlers/http/command"],183 if preferred_xml_app:
182 stdout=subprocess.PIPE, stderr=subprocess.PIPE)184 preferred_browser = preferred_xml_app.get_executable()
183 if gct.wait() == 0:
184 preferred_browser = gct.communicate()[0]
185 browser = re.match("((firefox|seamonkey|flock)[^\s]*)", preferred_browser)185 browser = re.match("((firefox|seamonkey|flock)[^\s]*)", preferred_browser)
186 if browser:186 if browser:
187 subprocess.call(sudo_prefix + [browser.group(0), "-new-window", url])187 subprocess.call(sudo_prefix + [browser.group(0), "-new-window", url])
188188
=== modified file 'debian/changelog'
--- debian/changelog 2012-02-03 23:08:37 +0000
+++ debian/changelog 2012-02-06 20:08:46 +0000
@@ -9,7 +9,12 @@
9 * Removed trailing directories from the devpath of disk devices (LP: #925582)9 * Removed trailing directories from the devpath of disk devices (LP: #925582)
10 * Fixed awk regular expression in max_diskspace_used script (LP: #926312)10 * Fixed awk regular expression in max_diskspace_used script (LP: #926312)
1111
12 -- Marc Tardif <marc@ubuntu.com> Fri, 03 Feb 2012 15:23:06 -050012 [Daniel Manrique]
13 * Changed way of obtaining preferred browser to ensure we honor the user's
14 preference rather than Chromium's clobbering of
15 /etc/alternatives/gnome-www-browser (LP: #925603)
16
17 -- Daniel Manrique <daniel.manrique@canonical.com> Mon, 06 Feb 2012 14:55:58 -0500
1318
14checkbox (0.13.1) precise; urgency=low19checkbox (0.13.1) precise; urgency=low
1520

Subscribers

People subscribed via source and target branches