[Kst] kdeextragear-2/kst/kst
Andrew Walker
arwalker at sumusltd.com
Thu May 20 23:14:23 CEST 2004
CVS commit by arwalker:
Added the Window immediately before the Help menu, if we can find it.
M +22 -1 kst.cpp 1.118
--- kdeextragear-2/kst/kst/kst.cpp #1.117:1.118
@@ -183,6 +183,27 @@ KstApp::KstApp(QWidget *parent, const ch
if (!isFakingSDIApplication()) {
+ QString strMenuTitle;
+ bool bAddedWindowMenu = false;
+ int iMenuCount;
+ int iMenuIndex;
+ int iMenuId;
+
+ iMenuCount = menuBar()->count();
+ for (iMenuIndex=0; iMenuIndex<iMenuCount; iMenuIndex++) {
+ iMenuId = menuBar()->idAt(iMenuIndex);
+ if (iMenuId != -1) {
+ strMenuTitle = menuBar()->text(iMenuId);
+ if (strMenuTitle.compare(i18n("&Help"))==0) {
+ menuBar()->insertItem( i18n("&Window"), windowMenu(), 100, iMenuIndex);
+ bAddedWindowMenu = true;
+ break;
+ }
+ }
+ }
+
+ if (!bAddedWindowMenu) {
menuBar()->insertItem( i18n("&Window"), windowMenu());
}
+ }
KstViewWindow *w = new KstViewWindow;
More information about the Kst
mailing list