Summary: | File->Close does not work as expected, and File->New Window is located strangely | ||
---|---|---|---|
Product: | [Applications] kst | Reporter: | Rick Chern <rchern> |
Component: | general | Assignee: | kst |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.x | ||
Target Milestone: | --- | ||
Platform: | Compiled Sources | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Rick Chern
2004-08-11 23:41:11 UTC
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: |