diff options
author | Přemysl Eric Janouch <p@janouch.name> | 2021-09-16 17:34:28 +0200 |
---|---|---|
committer | Přemysl Eric Janouch <p@janouch.name> | 2021-09-16 18:01:01 +0200 |
commit | 440a9a98409cef4e9ba3c8aa4cc2bfaeb8798b9f (patch) | |
tree | 720df17e956e393ec28d049ff9583008ff074dc8 | |
parent | 913267724ab3d503a4c6dde4ce31ef6460749d4b (diff) | |
download | fiv-440a9a98409cef4e9ba3c8aa4cc2bfaeb8798b9f.tar.gz fiv-440a9a98409cef4e9ba3c8aa4cc2bfaeb8798b9f.tar.xz fiv-440a9a98409cef4e9ba3c8aa4cc2bfaeb8798b9f.zip |
Add an icon and a desktop file
-rw-r--r-- | fastiv.c | 2 | ||||
-rw-r--r-- | fastiv.desktop | 11 | ||||
-rw-r--r-- | fastiv.svg | 43 | ||||
-rw-r--r-- | meson.build | 8 |
4 files changed, 62 insertions, 2 deletions
@@ -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 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg version="1.1" width="48" height="48" viewBox="0 0 48 48" + xmlns:xlink="http://www.w3.org/1999/xlink" + xmlns="http://www.w3.org/2000/svg" + xmlns:svg="http://www.w3.org/2000/svg"> + <defs> + <linearGradient id="base-background" x1="0" y1="0" x2="1" y2="1"> + <stop stop-color="#ffffff" offset="0.1" /> + <stop stop-color="#7f7f7f" offset="1" /> + </linearGradient> + <linearGradient id="i-background"> + <stop stop-color="#e0e0e0" offset="0" /> + <stop stop-color="#ffffff" offset="1" /> + </linearGradient> + <linearGradient id="red-background" x1="0" y1="0" x2="0" y2="1"> + <stop stop-color="#ff9b9b" offset="0" /> + <stop stop-color="#ffffff" offset="0.8" /> + </linearGradient> + <linearGradient id="green-background" x1="0" y1="0" x2="0" y2="1"> + <stop stop-color="#98ff98" offset="0" /> + <stop stop-color="#ffffff" offset="0.8" /> + </linearGradient> + <linearGradient id="blue-background" x1="0" y1="0" x2="0" y2="1"> + <stop stop-color="#9999ff" offset="0" /> + <stop stop-color="#ffffff" offset="0.8" /> + </linearGradient> + </defs> + <rect x="1" y="1" width="46" height="46" ry="5" + style="fill: url(#base-background)" stroke="#bfbfbf" stroke-width="2" /> + <circle cx="13.5" cy="12" r="4" + style="fill: url(#i-background)" stroke="#000000" stroke-width="2" /> + <path d="m 9.75,24 0,13 a 3.5 3.5 180 0 0 7.5,0 l 0,-13 a 3.5 3.5 180 0 0 -7.5,0 z" + style="fill: url(#i-background)" stroke="#000000" stroke-width="2" /> + <path d="m 22,8.25 6,0 3,3 3,-3 6,0 -9,10 z" + style="fill: url(#red-background)" stroke="#000000" stroke-width="2" + stroke-linejoin="round" /> + <path d="m 22,19.5 6,0 3,3 3,-3 6,0 -9,10 z" + style="fill: url(#green-background)" stroke="#000000" stroke-width="2" + stroke-linejoin="round" /> + <path d="m 22,30.75 6,0 3,3 3,-3 6,0 -9,10 z" + style="fill: url(#blue-background)" stroke="#000000" stroke-width="2" + stroke-linejoin="round" /> +</svg> 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') |