Changeset 46

Show
Ignore:
Timestamp:
09/10/06 18:51:11 (2 years ago)
Author:
dmik
Message:

Psi: ChatDlg?: Changed chat window title emphasis logic (for tabbed chatting) to bring it into accordance with the bringToFront() fix (r:44): don't allow the emphasis to be removed until the chat tab has got input focus, even if we make it the selected one.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • psi/trunk/src/chatdlg.cpp

    r20 r46  
    10291029                deferredScroll(); 
    10301030 
     1031        TabDlg *dlg = NULL; 
     1032        AdvancedWidget<QWidget> *atlw = this; 
     1033        if (d->pa->psi()->isChatTabbed(this)) { 
     1034                dlg = d->pa->psi()->getManagingTabs(this); 
     1035                atlw = dlg; 
     1036        } 
     1037         
    10311038        // if we're not active, notify the user by changing the title 
    1032         if(!isActiveWindow() || isHidden()) { //isHidden==tab hack 
    1033                 if (!isActiveWindow() || !option.raiseChatWindow) { 
    1034                         ++d->pending; 
    1035                         updateCaption(); 
    1036                         doFlash(true); 
    1037                 } 
    1038                 TabDlg *dlg = d->pa->psi()->getManagingTabs(this); 
    1039                 if(option.raiseChatWindow) { 
    1040                         if (!dlg) { 
    1041                                 bringToFront(this, false); 
    1042                         } else { 
    1043                                 dlg->selectTab(this); 
    1044                                 bringToFront(dlg, false); 
    1045                         } 
    1046                 } 
     1039        if(!atlw->isActiveWindow() || (dlg && !dlg->chatOnTop(this))) { 
     1040                // select the chat tab only if the Raise option is set but not when 
     1041                // the tab dialog is already active (so that the user is typing to 
     1042                // some other chat tab). Note that we do that before updateCaption() 
     1043                // because selectTab() will remove any title emphasis (asterisk, etc) 
     1044                if(option.raiseChatWindow && dlg && !dlg->isActiveWindow()) 
     1045                        dlg->selectTab(this); 
     1046                ++d->pending; 
     1047                updateCaption(); 
     1048                if(option.raiseChatWindow) 
     1049                        bringToFront(atlw, false); 
     1050                else 
     1051                        atlw->doFlash(true); 
    10471052        } 
    10481053        //else {