#! /bin/sh /usr/share/dpatch/dpatch-run ## 05_helpbrowser_ext_urls.dpatch by ## ## All lines beginning with `## DP:' are a description of the patch. ## DP: Use an external webbrowser for http links in help browser @DPATCH@ diff -urNad scribus-1.3.3.12.dfsg~/scribus/helpbrowser.cpp scribus-1.3.3.12.dfsg/scribus/helpbrowser.cpp --- scribus-1.3.3.12.dfsg~/scribus/helpbrowser.cpp 2008-07-05 06:50:06.000000000 -0400 +++ scribus-1.3.3.12.dfsg/scribus/helpbrowser.cpp 2008-07-07 10:05:51.000000000 -0400 @@ -58,6 +58,8 @@ #include #include #include +#include +#include #include #include @@ -208,7 +210,21 @@ return; } #endif +#if !defined(QT_MAC) && !defined(_WIN32) + if (name.left(7)=="http://") + { + QStringList args; + args.append("xdg-open"); + args.append(name); + QProcess webProc(args); + if (!webProc.start()) + QMessageBox::critical(this, tr("External Web Browser Failed to Start"), tr("Scribus was not able to start the external web browser application.")); + } + else + QTextBrowser::setSource(name); +#else QTextBrowser::setSource(name); +#endif } HelpBrowser::HelpBrowser( QWidget* parent, QString /*caption*/, QString guiLanguage, QString jumpToSection, QString jumpToFile)