[gnome-flashback/wip/segeiger/gnome-3-18-inputmethods] Working version
- From: Sebastian Geiger <segeiger src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-flashback/wip/segeiger/gnome-3-18-inputmethods] Working version
- Date: Tue, 12 Jan 2016 23:33:51 +0000 (UTC)
commit defac0329238dfb4af9d5775fe6be28fd78f499f
Author: Sebastian Geiger <sbastig gmx net>
Date: Wed Jan 13 00:33:29 2016 +0100
Working version
.../libinput-sources/gf-candidate-area.c | 6 ++++--
.../libinput-sources/gf-candidate-popup.c | 6 +++---
2 files changed, 7 insertions(+), 5 deletions(-)
---
diff --git a/gnome-flashback/libinput-sources/gf-candidate-area.c
b/gnome-flashback/libinput-sources/gf-candidate-area.c
index 534d01e..e79060b 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-area.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-area.c
@@ -159,7 +159,7 @@ gf_candidate_area_set_candidates (GfCandidateArea *area,
gtk_label_set_text (GTK_LABEL(index_label), index_text);
gtk_label_set_text (GTK_LABEL (candidate_label),
- g_list_nth (candidates, i)->data);
+ g_strdup (g_list_nth (candidates, i)->data));
g_free (index_text);
}
@@ -242,12 +242,14 @@ gf_candidate_area_init (GfCandidateArea *area)
}
area->button_box = gtk_box_new (GTK_ORIENTATION_HORIZONTAL, 0);
+ gtk_container_add (GTK_CONTAINER (area->box_layout), area->button_box);
+
area->prev_button = gtk_button_new_with_label ("Prev");
area->next_button = gtk_button_new_with_label ("Next");
gtk_container_add (GTK_CONTAINER (area->button_box), area->prev_button);
gtk_container_add (GTK_CONTAINER (area->button_box), area->next_button);
- gtk_container_add (GTK_CONTAINER (area->box_layout), area->button_box);
+
g_signal_connect (area->prev_button, "clicked",
G_CALLBACK (prev_button_clicked_cb), area);
diff --git a/gnome-flashback/libinput-sources/gf-candidate-popup.c
b/gnome-flashback/libinput-sources/gf-candidate-popup.c
index 47b7816..c99aab9 100644
--- a/gnome-flashback/libinput-sources/gf-candidate-popup.c
+++ b/gnome-flashback/libinput-sources/gf-candidate-popup.c
@@ -192,13 +192,12 @@ update_lookup_table_cb (IBusPanelService *service,
start_index = page * page_size;
end_index = MIN ((page + 1) * page_size, n_candidates);
- for (i = 0; (index_label = ibus_lookup_table_get_candidate (lookup_table, i)) != NULL; i++)
+ for (i = 0; (index_label = ibus_lookup_table_get_label (lookup_table, i)) != NULL; i++)
{
gchar *text;
text = g_strdup (ibus_text_get_text (index_label));
indexes = g_list_append (indexes, text);
- g_free (text);
}
for (i = start_index; i < end_index; i++)
@@ -209,10 +208,11 @@ update_lookup_table_cb (IBusPanelService *service,
ibus_text = ibus_lookup_table_get_candidate(lookup_table, i);
text = g_strdup (ibus_text_get_text(ibus_text));
candidates = g_list_append (candidates, text);
- g_free (text);
}
gf_candidate_area_set_candidates (popup->candidateArea, indexes, candidates, cursor_position, visible);
+
+ //TODO: free the stuff
}
static void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]