aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG5
-rwxr-xr-xlib/isodumper.py18
-rw-r--r--share/isodumper/isodumper.glade87
3 files changed, 72 insertions, 38 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 7ff92e2..bb143f8 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -6,6 +6,11 @@ IsoDumper 0.30
- added function to format the device in Fat32, ntfs or ext4.
- separated backup from writing.
+IsoDumper 0.22
+------------
+ - changed a window to a dialog form.
+ - added default values for the backup name and directory.
+
IsoDumper 0.21
------------
- added an "About isodumper" window "GtkAboutDialog".
diff --git a/lib/isodumper.py b/lib/isodumper.py
index edbbad9..388126b 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -73,7 +73,6 @@ class IsoDumper:
# get glade tree
self.gladefile = "/usr/share/isodumper/isodumper.glade"
-# self.gladefile = "/documents/isodumper-dev/share/isodumper/isodumper.glade"
self.wTree = gtk.glade.XML(self.gladefile)
# get globally needed widgets
@@ -82,7 +81,8 @@ class IsoDumper:
self.logview = self.wTree.get_widget("detail_text")
self.log = self.logview.get_buffer()
self.window.set_title(self.window.get_title()+' '+RELEASE)
-
+ self.wTree.get_widget("about_dialog").set_version(RELEASE)
+
# define size of the selected device
self.deviceSize=0
@@ -98,7 +98,7 @@ class IsoDumper:
# optionnal backup of the device
self.backup_select = self.wTree.get_widget("backup_select")
self.backup_name = self.wTree.get_widget("backup_name")
- self.backup = self.wTree.get_widget("backup")
+ self.backup_button = self.wTree.get_widget("backup_button")
self.choose = self.wTree.get_widget("choose")
self.backup_bname = self.wTree.get_widget("bname")
@@ -117,6 +117,7 @@ class IsoDumper:
"on_backup_select_clicked" : self.backup_sel,
"on_select_clicked" : self.backup_choosed,
"on_about_button_clicked" : self.about,
+ "on_choose_cancel_clicked" : self.backup_cancel,
"on_format_button_clicked" : self.format_dialog,
"on_format_cancel_clicked" : self.format_cancel,
"on_format_go_clicked" : self.do_format,
@@ -154,8 +155,15 @@ class IsoDumper:
self.wTree.get_widget("filechooserbutton").set_sensitive(True)
def backup_sel(self,widget):
+ if self.backup_bname.get_current_folder_uri() == None :
+ self.backup_bname.set_current_folder_uri('file:///home/'+self.user)
self.backup_bname.set_current_name(self.device_name+".iso")
- self.choose.show_all()
+ self.choose.run()
+
+ def backup_cancel(self,widget):
+ self.choose.hide()
+ # Unckeck the choice to backup
+ self.backup_button.set_sensitive(False)
def backup_choosed(self, widget):
exit_dialog=self.backup_bname.get_filename()
@@ -164,7 +172,7 @@ class IsoDumper:
if not exit_dialog.lower().endswith('.iso'):
exit_dialog=exit_dialog+".iso"
self.backup_select.set_label(exit_dialog)
- self.wTree.get_widget("backup_button").set_sensitive(True)
+ self.backup_button.set_sensitive(True)
self.choose.hide()
def format_dialog(self,widget):
diff --git a/share/isodumper/isodumper.glade b/share/isodumper/isodumper.glade
index e0a3644..addb2b9 100644
--- a/share/isodumper/isodumper.glade
+++ b/share/isodumper/isodumper.glade
@@ -409,27 +409,62 @@ Public License instead of this License.
</widget>
</child>
</widget>
- <widget class="GtkWindow" id="choose">
+ <widget class="GtkDialog" id="choose">
<property name="can_focus">False</property>
<property name="border_width">5</property>
- <property name="title" translatable="yes">IsoDumper</property>
- <property name="modal">True</property>
- <property name="window_position">center</property>
- <property name="default_width">715</property>
- <property name="default_height">540</property>
- <property name="icon_name">isodumper</property>
- <child>
- <widget class="GtkVBox" id="vbox1">
- <property name="height_request">400</property>
+ <property name="type_hint">dialog</property>
+ <child internal-child="vbox">
+ <widget class="GtkVBox" id="dialog-vbox6">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="spacing">2</property>
- <child>
- <widget class="GtkFileChooserWidget" id="bname">
+ <child internal-child="action_area">
+ <widget class="GtkHButtonBox" id="dialog-action_area6">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="orientation">vertical</property>
- <property name="action">save</property>
+ <property name="layout_style">end</property>
+ <child>
+ <widget class="GtkHBox" id="hbox1">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="spacing">9</property>
+ <child>
+ <widget class="GtkButton" id="select">
+ <property name="label" translatable="yes">Select</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <signal name="clicked" handler="on_select_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="pack_type">end</property>
+ <property name="position">0</property>
+ </packing>
+ </child>
+ <child>
+ <widget class="GtkButton" id="choose_cancel">
+ <property name="label">gtk-discard</property>
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">True</property>
+ <property name="use_stock">True</property>
+ <signal name="clicked" handler="on_choose_cancel_clicked" swapped="no"/>
+ </widget>
+ <packing>
+ <property name="expand">False</property>
+ <property name="fill">False</property>
+ <property name="position">1</property>
+ </packing>
+ </child>
</widget>
<packing>
<property name="expand">True</property>
@@ -438,29 +473,15 @@ Public License instead of this License.
</packing>
</child>
<child>
- <widget class="GtkHBox" id="hbox1">
+ <widget class="GtkFileChooserWidget" id="bname">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="spacing">9</property>
- <child>
- <widget class="GtkButton" id="select">
- <property name="label" translatable="yes">Select</property>
- <property name="visible">True</property>
- <property name="can_focus">True</property>
- <property name="receives_default">True</property>
- <signal name="clicked" handler="on_select_clicked" swapped="no"/>
- </widget>
- <packing>
- <property name="expand">True</property>
- <property name="fill">True</property>
- <property name="position">0</property>
- </packing>
- </child>
+ <property name="orientation">vertical</property>
+ <property name="action">save</property>
</widget>
<packing>
- <property name="expand">False</property>
- <property name="fill">False</property>
- <property name="pack_type">end</property>
+ <property name="expand">True</property>
+ <property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>