diff options
author | Priit Laes <plaes@plaes.org> | 2009-07-25 01:09:32 +0800 |
---|---|---|
committer | Priit Laes <plaes@plaes.org> | 2009-07-29 17:42:14 +0800 |
commit | 745f33e3fac9dd57b1da6be26c82a9101adf59cd (patch) | |
tree | 1af0a465913ce9a3cead2692e2ded3d91b902760 /src | |
parent | f64c5a8275701a2d9d22d9b9e75288c7fb161700 (diff) | |
download | gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar.gz gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar.bz2 gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar.lz gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar.xz gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.tar.zst gsoc2013-epiphany-745f33e3fac9dd57b1da6be26c82a9101adf59cd.zip |
Make pdm_dialog_fill_passwords_list asynchronous.
Signed-off-by: Priit Laes <plaes@plaes.org>
Diffstat (limited to 'src')
-rw-r--r-- | src/pdm-dialog.c | 36 |
1 files changed, 21 insertions, 15 deletions
diff --git a/src/pdm-dialog.c b/src/pdm-dialog.c index 697773cd0..c4c28b1cf 100644 --- a/src/pdm-dialog.c +++ b/src/pdm-dialog.c @@ -1270,26 +1270,32 @@ pdm_dialog_passwords_construct (PdmActionInfo *info) } static void -pdm_dialog_fill_passwords_list (PdmActionInfo *info) +pdm_dialog_fill_passwords_list_async_cb (GnomeKeyringResult result, + GList *list, + gpointer data) { - GList *list, *l; - GnomeKeyringResult result; + GList *l; + PdmActionInfo *info = (PdmActionInfo *)data; - result = gnome_keyring_list_item_ids_sync (GNOME_KEYRING_DEFAULT, &list); + if (result != GNOME_KEYRING_RESULT_OK) + return; - if (result == GNOME_KEYRING_RESULT_OK) - { - for (l = list; l != NULL; l = l->next) - info->add (info, l->data); - g_list_free (list); - } + for (l = list; l != NULL; l = l->next) + info->add (info, l->data); - /* Let's get notified when the list changes */ - info->filled = TRUE; + info->filled = TRUE; + gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (info->model), + COL_PASSWORDS_HOST, + GTK_SORT_ASCENDING); +} - gtk_tree_sortable_set_sort_column_id (GTK_TREE_SORTABLE (info->model), - COL_PASSWORDS_HOST, - GTK_SORT_ASCENDING); +static void +pdm_dialog_fill_passwords_list (PdmActionInfo *info) +{ + gnome_keyring_list_item_ids (GNOME_KEYRING_DEFAULT, + pdm_dialog_fill_passwords_list_async_cb, + info, + NULL); } static void |