[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenonbeta/kopete/kopete
From: Olivier Goffart <ogoffart () tiscalinet ! be>
Date: 2003-08-02 19:12:51
[Download RAW message or body]
CVS commit by ogoffart:
Update the accuont action menu in the system tray menu each time it is showed
M +14 -5 kopetewindow.cpp 1.128
--- kdenonbeta/kopete/kopete/kopetewindow.cpp #1.127:1.128
@@ -444,7 +444,4 @@ void KopeteWindow::slotAccountRegistered
//slotProtocolStatusIconChanged( proto, proto->statusIcon() );
- KActionMenu *menu = a->actionMenu();
- if( menu )
- menu->plug( tray->contextMenu(), 1 );
// this should be placed in the contactlistview insteads of, but i am lazy to redo a new slot
@@ -611,7 +608,18 @@ void KopeteWindow::slotProtocolStatusIco
}
-void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * /* me */ )
+void KopeteWindow::slotTrayAboutToShowMenu( KPopupMenu * popup )
{
-// kdDebug(14000) << k_funcinfo << "Called. EMPTY" << endl;
+ //KPopupMenu *popup=tray->contextMenu();
+
+ QPtrList<KopeteAccount> accounts = KopeteAccountManager::manager()->accounts();
+ for(KopeteAccount *a=accounts.first() ; a; a=accounts.next() )
+ {
+ KActionMenu *menu = a->actionMenu();
+ if( menu )
+ menu->plug(popup , 1 );
+
+ connect(popup , SIGNAL(aboutToHide()) , menu , SLOT(deleteLater()));
+ }
+
}
@@ -667,4 +675,5 @@ void KopeteWindow::slotSettingsChanged()
KopetePlugin *plugin = 0L;
+ //FIXME: loop only in accounts
while( ( plugin = it.current() ) != 0 )
{
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic