Changeset 6424 for trunk/qt4-gui/src
- Timestamp:
- 07/04/08 23:12:17 (5 months ago)
- Location:
- trunk/qt4-gui/src/core
- Files:
-
- 2 modified
-
licqgui.cpp (modified) (2 diffs)
-
licqgui.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/core/licqgui.cpp
r6393 r6424 818 818 } 819 819 820 UserEventCommon* LicqGui::showEventDialog(int fcn, QString id, unsigned long ppid, int convoId )820 UserEventCommon* LicqGui::showEventDialog(int fcn, QString id, unsigned long ppid, int convoId, bool autoPopup) 821 821 { 822 822 if (id.isEmpty() || ppid == 0) 823 823 return NULL; 824 824 825 // Check if a message window should be made active 826 bool activateMsgwin = Config::Chat::instance()->autoFocus(); 827 828 // Don't change focus if another message window is already active 829 const QWidget* activeWin = QApplication::activeWindow(); 830 if (activeWin != NULL && ((qobject_cast<const UserEventCommon*>(activeWin)) != NULL || 831 (qobject_cast<const UserEventTabDlg*>(activeWin)) != NULL)) 832 activateMsgwin = false; 825 // Focus the new window/tab after showing it 826 bool activateMsgwin = true; 827 828 if (autoPopup) 829 { 830 // Message is triggered by auto-popup (and not by user) so check if it 831 // really should be activated 832 activateMsgwin = Config::Chat::instance()->autoFocus(); 833 834 // Don't change focus if another message window is already active 835 const QWidget* activeWin = QApplication::activeWindow(); 836 if (activeWin != NULL && ((qobject_cast<const UserEventCommon*>(activeWin)) != NULL || 837 (qobject_cast<const UserEventTabDlg*>(activeWin)) != NULL)) 838 activateMsgwin = false; 839 } 833 840 834 841 if (Config::Chat::instance()->msgChatView()) … … 1483 1490 1484 1491 if (bCallSendMsg) 1485 showEventDialog(MessageEvent, id, ppid, sig->CID() );1492 showEventDialog(MessageEvent, id, ppid, sig->CID(), true); 1486 1493 if (bCallUserView) 1487 1494 showViewEventDialog(id, ppid); -
trunk/qt4-gui/src/core/licqgui.h
r6319 r6424 134 134 * @param ppid Contact protocol id 135 135 * @param convoId Conversation id 136 */ 137 UserEventCommon* showEventDialog(int fcn, QString id, unsigned long ppid, int convoId = -1); 136 * @param autoPopup True if the dialog was triggered automatically, false if triggered by the user 137 */ 138 UserEventCommon* showEventDialog(int fcn, QString id, unsigned long ppid, int convoId = -1, bool autoPopup = false); 138 139 139 140 /**
