Changeset 5459
- Timestamp:
- 09/29/07 07:19:48 (14 months ago)
- Location:
- branches/qt-gui_qt4/src
- Files:
-
- 5 modified
-
mainwin.cpp (modified) (7 diffs)
-
mainwin.h (modified) (1 diff)
-
optionsdlg.cpp (modified) (3 diffs)
-
optionsdlg.h (modified) (1 diff)
-
userevents/usereventtabdlg.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
branches/qt-gui_qt4/src/mainwin.cpp
r5447 r5459 455 455 licqConf.ReadBool("AutoClose", m_bAutoClose, true); 456 456 licqConf.ReadBool("AutoPopup", m_bAutoPopup, false); 457 licqConf.ReadBool("AutoFocus", m_bAutoFocus, true); 457 458 licqConf.ReadStr("MsgPopupKey", szTemp, "none"); 458 459 … … 2234 2235 { 2235 2236 e->show(); 2236 if(!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon")) 2237 if (m_bAutoFocus && 2238 (!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon"))) 2237 2239 { 2238 2240 e->raise(); … … 2270 2272 { 2271 2273 userEventTabDlg->show(); 2272 userEventTabDlg->selectTab(e); 2273 userEventTabDlg->raise(); 2274 userEventTabDlg->activateWindow(); 2274 if (m_bAutoFocus) 2275 { 2276 userEventTabDlg->selectTab(e); 2277 userEventTabDlg->raise(); 2278 userEventTabDlg->activateWindow(); 2279 } 2275 2280 } 2276 2281 else 2277 2282 { 2278 2283 e->show(); 2279 if (!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon")) 2284 if (m_bAutoFocus && 2285 (!qApp->activeWindow() || !qApp->activeWindow()->inherits("UserEventCommon"))) 2280 2286 { 2281 2287 e->raise(); … … 2291 2297 } 2292 2298 2299 bool newtabw = false; 2293 2300 QWidget *parent = NULL; 2294 2301 if (m_bTabbedChatting) 2295 2302 { 2296 if (userEventTabDlg != NULL) { 2297 userEventTabDlg->raise(); 2298 userEventTabDlg->activateWindow(); 2303 if (userEventTabDlg != NULL) 2304 { 2305 if (m_bAutoFocus) 2306 { 2307 userEventTabDlg->raise(); 2308 userEventTabDlg->activateWindow(); 2309 } 2299 2310 } 2300 2311 else … … 2303 2314 userEventTabDlg = new UserEventTabDlg(this, 0, "UserEventTabbedDialog"); 2304 2315 connect(userEventTabDlg, SIGNAL(signal_done()), this, SLOT(slot_doneUserEventTabDlg())); 2316 newtabw = true; 2305 2317 } 2306 2318 parent = userEventTabDlg; 2307 2319 } 2308 2320 2309 UserEventCommon *e = NULL;2321 UserEventCommon* e = NULL; 2310 2322 2311 2323 switch (fcn) … … 2357 2369 userEventTabDlg->addTab(e); 2358 2370 userEventTabDlg->show(); 2359 e->setFocus(); 2360 userEventTabDlg->raise(); 2361 userEventTabDlg->activateWindow(); 2371 if (newtabw) 2372 e->setFocus(); 2373 2374 if (m_bAutoFocus) 2375 { 2376 userEventTabDlg->raise(); 2377 userEventTabDlg->activateWindow(); 2378 } 2362 2379 2363 2380 // Check if we want the window sticky … … 2699 2716 licqConf.WriteBool("AutoClose", m_bAutoClose); 2700 2717 licqConf.WriteBool("AutoPopup", m_bAutoPopup); 2718 licqConf.WriteBool("AutoFocus", m_bAutoFocus); 2701 2719 licqConf.WriteStr("MsgPopupKey", m_MsgAutopopupKey.isEmpty() ? "none" : m_MsgAutopopupKey.toLatin1()); 2702 2720 -
branches/qt-gui_qt4/src/mainwin.h
r5446 r5459 144 144 m_bAutoClose, 145 145 m_bAutoPopup, 146 m_bAutoFocus, 146 147 m_bShowOffline, 147 148 m_bAlwaysShowONU, -
branches/qt-gui_qt4/src/optionsdlg.cpp
r5446 r5459 190 190 chkFlashAll->setChecked(mainwin->m_nFlash == FLASH_ALL); 191 191 chkAutoPopup->setChecked(mainwin->m_bAutoPopup); 192 chkAutoFocus->setChecked(mainwin->m_bAutoFocus); 192 193 chkAutoRaise->setChecked(mainwin->m_bAutoRaise); 193 194 chkHidden->setChecked(mainwin->m_bHidden); … … 480 481 mainwin->m_bAutoClose = chkAutoClose->isChecked(); 481 482 mainwin->m_bAutoPopup = chkAutoPopup->isChecked(); 483 mainwin->m_bAutoFocus = chkAutoFocus->isChecked(); 482 484 mainwin->m_bAutoRaise = chkAutoRaise->isChecked(); 483 485 mainwin->m_bHidden = chkHidden->isChecked(); … … 1172 1174 layNewMsgActions->addWidget(chkAutoPopup); 1173 1175 1176 chkAutoFocus = new QCheckBox(tr("Auto-focus message")); 1177 chkAutoFocus->setToolTip(tr("Automatically focus opened message windows.")); 1178 layNewMsgActions->addWidget(chkAutoFocus); 1179 1174 1180 chkAutoRaise = new QCheckBox(tr("Auto-raise main window")); 1175 1181 chkAutoRaise->setToolTip(tr("Raise the main window on incoming messages")); -
branches/qt-gui_qt4/src/optionsdlg.h
r5446 r5459 282 282 QVBoxLayout *layNewMsgActions, *layParanoia; 283 283 QCheckBox *chkOEAway, *chkOENA, *chkOEOccupied, *chkOEDND, *chkAlwaysOnlineNotify, 284 *chkBoldOnMsg, *chkAutoPopup, *chkAutoRaise, 284 *chkBoldOnMsg, *chkAutoPopup, *chkAutoRaise, *chkAutoFocus, 285 285 *chkFlashTaskbar, *chkFlashAll, *chkFlashUrgent; 286 286 QCheckBox *chkIgnoreNewUsers, *chkIgnoreWebPanel, *chkIgnoreMassMsg, *chkIgnoreEmailPager; -
branches/qt-gui_qt4/src/userevents/usereventtabdlg.cpp
r5422 r5459 78 78 updateTabLabel(u); 79 79 gUserManager.DropUser(u); 80 tabw->setCurrentIndex(index); 80 QWidget* fw = tabw->focusWidget(); 81 if (gMainWindow->m_bAutoFocus) 82 tabw->setCurrentIndex(index); 83 else 84 if (fw != NULL) 85 fw->setFocus(); 81 86 } 82 87
