aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPapoteur <papoteur@mageialinux-online.org>2016-03-03 07:16:00 +0100
committerPapoteur <papoteur@mageialinux-online.org>2016-03-03 07:16:00 +0100
commitac758433a205686b4481a2c1a9255fb8de6fd2cd (patch)
tree10d14623c6249d28ee6f2e462db3670e2a8852ec
parent00000cf484dfaa5f7e252dd1c482bef3246e03ca (diff)
downloadisodumper-ac758433a205686b4481a2c1a9255fb8de6fd2cd.tar
isodumper-ac758433a205686b4481a2c1a9255fb8de6fd2cd.tar.gz
isodumper-ac758433a205686b4481a2c1a9255fb8de6fd2cd.tar.bz2
isodumper-ac758433a205686b4481a2c1a9255fb8de6fd2cd.tar.xz
isodumper-ac758433a205686b4481a2c1a9255fb8de6fd2cd.zip
Refresh the list will nor add more than needed entries (mga#17857)
-rwxr-xr-xlib/isodumper.py5
1 files changed, 4 insertions, 1 deletions
diff --git a/lib/isodumper.py b/lib/isodumper.py
index 78b9ab4..94c8eb6 100755
--- a/lib/isodumper.py
+++ b/lib/isodumper.py
@@ -120,6 +120,7 @@ class UDisks2(object):
item.append(path)
item.append(size)
list.append(item)
+ self.device_nb=len(list)
return list
def unmount(self, device_node_path):
@@ -212,7 +213,8 @@ class IsoDumper:
self.get_devices()
def update_list(self, widget):
- self.devicelist.remove_text(0)
+ for i in xrange(self.device_nb):
+ self.devicelist.remove_text(0)
self.get_devices()
self.restore(widget)
@@ -229,6 +231,7 @@ class IsoDumper:
# convert in Mbytes
sizeM=str(int(size)/(1024*1024))
self.devicelist.append_text(name+' ('+path.lstrip()+') '+sizeM+_('Mb'))
+ self.device_nb=len(self.list)
dialog.hide()
def device_selected(self, widget):