Members of the KDE Community are recommended to subscribe to the kde-community mailing list at https://mail.kde.org/mailman/listinfo/kde-community to allow them to participate in important discussions and receive other important announcements

Commit b0c90208 authored by Laurent Montel's avatar Laurent Montel 😁 Committed by Pali Rohár

Fix reactivate select icon

parent 5d817600
......@@ -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>
......
......@@ -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();
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment