Changeset 6308 for trunk/qt-gui

Show
Ignore:
Timestamp:
06/14/08 21:32:59 (6 months ago)
Author:
eugene
Message:

Fixed compilation after my daemon cleanup.

Location:
trunk/qt-gui/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt-gui/src/editgrp.cpp

    r6284 r6308  
    5858  btnEdit = new QPushButton(tr("Edit Name"), grpGroups); 
    5959  QWhatsThis::add(btnEdit, tr("Edit group name (hit enter to save).")); 
    60   btnDefault = new QPushButton(tr("Set Default"), grpGroups); 
    61   QString defaultWhatsThis = tr("The default group to start up in."); 
    62   QWhatsThis::add(btnDefault, defaultWhatsThis); 
    63   btnNewUser = new QPushButton(tr("Set New Users"), grpGroups); 
    64   QString newUserWhatsThis 
    65       = tr("The group to which new users will be automatically added.  " 
    66            "All new users will be in the local system group New Users " 
    67            "but for server side storage will also be stored in the " 
    68            "specified group."); 
    69   QWhatsThis::add(btnNewUser, newUserWhatsThis); 
    7060  vlay->addWidget(btnAdd); 
    7161  vlay->addWidget(btnRemove); 
     
    7363  vlay->addWidget(btnDown); 
    7464  vlay->addWidget(btnEdit); 
    75   vlay->addWidget(btnDefault); 
    76   vlay->addWidget(btnNewUser); 
    77  
    78   glay->addWidget(new QLabel(tr("Default:"), grpGroups), 1, 0); 
    79   nfoDefault = new CInfoField(grpGroups, true); 
    80   QWhatsThis::add(nfoDefault, defaultWhatsThis); 
    81   glay->addMultiCellWidget(nfoDefault, 1, 1, 1, 2); 
    82   glay->addWidget(new QLabel(tr("New User:"), grpGroups), 2, 0); 
    83   nfoNewUser = new CInfoField(grpGroups, true); 
    84   QWhatsThis::add(nfoNewUser, newUserWhatsThis); 
    85   glay->addMultiCellWidget(nfoNewUser, 2, 2, 1, 2); 
    8665 
    8766  edtName = new QLineEdit(grpGroups); 
     
    11089  connect(btnUp, SIGNAL(clicked()), this, SLOT(slot_up())); 
    11190  connect(btnDown, SIGNAL(clicked()), this, SLOT(slot_down())); 
    112   connect(btnDefault, SIGNAL(clicked()), this, SLOT(slot_default())); 
    113   connect(btnNewUser, SIGNAL(clicked()), this, SLOT(slot_newuser())); 
    11491  connect(btnEdit, SIGNAL(clicked()), this, SLOT(slot_edit())); 
    11592  connect(btnDone, SIGNAL(clicked()), this, SLOT(close())); 
     
    142119  myGroupIds.clear(); 
    143120 
    144   const QString allUsers = Strings::getSystemGroupName(GROUP_ALL_USERS); 
    145  
    146   lstGroups->insertItem(allUsers); 
    147   myGroupIds.push_back(0); 
    148  
    149   if (gUserManager.DefaultGroup() == GROUP_ALL_USERS) 
    150     nfoDefault->setText(allUsers); 
    151   if (gUserManager.NewUserGroup() == GROUP_ALL_USERS) 
    152     nfoNewUser->setText(allUsers); 
    153  
    154121  FOR_EACH_GROUP_START_SORTED(LOCK_R) 
    155122  { 
     
    157124    lstGroups->insertItem(name); 
    158125    myGroupIds.push_back(pGroup->id()); 
    159  
    160     if (gUserManager.DefaultGroup() == pGroup->id()) 
    161       nfoDefault->setText(name); 
    162  
    163     if (gUserManager.NewUserGroup() == pGroup->id()) 
    164       nfoNewUser->setText(name); 
    165126  } 
    166127  FOR_EACH_GROUP_END 
     
    248209} 
    249210 
    250 void EditGrpDlg::slot_default() 
    251 { 
    252   gUserManager.SetDefaultGroup(currentGroupId()); 
    253   RefreshList(); 
    254 } 
    255  
    256 void EditGrpDlg::slot_newuser() 
    257 { 
    258   gUserManager.SetNewUserGroup(currentGroupId()); 
    259   RefreshList(); 
    260 } 
    261  
    262211void EditGrpDlg::slot_edit() 
    263212{ 
  • trunk/qt-gui/src/editgrp.h

    r6284 r6308  
    2929class QPushButton; 
    3030 
    31 class CInfoField; 
    3231class CSignalManager; 
    3332 
     
    4140  QGroupBox *grpGroups; 
    4241  QPushButton *btnAdd, *btnRemove, *btnUp, *btnDown, *btnDone, *btnEdit, 
    43               *btnDefault, *btnNewUser, *btnSave; 
     42              *btnSave; 
    4443 
    4544  QLineEdit *edtName; 
    46   CInfoField *nfoDefault, *nfoNewUser; 
    4745 
    4846  void RefreshList(); 
     
    5654  void slot_editok(); 
    5755  void slot_editcancel(); 
    58   void slot_default(); 
    59   void slot_newuser(); 
    6056signals: 
    6157  void signal_updateGroups(); 
  • trunk/qt-gui/src/mainwin.cpp

    r6305 r6308  
    529529  licqConf.ReadNum("AutoNAMess", autoNAMess, 0); 
    530530 
     531  unsigned short groupType; 
     532  licqConf.ReadNum("GroupId", m_nCurrentGroup, 0); 
     533  licqConf.ReadNum("GroupType", groupType, GROUPS_USER); 
     534  m_nGroupType = static_cast<GroupType>(groupType); 
     535 
    531536  licqConf.SetSection("functions"); 
    532537  licqConf.ReadBool("AutoClose", m_bAutoClose, true); 
     
    540545       gLog.Error("%sUnknown popup key: %s\n", L_INITxSTR, szTemp); 
    541546  } 
    542  
    543   m_nCurrentGroup = gUserManager.DefaultGroup(); 
    544   m_nGroupType = GROUPS_USER; 
    545547 
    546548  // load up position and size from file 
     
    34273429  licqConf.WriteNum("AutoAwayMess", autoAwayMess); 
    34283430  licqConf.WriteNum("AutoNAMess", autoNAMess); 
     3431  licqConf.WriteNum("GroupId", m_nCurrentGroup); 
     3432  licqConf.WriteNum("GroupType", static_cast<unsigned short>(m_nGroupType)); 
    34293433 
    34303434  licqConf.SetSection("functions");