diff options
| author | jvoisin | 2011-12-24 00:43:20 +0100 |
|---|---|---|
| committer | jvoisin | 2011-12-24 00:43:20 +0100 |
| commit | 72980c74513f20b7b5f3e42a5bf1c8c50dda17d9 (patch) | |
| tree | 1e195a21700bc8dfdc77a0189b6f88c891a907f8 /mat-gui | |
| parent | 82776ce3beb8a3a7a4465832980e846498d1e542 (diff) | |
Revert a stupid idea
Diffstat (limited to 'mat-gui')
| -rwxr-xr-x | mat-gui | 11 |
1 files changed, 6 insertions, 5 deletions
| @@ -34,7 +34,7 @@ class CFile(object): | |||
| 34 | try: | 34 | try: |
| 35 | self.file = mat.create_class_file(filename, backup, add2archive) | 35 | self.file = mat.create_class_file(filename, backup, add2archive) |
| 36 | except: | 36 | except: |
| 37 | self.file = False | 37 | self.file = None |
| 38 | 38 | ||
| 39 | 39 | ||
| 40 | class GUI: | 40 | class GUI: |
| @@ -73,7 +73,8 @@ class GUI: | |||
| 73 | self.treeview.set_search_column(1) # filename column is searchable | 73 | self.treeview.set_search_column(1) # filename column is searchable |
| 74 | self.treeview.set_rules_hint(True) # alternate colors for rows | 74 | self.treeview.set_rules_hint(True) # alternate colors for rows |
| 75 | self.treeview.set_rubber_banding(True) # mouse selection | 75 | self.treeview.set_rubber_banding(True) # mouse selection |
| 76 | self.treeview.connect('drag_data_received', self.__on_drag_data_received) | 76 | self.treeview.connect('drag_data_received', |
| 77 | self.__on_drag_data_received) | ||
| 77 | self.treeview.drag_dest_set(gtk.DEST_DEFAULT_MOTION | | 78 | self.treeview.drag_dest_set(gtk.DEST_DEFAULT_MOTION | |
| 78 | gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP, | 79 | gtk.DEST_DEFAULT_HIGHLIGHT | gtk.DEST_DEFAULT_DROP, |
| 79 | [('text/uri-list', 0, 80)], gtk.gdk.ACTION_COPY) | 80 | [('text/uri-list', 0, 80)], gtk.gdk.ACTION_COPY) |
| @@ -191,8 +192,8 @@ data loss, but clean more efficiently')) | |||
| 191 | self.__create_menu_item(_('Clear the filelist'), | 192 | self.__create_menu_item(_('Clear the filelist'), |
| 192 | lambda x: self.liststore.clear(), edit_menu, gtk.STOCK_REMOVE, | 193 | lambda x: self.liststore.clear(), edit_menu, gtk.STOCK_REMOVE, |
| 193 | '<Control>L') | 194 | '<Control>L') |
| 194 | self.__create_menu_item(_('Preferences'), self.__preferences, edit_menu, | 195 | self.__create_menu_item(_('Preferences'), self.__preferences, |
| 195 | gtk.STOCK_PREFERENCES, '<Control>P') | 196 | edit_menu, gtk.STOCK_PREFERENCES, '<Control>P') |
| 196 | 197 | ||
| 197 | process_menu = self.__create_sub_menu(_('Process'), menubar) | 198 | process_menu = self.__create_sub_menu(_('Process'), menubar) |
| 198 | item = gtk.ImageMenuItem() | 199 | item = gtk.ImageMenuItem() |
| @@ -295,7 +296,7 @@ data loss, but clean more efficiently')) | |||
| 295 | return False | 296 | return False |
| 296 | 297 | ||
| 297 | cf = CFile(filename, self.backup, self.add2archive) | 298 | cf = CFile(filename, self.backup, self.add2archive) |
| 298 | if cf.file is not False: # if the file is supported by the mat | 299 | if cf.file is not None: # if the file is supported by the mat |
| 299 | self.liststore.append([cf, cf.file.basename, | 300 | self.liststore.append([cf, cf.file.basename, |
| 300 | cf.file.mime, _('unknow'), 'None']) | 301 | cf.file.mime, _('unknow'), 'None']) |
| 301 | return False | 302 | return False |
