aboutsummaryrefslogtreecommitdiff
path: root/main/src/ui/util/helper.vala
diff options
context:
space:
mode:
authorMiquel Lionel <lionel@les-miquelots.net>2023-10-30 21:48:08 +0100
committerMiquel Lionel <lionel@les-miquelots.net>2023-10-30 21:48:08 +0100
commitd761e8ccd5293d2f30a889b0cbe302c985aee68c (patch)
tree922bb248a7fee4cdff3da114abc7d77200f3d0da /main/src/ui/util/helper.vala
parent302e954c99c71d670201828c6746dfaa40276d6d (diff)
parent3de716446819550514d50a8112f5b6dd0c662702 (diff)
downloaddino-add_conversation_account_indicator.tar.gz
dino-add_conversation_account_indicator.zip
Show which account is currently used in conversation details in the about sectionadd_conversation_account_indicator
Diffstat (limited to 'main/src/ui/util/helper.vala')
-rw-r--r--main/src/ui/util/helper.vala6
1 files changed, 6 insertions, 0 deletions
diff --git a/main/src/ui/util/helper.vala b/main/src/ui/util/helper.vala
index d6da72dd..63288fc2 100644
--- a/main/src/ui/util/helper.vala
+++ b/main/src/ui/util/helper.vala
@@ -103,7 +103,13 @@ private const string force_color_css = "%s { color: %s; }";
public static Gtk.CssProvider force_css(Gtk.Widget widget, string css) {
var p = new Gtk.CssProvider();
try {
+#if GTK_4_12 && (VALA_0_56_GREATER_11 || VALA_0_58)
+ p.load_from_string(css);
+#elif (VALA_0_56_11 || VALA_0_56_12)
+ p.load_from_data(css, css.length);
+#else
p.load_from_data(css.data);
+#endif
widget.get_style_context().add_provider(p, Gtk.STYLE_PROVIDER_PRIORITY_APPLICATION);
} catch (GLib.Error err) {
// handle err