[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/src
From: Jens Dagerbo <jens.dagerbo () swipnet ! se>
Date: 2005-02-08 0:44:41
Message-ID: 20050208004441.F27B41CFB7 () office ! kde ! org
[Download RAW message or body]
CVS commit by dagerbo:
When the toolbars are updated, the GUI is recreated..
so we need to reapply our workarounds.
BUG: 95758
M +2 -2 kdevelopui.rc 1.67
M +37 -18 newmainwindow.cpp 1.34
M +3 -1 newmainwindow.h 1.13
--- kdevelop/src/kdevelopui.rc #1.66:1.67
@@ -1,4 +1,4 @@
<!DOCTYPE kpartgui SYSTEM "kpartgui.dtd">
-<kpartgui version="22" name="kdevelop" >
+<kpartgui version="23" name="kdevelop" >
<MenuBar>
<Menu name="file" noMerge="1"><text>&File</text>
@@ -112,5 +112,5 @@
<Separator />
<Action name="settings_configure_shortcuts" />
- <Action name="settings_configure_toolbars" />
+ <Action name="set_configure_toolbars" />
<Action name="settings_configure_notifications" />
<Action name="settings_configure_editors" />
--- kdevelop/src/newmainwindow.cpp #1.33:1.34
@@ -47,4 +47,5 @@
#include <kedittoolbar.h>
#include <designer.h>
+#include <kstdaction.h>
#include "kdevplugin.h"
@@ -107,4 +108,5 @@ NewMainWindow::NewMainWindow(QWidget *pa
m_raiseEditor->setWhatsThis(i18n("<b>Raise editor</b><p>Focuses the editor."));
+ KStdAction::configureToolbars( this, SLOT(configureToolbars()), actionCollection(), \
"set_configure_toolbars" );
//@fixme why is this part of KDevMainWindow?
@@ -141,21 +143,5 @@ void NewMainWindow::init() {
delete m_pWindowMenu;
- // get the xmlgui created one instead
- m_pWindowMenu = static_cast<QPopupMenu*>(main()->child( "window", "KPopupMenu" ));
-
- if( !m_pWindowMenu )
- {
- kdDebug(9000) << "Couldn't find the XMLGUI window menu. Creating new." << \
endl;
-
- m_pWindowMenu = new QPopupMenu( main(), "window");
- menuBar()->insertItem(i18n("&Window"),m_pWindowMenu);
- }
-
- actionCollection()->action( "file_close" )->plug( m_pWindowMenu );
- actionCollection()->action( "file_close_all" )->plug( m_pWindowMenu );
- actionCollection()->action( "file_closeother" )->plug( m_pWindowMenu );
-
- QObject::connect( m_pWindowMenu, SIGNAL(activated(int)), this, SLOT(openURL(int )) );
- QObject::connect( m_pWindowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu()) );
+ setupWindowMenu();
menuBar()->setEnabled( false );
@@ -212,4 +198,16 @@ void NewMainWindow::init() {
}
+void NewMainWindow::configureToolbars( )
+{
+ kdDebug() << k_funcinfo << endl;
+
+ KEditToolbar dlg( factory() );
+ if ( dlg.exec() )
+ {
+ setupWindowMenu();
+ createGUI( PartController::getInstance()->activePart() );
+ }
+}
+
void NewMainWindow::tabContext(QWidget* widget,const QPoint & pos)
{
@@ -330,4 +328,25 @@ void NewMainWindow::openURL( int id )
}
+void NewMainWindow::setupWindowMenu( )
+{
+ // get the xmlgui created one instead
+ m_pWindowMenu = static_cast<QPopupMenu*>(main()->child( "window", "KPopupMenu" ));
+
+ if( !m_pWindowMenu )
+ {
+ kdDebug(9000) << "Couldn't find the XMLGUI window menu. Creating new." << \
endl; +
+ m_pWindowMenu = new QPopupMenu( main(), "window");
+ menuBar()->insertItem(i18n("&Window"),m_pWindowMenu);
+ }
+
+ actionCollection()->action( "file_close" )->plug( m_pWindowMenu );
+ actionCollection()->action( "file_close_all" )->plug( m_pWindowMenu );
+ actionCollection()->action( "file_closeother" )->plug( m_pWindowMenu );
+
+ QObject::connect( m_pWindowMenu, SIGNAL(activated(int)), this, SLOT(openURL(int )) );
+ QObject::connect( m_pWindowMenu, SIGNAL(aboutToShow()), this, SLOT(fillWindowMenu()) \
); +}
+
void NewMainWindow::fillWindowMenu()
{
--- kdevelop/src/newmainwindow.h #1.12:1.13
@@ -99,4 +99,6 @@ private slots:
void tabContext(QWidget*,const QPoint &);
void tabContextActivated(int);
+ void configureToolbars();
+ void setupWindowMenu();
// void loadMDISettings();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic