Forgot modifications in 786ae0354f.

preferencesAboutTextFull
Yimgo 12 years ago
parent 786ae0354f
commit 1c5601f3a4
  1. 9
      src/domain/UBGraphicsWidgetItem.cpp
  2. 1
      src/domain/UBGraphicsWidgetItem.h

@ -120,6 +120,7 @@ QUrl UBGraphicsWidgetItem::mainHtml()
void UBGraphicsWidgetItem::loadMainHtml() void UBGraphicsWidgetItem::loadMainHtml()
{ {
mInitialLoadDone = false;
load(mMainHtmlUrl); load(mMainHtmlUrl);
} }
@ -1074,8 +1075,7 @@ QString UBGraphicsW3CWidgetItem::freezedWidgetPage()
static QString defaultcontent; static QString defaultcontent;
if (defaultcontent.isNull()) { if (defaultcontent.isNull()) {
QString etcPath = UBPlatformUtils::applicationResourcesDirectory() + "/etc/"; QString freezedWidgetDefaultContentFilePath = freezedWidgetFilePath();
QString freezedWidgetDefaultContentFilePath = etcPath + "freezedWidgetWrapper.html";
QFile wrapperFile(freezedWidgetDefaultContentFilePath); QFile wrapperFile(freezedWidgetDefaultContentFilePath);
if (!wrapperFile.open(QIODevice::ReadOnly | QIODevice::Text)) { if (!wrapperFile.open(QIODevice::ReadOnly | QIODevice::Text)) {
qDebug() << "can't open wrapper file " + freezedWidgetDefaultContentFilePath; qDebug() << "can't open wrapper file " + freezedWidgetDefaultContentFilePath;
@ -1095,6 +1095,11 @@ QString UBGraphicsW3CWidgetItem::freezedWidgetPage()
return defaultcontent; return defaultcontent;
} }
QString UBGraphicsW3CWidgetItem::freezedWidgetFilePath()
{
return UBPlatformUtils::applicationResourcesDirectory() + "/etc/" + "freezedWidgetWrapper.html";
}
bool UBGraphicsW3CWidgetItem::hasNPAPIWrapper(const QString& pMimeType) bool UBGraphicsW3CWidgetItem::hasNPAPIWrapper(const QString& pMimeType)
{ {
loadNPAPIWrappersTemplates(); loadNPAPIWrappersTemplates();

@ -239,6 +239,7 @@ class UBGraphicsW3CWidgetItem : public UBGraphicsWidgetItem
QMap<QString, PreferenceValue> preferences(); QMap<QString, PreferenceValue> preferences();
Metadata metadatas() const; Metadata metadatas() const;
static QString freezedWidgetFilePath();
static QString createNPAPIWrapper(const QString& url, const QString& pMimeType = QString(), const QSize& sizeHint = QSize(300, 150), const QString& pName = QString()); static QString createNPAPIWrapper(const QString& url, const QString& pMimeType = QString(), const QSize& sizeHint = QSize(300, 150), const QString& pName = QString());
static QString createNPAPIWrapperInDir(const QString& url, const QDir& pDir, const QString& pMimeType = QString(), const QSize& sizeHint = QSize(300, 150), const QString& pName = QString()); static QString createNPAPIWrapperInDir(const QString& url, const QDir& pDir, const QString& pMimeType = QString(), const QSize& sizeHint = QSize(300, 150), const QString& pName = QString());
static QString createHtmlWrapperInDir(const QString& html, const QDir& pDir, const QSize& sizeHint, const QString& pName); static QString createHtmlWrapperInDir(const QString& html, const QDir& pDir, const QSize& sizeHint, const QString& pName);

Loading…
Cancel
Save