From 54be1fe46eac36e5a3eda8823f5c18af9d75eaee Mon Sep 17 00:00:00 2001 From: Mike Gabriel Date: Tue, 5 Jul 2022 22:04:08 +0200 Subject: src/service.c: Use 'input-keyboard' (symbolic) icon as indicator icon on Lomiri. --- src/service.c | 22 ++++++++++++++++------ 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/src/service.c b/src/service.c index 73f61065..498b0996 100644 --- a/src/service.c +++ b/src/service.c @@ -23,6 +23,8 @@ #define BUS_NAME "org.ayatana.indicator.keyboard" #define BUS_PATH "/org/ayatana/indicator/keyboard" +#define ICON_DEFAULT "input-keyboard" + static guint m_nSignal = 0; static void *m_pLibHandle = NULL; static Keyboard* (*m_fnKeyboardNew)(); @@ -87,14 +89,22 @@ static GVariant* createHeaderState(IndicatorKeyboardService *self) g_variant_builder_add(&cBuilder, "{sv}", "title", g_variant_new_string(_("Keyboard"))); g_variant_builder_add(&cBuilder, "{sv}", "visible", g_variant_new_boolean(TRUE)); - gchar *sLanguage; - m_fnKeyboardGetLayout(self->pPrivate->pKeyboard, -1, &sLanguage, NULL); + GIcon *pIcon = NULL; + if (ayatana_common_utils_is_lomiri()) { + pIcon = g_themed_icon_new_with_default_fallbacks(ICON_DEFAULT); + } + else + { + gchar *sLanguage; + m_fnKeyboardGetLayout(self->pPrivate->pKeyboard, -1, &sLanguage, NULL); + + gchar *sIcon = g_strconcat("ayatana-indicator-keyboard-", sLanguage, NULL); + g_free(sLanguage); - gchar *sIcon = g_strconcat("ayatana-indicator-keyboard-", sLanguage, NULL); - g_free(sLanguage); + pIcon = g_themed_icon_new_with_default_fallbacks(sIcon); + g_free(sIcon); + } - GIcon *pIcon = g_themed_icon_new_with_default_fallbacks(sIcon); - g_free(sIcon); g_variant_builder_add(&cBuilder, "{sv}", "accessible-desc", g_variant_new_string(_("Current keyboard layout"))); if (pIcon) -- cgit v1.2.3 From 1221d55f3c1dca07b5cdae48c80790567d1d3047 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristjan=20R=C3=A4ts?= Date: Sat, 25 Jun 2022 19:02:27 +0000 Subject: Translated using Weblate (Estonian) Currently translated at 100.0% (3 of 3 strings) Translation: Ayatana Indicators/Keyboard Applet Translate-URL: https://hosted.weblate.org/projects/ayatana-indicators/keyboard-applet/et/ --- po/et.po | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/po/et.po b/po/et.po index a592d6e5..beef7100 100644 --- a/po/et.po +++ b/po/et.po @@ -8,16 +8,16 @@ msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" "POT-Creation-Date: 2022-06-15 00:34+0200\n" -"PO-Revision-Date: 2021-02-08 21:50+0000\n" +"PO-Revision-Date: 2022-06-26 19:20+0000\n" "Last-Translator: Kristjan Räts \n" -"Language-Team: Estonian \n" +"Language-Team: Estonian \n" "Language: et\n" "MIME-Version: 1.0\n" "Content-Type: text/plain; charset=UTF-8\n" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=n != 1;\n" -"X-Generator: Weblate 4.5-dev\n" +"X-Generator: Weblate 4.13.1-dev\n" #: ../src/service.c:87 msgid "Keyboard" @@ -28,6 +28,5 @@ msgid "Current keyboard layout" msgstr "Praegune klahvipaigutus" #: ../src/service.c:155 -#, fuzzy msgid "Keyboard Settings…" msgstr "Klaviatuuri seaded…" -- cgit v1.2.3