Merge ubiquity:wip/launch-browser-properly into ubiquity:master

Proposed by Iain Lane
Status: Merged
Merged at revision: a0fee1c51bb5c26932201275c6adb008a637b0cf
Proposed branch: ubiquity:wip/launch-browser-properly
Merge into: ubiquity:master
Diff against target: 73 lines (+16/-3)
4 files modified
ubiquity/misc.py (+5/-0)
ubiquity/plugins/ubi-language.py (+1/-3)
ubiquity/plugins/ubi-partman.py (+5/-0)
ubiquity/plugins/ubi-prepare.py (+5/-0)
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Review via email: mp+382679@code.launchpad.net
To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) :
review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/ubiquity/misc.py b/ubiquity/misc.py
2index c94fee8..c0b0536 100644
3--- a/ubiquity/misc.py
4+++ b/ubiquity/misc.py
5@@ -906,4 +906,9 @@ def install_size():
6
7 min_install_size = None
8
9+
10+def launch_uri(uri):
11+ subprocess.Popen(['sensible-browser', uri], close_fds=True,
12+ preexec_fn=drop_all_privileges)
13+
14 # vim:ai:et:sts=4:tw=80:sw=4:
15diff --git a/ubiquity/plugins/ubi-language.py b/ubiquity/plugins/ubi-language.py
16index 19c979d..87ee02d 100644
17--- a/ubiquity/plugins/ubi-language.py
18+++ b/ubiquity/plugins/ubi-language.py
19@@ -373,10 +373,8 @@ class PageGtk(PageBase):
20 self.release_notes_label.hide()
21 self.updating_installer = False
22 elif uri == 'release-notes':
23- import subprocess
24 uri = self.release_notes_url.replace('${LANG}', lang)
25- subprocess.Popen(['sensible-browser', uri], close_fds=True,
26- preexec_fn=misc.drop_all_privileges)
27+ misc.launch_uri(uri)
28 return True
29
30
31diff --git a/ubiquity/plugins/ubi-partman.py b/ubiquity/plugins/ubi-partman.py
32index d2bd01d..68a1140 100644
33--- a/ubiquity/plugins/ubi-partman.py
34+++ b/ubiquity/plugins/ubi-partman.py
35@@ -136,6 +136,8 @@ class PageGtk(PageBase):
36 self.page_auto = builder.get_object('stepPartAuto')
37 self.page_advanced = builder.get_object('stepPartAdvanced')
38 self.page_crypto = builder.get_object('stepPartCrypto')
39+ self.bitlocker_label = builder.get_object('label_using_bitlocker')
40+ self.bitlocker_label.connect('activate-link', self.on_link_clicked)
41
42 # Get all objects + add internal child(s)
43 all_widgets = builder.get_object_ids()
44@@ -208,6 +210,9 @@ class PageGtk(PageBase):
45 # Define a list to save grub imformation
46 self.grub_options = []
47
48+ def on_link_clicked(self, widget, uri):
49+ misc.launch_uri(uri)
50+
51 def update_branded_strings(self):
52 release = misc.get_release()
53
54diff --git a/ubiquity/plugins/ubi-prepare.py b/ubiquity/plugins/ubi-prepare.py
55index 1e17587..af3b4d0 100644
56--- a/ubiquity/plugins/ubi-prepare.py
57+++ b/ubiquity/plugins/ubi-prepare.py
58@@ -123,11 +123,16 @@ class PageGtk(PreparePageBase):
59 self.prepare_page = builder.get_object('stepPrepare')
60 self.insufficient_space_page = builder.get_object('stepNoSpace')
61 self.rst_page = builder.get_object('stepRST')
62+ self.rst_label = builder.get_object('label_using_rst')
63+ self.rst_label.connect('activate-link', self.on_link_clicked)
64 self.current_page = self.prepare_page
65 self.plugin_widgets = self.prepare_page
66 self.plugin_optional_widgets = [self.insufficient_space_page,
67 self.rst_page]
68
69+ def on_link_clicked(self, widget, uri):
70+ misc.launch_uri(uri)
71+
72 def plugin_get_current_page(self):
73 return self.current_page
74

Subscribers

People subscribed via source and target branches