summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libmatekbd/matekbd-indicator.c8
-rw-r--r--libmatekbd/matekbd-status.c6
-rw-r--r--test/matekbd-status-test.c5
3 files changed, 13 insertions, 6 deletions
diff --git a/libmatekbd/matekbd-indicator.c b/libmatekbd/matekbd-indicator.c
index 0a43af1..dcb65e9 100644
--- a/libmatekbd/matekbd-indicator.c
+++ b/libmatekbd/matekbd-indicator.c
@@ -202,10 +202,12 @@ matekbd_indicator_fill (MatekbdIndicator * gki)
for (grp = 0; grp < total_groups; grp++) {
GtkWidget *page;
+#if 0
gchar *full_group_name =
(grp <
g_strv_length (globals.full_group_names)) ?
globals.full_group_names[grp] : "?";
+#endif
page = matekbd_indicator_prepare_drawing (gki, grp);
if (page == NULL)
@@ -527,10 +529,10 @@ matekbd_indicator_load_group_names (const gchar ** layout_ids,
if (xkl_engine_get_features (globals.engine) &
XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- GSList *lst = globals.kbd_cfg.layouts_variants;
- for (i = 0; lst; lst = lst->next, i++) {
+ gchar **lst = globals.kbd_cfg.layouts_variants;
+ for (i = 0; *lst; lst++, i++) {
globals.full_group_names[i] =
- g_strdup ((char *) lst->data);
+ g_strdup ((char *) *lst);
}
} else {
for (i = total_groups; --i >= 0;) {
diff --git a/libmatekbd/matekbd-status.c b/libmatekbd/matekbd-status.c
index 2462910..d363260 100644
--- a/libmatekbd/matekbd-status.c
+++ b/libmatekbd/matekbd-status.c
@@ -472,10 +472,10 @@ matekbd_status_load_group_names (const gchar ** layout_ids,
if (xkl_engine_get_features (globals.engine) &
XKLF_MULTIPLE_LAYOUTS_SUPPORTED) {
- GSList *lst = globals.kbd_cfg.layouts_variants;
- for (i = 0; lst; lst = lst->next, i++) {
+ gchar **lst = globals.kbd_cfg.layouts_variants;
+ for (i = 0; *lst; lst++, i++) {
globals.full_group_names[i] =
- g_strdup ((char *) lst->data);
+ g_strdup ((char *) *lst);
}
} else {
for (i = total_groups; --i >= 0;) {
diff --git a/test/matekbd-status-test.c b/test/matekbd-status-test.c
index d52c598..78cdb48 100644
--- a/test/matekbd-status-test.c
+++ b/test/matekbd-status-test.c
@@ -49,6 +49,11 @@ main (int argc, char **argv)
icon = matekbd_status_new ();
+ if (icon == NULL)
+ {
+ return 1;
+ }
+
gtk_main ();
return 0;