Changeset 6454 for trunk/qt4-gui/src

Show
Ignore:
Timestamp:
07/20/08 17:08:55 (4 months ago)
Author:
flynd
Message:

Update to r6453. Only disallow leaving the server side group, don't stop user from adding if the contact for some reason is not member of the same group locally.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/qt4-gui/src/core/usermenu.cpp

    r6453 r6454  
    327327  { 
    328328    unsigned short gid = a->data().toUInt(); 
    329     a->setChecked(u->GetInGroup(GROUPS_USER, gid)); 
    330     a->setEnabled(gid != serverGroup); 
     329    bool inGroup = u->GetInGroup(GROUPS_USER, gid); 
     330    a->setChecked(inGroup); 
     331 
     332    // Don't allow leaving group if contact is member of the same group at the server side 
     333    a->setEnabled(!inGroup || gid != serverGroup); 
    331334  } 
    332335  foreach (QAction* a, mySystemGroupActions->actions())