Add "Running System" button in media selection
authorNikos Skalkotos <skalkoto@grnet.gr>
Wed, 21 Nov 2012 08:26:31 +0000 (10:26 +0200)
committerNikos Skalkotos <skalkoto@grnet.gr>
Wed, 21 Nov 2012 08:26:31 +0000 (10:26 +0200)
This can be used to create an image out of a live system. This
functionality is not yet implemented.

image_creator/dialog_main.py

index f9dd260..4071018 100644 (file)
@@ -141,14 +141,16 @@ def select_file(d, media):
             else:
                 break
 
             else:
                 break
 
-        (code, media) = d.fselect(root, 10, 50,
-                                  title="Please select input media")
+        (code, media) = d.fselect(root, 10, 60, extra_button=1,
+            title="Please select an input media.", extra_label="Running System")
         if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
             if confirm_exit(d, "You canceled the media selection dialog box."):
                 sys.exit(0)
             else:
                 media = None
                 continue
         if code in (d.DIALOG_CANCEL, d.DIALOG_ESC):
             if confirm_exit(d, "You canceled the media selection dialog box."):
                 sys.exit(0)
             else:
                 media = None
                 continue
+        elif code == d.DIALOG_EXTRA:
+            media = '/'
 
     return media
 
 
     return media