r20197 by craig - Swap from ScTextBrowser to QTextBrowser in the About window to avoid impending WebKit implosion
scribus-commit
scribus-commit at lists.scribus.net
Tue Jun 23 13:10:06 UTC 2015
Author: craig
Date: Tue Jun 23 13:10:06 2015
New Revision: 20197
URL: http://scribus.net/websvn/listing.php?repname=Scribus&sc=1&rev=20197
Log:
Swap from ScTextBrowser to QTextBrowser in the About window to avoid impending WebKit implosion
Modified:
trunk/Scribus/scribus/scribus.css
trunk/Scribus/scribus/ui/about.cpp
trunk/Scribus/scribus/ui/about.h
trunk/Scribus/scribus/upgradechecker.cpp
trunk/Scribus/scribus/upgradechecker.h
Modified: trunk/Scribus/scribus/scribus.css
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20197&path=/trunk/Scribus/scribus/scribus.css
==============================================================================
--- trunk/Scribus/scribus/scribus.css (original)
+++ trunk/Scribus/scribus/scribus.css Tue Jun 23 13:10:06 2015
@@ -53,11 +53,5 @@
QComboBox#unitSwitcher:on { padding-top: 3px; padding-left: 4px; }
QComboBox#unitSwitcher::drop-down { subcontrol-origin: padding; subcontrol-position: top right; width: 15px; border-left-width: 1px; border-left-color: darkgray; border-left-style: solid; border-top-right-radius: 3px; border-bottom-right-radius: 3px; }
-/*
-FileToolBar QToolButton::menu-indicator { background:red }
-EditToolBar QToolButton::menu-indicator { color:red }
-*/
ScToolBar QToolButton::menu-indicator { image: url(___tb_menu_arrow___); }
-/*
-PDFToolBar QToolButton::menu-indicator { color:red }
-*/
+
Modified: trunk/Scribus/scribus/ui/about.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20197&path=/trunk/Scribus/scribus/ui/about.cpp
==============================================================================
--- trunk/Scribus/scribus/ui/about.cpp (original)
+++ trunk/Scribus/scribus/ui/about.cpp Tue Jun 23 13:10:06 2015
@@ -32,7 +32,6 @@
#include "commonstrings.h"
#include "scconfig.h"
#include "scpaths.h"
-#include "sctextbrowser.h"
#ifdef HAVE_SVNVERSION
#include "svnversion.h"
#endif
@@ -180,45 +179,39 @@
buildID->setText( tr("<p align=\"center\"><b>%1 %2</b></p><p align=\"center\">%3<br>%4 %5<br>%6</p>").arg( tr("Scribus Version")).arg(version).arg(built).arg( tr("Build ID:")).arg(bu).arg(gsver));
tabLayout1->addWidget( buildID, 0, Qt::AlignHCenter );
tabWidget2->addTab( tab, tr( "&About" ) );
+
+ /*! AUTHORS tab */
tab_2 = new QWidget( tabWidget2 );
tabLayout = new QHBoxLayout( tab_2 );
tabLayout->setSpacing( 6 );
tabLayout->setMargin( 10 );
-
-
- /*! AUTHORS tab */
- // /usr/local/scribus14/share/doc/scribus-1.3.5svn/AUTHORS
- textView1 = new ScTextBrowser( tab_2 );
- textView1->setHtml(About::parseAuthorFile(ScPaths::instance().docDir() + "AUTHORS"));
- textView1->swallowContextMenus(true);
- tabLayout->addWidget( textView1 );
- tabWidget2->addTab( tab_2, tr( "A&uthors" ) );
+ authorView = new QTextBrowser( tab_2 );
+ authorView->setHtml(About::parseAuthorFile(ScPaths::instance().docDir() + "AUTHORS"));
+ tabLayout->addWidget( authorView );
+ tabWidget2->addTab( tab_2, tr("A&uthors"));
+
+ /*! TRANSLATION tab */
tab_3 = new QWidget( tabWidget2 );
tabLayout_2 = new QHBoxLayout( tab_3 );
tabLayout_2->setSpacing( 6 );
tabLayout_2->setMargin( 10 );
- textView2 = new ScTextBrowser( tab_3);
-// LanguageManager langmgr;
-// langmgr.init(false);
-
- /*! TRANSLATION tab */
- // /usr/local/scribus14/share/doc/scribus-1.3.5svn/TRANSLATION
- textView2->setHtml(About::parseTranslationFile(ScPaths::instance().docDir() + "TRANSLATION"));
- textView2->swallowContextMenus(true);
- tabLayout_2->addWidget( textView2 );
+ transView = new QTextBrowser( tab_3);
+ transView->setHtml(About::parseTranslationFile(ScPaths::instance().docDir() + "TRANSLATION"));
+ tabLayout_2->addWidget( transView );
tabWidget2->addTab( tab_3, tr( "&Translations" ) );
/*! ONLINE tab (03/04/2004 petr vanek) */
- // /usr/local/scribus14/share/doc/scribus-1.3.5svn/LINKS
tab_4 = new QWidget( tabWidget2 );
- textView4 = new ScTextBrowser( tab_4 );
- textView4->setHtml(About::parseLinksFile(ScPaths::instance().docDir() + "LINKS"));
- textView4->swallowContextMenus(true);
+ onlineView = new QTextBrowser( tab_4 );
+ onlineView->setHtml(About::parseLinksFile(ScPaths::instance().docDir() + "LINKS"));
+ onlineView->setOpenExternalLinks(true);
tabLayout_4 = new QHBoxLayout( tab_4 );
tabLayout_4->setSpacing( 6 );
tabLayout_4->setMargin( 10 );
- tabLayout_4->addWidget( textView4 );
+ tabLayout_4->addWidget( onlineView );
tabWidget2->addTab( tab_4, tr( "&Online" ) );
+
+
/*! UPDATE tab */
tab_5 = new QWidget( tabWidget2 );
tabWidget2->addTab( tab_5, tr( "&Updates" ) );
@@ -226,9 +219,9 @@
updateLayout->setSpacing( 6 );
updateLayout->setMargin( 10 );
checkForUpdateButton = new QPushButton( tr( "Check for Updates" ), tab_5 );
- textView5 = new ScTextBrowser( tab_5);
+ updateView = new QTextBrowser( tab_5);
updateLayout->addWidget( checkForUpdateButton );
- updateLayout->addWidget( textView5 );
+ updateLayout->addWidget( updateView );
/*! LICENCE tab */
tab_Licence = new QWidget( tabWidget2 );
@@ -236,21 +229,21 @@
licenceLayout = new QVBoxLayout( tab_Licence );
licenceLayout->setSpacing( 6 );
licenceLayout->setMargin( 10 );
- textViewLicence = new ScTextBrowser( tab_Licence);
+ textViewLicence = new QTextBrowser( tab_Licence);
licenceLayout->addWidget( textViewLicence );
QFile licenceFile(ScPaths::instance().docDir() + "/COPYING");
if (!licenceFile.open(QIODevice::ReadOnly | QIODevice::Text))
- textViewLicence->setSimpleText( tr("Unable to open licence file. Please check your install directory or the Scribus website for licencing information.") );
+ textViewLicence->setPlainText(tr("Unable to open licence file. Please check your install directory or the Scribus website for licencing information.") );
else
{
QTextStream inTS(&licenceFile);
inTS.setAutoDetectUnicode(true);
inTS.setCodec("UTF-8");
QString licenceText = inTS.readAll();
- textViewLicence->setSimpleText(licenceText);
+ textViewLicence->setPlainText(licenceText);
}
- textViewLicence->swallowContextMenus(true);
+
//Add tab widget to about window
aboutLayout->addWidget( tabWidget2 );
@@ -685,8 +678,8 @@
void About::runUpdateCheck()
{
- textView5->clear();
- UpgradeCheckerGUI uc(textView5);
+ updateView->clear();
+ UpgradeCheckerGUI uc(updateView);
disconnect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
uc.fetch();
connect( checkForUpdateButton, SIGNAL( clicked() ), this, SLOT( runUpdateCheck() ) );
Modified: trunk/Scribus/scribus/ui/about.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20197&path=/trunk/Scribus/scribus/ui/about.h
==============================================================================
--- trunk/Scribus/scribus/ui/about.h (original)
+++ trunk/Scribus/scribus/ui/about.h Tue Jun 23 13:10:06 2015
@@ -8,12 +8,12 @@
#define ABOUT_H
#include <QDialog>
+#include <QTextBrowser>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include "scribusapi.h"
-#include "ui/sctextbrowser.h"
class QLabel;
class QWidget;
class QTabWidget;
@@ -48,11 +48,11 @@
QWidget* tab_4;
QWidget* tab_5;
QWidget* tab_Licence;
- ScTextBrowser* textView1;
- ScTextBrowser* textView2;
- ScTextBrowser* textView4;
- ScTextBrowser* textView5;
- ScTextBrowser* textViewLicence;
+ QTextBrowser* authorView;
+ QTextBrowser* transView;
+ QTextBrowser* onlineView;
+ QTextBrowser* updateView;
+ QTextBrowser* textViewLicence;
QVBoxLayout* aboutLayout;
QVBoxLayout* updateLayout;
QVBoxLayout* licenceLayout;
Modified: trunk/Scribus/scribus/upgradechecker.cpp
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20197&path=/trunk/Scribus/scribus/upgradechecker.cpp
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.cpp (original)
+++ trunk/Scribus/scribus/upgradechecker.cpp Tue Jun 23 13:10:06 2015
@@ -266,7 +266,7 @@
}
}
-UpgradeCheckerGUI::UpgradeCheckerGUI(ScTextBrowser *tb) : UpgradeChecker()
+UpgradeCheckerGUI::UpgradeCheckerGUI(QTextBrowser *tb) : UpgradeChecker()
{
outputWidget=tb;
writeToConsole=false;
@@ -278,7 +278,7 @@
void UpgradeCheckerGUI::outputText(QString text, bool noLineFeed)
{
- ScTextBrowser* w=outputWidget;
+ QTextBrowser* w=outputWidget;
if (w)
{
QString wText(w->toPlainText());
Modified: trunk/Scribus/scribus/upgradechecker.h
URL: http://scribus.net/websvn/diff.php?repname=Scribus&rev=20197&path=/trunk/Scribus/scribus/upgradechecker.h
==============================================================================
--- trunk/Scribus/scribus/upgradechecker.h (original)
+++ trunk/Scribus/scribus/upgradechecker.h Tue Jun 23 13:10:06 2015
@@ -13,7 +13,7 @@
#include <QString>
#include <QStringList>
#include <QNetworkAccessManager>
-class ScTextBrowser;
+#include <QTextBrowser>
/**
@author Craig Bradney <cbradney at zip.com.au>
@@ -60,12 +60,12 @@
Q_OBJECT
public:
- UpgradeCheckerGUI(ScTextBrowser *tb=0);
+ UpgradeCheckerGUI(QTextBrowser *tb=0);
~UpgradeCheckerGUI();
protected:
virtual void outputText(QString text, bool noLineFeed=false);
- ScTextBrowser *outputWidget;
+ QTextBrowser *outputWidget;
};
More information about the scribus-commit
mailing list