summaryrefslogtreecommitdiff
path: root/libre/mcomix/libre.patch
blob: cedb7700cde1fa70fc45378ca849f8046f27e627 (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
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 6583a7f..00c37f4 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,12 +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.LHA: (
         # Prefer 7z over lha executable for Unicode support.
         sevenzip_external.SevenZipArchive,
@@ -86,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)
 
@@ -164,9 +153,6 @@ def archive_mime_type(path):
                 else:
                     return constants.TAR
 
-            if magic.startswith(b'Rar!\x1a\x07'):
-                return constants.RAR
-
             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 470acdc..04fd006 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, TAR, GZIP, BZIP2, XZ, PDF, SEVENZIP, LHA, ZIP_EXTERNAL, SQUASHFS = range(11)
+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'),
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 94a8395..07f14c0 100644
--- a/mime/comicbook.schemas
+++ b/mime/comicbook.schemas
@@ -1,27 +1,5 @@
 <gconfschemafile>
     <schemalist>
-        <schema>
-            <key>/schemas/desktop/gnome/thumbnailers/application@x-cbr/enable</key>
-            <applyto>/desktop/gnome/thumbnailers/application@x-cbr/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@x-cbr/command</key>
-            <applyto>/desktop/gnome/thumbnailers/application@x-cbr/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@x-cbz/enable</key>
             <applyto>/desktop/gnome/thumbnailers/application@x-cbz/enable</applyto>
diff --git a/mime/comicthumb.thumbnailer b/mime/comicthumb.thumbnailer
index b536ddf..a0761c9 100644
--- a/mime/comicthumb.thumbnailer
+++ b/mime/comicthumb.thumbnailer
@@ -1,4 +1,4 @@
 [Thumbnailer Entry]
 TryExec=comicthumb
 Exec=comicthumb %u %o %s
-MimeType=application/x-cb7;application/x-cbr;application/x-cbt;application/x-cbz;application/x-ext-cb7;application/x-ext-cbr;application/x-ext-cbt;application/x-ext-cbz;
+MimeType=application/x-cb7;application/x-cbt;application/x-cbz;application/x-ext-cb7;application/x-ext-cbt;application/x-ext-cbz;
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 eb2ec8f..240ac0e 100644
--- a/mime/mcomix.desktop
+++ b/mime/mcomix.desktop
@@ -19,4 +19,4 @@ Terminal=false
 Type=Application
 StartupNotify=true
 Categories=Graphics;Viewer;
-MimeType=application/x-cb7;application/x-ext-cb7;application/x-cbr;application/x-ext-cbr;application/x-cbt;application/x-ext-cbt;application/x-cbz;application/x-ext-cbz;application/pdf;application/x-pdf;application/x-ext-pdf;image/bmp;image/x-MS-bmp;image/x-bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
+MimeType=application/x-cb7;application/x-ext-cb7;application/x-cbt;application/x-ext-cbt;application/x-cbz;application/x-ext-cbz;application/pdf;application/x-pdf;application/x-ext-pdf;image/bmp;image/x-MS-bmp;image/x-bmp;image/gif;image/jpeg;image/png;image/tiff;image/x-portable-bitmap;image/x-portable-graymap;image/x-portable-pixmap;
diff --git a/mime/mcomix.xml b/mime/mcomix.xml
index ec2a28e..c4c61da 100644
--- a/mime/mcomix.xml
+++ b/mime/mcomix.xml
@@ -5,11 +5,6 @@
         <comment xml:lang="en">Comic Book Archive (Zip compressed)</comment>
         <glob pattern="*.cbz"/>
     </mime-type>
-    <mime-type type="application/x-cbr">
-        <sub-class-of type="application/x-rar"/>
-        <comment xml:lang="en">Comic Book Archive (RAR compressed)</comment>
-        <glob pattern="*.cbr"/> 
-    </mime-type>
     <mime-type type="application/x-cbt">
         <sub-class-of type="application/x-compressed-tar"/>
         <sub-class-of type="application/x-bzip-compressed-tar"/>