[Psi-devel] Canceling XData Froms (XEP-0004) in messages
textshell-I1QKlO at neutronstar.dyndns.org
textshell-I1QKlO at neutronstar.dyndns.org
Mon Feb 19 09:17:53 PST 2007
On Mon, Feb 19, 2007 at 12:05:56PM -0500, Remko Tronçon wrote:
> > So what do you think would be the right behaviour,
> > and why?
>
> You're right, I seemed to have missed that. Roelof, can you fix that?
>
the current code in closeEvent even crashes. I've got a fix for that,
but the real question is, what's the right thing to do if the user closes
the dialog.
in the meantime we could add this patch:
--- old-psi/src/eventdlg.cpp 2007-02-19 15:04:45.000000000 +0100
+++ new-psi/src/eventdlg.cpp 2007-02-19 15:04:45.000000000 +0100
@@ -1421,7 +1421,10 @@
return;
// cancel the data form
- if(d->pb_form_cancel->isEnabled())
+ if(!d->composing && !d->xdata->fields().empty()
+ && QMessageBox::question( this, "Psi",
+ tr("Cancel data form?"),
+ QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes ) == QMessageBox::Yes )
doFormCancel();
e->accept();
More information about the psi-devel
mailing list