Changeset 6139 for trunk/qt4-gui/src/dialogs
- Timestamp:
- 04/10/08 02:50:04 (8 months ago)
- Location:
- trunk/qt4-gui/src/dialogs
- Files:
-
- 2 modified
-
awaymsgdlg.cpp (modified) (6 diffs)
-
awaymsgdlg.h (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt4-gui/src/dialogs/awaymsgdlg.cpp
r6068 r6139 40 40 #include <licq_user.h> 41 41 42 #include "core/licqgui.h" 43 42 44 #include "helpers/licqstrings.h" 43 45 #include "helpers/support.h" … … 55 57 AwayMsgDlg* AwayMsgDlg::myInstance = NULL; 56 58 57 void AwayMsgDlg::showAwayMsgDlg(unsigned short status, bool autoClose) 59 void AwayMsgDlg::showAwayMsgDlg(unsigned short status, bool autoClose, 60 unsigned long ppid, bool invisible, bool setStatus) 58 61 { 59 62 if (myInstance == NULL) … … 62 65 myInstance->raise(); 63 66 64 myInstance->selectAutoResponse(status, autoClose );67 myInstance->selectAutoResponse(status, autoClose, ppid, invisible, setStatus); 65 68 } 66 69 … … 109 112 } 110 113 111 void AwayMsgDlg::selectAutoResponse(unsigned short status, bool autoClose) 114 void AwayMsgDlg::selectAutoResponse(unsigned short status, bool autoClose, 115 unsigned long ppid, bool invisible, bool setStatus) 112 116 { 113 117 switch (status & 0x00FF) … … 120 124 121 125 myStatus = status; 126 myInvisible = invisible; 127 myPpid = ppid; 128 mySetStatus = setStatus; 122 129 123 130 // Fill in the select menu … … 235 242 myAutoCloseCounter = -1; 236 243 244 if (mySetStatus) 245 { 246 if (myPpid == 0) 247 LicqGui::instance()->changeStatus(myStatus, myInvisible); 248 else 249 LicqGui::instance()->changeStatus(myStatus, myPpid, myInvisible); 250 } 251 237 252 QString s = myAwayMsg->toPlainText().trimmed(); 238 253 -
trunk/qt4-gui/src/dialogs/awaymsgdlg.h
r5811 r6139 43 43 * @param status Status to prompt for away message to 44 44 * @param autoClose True if dialog should close after a timeout 45 * @param ppid Protocol to set status for or 0 to change globaly 46 * @param invisible True if new status is also invisible 47 * @param setStatus True if status should be set when dialog is closed 45 48 */ 46 static void showAwayMsgDlg(unsigned short status, bool autoClose = false); 49 static void showAwayMsgDlg(unsigned short status, bool autoClose = false, 50 unsigned long ppid = 0, bool invisible = false, bool setStatus = false); 47 51 48 52 static void showAutoResponseHints(QWidget* parent = 0); … … 53 57 AwayMsgDlg(QWidget* parent = 0); 54 58 ~AwayMsgDlg(); 55 void selectAutoResponse(unsigned short status, bool autoClose = false); 59 void selectAutoResponse(unsigned short status, bool autoClose = false, 60 unsigned long ppid = 0, bool invisible = false, bool setStatus = false); 56 61 57 62 MLEdit* myAwayMsg; … … 61 66 62 67 unsigned short myStatus; 68 bool myInvisible; 69 unsigned long myPpid; 70 bool mySetStatus; 63 71 short mySAR; 64 72 int myAutoCloseCounter;
