summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMontel Laurent <[email protected]>2017-04-05 07:51:06 +0200
committerPali Roh├ír <[email protected]>2017-12-22 09:10:28 +0100
commitb0c902085e8c083d738dc12f8f1e3dfea9f895fd (patch)
tree6f1181f6d9a0647bd5c23b89139a5f09077f7462
parent5d817600558964d2a3e8be12eae2abfd5caa7a05 (diff)
Fix reactivate select icon
-rw-r--r--kopete/contactlist/kopetegvipropswidget.ui4
-rw-r--r--kopete/contactlist/kopetelviprops.cpp27
2 files changed, 16 insertions, 15 deletions
diff --git a/kopete/contactlist/kopetegvipropswidget.ui b/kopete/contactlist/kopetegvipropswidget.ui
index 511b516..c5454e1 100644
--- a/kopete/contactlist/kopetegvipropswidget.ui
+++ b/kopete/contactlist/kopetegvipropswidget.ui
@@ -132,7 +132,7 @@
</widget>
</item>
<item row="1" column="1" >
- <widget class="QPushButton" name="icnbOpen" >
+ <widget class="KIconButton" name="icnbOpen" >
<property name="text" >
<string/>
</property>
@@ -149,7 +149,7 @@
</widget>
</item>
<item row="2" column="1" >
- <widget class="QPushButton" name="icnbClosed" >
+ <widget class="KIconButton" name="icnbClosed" >
<property name="text" >
<string/>
</property>
diff --git a/kopete/contactlist/kopetelviprops.cpp b/kopete/contactlist/kopetelviprops.cpp
index 889c703..4101372 100644
--- a/kopete/contactlist/kopetelviprops.cpp
+++ b/kopete/contactlist/kopetelviprops.cpp
@@ -57,6 +57,7 @@
#include "addressbooklinkwidget.h"
#include "avatardialog.h"
+#include "kopeteitembase.h"
#include "customnotificationprops.h"
const QLatin1String MC_OFF("user-offline");
@@ -80,8 +81,6 @@ KopeteGVIProps::KopeteGVIProps(Kopete::Group *group, QWidget *parent)
ui_mainWidget = new Ui::KopeteGVIPropsWidget;
ui_mainWidget->setupUi(mainWidget);
- ui_mainWidget->icnbOpen->setIconSize(QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall));
- ui_mainWidget->icnbClosed->setIconSize(QSize(KIconLoader::SizeSmall, KIconLoader::SizeSmall));
QPair<QString, QString> context = qMakePair(QStringLiteral("group"), QString::number(mGroup->groupId()));
mNotificationProps = new CustomNotificationProps(this, context);
@@ -96,15 +95,17 @@ KopeteGVIProps::KopeteGVIProps(Kopete::Group *group, QWidget *parent)
ui_mainWidget->edtDisplayName->setText(mGroup->displayName());
ui_mainWidget->chkUseCustomIcons->setChecked(mGroup->useCustomIcon());
-
-// QString openName = mGroup->icon( Kopete::ContactListElement::Open );
-// if(openName.isEmpty())
-// openName = KOPETE_GROUP_DEFAULT_OPEN_ICON;
-// QString closeName = mGroup->icon( Kopete::ContactListElement::Closed );
-// if(closeName.isEmpty())
-// closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON;
-// ui_mainWidget->icnbOpen->setIcon( openName );
-// ui_mainWidget->icnbClosed->setIcon( closeName );
+ ui_mainWidget->icnbOpen->setIconSize(KIconLoader::SizeSmall);
+ ui_mainWidget->icnbClosed->setIconSize(KIconLoader::SizeSmall);
+
+ QString openName = mGroup->icon( Kopete::ContactListElement::Open );
+ if(openName.isEmpty())
+ openName = KOPETE_GROUP_DEFAULT_OPEN_ICON;
+ QString closeName = mGroup->icon( Kopete::ContactListElement::Closed );
+ if(closeName.isEmpty())
+ closeName = KOPETE_GROUP_DEFAULT_CLOSED_ICON;
+ ui_mainWidget->icnbOpen->setIcon( openName );
+ ui_mainWidget->icnbClosed->setIcon( closeName );
connect(this, SIGNAL(okClicked()), this, SLOT(slotOkClicked()));
connect(ui_mainWidget->chkUseCustomIcons, SIGNAL(toggled(bool)),
@@ -131,12 +132,12 @@ void KopeteGVIProps::slotOkClicked()
// only call setIcon if the icon was changed
if (m_dirty) {
-/* mGroup->setIcon( ui_mainWidget->icnbOpen->icon(),
+ mGroup->setIcon( ui_mainWidget->icnbOpen->icon(),
Kopete::ContactListElement::Open );
mGroup->setIcon( ui_mainWidget->icnbClosed->icon(),
Kopete::ContactListElement::Closed );
-*/ }
+ }
mNotificationProps->storeCurrentCustoms();
}