summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gui.py4
-rw-r--r--lib/images.py4
-rw-r--r--lib/mat.py8
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')
125 filename_column = gtk.CellRendererText() 125 filename_column = gtk.CellRendererText()
126 column = gtk.TreeViewColumn(j, filename_column, text=i + 1) 126 column = gtk.TreeViewColumn(j, filename_column, text=i + 1)
127 column.set_sort_column_id(i + 1) 127 column.set_sort_column_id(i + 1)
128 if i is 0: 128 if i is 0: # place tooltip on this column
129 tips = TreeViewTooltips(column) 129 tips = TreeViewTooltips(column)
130 tips.add_view(treeview) 130 tips.add_view(treeview)
131 treeview.append_column(column) 131 treeview.append_column(column)
@@ -192,7 +192,7 @@ loss')
192 ''' 192 '''
193 chooser = gtk.FileChooserDialog( 193 chooser = gtk.FileChooserDialog(
194 title='Choose files', 194 title='Choose files',
195 parent=None, 195 parent=self.window,
196 action=gtk.FILE_CHOOSER_ACTION_OPEN, 196 action=gtk.FILE_CHOOSER_ACTION_OPEN,
197 buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1)) 197 buttons=(gtk.STOCK_OK, 0, gtk.STOCK_CANCEL, 1))
198 chooser.set_default_response(0) 198 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
7 7
8class JpegStripper(parser.GenericParser): 8class JpegStripper(parser.GenericParser):
9 ''' 9 '''
10 Represents a .jpeg file 10 represents a jpeg file
11 ''' 11 '''
12 def _should_remove(self, field): 12 def _should_remove(self, field):
13 ''' 13 '''
@@ -23,7 +23,7 @@ class JpegStripper(parser.GenericParser):
23 23
24class PngStripper(parser.GenericParser): 24class PngStripper(parser.GenericParser):
25 ''' 25 '''
26 Represents a .png file 26 represents a png file
27 ''' 27 '''
28 def _should_remove(self, field): 28 def _should_remove(self, field):
29 ''' 29 '''
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 = {
33 'audio/mpeg': audio.MpegAudioStripper, 33 'audio/mpeg': audio.MpegAudioStripper,
34 'image/jpeg': images.JpegStripper, 34 'image/jpeg': images.JpegStripper,
35 'image/png': images.PngStripper, 35 'image/png': images.PngStripper,
36 'application/vnd.oasis.opendocument': office.OpenDocumentStripper, 36 'application/opendocument': office.OpenDocumentStripper,
37 'application/vnd.openxmlformats-officedocument': office.OpenXmlStripper, 37 'application/officeopenxml': office.OpenXmlStripper,
38} 38}
39 39
40try: 40try:
@@ -146,9 +146,9 @@ def create_class_file(name, backup, add2archive):
146 mime = mimetypes.guess_type(name)[0] 146 mime = mimetypes.guess_type(name)[0]
147 147
148 if mime.startswith('application/vnd.oasis.opendocument'): 148 if mime.startswith('application/vnd.oasis.opendocument'):
149 mime = 'application/vnd.oasis.opendocument' # opendocument fileformat 149 mime = 'application/opendocument' # opendocument fileformat
150 elif mime.startswith('application/vnd.openxmlformats-officedocument'): 150 elif mime.startswith('application/vnd.openxmlformats-officedocument'):
151 mime = 'application/vnd.openxmlformats-officedocument' 151 mime = 'application/officeopenxml' # office openxml
152 152
153 try: 153 try:
154 stripper_class = STRIPPERS[mime] 154 stripper_class = STRIPPERS[mime]