summaryrefslogtreecommitdiff
path: root/client/gtk.c
diff options
context:
space:
mode:
authorSamuel Lidén Borell <samuel@kodafritt.se>2014-02-01 18:01:28 +0100
committerSamuel Lidén Borell <samuel@kodafritt.se>2014-02-01 18:01:28 +0100
commit3453849ea3c5c4f5fd7501c781171a582cc15c5b (patch)
treea14d6ea108e0bc292d653d9f635d91ae82d37319 /client/gtk.c
parent7f8ce5148ac329ebb4b2cc18c35a4b3a5be62030 (diff)
downloadfribid-3453849ea3c5c4f5fd7501c781171a582cc15c5b.tar.gz
fribid-3453849ea3c5c4f5fd7501c781171a582cc15c5b.tar.bz2
fribid-3453849ea3c5c4f5fd7501c781171a582cc15c5b.zip
Sort the list of tokens
Diffstat (limited to 'client/gtk.c')
-rw-r--r--client/gtk.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/client/gtk.c b/client/gtk.c
index 03335bb..be6a5f6 100644
--- a/client/gtk.c
+++ b/client/gtk.c
@@ -300,6 +300,7 @@ void platform_startSign(const char *url, const char *hostname, const char *ip,
// Create a GtkListStore of (displayname, token, filename) tuples
tokens = gtk_list_store_new(3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_STRING);
+ gtk_tree_sortable_set_sort_column_id(GTK_TREE_SORTABLE(tokens), 0, GTK_SORT_ASCENDING);
tokenCombo = GTK_COMBO_BOX(gtk_builder_get_object(builder, "signature_combo"));
gtk_combo_box_set_model(tokenCombo, GTK_TREE_MODEL(tokens));
@@ -434,11 +435,10 @@ static gboolean addTokenFunc(gpointer ptr) {
}
// Add token
- gtk_list_store_append(tokens, &iter);
- gtk_list_store_set(tokens, &iter,
- 0, token_getDisplayName(token),
- 1, token,
- 2, filename, -1);
+ gtk_list_store_insert_with_values(tokens, &iter, -1,
+ 0, token_getDisplayName(token),
+ 1, token,
+ 2, filename, -1);
if (filename) {
// The token was manually added. Select it.