diff -Nur a/mcomix/about_dialog.py b/mcomix/about_dialog.py --- a/mcomix/about_dialog.py 2014-07-20 14:41:41.000000000 -0300 +++ b/mcomix/about_dialog.py 2015-02-03 20:06:18.707598152 -0200 @@ -27,7 +27,7 @@ comment = \ _('%s is an image viewer specifically designed to handle comic books.') % \ constants.APPNAME + u' ' + \ - _('It reads ZIP, RAR and tar archives, as well as plain image files.') + _('It reads ZIP and tar archives, as well as plain image files.') self.set_comments(comment) license = \ diff -Nur a/mcomix/archive_tools.py b/mcomix/archive_tools.py --- a/mcomix/archive_tools.py 2014-07-28 11:32:51.000000000 -0300 +++ b/mcomix/archive_tools.py 2015-02-03 20:10:46.137856205 -0200 @@ -11,7 +11,6 @@ from mcomix import log from mcomix.archive import zip from mcomix.archive import zip_external -from mcomix.archive import rar from mcomix.archive import tar from mcomix.archive import sevenzip from mcomix.archive import lha @@ -20,9 +19,6 @@ def szip_available(): return sevenzip.SevenZipArchive.is_available() -def rar_available(): - return rar.RarArchive.is_available() or szip_available() - def lha_available(): return lha.LhaArchive.is_available() or szip_available() @@ -35,9 +31,6 @@ if szip_available(): formats.extend(constants.SZIP_FORMATS[1]) - if rar_available(): - formats.extend(constants.RAR_FORMATS[1]) - if lha_available(): formats.extend(constants.LHA_FORMATS[1]) @@ -81,10 +74,7 @@ else: return constants.TAR - if magic[0:4] == 'Rar!': - return constants.RAR - - elif magic[0:4] == '7z\xBC\xAF': + if magic[0:4] == '7z\xBC\xAF': return constants.SEVENZIP # Headers for TAR-XZ and TAR-LZMA that aren't supported by tarfile @@ -143,11 +133,6 @@ return sevenzip.SevenZipArchive(path) elif type in (constants.TAR, constants.GZIP, constants.BZIP2): return tar.TarArchive(path) - elif type == constants.RAR and rar.RarArchive.is_available(): - return rar.RarArchive(path) - elif type == constants.RAR and sevenzip.SevenZipArchive.is_available(): - log.info('Using Sevenzip for RAR archives.') - return sevenzip.SevenZipArchive(path) elif type == constants.SEVENZIP and sevenzip.SevenZipArchive.is_available(): return sevenzip.SevenZipArchive(path) elif type == constants.LHA and lha.LhaArchive.is_available(): diff -Nur a/mcomix/constants.py b/mcomix/constants.py --- a/mcomix/constants.py 2015-01-31 06:06:26.000000000 -0200 +++ b/mcomix/constants.py 2015-02-03 20:11:54.983850230 -0200 @@ -41,7 +41,7 @@ LAST_INDEX = -1 UNION_INDEX = -2 -ZIP, RAR, TAR, GZIP, BZIP2, PDF, SEVENZIP, LHA, ZIP_EXTERNAL = range(9) +ZIP, TAR, GZIP, BZIP2, PDF, SEVENZIP, LHA, ZIP_EXTERNAL = range(8) NORMAL_CURSOR, GRAB_CURSOR, WAIT_CURSOR, NO_CURSOR = range(4) LIBRARY_DRAG_EXTERNAL_ID, LIBRARY_DRAG_BOOK_ID, LIBRARY_DRAG_COLLECTION_ID = range(3) AUTOROTATE_NEVER, AUTOROTATE_WIDTH_90, AUTOROTATE_WIDTH_270, \ @@ -70,9 +70,6 @@ ZIP_FORMATS = ( ('application/x-zip', 'application/zip', 'application/x-zip-compressed', 'application/x-cbz'), ('*.zip', '*.cbz')) -RAR_FORMATS = ( - ('application/x-rar', 'application/x-cbr'), - ('*.rar', '*.cbr')) TAR_FORMATS = ( ('application/x-tar', 'application/x-gzip', 'application/x-bzip2', 'application/x-cbt'), ('*.tar', '*.gz', '*.bz2', '*.bzip2', '*.cbt')) diff -Nur a/mcomix/file_chooser_base_dialog.py b/mcomix/file_chooser_base_dialog.py --- a/mcomix/file_chooser_base_dialog.py 2014-01-18 06:01:42.000000000 -0200 +++ b/mcomix/file_chooser_base_dialog.py 2015-02-03 20:13:45.971467307 -0200 @@ -88,9 +88,6 @@ # extractor availability. mimetypes = constants.ZIP_FORMATS[0] + constants.TAR_FORMATS[0] patterns = constants.ZIP_FORMATS[1] + constants.TAR_FORMATS[1] - if archive_tools.rar_available(): - mimetypes += constants.RAR_FORMATS[0] - patterns += constants.RAR_FORMATS[1] if archive_tools.szip_available(): mimetypes += constants.SZIP_FORMATS[0] patterns += constants.SZIP_FORMATS[1] @@ -107,10 +104,6 @@ self.add_filter(_('Tar archives'), *constants.TAR_FORMATS) - if archive_tools.rar_available(): - self.add_filter(_('RAR archives'), - *constants.RAR_FORMATS) - if archive_tools.szip_available(): self.add_filter(_('7z archives'), *constants.SZIP_FORMATS) diff -Nur a/mcomix/messages/mcomix.pot b/mcomix/messages/mcomix.pot --- a/mcomix/messages/mcomix.pot 2015-01-31 05:55:44.000000000 -0200 +++ b/mcomix/messages/mcomix.pot 2015-02-03 20:32:26.271598749 -0200 @@ -24,7 +24,7 @@ msgstr "" #: mcomix/about_dialog.py:30 -msgid "It reads ZIP, RAR and tar archives, as well as plain image files." +msgid "It reads ZIP and tar archives, as well as plain image files." msgstr "" #: mcomix/about_dialog.py:34 @@ -242,10 +242,6 @@ msgid "Tar archives" msgstr "" -#: mcomix/file_chooser_base_dialog.py:111 -msgid "RAR archives" -msgstr "" - #: mcomix/file_chooser_base_dialog.py:115 msgid "7z archives" msgstr "" @@ -1568,10 +1564,6 @@ msgid "Bzip2 compressed tar archive" msgstr "" -#: mcomix/strings.py:13 -msgid "RAR archive" -msgstr "" - #: mcomix/strings.py:14 msgid "7z archive" msgstr "" diff -Nur a/mcomix/process.py b/mcomix/process.py --- a/mcomix/process.py 2014-07-25 13:37:00.000000000 -0300 +++ b/mcomix/process.py 2015-02-03 20:16:10.747046736 -0200 @@ -20,10 +20,7 @@ class Process: """The subprocess and popen2 modules in Python are broken (see issue - #1336). The problem (i.e. complete crash) they can cause happen fairly - often (once is too often) in MComix when calling "rar" or "unrar" to - extract specific files from archives. We roll our own very simple - process spawning module here instead. + #1336). We roll our own very simple process spawning module here instead. """ # TODO: I can no longer reproduce the issue. Check if this version of # process.py still solves it. diff -Nur a/mcomix/recent.py b/mcomix/recent.py --- a/mcomix/recent.py 2014-06-09 03:08:26.000000000 -0300 +++ b/mcomix/recent.py 2015-02-03 20:17:14.779514387 -0200 @@ -31,8 +31,7 @@ rfilter.add_pixbuf_formats() mimetypes, patterns = itertools.izip(constants.ZIP_FORMATS, - constants.RAR_FORMATS, constants.TAR_FORMATS, - constants.SZIP_FORMATS) + constants.TAR_FORMATS, constants.SZIP_FORMATS) for mimetype in itertools.chain.from_iterable(mimetypes): rfilter.add_mime_type(mimetype) diff -Nur a/mcomix/strings.py b/mcomix/strings.py --- a/mcomix/strings.py 2014-01-18 06:01:42.000000000 -0200 +++ b/mcomix/strings.py 2015-02-03 20:18:10.421674128 -0200 @@ -3,14 +3,13 @@ This file should only be imported after gettext has been correctly initialized and installed in the global namespace. """ -from mcomix.constants import ZIP, TAR, GZIP, BZIP2, RAR, SEVENZIP, LHA +from mcomix.constants import ZIP, TAR, GZIP, BZIP2, SEVENZIP, LHA ARCHIVE_DESCRIPTIONS = { ZIP: _('ZIP archive'), TAR: _('Tar archive'), GZIP: _('Gzip compressed tar archive'), BZIP2: _('Bzip2 compressed tar archive'), - RAR: _('RAR archive'), SEVENZIP: _('7z archive'), LHA: _('LHA archive') } diff -Nur a/mcomix.egg-info/SOURCES.txt b/mcomix.egg-info/SOURCES.txt --- a/mcomix.egg-info/SOURCES.txt 2015-01-31 06:08:19.000000000 -0200 +++ b/mcomix.egg-info/SOURCES.txt 2015-02-03 20:19:25.537920559 -0200 @@ -84,8 +84,6 @@ mcomix/archive/archive_recursive.py mcomix/archive/lha.py mcomix/archive/pdf.py -mcomix/archive/rar.py -mcomix/archive/rarfile.py mcomix/archive/sevenzip.py mcomix/archive/tar.py mcomix/archive/zip.py @@ -184,18 +182,13 @@ mime/mcomix.desktop mime/mcomix.thumbnailer mime/mcomix.xml -mime/icons/16x16/application-x-cbr.png mime/icons/16x16/application-x-cbt.png mime/icons/16x16/application-x-cbz.png -mime/icons/22x22/application-x-cbr.png mime/icons/22x22/application-x-cbt.png mime/icons/22x22/application-x-cbz.png -mime/icons/24x24/application-x-cbr.png mime/icons/24x24/application-x-cbt.png mime/icons/24x24/application-x-cbz.png -mime/icons/32x32/application-x-cbr.png mime/icons/32x32/application-x-cbt.png mime/icons/32x32/application-x-cbz.png -mime/icons/48x48/application-x-cbr.png mime/icons/48x48/application-x-cbt.png -mime/icons/48x48/application-x-cbz.png \ No newline at end of file +mime/icons/48x48/application-x-cbz.png diff -Nur a/mime/comicbook.schemas b/mime/comicbook.schemas --- a/mime/comicbook.schemas 2013-01-08 14:26:46.000000000 -0200 +++ b/mime/comicbook.schemas 2015-02-03 20:20:10.809688373 -0200 @@ -1,28 +1,6 @@ - /schemas/desktop/gnome/thumbnailers/application@x-cbr/enable - /desktop/gnome/thumbnailers/application@x-cbr/enable - comicthumb - bool - true - - - - - - - /schemas/desktop/gnome/thumbnailers/application@x-cbr/command - /desktop/gnome/thumbnailers/application@x-cbr/command - comicthumb - string - comicthumb %i %o %s - - - - - - /schemas/desktop/gnome/thumbnailers/application@x-cbz/enable /desktop/gnome/thumbnailers/application@x-cbz/enable comicthumb diff -Nur a/mime/comicthumb b/mime/comicthumb --- a/mime/comicthumb 2013-01-13 14:35:00.000000000 -0200 +++ b/mime/comicthumb 2015-02-03 20:22:30.481808283 -0200 @@ -7,7 +7,7 @@ comicthumb was originally written by Christoph Wolk, this version was re-written from scratch for Comix 4 by Pontus Ekberg. -Supported formats: ZIP, RAR and tar (.cbz, .cbr, .cbt) +Supported formats: ZIP and tar (.cbz, .cbt) Usage: comicthumb INFILE OUTFILE [SIZE] """ @@ -28,16 +28,13 @@ print __doc__ sys.exit(1) -ZIP, RAR, TAR, GZIP, BZIP2 = range(5) +ZIP, TAR, GZIP, BZIP2 = range(5) class Process: """The subprocess and popen2 modules in Python are broken (see issue - #1336). The problem (i.e. complete crash) they can cause happen fairly - often (once is too often) in Comix when calling "rar" or "unrar" to - extract specific files from archives. We roll our own very simple - process spawning module here instead. + #1336). We roll our own very simple process spawning module here instead. """ # TODO: I can no longer reproduce the issue. Check if this version of # process.py still solves it. @@ -94,19 +91,6 @@ elif self._type in [TAR, GZIP, BZIP2]: self._tfile = tarfile.open(src, 'r') self._files = self._tfile.getnames() - elif self._type == RAR: - self._rar = None - for command in ('unrar', 'rar'): - if Process([command]).spawn() is not None: - self._rar = command - if self._rar == None: - print '! Could not find the "rar" or "unrar" executable.' - sys.exit(1) - proc = Process([self._rar, 'vb', src]) - fobj = proc.spawn() - self._files = fobj.readlines() - proc.wait() - self._files = [name.rstrip('\n') for name in self._files] def get_files(self): """Return a list of the files in the archive.""" @@ -121,11 +105,6 @@ return cStringIO.StringIO(self._zfile.read(chosen)) elif self._type in [TAR, GZIP, BZIP2]: return cStringIO.StringIO(self._tfile.extractfile(chosen).read()) - elif self._type == RAR: - proc = Process([self._rar, 'p', '-inul', '-p-', '--', - self._src, chosen]) - fobj = proc.spawn() - return cStringIO.StringIO(fobj.read()) def archive_mime_type(path): @@ -145,8 +124,6 @@ if magic.startswith('\037\213'): return GZIP return TAR - if magic == 'Rar!': - return RAR except Exception: print '! Error while reading', path return None diff -Nur a/mime/mcomix.desktop b/mime/mcomix.desktop --- a/mime/mcomix.desktop 2013-01-08 14:26:46.000000000 -0200 +++ b/mime/mcomix.desktop 2015-02-03 20:24:12.805803236 -0200 @@ -19,4 +19,4 @@ Type=Application StartupNotify=true Categories=Graphics;Viewer; -MimeType=application/x-cbz;application/x-cbr;application/x-cbt;image/jpeg;image/png;image/gif;image/tiff;image/bmp;image/x-icon;image/x-xpixmap;image/x-xbitmap;application/x-zip;application/zip;application/x-rar;application/x-tar;application/x-gzip;application/x-bzip2;image/svg+xml;image/svg;image/svg-xml;image/vnd.adobe.svg+xml;text/xml-svg;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-pcx;image/x-cmu-raster;image/x-sun-raster;image/x-tga;application/x-7z-compressed;application/x-cb7;application/x-lzh;application/x-lha;application/x-lzh-compressed; +MimeType=application/x-cbz;application/x-cbt;image/jpeg;image/png;image/gif;image/tiff;image/bmp;image/x-icon;image/x-xpixmap;image/x-xbitmap;application/x-zip;application/zip;application/x-tar;application/x-gzip;application/x-bzip2;image/svg+xml;image/svg;image/svg-xml;image/vnd.adobe.svg+xml;text/xml-svg;image/x-portable-anymap;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;image/x-pcx;image/x-cmu-raster;image/x-sun-raster;image/x-tga;application/x-7z-compressed;application/x-cb7;application/x-lzh;application/x-lha;application/x-lzh-compressed; diff -Nur a/mime/mcomix.thumbnailer b/mime/mcomix.thumbnailer --- a/mime/mcomix.thumbnailer 2014-01-18 06:01:42.000000000 -0200 +++ b/mime/mcomix.thumbnailer 2015-02-03 20:27:12.596127651 -0200 @@ -1,4 +1,4 @@ [Thumbnailer Entry] TryExec=comicthumb Exec=comicthumb %u %o %s -MimeType=application/x-cbr;application/x-cbz;application/x-cbt; +MimeType=application/x-cbz;application/x-cbt; diff -Nur a/mime/mcomix.xml b/mime/mcomix.xml --- a/mime/mcomix.xml 2013-01-08 14:26:46.000000000 -0200 +++ b/mime/mcomix.xml 2015-02-03 20:27:36.940405337 -0200 @@ -5,11 +5,6 @@ Comic Book Archive (Zip compressed) - - - Comic Book Archive (RAR compressed) - - diff -Nur a/setup.py b/setup.py --- a/setup.py 2014-06-09 03:08:26.000000000 -0300 +++ b/setup.py 2015-02-03 20:28:30.005795579 -0200 @@ -79,23 +79,18 @@ ('share/icons/hicolor/48x48/apps', ['mcomix/images/48x48/mcomix.png']), ('share/icons/hicolor/16x16/mimetypes', ['mime/icons/16x16/application-x-cbz.png', - 'mime/icons/16x16/application-x-cbr.png', 'mime/icons/16x16/application-x-cbt.png']), ('share/icons/hicolor/22x22/mimetypes', ['mime/icons/22x22/application-x-cbz.png', - 'mime/icons/22x22/application-x-cbr.png', 'mime/icons/22x22/application-x-cbt.png']), ('share/icons/hicolor/24x24/mimetypes', ['mime/icons/24x24/application-x-cbz.png', - 'mime/icons/24x24/application-x-cbr.png', 'mime/icons/24x24/application-x-cbt.png']), ('share/icons/hicolor/32x32/mimetypes', ['mime/icons/32x32/application-x-cbz.png', - 'mime/icons/32x32/application-x-cbr.png', 'mime/icons/32x32/application-x-cbt.png']), ('share/icons/hicolor/48x48/mimetypes', ['mime/icons/48x48/application-x-cbz.png', - 'mime/icons/48x48/application-x-cbr.png', 'mime/icons/48x48/application-x-cbt.png'])], # Package metadata