usb-creator-hackers team mailing list archive
-
usb-creator-hackers team
-
Mailing list archive
-
Message #00105
[Merge] lp:~lucian.grijincu/usb-creator/search-desktop-for-iso into lp:usb-creator
Lucian Adrian Grijincu has proposed merging lp:~lucian.grijincu/usb-creator/search-desktop-for-iso into lp:usb-creator.
Requested reviews:
usb-creator hackers (usb-creator-hackers)
Related bugs:
Bug #761646 in usb-creator (Ubuntu): "iso from desktop not automatically detected"
https://bugs.launchpad.net/ubuntu/+source/usb-creator/+bug/761646
For more details, see:
https://code.launchpad.net/~lucian.grijincu/usb-creator/search-desktop-for-iso/+merge/57870
Fix for https://launchpad.net/bugs/761646.
Search Desktop for iso files too.
--
https://code.launchpad.net/~lucian.grijincu/usb-creator/search-desktop-for-iso/+merge/57870
Your team usb-creator hackers is requested to review the proposed merge of lp:~lucian.grijincu/usb-creator/search-desktop-for-iso into lp:usb-creator.
=== modified file 'usbcreator/frontends/gtk/frontend.py'
--- usbcreator/frontends/gtk/frontend.py 2011-02-15 17:16:21 +0000
+++ usbcreator/frontends/gtk/frontend.py 2011-04-15 13:13:35 +0000
@@ -155,12 +155,13 @@
self.backend.add_image(img)
self.source_vbox.hide()
- download_dir = glib.get_user_special_dir(glib.USER_DIRECTORY_DOWNLOAD)
- if download_dir and os.path.isdir(download_dir):
- # TODO evand 2009-10-22: File type detection based on file(1).
- for fname in os.listdir(download_dir):
- if fname.endswith('.iso') or fname.endswith('.img'):
- self.backend.add_image(os.path.join(download_dir, fname))
+ for search_dir_id in [glib.USER_DIRECTORY_DOWNLOAD, glib.USER_DIRECTORY_DESKTOP]:
+ search_dir = glib.get_user_special_dir(search_dir_id)
+ if search_dir and os.path.isdir(search_dir):
+ # TODO evand 2009-10-22: File type detection based on file(1).
+ for fname in os.listdir(search_dir):
+ if fname.endswith('.iso') or fname.endswith('.img'):
+ self.backend.add_image(os.path.join(search_dir, fname))
# Sets first pre-populated image as current in the backend
self.selection_changed_source(self.source_treeview.get_selection())
Follow ups