[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/kopete/kopete
From: Olivier Goffart <ogoffart () kde ! org>
Date: 2005-04-20 10:29:12
Message-ID: 20050420102912.E88255FA () office ! kde ! org
[Download RAW message or body]
CVS commit by ogoffart:
Add "set busy globally" and "set invisible globally" in the connection menu.
This is a bit dirty, but i hope this is going to replaced by dynamic categories
M +27 -0 kopetewindow.cpp 1.233
M +7 -0 kopetewindow.h 1.81
--- kdenetwork/kopete/kopete/kopetewindow.cpp #1.232:1.233
@@ -67,4 +67,5 @@
#include "kopeteuiglobal.h"
#include "systemtray.h"
+#include "kopeteonlinestatusmanager.h"
/* KMainWindow is very broken from our point of view - it deref()'s the app
@@ -190,4 +191,15 @@ void KopeteWindow::initActions()
"SetAwayAll" );
+ selectBusy = new Kopete::AwayAction( i18n("&Busy"), SmallIcon("kopeteaway"), \
0, + this, SLOT( slotGlobalBusyMessageSelect( \
const QString & ) ), actionCollection(), + \
"SetBusyAll" ); +
+
+ actionSetInvisible = new KAction( i18n( "&invisible" ), "kopeteavailable", 0 \
, + this, SLOT( slotSetInvisibleAll() ), actionCollection(),
+ "SetInvisibleAll" );
+
+
+
actionSetAvailable = new KAction( i18n( "&Online" ),
"kopeteavailable", 0 , Kopete::AccountManager::self(),
@@ -200,4 +212,6 @@ void KopeteWindow::initActions()
actionAwayMenu->insert(actionSetAvailable);
actionAwayMenu->insert(selectAway);
+ actionAwayMenu->insert(selectBusy);
+ actionAwayMenu->insert(actionSetInvisible);
actionAwayMenu->insert(actionDisconnect);
@@ -471,4 +485,17 @@ void KopeteWindow::slotGlobalAwayMessage
}
+void KopeteWindow::slotGlobalBusyMessageSelect( const QString &awayReason )
+{
+ Kopete::Away::getInstance()->setGlobalAwayMessage( awayReason );
+ Kopete::AccountManager::self()->setOnlineStatus(
+ Kopete::OnlineStatusManager::Busy , awayReason );
+}
+
+void KopeteWindow::slotSetInvisibleAll( )
+{
+ Kopete::AccountManager::self()->setOnlineStatus( \
Kopete::OnlineStatusManager::Invisible ); +}
+
+
bool KopeteWindow::queryClose()
--- kdenetwork/kopete/kopete/kopetewindow.h #1.80:1.81
@@ -96,4 +96,8 @@ private slots:
*/
void slotGlobalAwayMessageSelect( const QString & );
+ void slotGlobalBusyMessageSelect( const QString & );
+ void slotSetInvisibleAll( );
+
+
void slotQuit();
@@ -170,5 +174,8 @@ public:
KActionMenu* actionDockMenu;
Kopete::AwayAction* selectAway;
+ Kopete::AwayAction* selectBusy;
KAction* actionSetAvailable;
+ KAction* actionSetInvisible;
+
KAction* actionPrefs;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic