aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/theme
diff options
context:
space:
mode:
authorGravatar un1versal2016-05-06 21:44:19 +0100
committerGravatar un1versal2016-05-06 21:45:53 +0100
commit4e1fd3f69385387d438f3e924882b2204934900c (patch)
treef29bdd01ca42f2e2794e73ec20490ef0933387b0 /src/modules/theme
parentFix text appearing outside the buttonboundary when the text is longer than (#... (diff)
downloadKVIrc-4e1fd3f69385387d438f3e924882b2204934900c.tar.gz
KVIrc-4e1fd3f69385387d438f3e924882b2204934900c.tar.bz2
KVIrc-4e1fd3f69385387d438f3e924882b2204934900c.zip
cleanup: remove more ancient commneted code
Diffstat (limited to 'src/modules/theme')
-rw-r--r--src/modules/theme/PackThemeDialog.cpp8
-rw-r--r--src/modules/theme/ThemeManagementDialog.cpp17
-rw-r--r--src/modules/theme/libkvitheme.cpp1
3 files changed, 3 insertions, 23 deletions
diff --git a/src/modules/theme/PackThemeDialog.cpp b/src/modules/theme/PackThemeDialog.cpp
index 4af6d1326..f7e2b14b0 100644
--- a/src/modules/theme/PackThemeDialog.cpp
+++ b/src/modules/theme/PackThemeDialog.cpp
@@ -50,9 +50,6 @@
#include <QPainter>
#include <QImage>
#include <QBuffer>
-//#include <QComboBox>
-//#include <QToolTip>
-//#include <QPushButton>
PackThemeDialog::PackThemeDialog(QWidget * pParent, KviPointerList<KviThemeInfo> * pThemeInfoList)
: QWizard(pParent)
@@ -333,8 +330,6 @@ PackThemeImageWidget::PackThemeImageWidget(PackThemeDialog * pParent)
pLayout->addWidget(m_pImageSelector);
// Store data in the fields
registerField("packageImagePath*", m_pImageSelector);
-
- //m_pImageSelectionPage = pPage;
}
PackThemeImageWidget::~PackThemeImageWidget()
@@ -417,9 +412,6 @@ void PackThemeDialog::accept()
bool PackThemeDialog::packTheme()
{
- //m_pImageSelector->commit();
- //m_pPathSelector->commit();
-
// Get data from registered fields
m_szAuthor = field("packageAuthor").toString();
m_szName = field("packageName").toString();
diff --git a/src/modules/theme/ThemeManagementDialog.cpp b/src/modules/theme/ThemeManagementDialog.cpp
index 6eda5f88f..d37fbcf52 100644
--- a/src/modules/theme/ThemeManagementDialog.cpp
+++ b/src/modules/theme/ThemeManagementDialog.cpp
@@ -190,7 +190,6 @@ ThemeManagementDialog::ThemeManagementDialog(QWidget * parent)
connect(m_pListWidget, SIGNAL(itemDoubleClicked(QListWidgetItem *)), this, SLOT(applyTheme(QListWidgetItem *)));
//FIXME tooltip
- //connect(m_pListWidget,SIGNAL(tipRequest(QListWidgetItem *,const QPoint &)),this,SLOT(tipRequest(QListWidgetItem *,const QPoint &)));
connect(m_pListWidget, SIGNAL(customContextMenuRequested(const QPoint &)),
this, SLOT(contextMenuRequested(const QPoint &)));
connect(m_pListWidget, SIGNAL(itemSelectionChanged()), this, SLOT(enableDisableButtons()));
@@ -201,34 +200,25 @@ ThemeManagementDialog::ThemeManagementDialog(QWidget * parent)
pSep->setMinimumHeight(8);
pVBox->addWidget(pSep);
- //g->addWidget(pSep,2,0);
-
m_pCurrentInstalledThemeLabel = new QLabel(this);
m_pCurrentInstalledThemeLabel->setText(__tr2qs_ctx("<b><u>Current Installed Theme:</u> ", "theme") + " " + KVI_OPTION_STRING(KviOption_stringIconThemeSubdir) + "</b>");
- // g->addWidget(pLabel,2,0);
+
pVBox->addWidget(m_pCurrentInstalledThemeLabel);
pSep = new QFrame(this);
pSep->setFrameStyle(QFrame::HLine | QFrame::Sunken);
pSep->setMinimumWidth(400);
- // g->addWidget(pSep,3,0);
pVBox->addWidget(pSep);
- // g->addWidget(m_pListWidget,4,0);
pVBox->addWidget(m_pListWidget);
- // KviDynamicToolTip * tip = new KviDynamicToolTip(m_pListWidget);
- // connect(tip,SIGNAL(tipRequest(KviDynamicToolTip *,const QPoint &)),this,SLOT(tipRequest(KviDynamicToolTip *,const QPoint &)));
-
QPushButton * b = new QPushButton(__tr2qs("Close"), this);
b->setMaximumSize(b->sizeHint().width(), b->sizeHint().height());
connect(b, SIGNAL(clicked()), this, SLOT(closeClicked()));
- // g->addWidget(b,5,0);
+
pVBox->addWidget(b);
- // g->setMargin(1);
- // g->setSpacing(1);
pVBox->setAlignment(b, Qt::AlignRight);
fillThemeBox();
m_pContextPopup = new QMenu(this);
@@ -366,7 +356,6 @@ void ThemeManagementDialog::applyCurrentTheme()
KviThemeInfo out;
//qDebug("Apply theme item %x, info %x, %s : %s at location %d",(long)it,(long)it->themeInfo(),it->themeInfo()->directory().toUtf8().data(),it->themeInfo()->subdirectory().toUtf8().data(),it->themeInfo()->location());
-
if(!KviTheme::apply(it->themeInfo()->subdirectory(), it->themeInfo()->location(), out))
{
QString szErr = out.lastError();
@@ -473,14 +462,12 @@ void ThemeManagementDialog::fillThemeBox(bool bBuiltin)
for(int i = 0; i < slThemes.count(); i++)
{
//qDebug("Installed theme %s builtin %d",slThemes.at(i).toUtf8().data(),bBuiltin);
-
KviThemeInfo * inf = new KviThemeInfo();
if(inf->load(slThemes.at(i), bBuiltin ? KviThemeInfo::Builtin : KviThemeInfo::User))
{
ThemeListWidgetItem * it = new ThemeListWidgetItem(m_pListWidget, inf);
//qDebug("Item %x, info %x, info2 %x, %s : %s at location %d",(long)it,(long)inf,(long)it->themeInfo(),it->themeInfo()->directory().toUtf8().data(),it->themeInfo()->subdirectory().toUtf8().data(),it->themeInfo()->location());
-
QPixmap pixmap = inf->smallScreenshot();
if(!pixmap.isNull())
it->setIcon(pixmap.scaled(300, 280, Qt::KeepAspectRatio));
diff --git a/src/modules/theme/libkvitheme.cpp b/src/modules/theme/libkvitheme.cpp
index 68c7c3eb5..7428dc202 100644
--- a/src/modules/theme/libkvitheme.cpp
+++ b/src/modules/theme/libkvitheme.cpp
@@ -106,6 +106,7 @@ static bool theme_kvs_cmd_install(KviKvsModuleCommandCall * c)
If no switch is present then KVIrc tries to determine automatically the
type of theme (user, builtin or external).
*/
+
static bool theme_kvs_cmd_apply(KviKvsModuleCommandCall * c)
{
QString szTheme;