diff options
-rw-r--r-- | kxsldbg/kxsldbg.cpp | 27 | ||||
-rw-r--r-- | kxsldbg/kxsldbg.h | 1 |
2 files changed, 23 insertions, 5 deletions
diff --git a/kxsldbg/kxsldbg.cpp b/kxsldbg/kxsldbg.cpp index 465bd8af..dd878bfa 100644 --- a/kxsldbg/kxsldbg.cpp +++ b/kxsldbg/kxsldbg.cpp @@ -17,6 +17,9 @@ #include <klibloader.h> #include <tdemessagebox.h> #include <kstatusbar.h> +#include <tdepopupmenu.h> +#include <tdemenubar.h> +#include <kiconloader.h> KXsldbg::KXsldbg() : DCOPObject("KXsldbg"), KParts::MainWindow( 0L, "kxsldbg" ) @@ -50,12 +53,21 @@ KXsldbg::KXsldbg() // and integrate the part's GUI with the shell's createGUI(m_part); - // connect up signals - kapp->dcopClient()->attach(); - connectDCOPSignal(0, 0, "debuggerPositionChanged(TQString,int)", "newDebuggerPosition(TQString,int)", false ); - connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false ); + // connect up signals + kapp->dcopClient()->attach(); + connectDCOPSignal(0, 0, "debuggerPositionChanged(TQString,int)", "newDebuggerPosition(TQString,int)", false ); + connectDCOPSignal(0, 0, "editorPositionChanged(TQString,int,int)", "newCursorPosition(TQString,int,int)", false ); + + // Add xsldbg 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("&XSLDbg handbook"), TQT_TQOBJECT(this), + TQT_SLOT(showXSLDbgHelp()), NULL, -1, 1); + } } - } else { @@ -170,4 +182,9 @@ void KXsldbg::newDebuggerPosition(const TQString &file, int lineNumber) newCursorPosition(file, lineNumber); } +void KXsldbg::showXSLDbgHelp() +{ + kapp->invokeHelp(TQString(), "xsldbg"); +} + #include "kxsldbg.moc" diff --git a/kxsldbg/kxsldbg.h b/kxsldbg/kxsldbg.h index b9a919f9..a60805bd 100644 --- a/kxsldbg/kxsldbg.h +++ b/kxsldbg/kxsldbg.h @@ -61,6 +61,7 @@ protected: public slots: void quit(); + void showXSLDbgHelp(); private slots: void optionsShowToolbar(); |