Merge lp:~xnox/usb-creator/sensetivity into lp:usb-creator

Proposed by Dimitri John Ledkov
Status: Merged
Merged at revision: 313
Proposed branch: lp:~xnox/usb-creator/sensetivity
Merge into: lp:usb-creator
Diff against target: 55 lines (+7/-6)
3 files modified
debian/changelog (+1/-0)
gui/usbcreator-gtk.ui (+1/-0)
usbcreator/frontends/gtk/frontend.py (+5/-6)
To merge this branch: bzr merge lp:~xnox/usb-creator/sensetivity
Reviewer Review Type Date Requested Status
Evan (community) Approve
Review via email: mp+27536@code.launchpad.net

Description of the change

Splitting out the commit that fixes install button sensitive issue out of the "infobar / missing iso" notification branch.

To post a comment you must log in.
Revision history for this message
Evan (ev) wrote :

Looks good.

review: Approve

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 2010-05-27 15:13:58 +0000
3+++ debian/changelog 2010-06-14 17:18:26 +0000
4@@ -42,6 +42,7 @@
5
6 * Use XDG_CACHE_DIR for usb-creator.log
7 * Use XDG IconTheme spec for window icons (LP: #535061)
8+ * Fix install button sensetivity (LP: #582531)
9
10 [ Ignace Mouzannar ]
11 * Initial Debian release (Closes: #582884, #576359)
12
13=== modified file 'gui/usbcreator-gtk.ui'
14--- gui/usbcreator-gtk.ui 2010-05-18 16:00:05 +0000
15+++ gui/usbcreator-gtk.ui 2010-06-14 17:18:26 +0000
16@@ -389,6 +389,7 @@
17 <object class="GtkButton" id="button_install">
18 <property name="label" translatable="yes">Make Startup Disk</property>
19 <property name="visible">True</property>
20+ <property name="sensitive">False</property>
21 <property name="can_focus">True</property>
22 <property name="can_default">True</property>
23 <property name="has_default">True</property>
24
25=== modified file 'usbcreator/frontends/gtk/frontend.py'
26--- usbcreator/frontends/gtk/frontend.py 2010-05-21 04:09:58 +0000
27+++ usbcreator/frontends/gtk/frontend.py 2010-06-14 17:18:26 +0000
28@@ -161,6 +161,9 @@
29 if fname.endswith('.iso') or fname.endswith('.img'):
30 self.backend.add_image(os.path.join(download_dir, fname))
31
32+ # Sets first pre-populated image as current in the backend
33+ self.selection_changed_source(self.source_treeview.get_selection())
34+
35 if not persistent:
36 self.persist_disabled.set_active(True)
37 self.persist_vbox.hide()
38@@ -441,15 +444,11 @@
39 # Update install button state.
40 status = target['status']
41 source = self.backend.get_current_source()
42- if status == CAN_USE:
43- self.button_install.set_sensitive(True)
44- else:
45- self.button_install.set_sensitive(False)
46 if not source:
47+ self.button_install.set_sensitive(False)
48 return
49 stype = self.backend.sources[source]['type']
50- if (self.button_install.get_property('sensitive')
51- and stype == SOURCE_IMG):
52+ if status == CAN_USE and stype in (SOURCE_IMG, SOURCE_ISO):
53 self.button_install.set_sensitive(True)
54 else:
55 self.button_install.set_sensitive(False)

Subscribers

People subscribed via source and target branches