[Winpt-commits] r250 - trunk/Src
scm-commit@wald.intevation.org
scm-commit at wald.intevation.org
Sat Jul 29 12:48:24 CEST 2006
Author: twoaday
Date: 2006-07-29 12:48:22 +0200 (Sat, 29 Jul 2006)
New Revision: 250
Modified:
trunk/Src/wptKeyManager.cpp
Log:
Modified: trunk/Src/wptKeyManager.cpp
===================================================================
--- trunk/Src/wptKeyManager.cpp 2006-07-28 11:18:37 UTC (rev 249)
+++ trunk/Src/wptKeyManager.cpp 2006-07-29 10:48:22 UTC (rev 250)
@@ -688,17 +688,18 @@
/* Delete the list view items which match a key ptr
inside the @rset array. */
static void
-lv_del_confirmed_keys (listview_ctrl_t lv, gpgme_key_t *rset)
+lv_del_confirmed_keys (listview_ctrl_t lv, gpgme_key_t *rset, int n_rset)
{
winpt_key_s key2;
int j, i, n = listview_count_items (lv, 0);
-
- for (i=0; i < n; i++) {
+
+ for (i = n; i > -1; i--) {
if (listview_get_item_state (lv, i)) {
km_get_key (lv, i, &key2);
- for (j=0; rset[j] != NULL; j++) {
- if (rset[j] == key2.ctx)
+ for (j=0; j < n_rset; j++) {
+ if (rset[j] == key2.ctx) {
listview_del_item (lv, i);
+ }
}
}
}
@@ -800,7 +801,7 @@
if (n == 0)
show_msg (dlg, 1500, _("GnuPG Status: Finished"));
gpgme_release (ctx);
- lv_del_confirmed_keys (lv, rset);
+ lv_del_confirmed_keys (lv, rset, k_pos);
delete_keys_from_cache (rset, k_pos);
safe_free (rset);
if (with_seckey)
More information about the Winpt-commits
mailing list