From kopete-devel Mon Sep 08 08:09:03 2008 From: Pino Toscano Date: Mon, 08 Sep 2008 08:09:03 +0000 To: kopete-devel Subject: [kopete-devel] [PATCH] error message in Jabber vCard dialog Message-Id: <200809081009.09237.pino () kde ! org> X-MARC-Message: https://marc.info/?l=kopete-devel&m=122086389732723 MIME-Version: 1 Content-Type: multipart/mixed; boundary="--===============1783737011==" --===============1783737011== Content-Type: multipart/signed; boundary="nextPart1411188.qpc6W2O00r"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit --nextPart1411188.qpc6W2O00r Content-Type: multipart/mixed; boundary="Boundary-01=_f2NxInjtT5o7RnA" Content-Transfer-Encoding: 7bit Content-Disposition: inline --Boundary-01=_f2NxInjtT5o7RnA Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, currently, when opening the vCard dialog of a Jabber contact and anything=20 different than the "vCard is available" situation happen, an error message= =20 appears. Although, in some situation the IQ reply sent is valid, but just there is n= o=20 vCard available. libiris already marks this situation in a different way, s= o=20 the attached patch make use of that and presents a (better) message to the= =20 user. (Also, it splits the generic error message in two lines, so it does not=20 expands horizontally way too much.) Comments? =2D-=20 Pino Toscano --Boundary-01=_f2NxInjtT5o7RnA Content-Type: text/x-diff; charset="iso 8859-15"; name="kopete-jabber-vcard.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="kopete-jabber-vcard.diff" Index: ui/dlgjabbervcard.cpp =================================================================== --- ui/dlgjabbervcard.cpp (revisione 858346) +++ ui/dlgjabbervcard.cpp (copia locale) @@ -466,7 +466,10 @@ } else { - m_mainWidget->lblStatus->setText( i18n("Error: vCard could not be fetched correctly. Check connectivity with the Jabber server.") ); + if ( vCard->statusCode() == ( XMPP::Task::ErrDisc + 1 ) ) + m_mainWidget->lblStatus->setText( i18n("No vCard available.") ); + else + m_mainWidget->lblStatus->setText( i18n("Error: vCard could not be fetched correctly.\nCheck connectivity with the Jabber server.") ); //it is maybe possible to anyway edit our own vCard (if it is new if(m_account->myself() == m_contact) setEnabled( true ); --Boundary-01=_f2NxInjtT5o7RnA-- --nextPart1411188.qpc6W2O00r Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.9 (GNU/Linux) iD8DBQBIxN2fTNH2piB/L3oRAoVrAJ9YbKPDOit0BBkcGsrvituP9vowpACfakO1 t8HbNfbs4m9UxiGIdRGZunU= =WLYP -----END PGP SIGNATURE----- --nextPart1411188.qpc6W2O00r-- --===============1783737011== Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Content-Disposition: inline _______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel --===============1783737011==--