Resolved a conflict between the Yahoo protocol and MSN that was causing both protocols to do not work, removed some annoying error message notifications that are not valid with Caya. Actually, the idea is to reduce the use of pop-up window in favor of notifications.

This commit is contained in:
barrett 2012-03-20 23:32:18 +00:00
parent 5cf285f588
commit aa93e9ad96
3 changed files with 12 additions and 14 deletions

View File

@ -307,9 +307,9 @@ MSNP::Process(BMessage* msg)
if (fLogged) {
fMainConnection->setState(MSN::STATUS_AVAILABLE, fClientID);
} else if (fSettings) {
if (fMainConnection != NULL) {
if (fMainConnection != NULL)
break;
}
if (fUsername == "")
Error("Empty Username!", NULL);
if (fPassword == "")
@ -333,21 +333,15 @@ MSNP::Process(BMessage* msg)
}
break;
case CAYA_AWAY:
if (fLogged) {
if (fLogged)
fMainConnection->setState(MSN::STATUS_AWAY, fClientID);
} else {
Error("MSN Protocol: You are not logged!", NULL);
}
break;
case CAYA_EXTENDED_AWAY:
break;
case CAYA_DO_NOT_DISTURB:
if (fLogged) {
if (fLogged)
fMainConnection->setState(MSN::STATUS_IDLE, fClientID);
} else {
Error("MSN Protocol: You are not logged!", NULL);
}
break;
case CAYA_OFFLINE:
@ -397,7 +391,6 @@ MSNP::Process(BMessage* msg)
nouveau = false;
y = x;
} else {
delete fSwitchboardList.ItemAt(x)->second;
fSwitchboardList.RemoveItemAt(x);
}

View File

@ -415,18 +415,23 @@ Yahoo::LoggedOut()
{
LOG("Yahoo::LoggedOut()\n");
/*
That portion was causing conflicts with other protocols
don't enable unless you know what you are doing.
BMessage msg(IM_MESSAGE);
msg.AddInt32("im_what", IM_OWN_STATUS_SET);
msg.AddString("protocol", kProtocolSignature);
msg.AddInt32("status", CAYA_OFFLINE);
fServerMsgr->SendMessage(&msg);
fServerMsgr->SendMessage(&msg);*/
if (fYahoo) {
YahooConnection * oldYahoo = fYahoo;
fYahoo = NULL;
delete oldYahoo;
}
BString content(fYahooID);
content << " has logged out!";
_Notify(B_INFORMATION_NOTIFICATION, "Disconnected",

View File

@ -71,7 +71,7 @@ void
YahooConnection::SetAway(enum yahoo_status state, const char *msg)
{
if (fStatus == YAHOO_STATUS_OFFLINE) {
fManager->Error("Calling SetAway() when offline", NULL);
// fManager->Error("Calling SetAway() when offline", NULL);
return;
}
yahoo_set_away(fID, state, msg, 1);
@ -100,7 +100,7 @@ void
YahooConnection::Message(const char* who, const char* msg)
{
if (fStatus == YAHOO_STATUS_OFFLINE) {
fManager->Error( "Can't send message, not connected", who );
fManager->Error("Can't send message, not connected", who );
return;
}