From 4b4c34d561c4ba81274c861de47c9807dbe76ca8 Mon Sep 17 00:00:00 2001 From: jvoisin Date: Fri, 5 Aug 2011 13:30:34 +0200 Subject: Cleanup, and cosmetic --- gui.py | 4 ++-- lib/images.py | 4 ++-- lib/mat.py | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/gui.py b/gui.py index c40c0fc..c7fd839 100644 --- a/gui.py +++ b/gui.py @@ -125,7 +125,7 @@ loss') filename_column = gtk.CellRendererText() column = gtk.TreeViewColumn(j, filename_column, text=i + 1) column.set_sort_column_id(i + 1) - if i is 0: + if i is 0: # place tooltip on this column tips = TreeViewTooltips(column) tips.add_view(treeview) treeview.append_column(column) @@ -192,7 +192,7 @@ loss') ''' chooser = gtk.FileChooserDialog( title='Choose files', - parent=None, + parent=self.window, action=gtk.FILE_CHOOSER_ACTION_OPEN, buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1)) chooser.set_default_response(0) diff --git a/lib/images.py b/lib/images.py index 9fa9999..d090015 100644 --- a/lib/images.py +++ b/lib/images.py @@ -7,7 +7,7 @@ import parser class JpegStripper(parser.GenericParser): ''' - Represents a .jpeg file + represents a jpeg file ''' def _should_remove(self, field): ''' @@ -23,7 +23,7 @@ class JpegStripper(parser.GenericParser): class PngStripper(parser.GenericParser): ''' - Represents a .png file + represents a png file ''' def _should_remove(self, field): ''' diff --git a/lib/mat.py b/lib/mat.py index 80d5c66..23255d5 100644 --- a/lib/mat.py +++ b/lib/mat.py @@ -33,8 +33,8 @@ STRIPPERS = { 'audio/mpeg': audio.MpegAudioStripper, 'image/jpeg': images.JpegStripper, 'image/png': images.PngStripper, - 'application/vnd.oasis.opendocument': office.OpenDocumentStripper, - 'application/vnd.openxmlformats-officedocument': office.OpenXmlStripper, + 'application/opendocument': office.OpenDocumentStripper, + 'application/officeopenxml': office.OpenXmlStripper, } try: @@ -146,9 +146,9 @@ def create_class_file(name, backup, add2archive): mime = mimetypes.guess_type(name)[0] if mime.startswith('application/vnd.oasis.opendocument'): - mime = 'application/vnd.oasis.opendocument' # opendocument fileformat + mime = 'application/opendocument' # opendocument fileformat elif mime.startswith('application/vnd.openxmlformats-officedocument'): - mime = 'application/vnd.openxmlformats-officedocument' + mime = 'application/officeopenxml' # office openxml try: stripper_class = STRIPPERS[mime] -- cgit v1.3