Added XSLDbg handbook menu entry to KXSLDbg help menu. This resolves bug 1862.

pull/1/head
Michele Calgaro 11 years ago
parent 4f3fe9af51
commit 14f963cdeb

@ -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"

@ -61,6 +61,7 @@ protected:
public slots:
void quit();
void showXSLDbgHelp();
private slots:
void optionsShowToolbar();

Loading…
Cancel
Save