mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
...
This commit is contained in:
parent
85a7332318
commit
1bb4911ece
@ -356,7 +356,7 @@ class PostInstall:
|
|||||||
mimetypes = set([])
|
mimetypes = set([])
|
||||||
for x in all_input_formats():
|
for x in all_input_formats():
|
||||||
mt = guess_type('dummy.'+x)[0]
|
mt = guess_type('dummy.'+x)[0]
|
||||||
if mt and 'chemical' not in mt:
|
if mt and 'chemical' not in mt and 'ctc-posml' not in mt:
|
||||||
mimetypes.add(mt)
|
mimetypes.add(mt)
|
||||||
|
|
||||||
def write_mimetypes(f):
|
def write_mimetypes(f):
|
||||||
@ -376,11 +376,10 @@ class PostInstall:
|
|||||||
des = ('calibre-gui.desktop', 'calibre-lrfviewer.desktop',
|
des = ('calibre-gui.desktop', 'calibre-lrfviewer.desktop',
|
||||||
'calibre-ebook-viewer.desktop')
|
'calibre-ebook-viewer.desktop')
|
||||||
for x in des:
|
for x in des:
|
||||||
cmd = ['xdg-desktop-menu', 'install', './'+x]
|
cmd = ['xdg-desktop-menu', 'install', '--noupdate', './'+x]
|
||||||
if x != des[-1]:
|
|
||||||
cmd.insert(2, '--noupdate')
|
|
||||||
check_call(' '.join(cmd), shell=True)
|
check_call(' '.join(cmd), shell=True)
|
||||||
self.menu_resources.append(x)
|
self.menu_resources.append(x)
|
||||||
|
check_call(['xdg-desktop-menu', 'forceupdate'])
|
||||||
f = open('calibre-mimetypes', 'wb')
|
f = open('calibre-mimetypes', 'wb')
|
||||||
f.write(MIME)
|
f.write(MIME)
|
||||||
f.close()
|
f.close()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user