[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu May 20 21:57:55 CEST 2004
CVS commit by arwalker:
Added default kmdi menu
M +19 -54 kst.cpp 1.116
M +0 -3 kst.h 1.54
M +0 -5 kstui.rc 1.25
--- kdeextragear-2/kst/kst/kst.cpp #1.115:1.116
@@ -182,20 +182,6 @@ KstApp::KstApp(QWidget *parent, const ch
checkFontPresent("Symbol");
- switch( _mode ) {
- case KMdi::ToplevelMode:
- switchToToplevelMode();
- break;
- case KMdi::TabPageMode:
- switchToTabPageMode();
- break;
- case KMdi::ChildframeMode:
- switchToChildframeMode();
- break;
- case KMdi::IDEAlMode:
- switchToIDEAlMode();
- break;
- default:
- switchToTabPageMode();
- break;
+ if (!isFakingSDIApplication()) {
+ menuBar()->insertItem( i18n("&Window"), windowMenu());
}
@@ -218,30 +204,4 @@ void KstApp::checkFontPresent( const QSt
-void KstApp::mdiModeChanged(KMdi::MdiMode mode) {
- _MDITopLevelAction->setEnabled(true);
- _MDITabModeAction->setEnabled(true);
- _MDIChildFrameAction->setEnabled(true);
-//_MDIIDEAlModeAction->setEnabled(true);
-
- switch( mode ) {
- case KMdi::ToplevelMode:
- _MDITopLevelAction->setEnabled(false);
- break;
- case KMdi::TabPageMode:
- _MDITabModeAction->setEnabled(false);
- break;
- case KMdi::ChildframeMode:
- _MDIChildFrameAction->setEnabled(false);
- break;
-// case KMdi::IDEAlMode:
-// _MDIIDEAlModeAction->setEnabled(false);
-// break;
- default:
- break;
- }
-
- _mode = mode;
-}
-
void KstApp::customEvent(QCustomEvent *pEvent) {
if(pEvent->type() == KstELOGDebugInfoEvent) {
@@ -602,14 +562,4 @@ void KstApp::initActions() {
_reloadAction->setWhatsThis(i18n("Reload the data from file."));
-
- _MDITopLevelAction = new KAction("Toplevel Mode", 0, 0, this, SLOT(switchToToplevelMode()), actionCollection(), "mdi_toplevel");
- _MDITopLevelAction->setWhatsThis(i18n("Set top level MDI mode."));
- _MDIChildFrameAction = new KAction("Childframe Mode", 0, 0, this, SLOT(switchToChildframeMode()), actionCollection(), "mdi_childframe");
- _MDIChildFrameAction->setWhatsThis(i18n("Child frame MDI mode."));
- _MDITabModeAction = new KAction("Tab Mode", 0, 0, this, SLOT(switchToTabPageMode()), actionCollection(), "mdi_tab");
- _MDITabModeAction->setWhatsThis(i18n("Set tab MDI mode."));
-// _MDIIDEAlModeAction = new KAction("IDEAl Mode", 0, 0, this, SLOT(switchToIDEAlMode()), actionCollection(), "mdi_ideal");
-// _MDIIDEAlModeAction->setWhatsThis(i18n("Set IDEAl MDI mode"));
-
createGUI(0L);
}
@@ -711,5 +661,5 @@ void KstApp::saveOptions() {
recent->saveEntries(config, "Recent Files");
- config->writeEntry("MDIMode", (int)_mode);
+ config->writeEntry("MDIMode", (int)mdiMode());
config->sync();
}
@@ -719,5 +669,20 @@ void KstApp::readOptions() {
recent->loadEntries(config, "Recent Files");
- _mode = (KMdi::MdiMode)config->readNumEntry("MDIMode", (int)KMdi::TabPageMode);
+ int mdiMode = config->readNumEntry("MDIMode", (int)KMdi::TabPageMode);
+
+ switch (mdiMode) {
+ case KMdi::ToplevelMode:
+ switchToToplevelMode();
+ break;
+ case KMdi::ChildframeMode:
+ switchToChildframeMode();
+ break;
+ case KMdi::TabPageMode:
+ switchToTabPageMode();
+ break;
+ default:
+ switchToTabPageMode();
+ break;
+ }
}
--- kdeextragear-2/kst/kst/kst.h #1.53:1.54
@@ -276,6 +276,4 @@ class KstApp : public KMdiMainFrm {
void slotPreferences();
- void mdiModeChanged(KMdi::MdiMode);
-
signals:
void settingsChanged();
@@ -421,5 +419,4 @@ class KstApp : public KMdiMainFrm {
KstIfaceImpl *_dcopIface;
UpdateThread *_updateThread;
- KMdi::MdiMode _mode;
};
--- kdeextragear-2/kst/kst/kstui.rc #1.24:1.25
@@ -60,9 +60,4 @@
<Action name="pluginmanager_action"/>
<Action name="extensionmanager_action"/>
- <Menu name="mdi"><text>&MDI Mode</text>
- <Action name="mdi_toplevel"/>
- <Action name="mdi_tab"/>
- <Action name="mdi_childframe"/>
- </Menu>
</Menu>
<Menu name="help"><text>&Help</text>
More information about the Kst
mailing list