* Changes to notification code for my not yet merged Haiku patch (BNotification API changes).
* Exclude notification code for the moment, until the patch is merged.
This commit is contained in:
parent
afe167b86b
commit
fada1ba067
|
@ -23,7 +23,6 @@
|
||||||
#include <MenuItem.h>
|
#include <MenuItem.h>
|
||||||
#include <Notification.h>
|
#include <Notification.h>
|
||||||
#include <PopUpMenu.h>
|
#include <PopUpMenu.h>
|
||||||
#include <Roster.h>
|
|
||||||
#include <SpaceLayoutItem.h>
|
#include <SpaceLayoutItem.h>
|
||||||
#include <ScrollView.h>
|
#include <ScrollView.h>
|
||||||
#include <StringView.h>
|
#include <StringView.h>
|
||||||
|
@ -255,6 +254,7 @@ MainWindow::ImMessage(BMessage* msg)
|
||||||
// Sort list view again
|
// Sort list view again
|
||||||
fListView->Sort();
|
fListView->Sort();
|
||||||
|
|
||||||
|
#if 0
|
||||||
switch (status) {
|
switch (status) {
|
||||||
case CAYA_ONLINE:
|
case CAYA_ONLINE:
|
||||||
case CAYA_OFFLINE:
|
case CAYA_OFFLINE:
|
||||||
|
@ -269,16 +269,17 @@ MainWindow::ImMessage(BMessage* msg)
|
||||||
message << " is offline!";
|
message << " is offline!";
|
||||||
|
|
||||||
BNotification notification(B_INFORMATION_NOTIFICATION);
|
BNotification notification(B_INFORMATION_NOTIFICATION);
|
||||||
notification.SetApplication("Caya");
|
notification.SetGroup(BString("Caya"));
|
||||||
notification.SetTitle("Presence");
|
notification.SetTitle(BString("Presence"));
|
||||||
notification.SetIcon(rosterItem->Bitmap());
|
notification.SetIcon(rosterItem->Bitmap());
|
||||||
notification.SetContent(message.String());
|
notification.SetContent(message);
|
||||||
be_roster->Notify(notification);
|
notification.Send();
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,7 +13,6 @@
|
||||||
#include <Entry.h>
|
#include <Entry.h>
|
||||||
#include <Notification.h>
|
#include <Notification.h>
|
||||||
#include <Path.h>
|
#include <Path.h>
|
||||||
#include <Roster.h>
|
|
||||||
#include <TranslationUtils.h>
|
#include <TranslationUtils.h>
|
||||||
|
|
||||||
#include "Account.h"
|
#include "Account.h"
|
||||||
|
@ -315,13 +314,15 @@ Server::ImMessage(BMessage* msg)
|
||||||
CayaProtocolAddOn* addOn
|
CayaProtocolAddOn* addOn
|
||||||
= ProtocolManager::Get()->ProtocolAddOn(protocol);
|
= ProtocolManager::Get()->ProtocolAddOn(protocol);
|
||||||
|
|
||||||
|
#if 0
|
||||||
BNotification notification(B_PROGRESS_NOTIFICATION);
|
BNotification notification(B_PROGRESS_NOTIFICATION);
|
||||||
notification.SetApplication("Caya");
|
notification.SetGroup(BString("Caya"));
|
||||||
notification.SetTitle(title);
|
notification.SetTitle(title);
|
||||||
notification.SetIcon(addOn->Icon());
|
notification.SetIcon(addOn->Icon());
|
||||||
notification.SetContent(message);
|
notification.SetContent(message);
|
||||||
notification.SetProgress(progress);
|
notification.SetProgress(progress);
|
||||||
be_roster->Notify(notification);
|
notification.Send();
|
||||||
|
#endif
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IM_NOTIFICATION:
|
case IM_NOTIFICATION:
|
||||||
|
@ -344,11 +345,11 @@ Server::ImMessage(BMessage* msg)
|
||||||
= ProtocolManager::Get()->ProtocolAddOn(protocol);
|
= ProtocolManager::Get()->ProtocolAddOn(protocol);
|
||||||
|
|
||||||
BNotification notification((notification_type)type);
|
BNotification notification((notification_type)type);
|
||||||
notification.SetApplication("Caya");
|
notification.SetGroup(BString("Caya"));
|
||||||
notification.SetTitle(title);
|
notification.SetTitle(title);
|
||||||
notification.SetIcon(addOn->Icon());
|
notification.SetIcon(addOn->Icon());
|
||||||
notification.SetContent(message);
|
notification.SetContent(message);
|
||||||
be_roster->Notify(notification);
|
notification.Send();
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
|
|
Ŝarĝante…
Reference in New Issue