[gnome-flashback] system-indicators: remove generate-symbolic-icon setting
- From: Alberts Muktupāvels <muktupavels src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback] system-indicators: remove generate-symbolic-icon setting
- Date: Mon, 23 Dec 2019 12:52:28 +0000 (UTC)
commit 0818019000b477141f855fb9643c5ecbe42e5675
Author: Alberts Muktupāvels <alberts muktupavels gmail com>
Date: Mon Dec 23 14:48:30 2019 +0200
system-indicators: remove generate-symbolic-icon setting
Use prefer-symbolic-icons property from applet.
...shback.system-indicators.input-source.gschema.xml | 6 ------
system-indicators/si-input-source.c | 20 ++++++++++++++++++--
2 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/data/schemas/org.gnome.gnome-flashback.system-indicators.input-source.gschema.xml
b/data/schemas/org.gnome.gnome-flashback.system-indicators.input-source.gschema.xml
index 57f78e5..7fb6d09 100644
--- a/data/schemas/org.gnome.gnome-flashback.system-indicators.input-source.gschema.xml
+++ b/data/schemas/org.gnome.gnome-flashback.system-indicators.input-source.gschema.xml
@@ -1,11 +1,5 @@
<schemalist gettext-domain="gnome-flashback">
<schema id="org.gnome.gnome-flashback.system-indicators.input-source">
-
- <key name="generate-symbolic-icon" type="b">
- <default>true</default>
- <summary>Generate symbolic icon</summary>
- </key>
-
<key name="use-ibus-icon-if-available" type="b">
<default>false</default>
<summary>Use IBus icon if available</summary>
diff --git a/system-indicators/si-input-source.c b/system-indicators/si-input-source.c
index f8fc288..d9d0b9a 100644
--- a/system-indicators/si-input-source.c
+++ b/system-indicators/si-input-source.c
@@ -364,21 +364,24 @@ generate_icon_name (const char *text,
static gchar *
get_icon_name (SiInputSource *self)
{
- gboolean symbolic;
char *font_family;
int font_weight;
int font_size;
char *bg_color;
char *fg_color;
+ GpApplet *applet;
+ gboolean symbolic;
char *icon_name;
- symbolic = g_settings_get_boolean (self->settings, "generate-symbolic-icon");
font_family = g_settings_get_string (self->settings, "icon-font-family");
font_weight = g_settings_get_int (self->settings, "icon-font-weight");
font_size = 8;
bg_color = g_settings_get_string (self->settings, "icon-bg-color");
fg_color = g_settings_get_string (self->settings, "icon-fg-color");
+ applet = si_indicator_get_applet (SI_INDICATOR (self));
+ symbolic = gp_applet_get_prefer_symbolic_icons (applet);
+
icon_name = generate_icon_name (self->icon_text,
font_family,
font_weight,
@@ -468,6 +471,14 @@ settings_changed_cb (GSettings *settings,
update_icon (self);
}
+static void
+prefer_symbolic_icons_cb (GObject *object,
+ GParamSpec *pspec,
+ SiInputSource *self)
+{
+ update_icon (self);
+}
+
static void
activate_cb (GObject *object,
GAsyncResult *res,
@@ -1047,6 +1058,11 @@ si_input_source_constructed (GObject *object)
"changed",
G_CALLBACK (settings_changed_cb),
self);
+
+ g_signal_connect (applet,
+ "notify::prefer-symbolic-icons",
+ G_CALLBACK (prefer_symbolic_icons_cb),
+ self);
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]