aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@physics.org>2022-04-05 16:38:41 +0200
committerThomas White <taw@physics.org>2022-04-05 16:38:41 +0200
commitad8494c441231d63107cc5954b01aec5c64558fe (patch)
tree465da849b2a1e95149d2242fb3c92f5bb80ff24a
parent5c31874f20a37c2ac8d4c27d982c0783db990105 (diff)
GUI: Add desktop file and set application name
This fixes the broken window icon on Wayland.
-rw-r--r--data/crystfel.desktop10
-rw-r--r--meson.build2
-rw-r--r--src/crystfel_gui.c1
3 files changed, 13 insertions, 0 deletions
diff --git a/data/crystfel.desktop b/data/crystfel.desktop
new file mode 100644
index 00000000..d4dd8736
--- /dev/null
+++ b/data/crystfel.desktop
@@ -0,0 +1,10 @@
+[Desktop Entry]
+Name=CrystFEL
+GenericName=CrystFEL
+Comment=A graphical interface for CrystFEL
+Exec=crystfel
+Icon=crystfel
+Terminal=false
+Type=Application
+Categories=Science
+
diff --git a/meson.build b/meson.build
index ac956aea..1ee4d667 100644
--- a/meson.build
+++ b/meson.build
@@ -216,6 +216,8 @@ if gtkdep.found()
install: true,
install_rpath: '$ORIGIN/../lib64/:$ORIGIN/../lib')
+ install_data(['data/crystfel.desktop'],
+ install_dir: get_option('datadir') / 'applications')
endif
# render_hkl
diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c
index 59e3d2e7..252e63ab 100644
--- a/src/crystfel_gui.c
+++ b/src/crystfel_gui.c
@@ -980,6 +980,7 @@ int main(int argc, char *argv[])
gtk_disable_setlocale();
gtk_init(&argc, &argv);
+ g_set_application_name("CrystFEL");
if ( default_project(&proj) ) {
ERROR("Failed to set up default project\n");