summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorinfirit <[email protected]>2015-09-07 00:47:51 +0200
committerinfirit <[email protected]>2015-09-07 02:43:13 +0200
commit90075f0eb2af9c6a377640214e9971330c911836 (patch)
treed077a2a7a119001703d315278cc9765549acfe11
parentf3d8a72e097d997978213a2dbd3edbb83ad30047 (diff)
downloadlibmatekbd-90075f0eb2af9c6a377640214e9971330c911836.tar.bz2
libmatekbd-90075f0eb2af9c6a377640214e9971330c911836.tar.xz
Use variant-specific short descriptions, if available
Taken from libgnomekbd, Commit: d27cb9b53c1c8a361f752e1008c993e2d37acb6c From: Sergey V. Udaltsov <[email protected]>
-rw-r--r--libmatekbd/matekbd-desktop-config.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/libmatekbd/matekbd-desktop-config.c b/libmatekbd/matekbd-desktop-config.c
index 39c31ef..0038a9b 100644
--- a/libmatekbd/matekbd-desktop-config.c
+++ b/libmatekbd/matekbd-desktop-config.c
@@ -276,7 +276,7 @@ matekbd_desktop_config_load_group_descriptions (MatekbdDesktopConfig
{
gchar **sld, **lld, **svd, **lvd;
gchar **psld, **plld, **plvd;
- gchar **psgn, **pfgn;
+ gchar **psgn, **pfgn, **psvd;
gint total_descriptions;
if (!matekbd_desktop_config_get_lv_descriptions
@@ -295,8 +295,11 @@ matekbd_desktop_config_load_group_descriptions (MatekbdDesktopConfig
plld = lld;
psld = sld;
plvd = lvd;
+ psvd = svd;
while (plld != NULL && *plld != NULL) {
- *psgn++ = g_strdup (*psld++);
+ gchar *sd = (*psvd[0] == '\0') ? *psld : *psvd;
+ psld++, psvd++;
+ *psgn++ = g_strdup (sd);
*pfgn++ = g_strdup (matekbd_keyboard_config_format_full_layout
(*plld++, *plvd++));
}