seahorse r2586 - in trunk: . libcryptui
- From: nnielsen svn gnome org
- To: svn-commits-list gnome org
- Subject: seahorse r2586 - in trunk: . libcryptui
- Date: Sat, 18 Oct 2008 16:25:25 +0000 (UTC)
Author: nnielsen
Date: Sat Oct 18 16:25:24 2008
New Revision: 2586
URL: http://svn.gnome.org/viewvc/seahorse?rev=2586&view=rev
Log:
* libcryptui/cryptui-key-store.c: cryptui_key_store_set_selected_key
used wrong iter. Fixes bug #556187. Patch by Philip Withnall
Modified:
trunk/ChangeLog
trunk/libcryptui/cryptui-key-store.c
Modified: trunk/libcryptui/cryptui-key-store.c
==============================================================================
--- trunk/libcryptui/cryptui-key-store.c (original)
+++ trunk/libcryptui/cryptui-key-store.c Sat Oct 18 16:25:24 2008
@@ -1017,7 +1017,7 @@
{
GtkTreeModel* model = GTK_TREE_MODEL (ckstore->priv->store);
GtkTreeSelection *sel;
- GtkTreeIter iter;
+ GtkTreeIter iter, sel_iter;
const gchar *key;
gboolean have;
@@ -1033,16 +1033,19 @@
/* Is this row in our selection? */
gtk_tree_model_get (model, &iter, CRYPTUI_KEY_STORE_KEY, &key, -1);
have = (key && strcmp (selkey, key) == 0) ? TRUE : FALSE;
-
- /* Using checks so change data store */
- if (ckstore->priv->use_checks)
+
+ if (ckstore->priv->use_checks) {
+ /* Using checks so change data store */
gtk_tree_store_set (ckstore->priv->store, &iter, CRYPTUI_KEY_STORE_CHECK, have, -1);
-
- /* Using normal selection */
- else if (have)
- gtk_tree_selection_select_iter (sel, &iter);
- else
- gtk_tree_selection_unselect_iter (sel, &iter);
+ } else {
+ key_store_get_view_iter (ckstore, &iter, &sel_iter);
+
+ /* Using normal selection */
+ if (have)
+ gtk_tree_selection_select_iter (sel, &sel_iter);
+ else
+ gtk_tree_selection_unselect_iter (sel, &sel_iter);
+ }
} while (gtk_tree_model_iter_next (model, &iter));
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]