summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichele Calgaro <michele.calgaro@yahoo.it>2014-05-24 16:03:47 +0900
committerMichele Calgaro <michele.calgaro@yahoo.it>2014-05-24 16:03:47 +0900
commit14f963cdeb3e22f7e069532647d7e396543c9af7 (patch)
treed87bac9066310eb061a23f12b6e4c2962e6e341a
parent4f3fe9af514582ac77e2336b5ff8e91d670579a0 (diff)
downloadtdewebdev-14f963cdeb3e22f7e069532647d7e396543c9af7.tar.gz
tdewebdev-14f963cdeb3e22f7e069532647d7e396543c9af7.zip
Added XSLDbg handbook menu entry to KXSLDbg help menu. This resolves bug 1862.
-rw-r--r--kxsldbg/kxsldbg.cpp27
-rw-r--r--kxsldbg/kxsldbg.h1
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();