From ad8494c441231d63107cc5954b01aec5c64558fe Mon Sep 17 00:00:00 2001 From: Thomas White Date: Tue, 5 Apr 2022 16:38:41 +0200 Subject: GUI: Add desktop file and set application name This fixes the broken window icon on Wayland. --- data/crystfel.desktop | 10 ++++++++++ meson.build | 2 ++ src/crystfel_gui.c | 1 + 3 files changed, 13 insertions(+) create mode 100644 data/crystfel.desktop 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"); -- cgit v1.2.3