Merge lp:~lucian.grijincu/usb-creator/search-desktop-for-iso into lp:usb-creator

Proposed by Lucian Adrian Grijincu
Status: Merged
Merged at revision: 393
Proposed branch: lp:~lucian.grijincu/usb-creator/search-desktop-for-iso
Merge into: lp:usb-creator
Diff against target: 23 lines (+7/-6)
1 file modified
usbcreator/frontends/gtk/frontend.py (+7/-6)
To merge this branch: bzr merge lp:~lucian.grijincu/usb-creator/search-desktop-for-iso
Reviewer Review Type Date Requested Status
Dimitri John Ledkov Approve
Review via email: mp+57870@code.launchpad.net

Description of the change

Fix for https://launchpad.net/bugs/761646.
Search Desktop for iso files too.

To post a comment you must log in.
Revision history for this message
Dimitri John Ledkov (xnox) wrote :

Thank you for this merge proposal.
As this is an Ubuntu native package we keep a single changelog in debian/changelog such that bugs will be closed upon upload.
You can use: dch and debcommit. To edit the debian/changelog & make a commit with the same message and correct --fixes passed to bzr.

I have used the following changelog entry:
  * Search Desktop in addition to Downloads directory for ISOs. Thanks to
    Lucian Adrian Grijincu (LP: #761646)

I had to also fix up the glib -> GLib, since usb-creator has now been ported to python-gi. But that's ok, since the merge proposal has been lingering for a while here.

Thanks a lot.

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'usbcreator/frontends/gtk/frontend.py'
2--- usbcreator/frontends/gtk/frontend.py 2011-02-15 17:16:21 +0000
3+++ usbcreator/frontends/gtk/frontend.py 2011-04-15 13:13:35 +0000
4@@ -155,12 +155,13 @@
5 self.backend.add_image(img)
6 self.source_vbox.hide()
7
8- download_dir = glib.get_user_special_dir(glib.USER_DIRECTORY_DOWNLOAD)
9- if download_dir and os.path.isdir(download_dir):
10- # TODO evand 2009-10-22: File type detection based on file(1).
11- for fname in os.listdir(download_dir):
12- if fname.endswith('.iso') or fname.endswith('.img'):
13- self.backend.add_image(os.path.join(download_dir, fname))
14+ for search_dir_id in [glib.USER_DIRECTORY_DOWNLOAD, glib.USER_DIRECTORY_DESKTOP]:
15+ search_dir = glib.get_user_special_dir(search_dir_id)
16+ if search_dir and os.path.isdir(search_dir):
17+ # TODO evand 2009-10-22: File type detection based on file(1).
18+ for fname in os.listdir(search_dir):
19+ if fname.endswith('.iso') or fname.endswith('.img'):
20+ self.backend.add_image(os.path.join(search_dir, fname))
21
22 # Sets first pre-populated image as current in the backend
23 self.selection_changed_source(self.source_treeview.get_selection())

Subscribers

People subscribed via source and target branches