Changeset 4457

Show
Ignore:
Timestamp:
06/30/06 00:22:29 (2 years ago)
Author:
emostar
Message:

Use auto away, auto na, auto offline in all status modes.
Closes #819

Files:
1 modified

Legend:

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

    r4443 r4457  
    39803980       (unsigned long)idleTime > (unsigned long)(autoOfflineTime * 60000)) 
    39813981  { 
    3982     if (status == ICQ_STATUS_ONLINE || status == ICQ_STATUS_AWAY || status == ICQ_STATUS_NA) 
     3982    if (status != ICQ_STATUS_OFFLINE) 
    39833983    { 
    39843984      changeStatus(ICQ_STATUS_OFFLINE); 
     
    39913991       (unsigned long)idleTime > (unsigned long)(autoNATime * 60000)) 
    39923992  { 
    3993     if (status == ICQ_STATUS_ONLINE || status == ICQ_STATUS_AWAY) 
    3994     { 
    3995       if (autoNAMess) { 
    3996        SARList &sar = gSARManager.Fetch(SAR_NA); 
    3997        ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
    3998        if (o != 0) 
    3999        { 
    4000         o->SetAutoResponse(QString(sar[autoNAMess-1]->AutoResponse()).local8Bit()); 
    4001         gUserManager.DropOwner(); 
    4002        } 
    4003        gSARManager.Drop(); 
     3993    if (status != ICQ_STATUS_NA) 
     3994    { 
     3995      if (autoNAMess) 
     3996      { 
     3997        SARList &sar = gSARManager.Fetch(SAR_NA); 
     3998        ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     3999        if (o != 0) 
     4000        { 
     4001          o->SetAutoResponse(QString(sar[autoNAMess-1]->AutoResponse()).local8Bit()); 
     4002          gUserManager.DropOwner(); 
     4003        } 
     4004        gSARManager.Drop(); 
    40044005      } 
    40054006 
    40064007      changeStatus(ICQ_STATUS_NA); 
    40074008      bAutoNA = true; 
    4008       bAutoAway = (status == ICQ_STATUS_ONLINE || bAutoAway); 
     4009      bAutoAway = true; 
    40094010    } 
    40104011  } 
     
    40124013            (unsigned long)idleTime > (unsigned long)(autoAwayTime * 60000)) 
    40134014  { 
    4014     if (status == ICQ_STATUS_ONLINE) 
    4015     { 
    4016       if (autoAwayMess) { 
    4017        SARList &sar = gSARManager.Fetch(SAR_AWAY); 
    4018        ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
    4019        if (o != 0) 
    4020        { 
    4021         o->SetAutoResponse(QString(sar[autoAwayMess-1]->AutoResponse()).local8Bit()); 
    4022         gUserManager.DropOwner(); 
    4023        } 
    4024        gSARManager.Drop(); 
     4015    if (status != ICQ_STATUS_AWAY) 
     4016    { 
     4017      if (autoAwayMess) 
     4018      { 
     4019        SARList &sar = gSARManager.Fetch(SAR_AWAY); 
     4020        ICQOwner *o = gUserManager.FetchOwner(LOCK_W); 
     4021        if (o != 0) 
     4022        { 
     4023          o->SetAutoResponse(QString(sar[autoAwayMess-1]->AutoResponse()).local8Bit()); 
     4024          gUserManager.DropOwner(); 
     4025        } 
     4026        gSARManager.Drop(); 
    40254027      } 
    40264028