[gtk/wip/settings-portal: 4/4] Support the fontconfig timestamp
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/wip/settings-portal: 4/4] Support the fontconfig timestamp
- Date: Sun, 4 Nov 2018 13:18:18 +0000 (UTC)
commit 2459e6245346bed653c2316a3e4618f90feea075
Author: Matthias Clasen <mclasen redhat com>
Date: Sat Nov 3 22:53:21 2018 -0400
Support the fontconfig timestamp
Once we add this to the portal, we can support
it in Wayland as well, closing a long-standing
feature gap in the Wayland settings support.
gdk/wayland/gdkdisplay-wayland.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)
---
diff --git a/gdk/wayland/gdkdisplay-wayland.c b/gdk/wayland/gdkdisplay-wayland.c
index d576fa8878..4a5fc6b51c 100644
--- a/gdk/wayland/gdkdisplay-wayland.c
+++ b/gdk/wayland/gdkdisplay-wayland.c
@@ -1638,7 +1638,8 @@ static TranslationEntry translations[] = {
{ FALSE, "org.gnome.desktop.wm.preferences", "action-double-click-titlebar", "gtk-titlebar-double-click",
G_TYPE_STRING, { .s = "toggle-maximize" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-middle-click-titlebar", "gtk-titlebar-middle-click",
G_TYPE_STRING, { .s = "none" } },
{ FALSE, "org.gnome.desktop.wm.preferences", "action-right-click-titlebar", "gtk-titlebar-right-click",
G_TYPE_STRING, { .s = "menu" } },
- { FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b
= FALSE } }
+ { FALSE, "org.gnome.desktop.a11y", "always-show-text-caret", "gtk-keynav-use-caret", G_TYPE_BOOLEAN, { .b
= FALSE } },
+ { FALSE, "org.gnome.fontconfig", "timestamp", "gtk-fontconfig-timestamp", G_TYPE_INT, { .i = 0 } }
};
@@ -1755,7 +1756,10 @@ settings_portal_changed (GDBusProxy *proxy,
entry = find_translation_entry_by_schema (namespace, name);
if (entry != NULL)
{
- apply_portal_setting (entry, value, display))
+ char *a = g_variant_print (value, FALSE);
+ g_debug ("Using changed portal setting %s %s: %s", namespace, name, a);
+ g_free (a);
+ apply_portal_setting (entry, value, display);
gdk_display_setting_changed (display, entry->setting);
}
else
@@ -1936,7 +1940,10 @@ set_value_from_entry (GdkDisplay *display,
g_value_set_string (value, entry->fallback.s);
break;
case G_TYPE_INT:
- g_value_set_int (value, entry->fallback.i);
+ if (g_str_equal (entry->setting, "gtk-fontconfig-timestamp"))
+ g_value_set_uint (value, (guint)entry->fallback.i);
+ else
+ g_value_set_int (value, entry->fallback.i);
break;
case G_TYPE_BOOLEAN:
g_value_set_boolean (value, entry->fallback.b);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]