aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fiv-sidebar.c15
-rw-r--r--fiv-thumbnail.c1
-rw-r--r--fiv.c5
-rw-r--r--meson.build6
-rw-r--r--resources/info-symbolic.svg150
-rw-r--r--resources/resources.gresource.xml1
6 files changed, 172 insertions, 6 deletions
diff --git a/fiv-sidebar.c b/fiv-sidebar.c
index c29ef4d..e956d08 100644
--- a/fiv-sidebar.c
+++ b/fiv-sidebar.c
@@ -244,10 +244,21 @@ resolve_location(FivSidebar *self, const char *text)
// Relative paths produce invalid GFile objects with this function.
// And even if they didn't, we have our own root for them.
GFile *file = g_file_parse_name(text);
- if (g_uri_is_valid(text, G_URI_FLAGS_PARSE_RELAXED, NULL) ||
- g_file_peek_path(file))
+ if (g_file_peek_path(file))
return file;
+ // Neither branch looks like a particularly good solution.
+ // Though in general, false positives are preferred over negatives.
+#if GLIB_CHECK_VERSION(2, 66, 0)
+ if (g_uri_is_valid(text, G_URI_FLAGS_PARSE_RELAXED, NULL))
+ return file;
+#else
+ gchar *scheme = g_uri_parse_scheme(text);
+ g_free(scheme);
+ if (scheme)
+ return file;
+#endif
+
GFile *absolute = g_file_get_child_for_display_name(
fiv_io_model_get_location(self->model), text, NULL);
if (!absolute)
diff --git a/fiv-thumbnail.c b/fiv-thumbnail.c
index 076a917..bd7e6e9 100644
--- a/fiv-thumbnail.c
+++ b/fiv-thumbnail.c
@@ -22,6 +22,7 @@
#include <webp/mux.h>
#include <glib/gstdio.h>
+#include <errno.h>
#include <math.h>
#include <stdbool.h>
diff --git a/fiv.c b/fiv.c
index 3715907..cdebf6a 100644
--- a/fiv.c
+++ b/fiv.c
@@ -944,8 +944,9 @@ on_button_press_browser_paned(
static GtkWidget *
make_toolbar_button(const gchar *symbolic, const gchar *tooltip)
{
- GtkWidget *button =
- gtk_button_new_from_icon_name(symbolic, GTK_ICON_SIZE_BUTTON);
+ GtkWidget *button = gtk_button_new();
+ gtk_button_set_image(GTK_BUTTON(button),
+ gtk_image_new_from_icon_name(symbolic, GTK_ICON_SIZE_BUTTON));
gtk_widget_set_tooltip_text(button, tooltip);
gtk_widget_set_focus_on_click(button, FALSE);
gtk_style_context_add_class(
diff --git a/meson.build b/meson.build
index d862493..7b0762c 100644
--- a/meson.build
+++ b/meson.build
@@ -30,11 +30,13 @@ dependencies = [
dependency('libjpeg', required : get_option('jpeg-qs')),
dependency('libwebp'),
dependency('libwebpdemux'),
- dependency('libwebpdecoder'),
+ dependency('libwebpdecoder', required : false),
dependency('libwebpmux'),
# https://github.com/google/wuffs/issues/58
dependency('spng', version : '>=0.7.0',
- default_options: 'default_library=static'),
+ default_options: 'default_library=static',
+ # fallback : ['spng', 'spng_dep'],
+ ),
lcms2,
libraw,
diff --git a/resources/info-symbolic.svg b/resources/info-symbolic.svg
new file mode 100644
index 0000000..502a98a
--- /dev/null
+++ b/resources/info-symbolic.svg
@@ -0,0 +1,150 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg height="16px" viewBox="0 0 16 16" width="16px" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+ <filter id="a" height="100%" width="100%" x="0%" y="0%">
+ <feColorMatrix in="SourceGraphic" type="matrix" values="0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 1 0"/>
+ </filter>
+ <mask id="b">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/>
+ </g>
+ </mask>
+ <clipPath id="c">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="d">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="e">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="f">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="g">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="h">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="i">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="j">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="k">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="l">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="m">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="n">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.05"/>
+ </g>
+ </mask>
+ <clipPath id="o">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="p">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.3"/>
+ </g>
+ </mask>
+ <clipPath id="q">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="r">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+ </g>
+ </mask>
+ <clipPath id="s">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="t">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.4"/>
+ </g>
+ </mask>
+ <clipPath id="u">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="v">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.4"/>
+ </g>
+ </mask>
+ <clipPath id="w">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="x">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+ </g>
+ </mask>
+ <clipPath id="y">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <mask id="z">
+ <g filter="url(#a)">
+ <path d="m 0 0 h 16 v 16 h -16 z" fill-opacity="0.5"/>
+ </g>
+ </mask>
+ <clipPath id="A">
+ <path d="m 0 0 h 1024 v 800 h -1024 z"/>
+ </clipPath>
+ <g clip-path="url(#c)" mask="url(#b)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 562.460938 212.058594 h 10.449218 c -1.183594 0.492187 -1.296875 2.460937 0 3 h -10.449218 z m 0 0" fill="#2e3436"/>
+ </g>
+ <path d="m 7.90625 1 c -3.828125 0.050781 -6.90625 3.171875 -6.90625 7 c 0 3.867188 3.132812 7 7 7 s 7 -3.132812 7 -7 s -3.132812 -7 -7 -7 c -0.03125 0 -0.0625 0 -0.09375 0 z m -0.40625 3 h 1 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 0.5 h -1 c -0.277344 0 -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m -0.5 3 h 2 v 5 h -2 z m 0 0" fill="#2e3436"/>
+ <g clip-path="url(#e)" mask="url(#d)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 16 632 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#g)" mask="url(#f)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 17 631 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#i)" mask="url(#h)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 18 634 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#k)" mask="url(#j)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 16 634 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#m)" mask="url(#l)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 17 635 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#o)" mask="url(#n)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 19 635 h 1 v 1 h -1 z m 0 0" fill="#2e3436" fill-rule="evenodd"/>
+ </g>
+ <g clip-path="url(#q)" mask="url(#p)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 136 660 v 7 h 7 v -7 z m 0 0" fill="#2e3436"/>
+ </g>
+ <g clip-path="url(#s)" mask="url(#r)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 199 642 h 3 v 12 h -3 z m 0 0" fill="#2e3436"/>
+ </g>
+ <g clip-path="url(#u)" mask="url(#t)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 209.5 144.160156 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0" fill="#2e3436"/>
+ </g>
+ <g clip-path="url(#w)" mask="url(#v)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 206.5 144.160156 c 0.277344 0 0.5 0.222656 0.5 0.5 v 1 c 0 0.277344 -0.222656 0.5 -0.5 0.5 s -0.5 -0.222656 -0.5 -0.5 v -1 c 0 -0.277344 0.222656 -0.5 0.5 -0.5 z m 0 0" fill="#2e3436"/>
+ </g>
+ <g clip-path="url(#y)" mask="url(#x)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 229.5 143.160156 c -0.546875 0 -1 0.457032 -1 1 c 0 0.546875 0.453125 1 1 1 s 1 -0.453125 1 -1 c 0 -0.542968 -0.453125 -1 -1 -1 z m 0 0" fill="#2e3436"/>
+ </g>
+ <g clip-path="url(#A)" mask="url(#z)" transform="matrix(1 0 0 1 -660 -222)">
+ <path d="m 226.453125 143.160156 c -0.519531 0 -0.953125 0.433594 -0.953125 0.953125 v 0.09375 c 0 0.519531 0.433594 0.953125 0.953125 0.953125 h 0.09375 c 0.519531 0 0.953125 -0.433594 0.953125 -0.953125 v -0.09375 c 0 -0.519531 -0.433594 -0.953125 -0.953125 -0.953125 z m 0 0" fill="#2e3436"/>
+ </g>
+</svg>
diff --git a/resources/resources.gresource.xml b/resources/resources.gresource.xml
index 45439b6..b189ced 100644
--- a/resources/resources.gresource.xml
+++ b/resources/resources.gresource.xml
@@ -6,5 +6,6 @@
<file preprocess="xml-stripblanks">blend-tool-symbolic.svg</file>
<file preprocess="xml-stripblanks">checkerboard-symbolic.svg</file>
<file preprocess="xml-stripblanks">heal-symbolic.svg</file>
+ <file preprocess="xml-stripblanks">info-symbolic.svg</file>
</gresource>
</gresources>