kdevelop
Joseph Wenninger
kde at jowenn.at
Sat Sep 13 19:41:03 UTC 2003
CVS commit by jowenn:
somehow work with kmdi in kdelibs.
1) It should be considered using the standard xml gui client for the mdi actions
2) the forked/backported kmdi needs some synchronization with kdelibs
CCMAIL: kdevelop-devel at kdevelop.org
M +12 -10 parts/uimode/uichooser_widget.cpp 1.8
M +3 -3 src/mainwindow.cpp 1.41
--- kdevelop/parts/uimode/uichooser_widget.cpp #1.7:1.8
@@ -17,5 +17,5 @@
#include <qradiobutton.h>
-
+#include <kmdidefines.h>
#include <kapplication.h>
#include <kconfig.h>
@@ -50,20 +50,22 @@ void UIChooserWidget::load()
}
- int mdi = config->readNumEntry("MDIMode", 3);
+ int mdi = config->readNumEntry("MDIMode", KMdi::ChildframeMode);
switch (mdi)
{
- case 1:
+ case KMdi::ChildframeMode:
modeMDI->setChecked(true);
break;
- case 2:
+ case KMdi::TabPageMode:
modeTab->setChecked(true);
break;
- case 0:
+ case KMdi::ToplevelMode:
modeToplevel->setChecked(true);
break;
- default:
+ case KMdi::IDEAlMode:
modeIDEAl->setChecked(true);
break;
+ default:
+ break;
}
}
@@ -85,11 +87,11 @@ void UIChooserWidget::save()
if (modeTab->isChecked())
- config->writeEntry("MDIMode", 2);
+ config->writeEntry("MDIMode", KMdi::TabPageMode);
else if (modeToplevel->isChecked())
- config->writeEntry("MDIMode", 0);
+ config->writeEntry("MDIMode", KMdi::ToplevelMode);
else if (modeMDI->isChecked())
- config->writeEntry("MDIMode", 1);
+ config->writeEntry("MDIMode", KMdi::ChildframeMode);
else
- config->writeEntry("MDIMode", 3); // KMdi-IDEA
+ config->writeEntry("MDIMode", KMdi::IDEAlMode); // KMdi-IDEA
}
--- kdevelop/src/mainwindow.cpp #1.40:1.41
@@ -441,5 +441,5 @@ void MainWindow::embedSelectView(QWidget
KMdiChildView *child = wrapper(view, name);
- KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(child,KDockWidget::DockLeft,m_pMdi,25);
+ KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(child,KDockWidget::DockLeft,getMainDockWidget(),25);
// addToolWindow(TreeView, child, name, toolTip);
@@ -451,5 +451,5 @@ void MainWindow::embedSelectViewRight(QW
//we do not have a right pane so we insert it in the default pos
// embedSelectView( view, title, toolTip );
- KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(view,KDockWidget::DockRight,m_pMdi,25);
+ KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(view,KDockWidget::DockRight,getMainDockWidget(),25);
}
@@ -459,5 +459,5 @@ void MainWindow::embedOutputView(QWidget
KMdiChildView *child = wrapper(view, name);
// addToolViewWindow(OutputView, child, name, toolTip);
- KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(child,KDockWidget::DockBottom,m_pMdi,25);
+ KMdiToolViewAccessor *tmp=KMdiMainFrm::addToolWindow(child,KDockWidget::DockBottom,getMainDockWidget(),25);
m_outputViews.append(child);
More information about the KDevelop-devel
mailing list