Changeset 18

Show
Ignore:
Timestamp:
09/05/06 01:26:01 (2 years ago)
Author:
dmik
Message:

Chat: Added popular Ctrl+Tab and Ctrl+Shift+Tab as hotkeys to switch between tabs in the Tabbed chat mode.

Location:
psi/trunk/src
Files:
3 modified

Legend:

Unmodified
Added
Removed
  • psi/trunk/src/msgmle.cpp

    r2 r18  
    124124} 
    125125 
    126 bool ChatEdit::focusNextPrevChild(bool next) 
    127 { 
    128         return QWidget::focusNextPrevChild(next); 
    129 } 
    130  
    131126void ChatEdit::keyPressEvent(QKeyEvent *e) 
    132127{ 
     
    140135                e->ignore(); 
    141136        else if(e->key() == Key_S && (e->state() & AltButton)) 
     137                e->ignore(); 
     138        else if(e->key() == Key_Backtab && (e->state() & ControlButton)) 
     139                e->ignore(); 
     140        else if(e->key() == Key_Tab && (e->state() & ControlButton)) 
    142141                e->ignore(); 
    143142        else if(e->key() == Key_U && (e->state() & ControlButton)) 
  • psi/trunk/src/msgmle.h

    r2 r18  
    5050 
    5151protected: 
    52         // override the tab/esc behavior 
    53         bool focusNextPrevChild(bool next); 
    5452        void keyPressEvent(QKeyEvent *); 
    5553}; 
  • psi/trunk/src/tabdlg.cpp

    r2 r18  
    408408                closeChat(); 
    409409        } 
    410         else if ( e->key() == Key_PageUp && (e->state() & ControlButton) ) 
     410        else if ( e->key() == Key_PageUp && (e->state() & ControlButton) || 
     411                          e->key() == Key_Backtab && (e->state() & ControlButton) ) 
    411412        { 
    412413                previousTab(); 
    413414        } 
    414         else if ( e->key() == Key_PageDown && (e->state() & ControlButton) ) 
     415        else if ( e->key() == Key_PageDown && (e->state() & ControlButton) || 
     416                      e->key() == Key_Tab && (e->state() & ControlButton) ) 
    415417        { 
    416418                nextTab();