Version: 0.99-devel (using KDE KDE 3.2.1) Installed from: Compiled From Sources OS: Linux File->Close closes the current window, and does not delete any data objects, so it behaves identically to Window->Close. It may be confusing to have two menu items that work identically. In addition, closing a window is not really a "File" function. File->New Window would seem to be more comfortably located in Window as Window->New. (wishlist only)
I would agree that File->Close should close all open windows, after querying the user if they want to save. This makes the Close option on the same level as Open and Open Recent. For the New Window... item unfortunately the kmdi library has total control of this.
Would it be possible to not add the KMDI Window menu to the menubar, and create a custom one for kst? Then connect the aboutToShow() signal for this custom menu to a slot that duplicates the current items in the KMDI Window menu, and adds any additional items (like New Window)?
I have a fix for this and will check it in once 0.99 is released.
CVS commit by arwalker: Moved the File->New Window... menu item to Window->New... which is the more logical location for it. Fix for 87002. CCMAIL: 87002-done@bugs.kde.org M +9 -2 kst.cpp 1.211 M +1 -0 kst.h 1.99 --- kdeextragear-2/kst/kst/kst.cpp #1.210:1.211 @@ -208,7 +208,15 @@ KstApp::KstApp(QWidget *parent, const ch menuBar()->insertItem(i18n("&Window"), windowMenu()); } + QObject::connect( windowMenu(), SIGNAL(aboutToShow()), this, SLOT(addNewWindowMenu()) ); } } + +void KstApp::addNewWindowMenu() { + int id = windowMenu()->insertItem(i18n("&New..."), this, SLOT(slotFileNewWindow()), 0, -1, 0); + windowMenu()->setWhatsThis(id, i18n("Create a new plot window.")); +} + + void KstApp::checkFontPresent(const QString& font) { QFont f(font); @@ -273,10 +281,9 @@ KstApp::~KstApp() { void KstApp::initActions() { - +#if 0 fileNewWindow = new KAction(i18n("New &Window..."), 0, 0, this, SLOT(slotFileNewWindow()), actionCollection(),"file_new_window"); -#if 0 fileOpenNew = KStdAction::openNew(this, SLOT(slotFileNew()), actionCollection()); fileOpenNew->setWhatsThis(i18n("Open Kst plot file.")); --- kdeextragear-2/kst/kst/kst.h #1.98:1.99 @@ -170,4 +170,5 @@ class KstApp : public KMdiMainFrm { void slotSettingsChanged(); + void addNewWindowMenu(); public slots: