diff options
| -rwxr-xr-x | mat-gui | 21 |
1 files changed, 11 insertions, 10 deletions
| @@ -304,19 +304,18 @@ non-anonymised) file to output archive')) | |||
| 304 | we need to process them | 304 | we need to process them |
| 305 | ''' | 305 | ''' |
| 306 | url = urllib2.unquote(url) # unescape stupid chars | 306 | url = urllib2.unquote(url) # unescape stupid chars |
| 307 | url = url.replace('\n', '') | 307 | url = url.decode('utf-8') # decode in utf-8 |
| 308 | if url.startswith('file:\\\\\\'): # windows | 308 | if url.startswith('file:\\\\\\'): # windows |
| 309 | return url[8:] # 8 is len('file:///') | 309 | return url[8:] # 8 is len('file:///') |
| 310 | elif url.startswith('file://'): # nautilus, rox | 310 | elif url.startswith('file://'): # nautilus, rox, thunar |
| 311 | return url[7:] # 7 is len('file://') | 311 | return url[7:] # 7 is len('file://') |
| 312 | elif url.startswith('file:'): # xffm | 312 | elif url.startswith('file:'): # xffm |
| 313 | return url[5:] # 5 is len('file:') | 313 | return url[5:] # 5 is len('file:') |
| 314 | 314 | ||
| 315 | urls = selection.get_data().split('\r') | 315 | urls = selection.get_uris() |
| 316 | urls = urls[:-1] # last entry in only a '\n' | 316 | urls = urls[:-1] # last entry in always a '\n' |
| 317 | urls = map(clean_path, urls) | 317 | urls = map(clean_path, urls) |
| 318 | task = self.populate(urls) | 318 | GObject.idle_add(self.populate(urls).next) # asynchrone processing |
| 319 | GObject.idle_add(task.next) # asynchrone processing | ||
| 320 | 319 | ||
| 321 | def __add_file_to_treeview(self, filename): | 320 | def __add_file_to_treeview(self, filename): |
| 322 | ''' | 321 | ''' |
| @@ -414,8 +413,9 @@ non-anonymised) file to output archive')) | |||
| 414 | ''' Check elements in iterator are clean ''' | 413 | ''' Check elements in iterator are clean ''' |
| 415 | for line in iterator: # for each file in selection | 414 | for line in iterator: # for each file in selection |
| 416 | print self.liststore[line][0].file | 415 | print self.liststore[line][0].file |
| 417 | logging.info('Checking %s' % self.liststore[line][2]) | 416 | msg = 'Checking %s ' % self.liststore[line][2] |
| 418 | self.statusbar.push(0, _('Checking %s...') % self.liststore[line][2]) | 417 | logging.info(msg) |
| 418 | self.statusbar.push(0, msg) | ||
| 419 | 419 | ||
| 420 | if self.force or self.liststore[line][6]: | 420 | if self.force or self.liststore[line][6]: |
| 421 | if self.liststore[line][0].file.is_clean(): | 421 | if self.liststore[line][0].file.is_clean(): |
| @@ -432,8 +432,9 @@ non-anonymised) file to output archive')) | |||
| 432 | def mat_clean(self, iterator): | 432 | def mat_clean(self, iterator): |
| 433 | ''' Clean elements in iterator ''' | 433 | ''' Clean elements in iterator ''' |
| 434 | for line in iterator: # for each file in selection | 434 | for line in iterator: # for each file in selection |
| 435 | logging.info('Cleaning %s' % self.liststore[line][2]) | 435 | msg = _('Cleaning %s') % self.liststore[line][2] |
| 436 | self.statusbar.push(0, _('Cleaning %s...') % self.liststore[line][2]) | 436 | logging.info(msg) |
| 437 | self.statusbar.push(0, msg) | ||
| 437 | if self.force or self.liststore[line][6]: | 438 | if self.force or self.liststore[line][6]: |
| 438 | if self.liststore[line][0].file.remove_all(): | 439 | if self.liststore[line][0].file.remove_all(): |
| 439 | self.liststore[line][4] = _('Clean') | 440 | self.liststore[line][4] = _('Clean') |
