X-Git-Url: https://git.quassel-irc.org/?a=blobdiff_plain;f=src%2Fqtui%2Fsettingspages%2Fidentitiessettingspage.cpp;h=8dd9c0d9d3bac7e77c1b192494f64d4929ddff2c;hb=ef91ece316298bfd7e484ede233822457a61db41;hp=8102f00cefef22774f191408d2f7823e3ddda792;hpb=cedc301cd2f6dc644ddbf9fc9ae4fe605be2e9da;p=quassel.git diff --git a/src/qtui/settingspages/identitiessettingspage.cpp b/src/qtui/settingspages/identitiessettingspage.cpp index 8102f00c..8dd9c0d9 100644 --- a/src/qtui/settingspages/identitiessettingspage.cpp +++ b/src/qtui/settingspages/identitiessettingspage.cpp @@ -24,11 +24,21 @@ #include "identitiessettingspage.h" #include "client.h" +#include "iconloader.h" IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent) : SettingsPage(tr("General"), tr("Identities"), parent) { ui.setupUi(this); + ui.renameIdentity->setIcon(BarIcon("edit-rename")); + ui.addIdentity->setIcon(BarIcon("list-add-user")); + ui.deleteIdentity->setIcon(BarIcon("list-remove-user")); + ui.addNick->setIcon(SmallIcon("list-add")); + ui.deleteNick->setIcon(SmallIcon("edit-delete")); + ui.renameNick->setIcon(SmallIcon("edit-rename")); + ui.nickUp->setIcon(SmallIcon("go-up")); + ui.nickDown->setIcon(SmallIcon("go-down")); + setEnabled(Client::isConnected()); // need a core connection! setWidgetStates(); connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool))); @@ -62,7 +72,6 @@ IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent) // we would need this if we enabled drag and drop in the nicklist... //connect(ui.nicknameList, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(setWidgetStates())); //connect(ui.nicknameList->model(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(nicklistHasChanged())); - } void IdentitiesSettingsPage::setWidgetStates() { @@ -76,7 +85,6 @@ void IdentitiesSettingsPage::setWidgetStates() { ui.nickDown->setDisabled(true); } ui.deleteNick->setEnabled(ui.nicknameList->count() > 1); - } void IdentitiesSettingsPage::coreConnectionStateChanged(bool state) { @@ -444,6 +452,8 @@ void CreateIdentityDlg::on_identityName_textChanged(const QString &text) { SaveIdentitiesDlg::SaveIdentitiesDlg(const QList &toCreate, const QList &toUpdate, const QList &toRemove, QWidget *parent) : QDialog(parent) { //, toCreate(tocreate), toUpdate(toupdate), toRemove(toremove) { ui.setupUi(this); + ui.abort->setIcon(SmallIcon("dialog-cancel")); + numevents = toCreate.count() + toUpdate.count() + toRemove.count(); rcvevents = 0; if(numevents) { @@ -463,9 +473,8 @@ SaveIdentitiesDlg::SaveIdentitiesDlg(const QList &toCreate, const QL numevents--; continue; } - // FIXME this only checks for one changed item rather than all! connect(cid, SIGNAL(updatedRemotely()), this, SLOT(clientEvent())); - Client::updateIdentity(*id); + Client::updateIdentity(id->id(), id->toVariantMap()); } foreach(IdentityId id, toRemove) { Client::removeIdentity(id);