diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/simplemainwindow.cpp | 16 | ||||
-rw-r--r-- | src/simplemainwindow.h | 3 |
2 files changed, 18 insertions, 1 deletions
diff --git a/src/simplemainwindow.cpp b/src/simplemainwindow.cpp index 3c9db000..6ca92ef8 100644 --- a/src/simplemainwindow.cpp +++ b/src/simplemainwindow.cpp @@ -89,6 +89,17 @@ void SimpleMainWindow::init() m_mainWindowShare->init(); setupWindowMenu(); + + // Add TDE Programming handbook to Help menu + TQMenuBar *mbar = menuBar(); + TDEPopupMenu *help_menu = dynamic_cast<TDEPopupMenu*> + (menuBar()->findItem(mbar->idAt(mbar->count()-1))->popup()); + if (help_menu) + { + help_menu->insertItem(SmallIconSet("contents"), i18n("TDevelop &Programming Handbook"), + TQT_TQOBJECT(this), TQT_SLOT(slotProgrammingHandbook()), NULL, -1, 1); + } + menuBar()->setEnabled( false ); //FIXME: this checks only for global offers which is not quite correct because @@ -1006,6 +1017,11 @@ void SimpleMainWindow::projectClosed() DMainWindow::setCaption(TQString()); } +void SimpleMainWindow::slotProgrammingHandbook() +{ + kapp->invokeHelp(TQString::null, "tde_app_devel"); +} + #include "simplemainwindow.moc" // kate: space-indent on; indent-width 4; tab-width 4; replace-tabs on diff --git a/src/simplemainwindow.h b/src/simplemainwindow.h index 7dbf5695..cc7d86f4 100644 --- a/src/simplemainwindow.h +++ b/src/simplemainwindow.h @@ -101,7 +101,8 @@ private slots: void raiseRightDock(); void raiseDock(DDockWindow *dock); void lowerAllDocks(); - + void slotProgrammingHandbook(); + private: void createFramework(); void createActions(); |