Package: gnucash
Version: 2.2.4-2
Severity: important
Tags: fixed-upstream patch

Hi Thomas,

On the German Gnucash user's mailing list Michael Mühle [1]reported a
problem with the dialog window which informs the user that he should
enter his PIN into the card reader: The dialog window does not disappear
after the PIN is entered which results in an "Error executing backend's
queue". This bug makes Gnucash unusable with any card reader which have
an integrated PIN entry keyboard.

1. http://comments.gmane.org/gmane.comp.gnome.apps.gnucash.german/5942

Fortunately the bug is fixed in upstream in the changesets [2]17337 and
[3]17338, which has been released with Gnucash 2.2.6 recently. I've
extracted the changesets and attached them to this mail as a patch. You
should be able to apply this patch on top of the unpackaged (thus
already patched) source package of gnucash 2.2.4-2 using the command
"patch -p0 < /path/to/pinentry_disappear.patch".

2. http://svn.gnucash.org/trac/changeset/17337
3. http://svn.gnucash.org/trac/changeset/17338

It would be very helpful if this patch finds its way into the release of
Debian Lenny.

Regards
  Micha
Index: src/import-export/aqbanking/gnc-gwen-gui.c
===================================================================
--- src/import-export/aqbanking/gnc-gwen-gui.c	(Revision 17336)
+++ src/import-export/aqbanking/gnc-gwen-gui.c	(Revision 17338)
@@ -187,7 +187,7 @@
     GWEN_GUI_CHECKCERT_FN builtin_checkcert;
 
     /* Dialogs */
-    guint showbox_id;
+    guint32 showbox_id;
     GHashTable *showbox_hash;
     GtkWidget *showbox_last;
 
@@ -959,6 +959,7 @@
 {
     GncGWENGui *gui = GETDATA_GUI(gwen_gui);
     GtkWidget *dialog;
+    guint32 showbox_id;
 
     g_return_val_if_fail(gui, -1);
 
@@ -974,13 +975,17 @@
     g_signal_connect(dialog, "response", G_CALLBACK(gtk_widget_hide), NULL);
     gtk_widget_show_all(dialog);
 
-    g_hash_table_insert(gui->showbox_hash, GUINT_TO_POINTER(gui->showbox_id),
+    showbox_id = gui->showbox_id++;
+    g_hash_table_insert(gui->showbox_hash, GUINT_TO_POINTER(showbox_id),
                         dialog);
-    gui->showbox_id++;
     gui->showbox_last = dialog;
 
-    LEAVE(" ");
-    return 0;
+    /* Give it a change to be showed */
+    if (!keep_alive(gui))
+        showbox_id = 0;
+
+    LEAVE("id=%" G_GUINT32_FORMAT, showbox_id);
+    return showbox_id;
 }
 
 static void

Reply via email to