Merge lp:~maco.m/ubiquity/791446 into lp:ubiquity

Proposed by Mackenzie Morgan
Status: Merged
Merged at revision: 4758
Proposed branch: lp:~maco.m/ubiquity/791446
Merge into: lp:ubiquity
Diff against target: 56 lines (+16/-3)
2 files modified
debian/changelog (+7/-0)
ubiquity/plugins/ubi-prepare.py (+9/-3)
To merge this branch: bzr merge lp:~maco.m/ubiquity/791446
Reviewer Review Type Date Requested Status
Evan (community) Needs Fixing
Review via email: mp+63197@code.launchpad.net

Description of the change

make ubi-prepare.py use Qt API when using Qt widgets instead of trying to use the GTK API on them

To post a comment you must log in.
lp:~maco.m/ubiquity/791446 updated
4746. By Mackenzie Morgan

debian/changelog: fix versions

Revision history for this message
Evan (ev) wrote :

I'd rather not have toolkit-specific code in an abstraction, as it is here. This should be refactored so that the PageGTK and PageKDE classes provide their own methods for setting the UI controls but call into the common code for processing the wget call. This can be most easily accomplished by factoring out the UI calls into a single stub function that check_returncode calls, which both classes provide variants of.

review: Needs Fixing
lp:~maco.m/ubiquity/791446 updated
4747. By Mackenzie Morgan

ubi-prepare.py: check_returncode() calls abstracted functions in PageGtk and Page Kde for checkbutton/checkbox

4748. By Mackenzie Morgan

merge from trunk

Revision history for this message
Mackenzie Morgan (maco.m) wrote :

Is this what you mean?

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'debian/changelog'
2--- debian/changelog 2011-06-08 14:55:06 +0000
3+++ debian/changelog 2011-06-08 17:32:18 +0000
4@@ -1,3 +1,10 @@
5+ubiquity (2.7.6) UNRELEASED; urgency=low
6+
7+ * make ubi-prepare.py handle cases where prepare_download_updates
8+ is Qt too (LP: #791446)
9+
10+ -- Mackenzie Morgan <maco.m@ubuntu.com> Thu, 02 Jun 2011 02:18:12 -0400
11+
12 ubiquity (2.7.5) oneiric; urgency=low
13
14 * Stop installing earth.jpg; it's 250KiB and we no longer use it.
15
16=== modified file 'ubiquity/plugins/ubi-prepare.py'
17--- ubiquity/plugins/ubi-prepare.py 2011-05-31 09:18:59 +0000
18+++ ubiquity/plugins/ubi-prepare.py 2011-06-08 17:32:18 +0000
19@@ -90,9 +90,9 @@
20 if WGET_HASH == h.hexdigest():
21 state = True
22 self.prepare_network_connection.set_state(state)
23- self.prepare_download_updates.set_sensitive(state)
24+ self.set_download_updates(state)
25 if not state:
26- self.prepare_download_updates.set_active(False)
27+ self.enable_download_updates(False)
28 self.controller.dbfilter.set_online_state(state)
29 return False
30
31@@ -158,12 +158,15 @@
32 gobject.source_remove(self.timeout_id)
33 self.timeout_id = gobject.timeout_add(300, self.check_returncode)
34
35+ def enable_download_updates(self, val):
36+ self.prepare_download_updates.set_sensitive(val)
37+
38 def set_download_updates(self, val):
39 self.prepare_download_updates.set_active(val)
40
41 def get_download_updates(self):
42 return self.prepare_download_updates.get_active()
43-
44+
45 def set_allow_nonfree(self, allow):
46 if not allow:
47 self.prepare_nonfree_software.set_active(False)
48@@ -243,6 +246,9 @@
49 self.timer.disconnect(self.timer, SIGNAL("timeout()"),
50 self.check_returncode)
51
52+ def enable_download_updates(self, val):
53+ self.prepare_download_updates.setEnabled(val)
54+
55 def set_download_updates(self, val):
56 self.prepare_download_updates.setChecked(val)
57

Subscribers

People subscribed via source and target branches

to status/vote changes: