Changeset 6283 for trunk/qt4-gui/src/core/usermenu.cpp
- Timestamp:
- 06/14/08 03:47:03 (6 months ago)
- Files:
-
- 1 modified
-
trunk/qt4-gui/src/core/usermenu.cpp (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/core/usermenu.cpp
r6281 r6283 206 206 delete a; 207 207 208 GroupList* g = gUserManager.LockGroupList(LOCK_R); 209 for (unsigned int i = 0; i < g->size(); ++i) 210 { 211 QString name = QString::fromLocal8Bit((*g)[i]); 208 FOR_EACH_GROUP_START_SORTED(LOCK_R) 209 { 210 QString name = QString::fromLocal8Bit(pGroup->name().c_str()); 212 211 213 212 a = myUserGroupActions->addAction(name); 214 a->setData( i + 1);213 a->setData(pGroup->id()); 215 214 a->setCheckable(true); 216 215 217 216 a = myServerGroupActions->addAction(name); 218 a->setData( i + 1);217 a->setData(pGroup->id()); 219 218 a->setCheckable(true); 220 219 } 221 gUserManager.UnlockGroupList();220 FOR_EACH_GROUP_END 222 221 223 222 // Add groups to menu … … 552 551 gUserManager.SetUserInGroup(myId.toLatin1(), myPpid, GROUPS_USER, gid, 553 552 action->isChecked(), false); 554 555 // The daemon does not send an update when group membership changes556 // so tell the contactList it needs to update557 LicqGui::instance()->contactList()->updateUser(myId, myPpid);558 553 } 559 554 … … 578 573 gUserManager.SetUserInGroup(myId.toLatin1(), myPpid, GROUPS_SYSTEM, gid, 579 574 action->isChecked(), true); 580 581 // The daemon does not send an update when group membership changes582 // so tell the contactList it needs to update583 LicqGui::instance()->contactList()->updateUser(myId, myPpid);584 575 } 585 576 … … 588 579 unsigned int gid = action->data().toUInt(); 589 580 gUserManager.SetUserInGroup(myId.toLatin1(), myPpid, GROUPS_USER, gid, true, true); 590 591 // The daemon does not send an update when group membership changes 592 // so tell the contactList it needs to update 593 LicqGui::instance()->contactList()->updateUser(myId, myPpid); 594 } 581 }
