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

@ -239,6 +239,7 @@ class UBGraphicsW3CWidgetItem : public UBGraphicsWidgetItem
QMap<QString, PreferenceValue> preferences();
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 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);

Loading…
Cancel
Save