From 440a9a98409cef4e9ba3c8aa4cc2bfaeb8798b9f Mon Sep 17 00:00:00 2001 From: Přemysl Eric Janouch
Date: Thu, 16 Sep 2021 17:34:28 +0200 Subject: Add an icon and a desktop file --- fastiv.c | 2 ++ fastiv.desktop | 11 +++++++++++ fastiv.svg | 43 +++++++++++++++++++++++++++++++++++++++++++ meson.build | 8 ++++++-- 4 files changed, 62 insertions(+), 2 deletions(-) create mode 100644 fastiv.desktop create mode 100644 fastiv.svg diff --git a/fastiv.c b/fastiv.c index 2ed8ec1..82d518b 100644 --- a/fastiv.c +++ b/fastiv.c @@ -77,6 +77,8 @@ main(int argc, char *argv[]) return 0; } + gtk_window_set_default_icon_name(PROJECT_NAME); + GtkWidget *view = g_object_new(FASTIV_TYPE_VIEW, NULL); GtkWidget *window = gtk_window_new(GTK_WINDOW_TOPLEVEL); g_signal_connect(window, "destroy", G_CALLBACK(gtk_main_quit), NULL); diff --git a/fastiv.desktop b/fastiv.desktop new file mode 100644 index 0000000..38d747a --- /dev/null +++ b/fastiv.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Type=Application +Name=fastiv +GenericName=Image Viewer +Icon=fastiv +Exec=fastiv %F +Terminal=false +StartupNotify=true +Categories=Graphics;2DGraphics;Viewer; +# TODO(p): Figure out how to include RAW MIME types, if appropriate. +MimeType=image/png;image/bmp;image/x-bmp;image/x-MS-bmp;image/gif;image/jpeg; diff --git a/fastiv.svg b/fastiv.svg new file mode 100644 index 0000000..571b4c2 --- /dev/null +++ b/fastiv.svg @@ -0,0 +1,43 @@ + + diff --git a/meson.build b/meson.build index b730544..2a13822 100644 --- a/meson.build +++ b/meson.build @@ -1,6 +1,6 @@ project('fastiv', 'c', default_options : ['c_std=gnu99'], version : '0.1.0') -# TODO(p): consider whether libraw_r would be appropriate +# TODO(p): Use libraw_r later, when we start parallelizing/preloading. libraw = dependency('libraw', required : get_option('libraw')) dependencies = [ dependency('gtk+-3.0'), @@ -17,7 +17,11 @@ configure_file( configuration : conf, ) -# TODO(p): we need to create and install a .desktop file executable('fastiv', 'fastiv.c', 'fastiv-view.c', install : true, dependencies : [dependencies]) + +install_data('fastiv.desktop', + install_dir : get_option('datadir') + '/applications') +install_data('fastiv.svg', + install_dir : get_option('datadir') + '/icons/hicolor/scalable/apps') -- cgit v1.2.3-70-g09d2