aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorpapoteur-mga <yves.brungard_git@gadz.org>2014-06-29 12:27:37 +0200
committerpapoteur-mga <yves.brungard_git@gadz.org>2014-06-29 12:27:37 +0200
commit08be1259f919393b4d66f07fd1e7ca4f95e557f2 (patch)
tree16758586fb383b52615c1e4e6842837773bb7408
parentf7d3c0a0f20038708d5d42ddb4d2c31d84d6aaa5 (diff)
downloadisodumper-08be1259f919393b4d66f07fd1e7ca4f95e557f2.tar
isodumper-08be1259f919393b4d66f07fd1e7ca4f95e557f2.tar.gz
isodumper-08be1259f919393b4d66f07fd1e7ca4f95e557f2.tar.bz2
isodumper-08be1259f919393b4d66f07fd1e7ca4f95e557f2.tar.xz
isodumper-08be1259f919393b4d66f07fd1e7ca4f95e557f2.zip
Modifications for 0.23
-rw-r--r--CHANGELOG8
-rwxr-xr-xlib/isodumper.py33
-rw-r--r--share/isodumper/isodumper.glade14
3 files changed, 36 insertions, 19 deletions
diff --git a/CHANGELOG b/CHANGELOG
index ee62130..030357f 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,6 +1,14 @@
The initial state comes from https://launchpad.net/usb-imagewriter
The modifications are:
+IsoDumper 0.23
+------------
+ - added close the application when X of the window bar clicked
+ - added file name and device name in the logview when selected
+ - set the user owner of log file and directory
+ - suppress window redraw when closing the logview
+
+
IsoDumper 0.22
------------
- changed a window to a dialog form.
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 5a1e8a5..1c1f942 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -59,8 +59,8 @@ class IsoDumper:
def __init__(self, user):
APP="isodumper"
DIR="/usr/share/locale"
- RELEASE="v0.22"
- # for the localisation of log file
+ RELEASE="v0.23"
+ # for the localisation of log file
self.user=user
gettext.bindtextdomain(APP, DIR)
@@ -77,6 +77,7 @@ class IsoDumper:
self.devicelist = self.wTree.get_widget("device_combobox")
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)
@@ -90,9 +91,9 @@ class IsoDumper:
filt.add_pattern("*.iso")
filt.add_pattern("*.img")
self.chooser.set_filter(filt)
-
- # optionnal backup of the device
+
+ # 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")
@@ -107,7 +108,7 @@ class IsoDumper:
"on_success_button_clicked" : self.close,
"on_filechooserbutton_file_set" : self.activate_devicelist,
"on_backup_name_file_set" : self.activate_backup,
- "on_detail_expander_activate" : self.expander_control,
+# "on_detail_expander_activate" : self.expander_control,
"on_device_combobox_changed" : self.device_selected,
"on_nodev_close_clicked" : self.close,
"on_backup_toggled" : self.enable_backup,
@@ -115,9 +116,11 @@ class IsoDumper:
"on_select_clicked" : self.backup_choosed,
"on_choose_cancel_clicked" : self.backup_cancel,
"on_about_button_clicked" : self.about,
- "on_write_button_clicked" : self.do_write}
+ "on_write_button_clicked" : self.do_write,
+ "on_main_dialog_delete_event" : gtk.main_quit,}
self.wTree.signal_autoconnect(dict)
+
self.window.show_all()
# make sure we have a target device
self.get_devices()
@@ -146,12 +149,13 @@ class IsoDumper:
write_button = self.wTree.get_widget("write_button")
write_button.set_sensitive(True)
self.dev = self.combo.get_active_text()
+ self.logger(_('Target Device: ')+ self.dev)
def enable_backup(self,widget) :
self.backup_select.set_sensitive(not self.backup_select.get_sensitive())
def backup_sel(self,widget):
- if self.backup_bname.get_current_folder_uri() == None :
+ 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.run()
@@ -360,6 +364,7 @@ class IsoDumper:
home='/root'
if not(os.path.isdir(home+'/.isodumper')):
os.mkdir(home+'/.isodumper')
+ os.chown(home+'/.isodumper')
logfile=open(home+'/.isodumper/isodumper.log',"w")
logfile.write(self.log.get_text(start, end, False))
print self.log.get_text(start, end, False)
@@ -374,15 +379,19 @@ class IsoDumper:
expander.set_sensitive(True)
label.set_sensitive(True)
self.img_name = self.chooser.get_filename()
+ self.logger(_('Image ')+": "+ self.img_name)
+ self.chooser.set_tooltip_text(self.img_name)
+
def activate_backup(self, widget):
self.backup_img_name = self.backup_dir.get_filename()
- def expander_control(self, widget):
- # this is darn ugly but still better than the UI behavior of
- # the unexpanded expander which doesnt reset the window size
- if widget.get_expanded():
- gobject.timeout_add(130, lambda: self.window.reshow_with_initial_size())
+# def expander_control(self, widget):
+# # this is darn ugly but still better than the UI behavior of
+# # the unexpanded expander which doesnt reset the window size
+# if widget.get_expanded():
+# #gobject.timeout_add(130, lambda: self.window.reshow_with_initial_size())
+# pass
def about(self, widget):
about_button = self.wTree.get_widget("about_button")
diff --git a/share/isodumper/isodumper.glade b/share/isodumper/isodumper.glade
index 8cd597e..ef13b42 100644
--- a/share/isodumper/isodumper.glade
+++ b/share/isodumper/isodumper.glade
@@ -407,13 +407,12 @@ Public License instead of this License.
</child>
</widget>
<widget class="GtkDialog" id="choose">
+ <property name="width_request">715</property>
+ <property name="height_request">540</property>
<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="default_width">715</property>
- <property name="default_height">540</property>
- <property name="icon_name">isodumper</property>
+ <property name="title" translatable="yes">Isodumper</property>
+ <property name="icon">isodumper</property>
<property name="type_hint">dialog</property>
<child internal-child="vbox">
<widget class="GtkVBox" id="dialog-vbox6">
@@ -648,8 +647,8 @@ Public License instead of this License.
Something went wrong, please see the details
window for the exact error.
- A logfile isodumper.log with the content will be saved in your
- homedir/.isodumper when the application is closed.</property>
+The application will be closed with this window, and a logfile
+ isodumper.log will be saved in your homedir/.isodumper </property>
<property name="use_markup">True</property>
</widget>
<packing>
@@ -675,6 +674,7 @@ Public License instead of this License.
<property name="window_position">center-always</property>
<property name="icon_name">isodumper</property>
<property name="type_hint">dialog</property>
+ <signal name="delete_event" handler="on_main_dialog_delete_event" swapped="no"/>
<child>
<widget class="GtkVBox" id="vbox2">
<property name="visible">True</property>