CVS commit by gogolok: ask for deletion when an user removed subscription from us M +1 -0 TODO 1.62 M +16 -9 jabberaccount.cpp 1.63 --- kdenonbeta/kopete/protocols/jabber/TODO #1.61:1.62 @@ -20,2 +20,3 @@ - "Remove Authorization From" in contact popup menu has wrong position - support different icons for contacts from servers with broken connections etc. +- show (i.e. with a QToolTip) the subscription status: both, to, from --- kdenonbeta/kopete/protocols/jabber/jabberaccount.cpp #1.62:1.63 @@ -867,5 +867,4 @@ void JabberAccount::slotSubscription (co arg (jid.userHost (), 1), i18n ("Authorize Jabber User?"), i18n ("Authorize"), i18n ("Deny"))) { - Jabber::JT_Presence * task; KopeteMetaContact *mc; @@ -903,15 +902,23 @@ void JabberAccount::slotSubscription (co kdDebug (JABBER_DEBUG_GLOBAL) << "[JabberAccount] " << jid.userHost () << " deleted auth!" << endl; - KMessageBox::information (0L, - i18n - ("The Jabber user %1 removed %2's subscription to them. This account will no longer be able to view their online/offline status."). - arg (jid.userHost (), 1).arg (accountId(), 2), i18n ("Notification")); - - /* FIXME: Do we really want that behavior ? - * Delete the item from the roster. */ Jabber::JT_Roster * task = new Jabber::JT_Roster (jabberClient->rootTask ()); + switch (KMessageBox::warningYesNo (0L, + i18n + ("The Jabber user %1 removed %2's subscription to them." + "This account will no longer be able to view their online/offline status." + "\nDo you want to delete the contact?"). + arg (jid.userHost (), 1).arg (accountId(), 2), i18n ("Notification"))) + { + case KMessageBox::Yes: task->remove (jid); task->go (true); + break; + + default: + /* We want to leave the contact in our contact list, so do nothing. */ + break; + + } } }