[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdenetwork/ksirc
From: Richard J. Moore <rich () kde ! org>
Date: 2004-03-25 0:13:27
Message-ID: 20040325001327.B28B69985 () office ! kde ! org
[Download RAW message or body]
CVS commit by rich:
Since the chat windows are the ones used most, lets try to make them pretend
to follow the style guide. I added a showmenu toggle, and also a
fullscreenmode toggle. This stuff really needs to be ported to xmlgui.
M +22 -1 displayMgrMDI.cpp 1.42
M +1 -0 displayMgrMDI.h 1.14
--- kdenetwork/ksirc/displayMgrMDI.cpp #1.41:1.42
@@ -8,4 +8,5 @@
#include <kwin.h>
#include <kaccel.h>
+#include <kaction.h>
#include <kapplication.h>
#include <klocale.h>
@@ -41,5 +42,5 @@ void DisplayMgrMDI::newTopLevel( QWidget
KMainWindow *t = static_cast<KMainWindow *>(w);
- QMenuData *cmenu = t->menuBar();
+ QMenuBar *cmenu = t->menuBar();
if(cmenu){
QPopupMenu *m = new QPopupMenu(t, QCString(t->name()) + "_popup_MDI");
@@ -57,4 +58,17 @@ void DisplayMgrMDI::newTopLevel( QWidget
cmenu->insertItem(i18n("&Window"), m, DMM_MDI_ID, 4);
cmenu->setAccel(Key_M, DMM_MDI_ID);
+
+ QPopupMenu *sm = new QPopupMenu(t, "settings" );
+
+ KToggleAction *showmenu = KStdAction::showMenubar( 0, 0, t->actionCollection() );
+ showmenu->plug( sm );
+ connect( showmenu, SIGNAL(toggled(bool)), cmenu, SLOT(setShown(bool)) );
+
+ KToggleAction *showfull = KStdAction::fullScreen( this, SLOT(toggleFullScreen()),
+ t->actionCollection(), t );
+ showfull->plug( sm );
+ connect( showfull, SIGNAL(toggled(bool)), this, SLOT(setFullScreen(bool)) );
+
+ cmenu->insertItem( i18n("&Settings"), sm, -1, 5 );
}
}
@@ -226,4 +240,11 @@ MDITopLevel *DisplayMgrMDI::topLevel()
}
+void DisplayMgrMDI::setFullScreen( bool full ) {
+ if ( full )
+ m_topLevel->showFullScreen();
+ else
+ m_topLevel->showNormal();
+}
+
void DisplayMgrMDI::moveWindowLeft() {
moveWindow(-1);
--- kdenetwork/ksirc/displayMgrMDI.h #1.13:1.14
@@ -29,4 +29,5 @@ protected slots:
void moveWindowLeft();
void moveWindowRight();
+ void setFullScreen(bool);
protected:
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic