summaryrefslogtreecommitdiff
path: root/libre/mcomix/libre.patch
blob: 20b0c3ca1bd341b7c4a1db5972198f831a816bac (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
diff --git a/man/comicthumb.1 b/man/comicthumb.1
index 4af1791..6546014 100644
--- a/man/comicthumb.1
+++ b/man/comicthumb.1
@@ -1,7 +1,7 @@
 .TH comicthumb 1
 
 .SH NAME
-\fBcomicthumb\fP - Thumbnailer for cbz, cbr and cbt archives.
+\fBcomicthumb\fP - Thumbnailer for cbz and cbt archives.
 
 .SH SYNOPSIS
 .nf
diff --git a/man/mcomix.1 b/man/mcomix.1
index 5361e86..37b0698 100644
--- a/man/mcomix.1
+++ b/man/mcomix.1
@@ -12,7 +12,7 @@
 .B MComix
 is a user-friendly, customizable image viewer. It is specifically designed to
 handle comic books (both Western comics and manga) and supports a variety of
-container formats (including CBR, CBZ, CB7, CBT, LHA and PDF).
+container formats (including CBZ, CB7, CBT, LHA and PDF).
 
 .SH OPTIONS
 .TP
diff --git a/mcomix/comicthumb.py b/mcomix/comicthumb.py
index 3606091..150a1f5 100755
--- a/mcomix/comicthumb.py
+++ b/mcomix/comicthumb.py
@@ -34,7 +34,7 @@ def main():
     parser=argparse.ArgumentParser(
         prog='comicthumb',
         description='Thumbnailer for comic book archives',
-        epilog='Supported formats: ZIP, RAR and tar (.cbz, .cbr, .cbt)',
+        epilog='Supported formats: ZIP and tar (.cbz, .cbt)',
     )
     parser.add_argument('infile',default=None,metavar='INFILE',
                         help='input archive')
diff --git a/mcomix/mcomix/about_dialog.py b/mcomix/mcomix/about_dialog.py
index ba64a40..0160ed9 100644
--- a/mcomix/mcomix/about_dialog.py
+++ b/mcomix/mcomix/about_dialog.py
@@ -28,7 +28,7 @@ class _AboutDialog(Gtk.AboutDialog):
         comment = \
             _('%s is an image viewer specifically designed to handle comic books.') % \
             constants.APPNAME + ' ' + \
-            _('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 --git a/mcomix/mcomix/archive_tools.py b/mcomix/mcomix/archive_tools.py
index c121f59..1f48aa8 100644
--- a/mcomix/mcomix/archive_tools.py
+++ b/mcomix/mcomix/archive_tools.py
@@ -15,8 +15,6 @@ from mcomix.archive import (
     archivemount,
     lha_external,
     pdf_external,
-    rar,
-    rar_external,
     sevenzip_external,
     squashfs,
     tar,
@@ -47,16 +45,6 @@ _HANDLERS = {
     constants.XZ: (
         tar.TarArchive,
     ),
-    constants.RAR: (
-        rar.RarArchive,
-        rar_external.RarArchive,
-        # Last resort: some versions of 7z support RAR.
-        sevenzip_external.SevenZipArchive,
-    ),
-    constants.RAR5: (
-        rar.RarArchive,
-        rar_external.RarArchive,
-    ),
     constants.LHA: (
         # Prefer 7z over lha executable for Unicode support.
         sevenzip_external.SevenZipArchive,
@@ -90,9 +78,6 @@ def _is_available(archive_type):
 def szip_available():
     return _is_available(constants.SEVENZIP)
 
-def rar_available():
-    return _is_available(constants.RAR)
-
 def lha_available():
     return _is_available(constants.LHA)
 
@@ -109,7 +94,6 @@ def init_supported_formats():
     for name, formats, is_available in (
         ('ZIP', constants.ZIP_FORMATS , True            ),
         ('Tar', constants.TAR_FORMATS , True            ),
-        ('RAR', constants.RAR_FORMATS , rar_available() ),
         ('7z' , constants.SZIP_FORMATS, szip_available()),
         ('LHA', constants.LHA_FORMATS , lha_available() ),
         ('PDF', constants.PDF_FORMATS , pdf_available() ),
@@ -168,11 +152,6 @@ def archive_mime_type(path):
                 else:
                     return constants.TAR
 
-            if magic.startswith(b'Rar!\x1a\x07'):
-                if sevenzip_external.is_7z_support_rar():
-                    return constants.RAR
-                else:
-                    return constants.RAR5
 
             if magic[0:6] == b'7z\xbc\xaf\x27\x1c':
                 return constants.SEVENZIP
diff --git a/mcomix/mcomix/constants.py b/mcomix/mcomix/constants.py
index 414f65c..e068218 100644
--- a/mcomix/mcomix/constants.py
+++ b/mcomix/mcomix/constants.py
@@ -49,7 +49,7 @@ ANIMATION_NORMAL = 1 # loop as animation setting
 ANIMATION_ONCE = 1<<1 # loop only once
 ANIMATION_INF = 1<<2 # loop infinity
 
-ZIP, RAR, RAR5, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(12)
+ZIP, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(10)
 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, \
@@ -84,13 +84,6 @@ ZIP_FORMATS = (
     ('.cbz', 'application/vnd.comicbook+zip'),
 )
 
-RAR_FORMATS = (
-    # https://www.iana.org/assignments/media-types/application/vnd.rar
-    ('.rar', 'application/vnd.rar'),
-    # https://www.iana.org/assignments/media-types/application/vnd.comicbook-rar
-    ('.cbr', 'application/vnd.comicbook-rar'),
-)
-
 TAR_FORMATS = (
     # not registed in IANA
     ('.tar', 'application/x-tar'),
@@ -143,7 +136,7 @@ SQUASHFS_FORMATS = (
     ('.sqsh', 'application/vnd.squashfs'),
 )
 
-ARCHIVE_FORMATS = ZIP_FORMATS + RAR_FORMATS + TAR_FORMATS + SQUASHFS_FORMATS
+ARCHIVE_FORMATS = ZIP_FORMATS + TAR_FORMATS + SQUASHFS_FORMATS
 ARCHIVE_FORMATS += SZIP_FORMATS + LHA_FORMATS + PDF_FORMATS
 
 # vim: expandtab:sw=4:ts=4
diff --git a/mcomix/mcomix/messages/mcomix.pot b/mcomix/mcomix/messages/mcomix.pot
index e622347..02528c3 100644
--- a/mcomix/mcomix/messages/mcomix.pot
+++ b/mcomix/mcomix/messages/mcomix.pot
@@ -24,7 +24,7 @@ msgid "%s is an image viewer specifically designed to handle comic books."
 msgstr ""
 
 #: mcomix/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/mcomix/about_dialog.py:34
@@ -1523,10 +1523,6 @@ msgstr ""
 msgid "ZIP archive"
 msgstr ""
 
-#: mcomix/mcomix/strings.py:10
-msgid "RAR archive"
-msgstr ""
-
 #: mcomix/mcomix/strings.py:11
 msgid "Tar archive"
 msgstr ""
diff --git a/mcomix/mcomix/strings.py b/mcomix/mcomix/strings.py
index 0eb2ea7..c534f5f 100644
--- a/mcomix/mcomix/strings.py
+++ b/mcomix/mcomix/strings.py
@@ -3,11 +3,10 @@
     This file should only be imported after gettext has been correctly initialized
     and installed in the global namespace. '''
 
-from mcomix.constants import ZIP, RAR, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL
+from mcomix.constants import ZIP, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL
 
 ARCHIVE_DESCRIPTIONS = {
     ZIP         : _('ZIP archive'),
-    RAR         : _('RAR archive'),
     TAR         : _('Tar archive'),
     GZIP        : _('Gzip compressed tar archive'),
     BZIP2       : _('Bzip2 compressed tar archive'),
diff --git a/mime/comicbook.schemas b/mime/comicbook.schemas
index d8ab034..3bf2711 100644
--- a/mime/comicbook.schemas
+++ b/mime/comicbook.schemas
@@ -1,27 +1,5 @@
 <gconfschemafile>
     <schemalist>
-        <schema>
-            <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/enable</key>
-            <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/enable</applyto>
-            <owner>comicthumb</owner>
-            <type>bool</type>
-            <default>true</default>
-            <locale name="C">
-                <short></short>
-                <long></long>
-            </locale>
-        </schema>
-        <schema>
-            <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/command</key>
-            <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook-rar/command</applyto>
-            <owner>comicthumb</owner>
-            <type>string</type>
-            <default>comicthumb %i %o %s</default>
-            <locale name="C">
-                <short></short>
-                <long></long>
-            </locale>
-        </schema>
         <schema>
             <key>/schemas/desktop/gnome/thumbnailers/application@vnd.comicbook+zip/enable</key>
             <applyto>/desktop/gnome/thumbnailers/application@vnd.comicbook+zip/enable</applyto>
diff --git a/mime/comicthumb.thumbnailer b/mime/comicthumb.thumbnailer
index e357fe0..88cc59f 100644
--- a/mime/comicthumb.thumbnailer
+++ b/mime/comicthumb.thumbnailer
@@ -1,4 +1,4 @@
 [Thumbnailer Entry]
 TryExec=comicthumb
 Exec=comicthumb %i %o %s
-MimeType=application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf
+MimeType=application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf
diff --git a/mime/mcomix.appdata.xml b/mime/mcomix.appdata.xml
index 514f95d..b07b474 100644
--- a/mime/mcomix.appdata.xml
+++ b/mime/mcomix.appdata.xml
@@ -10,7 +10,7 @@
   <p>
 	  MComix is a user-friendly, customizable image viewer. It is specifically
 	  designed to handle comic books (both Western comics and manga) and supports
-	  a variety of container formats (including CBR, CBZ, CB7, CBT, LHA and PDF).
+	  a variety of container formats (including CBZ, CB7, CBT, LHA and PDF).
   </p>
   <p>
 	  MComix is a fork of the Comix project, and aims to add bug fixes and
diff --git a/mime/mcomix.desktop b/mime/mcomix.desktop
index 0bb8315..1d46cdf 100644
--- a/mime/mcomix.desktop
+++ b/mime/mcomix.desktop
@@ -19,4 +19,4 @@ Terminal=false
 Type=Application
 StartupNotify=true
 Categories=Graphics;Viewer;
-MimeType=application/vnd.comicbook-rar;application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf;image/bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
+MimeType=application/vnd.comicbook+zip;application/x-cb7;application/x-cbt;application/pdf;image/bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;