Changeset 6143
- Timestamp:
- 04/11/08 04:54:45 (8 months ago)
- Location:
- trunk/qt4-gui/src
- Files:
-
- 5 modified
-
config/chat.cpp (modified) (3 diffs)
-
config/chat.h (modified) (3 diffs)
-
core/licqgui.cpp (modified) (2 diffs)
-
settings/events.cpp (modified) (4 diffs)
-
settings/events.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/config/chat.cpp
r6142 r6143 95 95 iniFile.SetSection("functions"); 96 96 iniFile.ReadBool("AutoClose", myAutoClose, true); 97 iniFile.Read Bool("AutoPopup", myAutoPopup, false);97 iniFile.ReadNum("AutoPopup", myAutoPopup, 0); 98 98 iniFile.ReadBool("AutoFocus", myAutoFocus, true); 99 99 iniFile.ReadBool("PopupAutoResponse", myPopupAutoResponse, true); … … 154 154 iniFile.SetSection("functions"); 155 155 iniFile.WriteBool("AutoClose", myAutoClose); 156 iniFile.Write Bool("AutoPopup", myAutoPopup);156 iniFile.WriteNum("AutoPopup", myAutoPopup); 157 157 iniFile.WriteBool("AutoFocus", myAutoFocus); 158 158 iniFile.WriteBool("PopupAutoResponse", myPopupAutoResponse); … … 191 191 } 192 192 193 void Config::Chat::setAutoPopup( boolautoPopup)193 void Config::Chat::setAutoPopup(unsigned short autoPopup) 194 194 { 195 195 if (autoPopup == myAutoPopup) -
trunk/qt4-gui/src/config/chat.h
r6142 r6143 67 67 // Get functions 68 68 bool autoClose() const { return myAutoClose; } 69 boolautoPopup() const { return myAutoPopup; }69 unsigned short autoPopup() const { return myAutoPopup; } 70 70 bool autoFocus() const { return myAutoFocus; } 71 71 bool manualNewUser() const { return myManualNewUser; } … … 117 117 // Set functions 118 118 void setAutoClose(bool autoClose); 119 void setAutoPopup( boolautoPopup);119 void setAutoPopup(unsigned short autoPopup); 120 120 void setAutoFocus(bool autoFocus); 121 121 void setManualNewUser(bool manualNewUser); … … 165 165 166 166 bool myAutoFocus; 167 boolmyAutoPopup;167 unsigned short myAutoPopup; 168 168 bool myAutoClose; 169 169 bool myManualNewUser; -
trunk/qt4-gui/src/core/licqgui.cpp
r6138 r6143 1480 1480 break; 1481 1481 1482 if ( Config::Chat::instance()->autoPopup() &&sig->Argument() > 0)1483 { 1484 bool popCheck = false;1482 if (sig->Argument() > 0) 1483 { 1484 unsigned short popCheck = 99; 1485 1485 1486 1486 ICQOwner* o = gUserManager.FetchOwner(ppid, LOCK_R); … … 1491 1491 case ICQ_STATUS_ONLINE: 1492 1492 case ICQ_STATUS_FREEFORCHAT: 1493 popCheck = true; 1494 default: 1495 gUserManager.DropOwner(ppid); 1493 popCheck = 1; 1494 break; 1495 case ICQ_STATUS_AWAY: 1496 popCheck = 2; 1497 break; 1498 case ICQ_STATUS_NA: 1499 popCheck = 3; 1500 break; 1501 case ICQ_STATUS_OCCUPIED: 1502 popCheck = 4; 1503 break; 1504 case ICQ_STATUS_DND: 1505 popCheck = 5; 1506 break; 1496 1507 } 1508 gUserManager.DropOwner(ppid); 1497 1509 } 1498 1510 1499 if ( popCheck)1511 if (Config::Chat::instance()->autoPopup() >= popCheck) 1500 1512 { 1501 1513 ICQUser* u = gUserManager.FetchUser(id.toLatin1(), ppid, LOCK_R); -
trunk/qt4-gui/src/settings/events.cpp
r6091 r6143 24 24 25 25 #include <QCheckBox> 26 #include <QComboBox> 26 27 #include <QGridLayout> 27 28 #include <QGroupBox> … … 69 70 myMsgActionsLayout->addWidget(myBoldOnMsgCheck, 0, 0); 70 71 71 myAutoPopupCheck = new QCheckBox(tr("Auto-popup message"));72 myAutoPopupCheck->setToolTip(tr("Open all incoming messages automatically when received if we are online (or free for chat)"));73 myMsgActionsLayout->addWidget(myAutoPopupCheck, 1, 0);74 75 72 myAutoFocusCheck = new QCheckBox(tr("Auto-focus message")); 76 73 myAutoFocusCheck->setToolTip(tr("Automatically focus opened message windows.")); 77 myMsgActionsLayout->addWidget(myAutoFocusCheck, 2, 0);74 myMsgActionsLayout->addWidget(myAutoFocusCheck, 1, 0); 78 75 79 76 myAutoRaiseCheck = new QCheckBox(tr("Auto-raise main window")); 80 77 myAutoRaiseCheck->setToolTip(tr("Raise the main window on incoming messages")); 81 myMsgActionsLayout->addWidget(myAutoRaiseCheck, 3, 0); 78 myMsgActionsLayout->addWidget(myAutoRaiseCheck, 2, 0); 79 80 QHBoxLayout* autoPopupLayout = new QHBoxLayout(); 81 QLabel* autoPopupLabel = new QLabel(tr("Auto-popup message:")); 82 autoPopupLayout->addWidget(autoPopupLabel); 83 myAutoPopupCombo = new QComboBox(); 84 myAutoPopupCombo->addItem(tr("Never")); 85 myAutoPopupCombo->addItem(tr("Only when online")); 86 myAutoPopupCombo->addItem(tr("When online or away")); 87 myAutoPopupCombo->addItem(tr("When online, away or N/A")); 88 myAutoPopupCombo->addItem(tr("Always except DND")); 89 myAutoPopupCombo->addItem(tr("Always")); 90 myAutoPopupCombo->setToolTip(tr("Select for which statuses incoming messages should " 91 "open automatically.\nOnline also includes Free for chat.")); 92 autoPopupLabel->setBuddy(myAutoPopupCombo); 93 autoPopupLayout->addWidget(myAutoPopupCombo); 94 myMsgActionsLayout->addLayout(autoPopupLayout, 3, 0); 82 95 83 96 myFlashTaskbarCheck = new QCheckBox(tr("Flash taskbar")); … … 292 305 myFlashAllCheck->setChecked(flash == Config::ContactList::FlashAll); 293 306 294 myAutoPopupC heck->setChecked(chatConfig->autoPopup());307 myAutoPopupCombo->setCurrentIndex(chatConfig->autoPopup()); 295 308 myAutoFocusCheck->setChecked(chatConfig->autoFocus()); 296 309 myFlashTaskbarCheck->setChecked(chatConfig->flashTaskbar()); … … 346 359 contactListConfig->setFlash(Config::ContactList::FlashNone); 347 360 348 chatConfig->setAutoPopup(myAutoPopupC heck->isChecked());361 chatConfig->setAutoPopup(myAutoPopupCombo->currentIndex()); 349 362 chatConfig->setAutoFocus(myAutoFocusCheck->isChecked()); 350 363 chatConfig->setFlashTaskbar(myFlashTaskbarCheck->isChecked()); -
trunk/qt4-gui/src/settings/events.h
r6091 r6143 26 26 27 27 class QCheckBox; 28 class QComboBox; 28 29 class QGridLayout; 29 30 class QGroupBox; … … 82 83 QCheckBox* myAlwaysOnlineNotifyCheck; 83 84 QCheckBox* myBoldOnMsgCheck; 84 QC heckBox* myAutoPopupCheck;85 QComboBox* myAutoPopupCombo; 85 86 QCheckBox* myAutoRaiseCheck; 86 87 QCheckBox* myAutoFocusCheck;
