aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/theme')
-rw-r--r--src/modules/theme/ThemeFunctions.cpp6
-rw-r--r--src/modules/theme/ThemeManagementDialog.cpp17
-rw-r--r--src/modules/theme/ThemeManagementDialog.h4
-rw-r--r--src/modules/theme/WebThemeInterfaceDialog.cpp8
-rw-r--r--src/modules/theme/WebThemeInterfaceDialog.h4
5 files changed, 5 insertions, 34 deletions
diff --git a/src/modules/theme/ThemeFunctions.cpp b/src/modules/theme/ThemeFunctions.cpp
index 0583e9a5a..0d458e416 100644
--- a/src/modules/theme/ThemeFunctions.cpp
+++ b/src/modules/theme/ThemeFunctions.cpp
@@ -144,7 +144,7 @@ namespace ThemeFunctions
r.getStringInfoField("Date", szPackageDate);
QString szWarnings;
- QString szDetails = "<html><body bgcolor=\"#ffffff\">";
+ QString szDetails = "<html><body>";
QString szTmp;
int iIdx = 0;
@@ -237,8 +237,8 @@ namespace ThemeFunctions
// clang-format off
hd.szHtmlText = QString(
- "<html bgcolor=\"#ffffff\">" \
- "<body bgcolor=\"#ffffff\">" \
+ "<html>" \
+ "<body>" \
"<p><center>" \
"<h2>%1 %2</h2>" \
"</center></p>" \
diff --git a/src/modules/theme/ThemeManagementDialog.cpp b/src/modules/theme/ThemeManagementDialog.cpp
index fb6317000..644197c16 100644
--- a/src/modules/theme/ThemeManagementDialog.cpp
+++ b/src/modules/theme/ThemeManagementDialog.cpp
@@ -23,10 +23,7 @@
//=============================================================================
#include "kvi_settings.h"
-#if defined(COMPILE_WEBENGINE_SUPPORT)
#include "WebThemeInterfaceDialog.h"
-#endif
-
#include "ThemeManagementDialog.h"
#include "PackThemeDialog.h"
#include "SaveThemeDialog.h"
@@ -113,9 +110,8 @@ ThemeManagementDialog::ThemeManagementDialog(QWidget * parent)
: QWidget(parent)
{
m_pItemDelegate = nullptr;
-#ifdef COMPILE_WEBENGINE_SUPPORT
m_pWebThemeInterfaceDialog = nullptr;
-#endif
+
setObjectName("theme_options_widget");
setWindowTitle(__tr2qs_ctx("Manage Themes - KVIrc", "theme"));
setWindowIcon(*(g_pIconManager->getSmallIcon(KviIconManager::Theme)));
@@ -144,7 +140,6 @@ ThemeManagementDialog::ThemeManagementDialog(QWidget * parent)
m_pPackThemeButton = new QToolButton(pHBox);
m_pPackThemeButton->setIcon(*(g_pIconManager->getBigIcon(KVI_BIGICON_PACK)));
-
m_pPackThemeButton->setIconSize(QSize(32, 32));
m_pPackThemeButton->setToolTip(__tr2qs_ctx("Export selected themes to a distributable package", "theme"));
connect(m_pPackThemeButton, SIGNAL(clicked()), this, SLOT(packTheme()));
@@ -241,13 +236,11 @@ ThemeManagementDialog::~ThemeManagementDialog()
delete m_pItemDelegate;
g_rectManagementDialogGeometry = QRect(pos().x(), pos().y(), size().width(), size().height());
m_pInstance = nullptr;
-#ifdef COMPILE_WEBENGINE_SUPPORT
if(m_pWebThemeInterfaceDialog)
{
m_pWebThemeInterfaceDialog->deleteLater();
m_pWebThemeInterfaceDialog = nullptr;
}
-#endif //COMPILE_WEBENGINE_SUPPORT
}
void ThemeManagementDialog::closeClicked()
@@ -418,7 +411,6 @@ void ThemeManagementDialog::installFromFile()
void ThemeManagementDialog::getMoreThemes()
{
-#ifdef COMPILE_WEBENGINE_SUPPORT
if(m_pWebThemeInterfaceDialog)
{
m_pWebThemeInterfaceDialog->show();
@@ -429,18 +421,11 @@ void ThemeManagementDialog::getMoreThemes()
QObject::connect(m_pWebThemeInterfaceDialog, SIGNAL(destroyed()), this, SLOT(webThemeInterfaceDialogDestroyed()));
m_pWebThemeInterfaceDialog->show();
}
-#else
- if(!g_pMainWindow)
- return;
- g_pMainWindow->executeInternalCommand(KVI_INTERNALCOMMAND_OPENURL_KVIRC_THEMES);
-#endif
}
void ThemeManagementDialog::webThemeInterfaceDialogDestroyed()
{
-#ifdef COMPILE_WEBENGINE_SUPPORT
m_pWebThemeInterfaceDialog = nullptr;
-#endif
fillThemeBox();
}
diff --git a/src/modules/theme/ThemeManagementDialog.h b/src/modules/theme/ThemeManagementDialog.h
index 743cd160a..e82dbbcde 100644
--- a/src/modules/theme/ThemeManagementDialog.h
+++ b/src/modules/theme/ThemeManagementDialog.h
@@ -39,9 +39,7 @@
#include <QMenu>
#include "kvi_settings.h"
-#if defined(COMPILE_WEBENGINE_SUPPORT) || defined(Q_MOC_RUN)
#include "WebThemeInterfaceDialog.h"
-#endif
class QLineEdit;
class QPushButton;
@@ -76,9 +74,7 @@ protected:
QMenu * m_pContextPopup;
QToolButton * m_pDeleteThemeButton;
QToolButton * m_pPackThemeButton;
-#if defined(COMPILE_WEBENGINE_SUPPORT) || defined(Q_MOC_RUN)
WebThemeInterfaceDialog * m_pWebThemeInterfaceDialog;
-#endif
public:
static ThemeManagementDialog * instance() { return m_pInstance; }
static void display(bool bTopLevel);
diff --git a/src/modules/theme/WebThemeInterfaceDialog.cpp b/src/modules/theme/WebThemeInterfaceDialog.cpp
index e6eb16711..84c177845 100644
--- a/src/modules/theme/WebThemeInterfaceDialog.cpp
+++ b/src/modules/theme/WebThemeInterfaceDialog.cpp
@@ -24,8 +24,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_WEBENGINE_SUPPORT
-
#include "WebThemeInterfaceDialog.h"
#include "ThemeFunctions.h"
@@ -48,9 +46,7 @@ WebThemeInterfaceDialog::WebThemeInterfaceDialog(QWidget * par)
g_pApp->getGlobalKvircDirectory(m_szGlobalThemesPath, KviApplication::Themes);
m_szGlobalThemesPath += KVI_PATH_SEPARATOR_CHAR;
- setPackagePageUrl(
- QString::fromLatin1("https://www.kvirc.net/app/themes.php?version=" KVI_VERSION "&lang=%1")
- .arg(KviLocale::instance()->localeName()));
+ setPackagePageUrl("https://kvirc.github.io/kvirc-themes/");
}
WebThemeInterfaceDialog::~WebThemeInterfaceDialog()
= default;
@@ -67,5 +63,3 @@ bool WebThemeInterfaceDialog::packageIsInstalled(const QString & szId, const QSt
return KviFileUtils::fileExists(m_szGlobalThemesPath + szSubdir) || KviFileUtils::fileExists(m_szLocalThemesPath + szSubdir);
}
-
-#endif //COMPILE_WEBENGINE_SUPPORT
diff --git a/src/modules/theme/WebThemeInterfaceDialog.h b/src/modules/theme/WebThemeInterfaceDialog.h
index c71827391..1db0b18cb 100644
--- a/src/modules/theme/WebThemeInterfaceDialog.h
+++ b/src/modules/theme/WebThemeInterfaceDialog.h
@@ -26,8 +26,6 @@
#include "kvi_settings.h"
-#ifdef COMPILE_WEBENGINE_SUPPORT
-
#include "KviWebPackageManagementDialog.h"
class WebThemeInterfaceDialog : public KviWebPackageManagementDialog
@@ -46,6 +44,4 @@ protected:
bool installPackage(const QString & szPath, QString & szError) override;
};
-#endif //COMPILE_WEBENGINE_SUPPORT
-
#endif //_WEBTHEMEINTERFACEDIALOG_H_