]> git.pld-linux.org Git - packages/calibre.git/blobdiff - desktop-integration.patch
- up to 4.20.0
[packages/calibre.git] / desktop-integration.patch
index c22d12b13d094fb0e61fe256d662d4bcb2b9d956..5daf2f5bb1640184273a87920b4b5be9859ede37 100644 (file)
@@ -4,8 +4,8 @@
                  def install_single_icon(iconsrc, basename, size, context, is_last_icon=False):
                      filename = '%s-%s.png' % (basename, size)
                      render_img(iconsrc, filename, width=int(size), height=int(size))
--                    cmd = ['xdg-icon-resource', 'install', '--noupdate', '--context', context, '--size', str(size), filename, basename]
-+                    cmd = ['xdg-icon-resource', 'install', '--noupdate', '--novendor', '--context', context, '--size', str(size), filename, basename]
+-                    cmd = ['xdg-icon-resource', 'install', '--noupdate', '--context', context, '--size', unicode_type(size), filename, basename]
++                    cmd = ['xdg-icon-resource', 'install', '--noupdate', '--novendor', '--context', context, '--size', unicode_type(size), filename, basename]
                      if is_last_icon:
                          del cmd[2]
                      cc(cmd)
                      cc(' '.join(cmd), shell=True)
                      self.menu_resources.append(x)
                      ak = x.partition('.')[0]
-@@ -856,10 +856,9 @@
-                     ak = x.partition('.')[0]
-                     if ak in APPDATA and os.access(appdata, os.W_OK):
-                         self.appdata_resources.append(write_appdata(ak, APPDATA[ak], appdata, translators))
--                cc(['xdg-desktop-menu', 'forceupdate'])
-                 MIME = P('calibre-mimetypes.xml')
-                 self.mime_resources.append(MIME)
--                cc(['xdg-mime', 'install', MIME])
-+                cc(['xdg-mime', 'install', '--novendor', MIME])
-         except Exception:
-             if self.opts.fatal_errors:
-                 raise
+@@ -856,8 +856,7 @@
+                 MIME = P(MIME_BASE)
+                 self.mime_resources.append(MIME_BASE)
+                 if not getattr(self.opts, 'staged_install', False):
+-                    cc(['xdg-mime', 'install', MIME])
+-                    cc(['xdg-desktop-menu', 'forceupdate'])
++                    cc(['xdg-mime', 'install', '--novendor', MIME])
+                 else:
+                     from shutil import copyfile
+                     copyfile(MIME, os.path.join(env['XDG_DATA_DIRS'], 'mime', 'packages', MIME_BASE))
This page took 0.357866 seconds and 4 git commands to generate.