From aaee08b4fe53bf2cdc2079ee623d4d86f4f73991 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Thu, 13 Aug 2020 16:38:41 +0200 Subject: Add icon SVG and use for window icon --- CMakeLists.txt | 4 + data/crystfel.svg | 459 +++++++++++++++++++++++++++++++++++++++++++++++++++++ meson.build | 6 + src/crystfel_gui.c | 1 + 4 files changed, 470 insertions(+) create mode 100644 data/crystfel.svg diff --git a/CMakeLists.txt b/CMakeLists.txt index 5c5f6d91..25abff90 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -175,6 +175,10 @@ add_subdirectory(tests) install(DIRECTORY ${CMAKE_SOURCE_DIR}/scripts DESTINATION ${CMAKE_INSTALL_DOCDIR}) +# Misc resources +install(FILES ${CMAKE_SOURCE_DIR}/data/crystfel.svg + DESTINATION ${CMAKE_INSTALL_DATADIR}/icons/hicolor/scalable/apps) + # ---------------------------------------------------------------------- # partial_sim diff --git a/data/crystfel.svg b/data/crystfel.svg new file mode 100644 index 00000000..7c4bb70f --- /dev/null +++ b/data/crystfel.svg @@ -0,0 +1,459 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + image/svg+xml + + + + + + + + + + + + + + + + + + + + + diff --git a/meson.build b/meson.build index 8ae018de..2ceeed4f 100644 --- a/meson.build +++ b/meson.build @@ -234,6 +234,12 @@ executable('pattern_sim', pattern_sim_sources, simulation_bits = files(['src/diffraction.c', 'src/diffraction-gpu.c', 'src/cl-utils.c']) +# ************************ Misc resources ************************ + +install_data(['data/crystfel.svg'], + install_dir : get_option('datadir')+'/icons/hicolor/scalable/apps') + + # ************************ Testing ************************ subdir('tests') diff --git a/src/crystfel_gui.c b/src/crystfel_gui.c index 04658ea4..619ebd37 100644 --- a/src/crystfel_gui.c +++ b/src/crystfel_gui.c @@ -848,6 +848,7 @@ int main(int argc, char *argv[]) proj.window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(proj.window), "CrystFEL"); + gtk_window_set_default_icon_name("crystfel"); g_signal_connect(G_OBJECT(proj.window), "delete-event", G_CALLBACK(delete_event_sig), &proj); -- cgit v1.2.3