~ubuntu-branches/ubuntu/jaunty/quassel/jaunty-backports

« back to all changes in this revision

Viewing changes to src/qtui/settingspages/identitiessettingspage.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Harald Sitter
  • Date: 2008-11-17 15:22:46 UTC
  • mfrom: (1.1.3 upstream)
  • Revision ID: james.westby@ubuntu.com-20081117152246-3lwlpnr4r08910kv
Tags: 0.3.1-0ubuntu1
* New upstream release (LP: #271403)
* Drop all patches originated from upstream (quassel_*)
* Compile with non-builtin quassel icons
  + Introduce new quassel-data package
  + quassel and quassel-client depend on quassel-data
  + Don't manually enforce icon installation for desktop files in debian/rules
  + Add quassel_01_fix_iconloader.patch
* Drop perl build dependency, I have no clue why it was added in the first
  place. Neither changelog nor Bazaar knows, and since quassel compiles just
  fine without it, removing it should be save.

Show diffs side-by-side

added added

removed removed

Lines of Context:
24
24
#include "identitiessettingspage.h"
25
25
 
26
26
#include "client.h"
 
27
#include "iconloader.h"
27
28
 
28
29
IdentitiesSettingsPage::IdentitiesSettingsPage(QWidget *parent)
29
30
  : SettingsPage(tr("General"), tr("Identities"), parent) {
30
31
 
31
32
  ui.setupUi(this);
 
33
  ui.renameIdentity->setIcon(BarIcon("edit-rename"));
 
34
  ui.addIdentity->setIcon(BarIcon("list-add-user"));
 
35
  ui.deleteIdentity->setIcon(BarIcon("list-remove-user"));
 
36
  ui.addNick->setIcon(SmallIcon("list-add"));
 
37
  ui.deleteNick->setIcon(SmallIcon("edit-delete"));
 
38
  ui.renameNick->setIcon(SmallIcon("edit-rename"));
 
39
  ui.nickUp->setIcon(SmallIcon("go-up"));
 
40
  ui.nickDown->setIcon(SmallIcon("go-down"));
 
41
 
32
42
  setEnabled(Client::isConnected());  // need a core connection!
33
43
  setWidgetStates();
34
44
  connect(Client::instance(), SIGNAL(coreConnectionStateChanged(bool)), this, SLOT(coreConnectionStateChanged(bool)));
62
72
  // we would need this if we enabled drag and drop in the nicklist...
63
73
  //connect(ui.nicknameList, SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(setWidgetStates()));
64
74
  //connect(ui.nicknameList->model(), SIGNAL(rowsInserted(const QModelIndex &, int, int)), this, SLOT(nicklistHasChanged()));
65
 
 
66
75
}
67
76
 
68
77
void IdentitiesSettingsPage::setWidgetStates() {
76
85
    ui.nickDown->setDisabled(true);
77
86
  }
78
87
  ui.deleteNick->setEnabled(ui.nicknameList->count() > 1);
79
 
 
80
 
  // FIXME this is until stuff has been implemented
81
 
  ui.detachAwayEnabled->setEnabled(false);
82
88
}
83
89
 
84
90
void IdentitiesSettingsPage::coreConnectionStateChanged(bool state) {
446
452
SaveIdentitiesDlg::SaveIdentitiesDlg(const QList<Identity *> &toCreate, const QList<Identity *> &toUpdate, const QList<IdentityId> &toRemove, QWidget *parent)
447
453
  : QDialog(parent) { //, toCreate(tocreate), toUpdate(toupdate), toRemove(toremove) {
448
454
  ui.setupUi(this);
 
455
  ui.abort->setIcon(SmallIcon("dialog-cancel"));
 
456
 
449
457
  numevents = toCreate.count() + toUpdate.count() + toRemove.count();
450
458
  rcvevents = 0;
451
459
  if(numevents) {