aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPřemysl Eric Janouch <p@janouch.name>2021-10-16 09:00:31 +0200
committerPřemysl Eric Janouch <p@janouch.name>2021-10-16 09:00:31 +0200
commit33e98881ad787a93cc2fc2770c1c993d5bb65081 (patch)
tree9bd3c2a413db4ed2a194395f8bc7e77cbeb2f5f0
parentc0a094e4734a1a760681e75565af10bf86b68bee (diff)
downloadtdv-33e98881ad787a93cc2fc2770c1c993d5bb65081.tar.gz
tdv-33e98881ad787a93cc2fc2770c1c993d5bb65081.tar.xz
tdv-33e98881ad787a93cc2fc2770c1c993d5bb65081.zip
sdgui: add a MIME-associated desktop file
Neither StarDict nor shared-mime-info have their own MIME DB file.
-rw-r--r--CMakeLists.txt4
-rw-r--r--sdgui.desktop8
-rw-r--r--sdgui.xml10
3 files changed, 22 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 38b0bf7..e2b9083 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -198,6 +198,10 @@ install (TARGETS ${PROJECT_NAME} DESTINATION ${CMAKE_INSTALL_BINDIR})
install (FILES LICENSE DESTINATION ${CMAKE_INSTALL_DOCDIR})
if (WITH_GUI)
install (TARGETS sdgui DESTINATION ${CMAKE_INSTALL_BINDIR})
+ install (FILES sdgui.desktop
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/applications)
+ install (FILES sdgui.xml
+ DESTINATION ${CMAKE_INSTALL_DATADIR}/mime/packages)
endif ()
foreach (page ${project_MAN_PAGES})
diff --git a/sdgui.desktop b/sdgui.desktop
new file mode 100644
index 0000000..38b8ee2
--- /dev/null
+++ b/sdgui.desktop
@@ -0,0 +1,8 @@
+[Desktop Entry]
+Type=Application
+Name=sdgui
+GenericName=StarDict GUI
+Exec=sdgui %F
+StartupNotify=true
+MimeType=application/x-stardict-ifo;
+Categories=Office;Dictionary;GTK;
diff --git a/sdgui.xml b/sdgui.xml
new file mode 100644
index 0000000..6aefed2
--- /dev/null
+++ b/sdgui.xml
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
+ <mime-type type="application/x-stardict-ifo">
+ <comment>StarDict dictionary main file</comment>
+ <magic>
+ <match type="string" offset="0" value="StarDict's dict ifo file"/>
+ </magic>
+ <glob pattern="*.ifo"/>
+ </mime-type>
+</mime-info>