[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdevelop/src
From: Alexander Dymo <cloudtemple () mksat ! net>
Date: 2005-04-08 21:37:32
Message-ID: 20050408213732.61296643 () office ! kde ! org
[Download RAW message or body]
CVS commit by dymo:
Simple Ideal mode now understand most ui settings, loads/saves mainwindow and partcontroller \
settings, and it doesn't crash anymore. Also moving is now persistantly disabled for toolviews. \
Should be almost usable at this point.
M +12 -4 simplemainwindow.cpp 1.2
M +4 -0 simplemainwindow.h 1.2
M +7 -0 newui/ddockwindow.cpp 1.2
M +2 -0 newui/ddockwindow.h 1.2
M +3 -2 newui/dmainwindow.cpp 1.2
--- kdevelop/src/newui/ddockwindow.cpp #1.1:1.2
@@ -248,3 +248,10 @@ void DDockWindow::showWidget(QWidget *wi
}
+void DDockWindow::setMovingEnabled(bool b)
+{
+ //some operations on KMainWindow cause moving to be enabled
+ //but we always don't want DDockWindow instances to be movable
+ QDockWindow::setMovingEnabled(false);
+}
+
#include "ddockwindow.moc"
--- kdevelop/src/newui/ddockwindow.h #1.1:1.2
@@ -56,4 +56,6 @@ public:
virtual QWidget *currentWidget() const;
+ virtual void setMovingEnabled(bool b);
+
private slots:
void selectWidget();
--- kdevelop/src/newui/dmainwindow.cpp #1.1:1.2
@@ -33,4 +33,5 @@ DMainWindow::DMainWindow(QWidget *parent
:KParts::MainWindow(parent, name), m_currentWidget(0)
{
+ loadSettings();
createToolWindows();
m_central = new Ideal::DockSplitter(Qt::Horizontal, this);
@@ -50,6 +51,6 @@ void DMainWindow::loadSettings()
DMainWindow::~DMainWindow()
{
- for (QValueList<QWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it)
- removeWidget(*it);
+/* for (QValueList<QWidget*>::iterator it = m_widgets.begin(); it != m_widgets.end(); ++it)
+ removeWidget(*it);*/
}
--- kdevelop/src/simplemainwindow.cpp #1.1:1.2
@@ -101,8 +101,5 @@ void SimpleMainWindow::init()
this, SLOT(documentChangedState(const KURL&, DocumentState)));
- //seems that smth in init makes docks movable so we need to disable moving again
- toolWindow(DDockWindow::Left)->setMovingEnabled(false);
- toolWindow(DDockWindow::Right)->setMovingEnabled(false);
- toolWindow(DDockWindow::Bottom)->setMovingEnabled(false);
+ loadSettings();
}
@@ -409,3 +406,14 @@ void SimpleMainWindow::slotNewToolbarCon
}
+bool SimpleMainWindow::queryClose()
+{
+ saveSettings();
+ return Core::getInstance()->queryClose();
+}
+
+bool SimpleMainWindow::queryExit()
+{
+ return true;
+}
+
#include "simplemainwindow.moc"
--- kdevelop/src/simplemainwindow.h #1.1:1.2
@@ -56,4 +56,8 @@ public:
void init();
+protected:
+ virtual bool queryClose();
+ virtual bool queryExit();
+
protected slots:
virtual void closeTab();
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic