From fada1ba067386bafe6a02d11f711a9f49a7a10cf Mon Sep 17 00:00:00 2001 From: plfiorini Date: Sat, 3 Jul 2010 07:55:23 +0000 Subject: [PATCH] * 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. --- application/MainWindow.cpp | 11 ++++++----- application/Server.cpp | 11 ++++++----- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/application/MainWindow.cpp b/application/MainWindow.cpp index 936df37..10bcff1 100644 --- a/application/MainWindow.cpp +++ b/application/MainWindow.cpp @@ -23,7 +23,6 @@ #include #include #include -#include #include #include #include @@ -255,6 +254,7 @@ MainWindow::ImMessage(BMessage* msg) // Sort list view again fListView->Sort(); +#if 0 switch (status) { case CAYA_ONLINE: case CAYA_OFFLINE: @@ -269,16 +269,17 @@ MainWindow::ImMessage(BMessage* msg) message << " is offline!"; BNotification notification(B_INFORMATION_NOTIFICATION); - notification.SetApplication("Caya"); - notification.SetTitle("Presence"); + notification.SetGroup(BString("Caya")); + notification.SetTitle(BString("Presence")); notification.SetIcon(rosterItem->Bitmap()); - notification.SetContent(message.String()); - be_roster->Notify(notification); + notification.SetContent(message); + notification.Send(); } break; default: break; } +#endif } break; } diff --git a/application/Server.cpp b/application/Server.cpp index 9b7365c..ead5db9 100644 --- a/application/Server.cpp +++ b/application/Server.cpp @@ -13,7 +13,6 @@ #include #include #include -#include #include #include "Account.h" @@ -315,13 +314,15 @@ Server::ImMessage(BMessage* msg) CayaProtocolAddOn* addOn = ProtocolManager::Get()->ProtocolAddOn(protocol); +#if 0 BNotification notification(B_PROGRESS_NOTIFICATION); - notification.SetApplication("Caya"); + notification.SetGroup(BString("Caya")); notification.SetTitle(title); notification.SetIcon(addOn->Icon()); notification.SetContent(message); notification.SetProgress(progress); - be_roster->Notify(notification); + notification.Send(); +#endif break; } case IM_NOTIFICATION: @@ -344,11 +345,11 @@ Server::ImMessage(BMessage* msg) = ProtocolManager::Get()->ProtocolAddOn(protocol); BNotification notification((notification_type)type); - notification.SetApplication("Caya"); + notification.SetGroup(BString("Caya")); notification.SetTitle(title); notification.SetIcon(addOn->Icon()); notification.SetContent(message); - be_roster->Notify(notification); + notification.Send(); break; } default: