Changeset 4452
- Timestamp:
- 06/27/06 00:49:31 (2 years ago)
- Location:
- trunk/qt-gui/src
- Files:
-
- 2 modified
-
usereventdlg.cpp (modified) (8 diffs)
-
usereventdlg.h (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/qt-gui/src/usereventdlg.cpp
r4443 r4452 1510 1510 1511 1511 QAccel *a = new QAccel( this ); 1512 a->connectItem(a->insertItem(Key_Escape), this, SLOT( cancelSend()));1512 a->connectItem(a->insertItem(Key_Escape), this, SLOT(slot_cancelSend())); 1513 1513 #if QT_VERSION >= 300 1514 1514 if (mainwin->userEventTabDlg && … … 1593 1593 connect( btnSend, SIGNAL( clicked() ), this, SLOT( trySecure() ) ); 1594 1594 1595 btnC ancel= new QPushButton(tr("&Close"), this);1596 w = QMAX(btnC ancel->sizeHint().width(), w);1595 btnClose = new QPushButton(tr("&Close"), this); 1596 w = QMAX(btnClose->sizeHint().width(), w); 1597 1597 btnSend->setFixedWidth(w); 1598 btnC ancel->setFixedWidth(w);1598 btnClose->setFixedWidth(w); 1599 1599 h_lay->addWidget(btnSend); 1600 h_lay->addWidget(btnC ancel);1601 connect(btnC ancel, SIGNAL(clicked()), this, SLOT(cancelSend()));1600 h_lay->addWidget(btnClose); 1601 connect(btnClose, SIGNAL(clicked()), this, SLOT(slot_close())); 1602 1602 splView = new QSplitter(Vertical, mainWidget); 1603 1603 //splView->setOpaqueResize(); … … 1786 1786 setFocusProxy(mleSend); 1787 1787 setTabOrder(mleSend, btnSend); 1788 setTabOrder(btnSend, btnC ancel);1788 setTabOrder(btnSend, btnClose); 1789 1789 icqColor.SetToDefault(); 1790 1790 mleSend->setBackground(QColor(icqColor.BackRed(), icqColor.BackGreen(), icqColor.BackBlue())); … … 2232 2232 setCaption(title); 2233 2233 setCursor(waitCursor); 2234 btnSend->setEnabled(false); 2235 btnCancel->setText(tr("&Cancel")); 2234 btnSend->setText(tr("&Cancel")); 2235 btnClose->setEnabled(false); 2236 disconnect(btnSend, SIGNAL(clicked()), this, SLOT(sendButton())); 2237 connect(btnSend, SIGNAL(clicked()), this, SLOT(slot_cancelSend())); 2238 2236 2239 connect (sigman, SIGNAL(signal_doneUserFcn(ICQEvent *)), this, SLOT(sendDone_common(ICQEvent *))); 2237 2240 } … … 2312 2315 2313 2316 setCursor(arrowCursor); 2314 btnSend->setEnabled(true); 2315 btnCancel->setText(tr("&Close")); 2317 btnSend->setText(tr("&Send")); 2318 btnClose->setEnabled(true); 2319 disconnect(btnSend, SIGNAL(clicked()), this, SLOT(slot_cancelSend())); 2320 connect(btnSend, SIGNAL(clicked()), this, SLOT(sendButton())); 2321 2316 2322 // If cancelled automatically check "Send through Server" 2317 2323 if (mainwin->m_bAutoSendThroughServer && e->Result() == EVENT_CANCELLED) … … 2546 2552 2547 2553 2548 //-----UserSendCommon::cancelSend-------------------------------------------- 2549 void UserSendCommon::cancelSend() 2554 //-----UserSendCommon::slot_close-------------------------------------------- 2555 void UserSendCommon::slot_close() 2556 { 2557 if (mainwin->m_bMsgChatView) 2558 { 2559 // the window is at the front, if the timer has not expired and we close 2560 // the window, then the new events will stay there 2561 slot_ClearNewEvents(); 2562 } 2563 #if QT_VERSION >= 300 2564 if (mainwin->userEventTabDlg && 2565 mainwin->userEventTabDlg->tabExists(this)) 2566 mainwin->userEventTabDlg->removeTab(this); 2567 else 2568 #endif 2569 close(); 2570 } 2571 2572 //-----UserSendCommon::slot_cancelSend-------------------------------------------- 2573 void UserSendCommon::slot_cancelSend() 2550 2574 { 2551 2575 unsigned long icqEventTag = 0; … … 2554 2578 2555 2579 if (!icqEventTag) 2556 {2557 if (mainwin->m_bMsgChatView)2558 {2559 // the window is at the front, if the timer has not expired and we close2560 // the window, then the new events will stay there2561 slot_ClearNewEvents();2562 }2563 #if QT_VERSION >= 3002564 if (mainwin->userEventTabDlg &&2565 mainwin->userEventTabDlg->tabExists(this))2566 mainwin->userEventTabDlg->removeTab(this);2567 else2568 #endif2569 close();2570 2580 return; 2571 }2572 2581 2573 2582 #if QT_VERSION >= 300 … … 2576 2585 mainwin->userEventTabDlg->setCaption(m_sBaseTitle); 2577 2586 #endif 2578 setCaption(m_sBaseTitle);2579 2587 server->CancelEvent(icqEventTag); 2580 icqEventTag = 0;2581 btnSend->setEnabled(true);2582 btnCancel->setText(tr("&Close"));2583 setCursor(arrowCursor);2584 2588 } 2585 2589 -
trunk/qt-gui/src/usereventdlg.h
r4443 r4452 277 277 QSplitter * splView; 278 278 QCheckBox *chkSendServer, *chkUrgent, *chkMass; 279 QPushButton *btnSend, *btnC ancel;279 QPushButton *btnSend, *btnClose; 280 280 QGroupBox *grpMR; 281 281 QButtonGroup *grpCmd; … … 299 299 virtual void sendDone_common(ICQEvent *); 300 300 301 void cancelSend(); 301 void slot_close(); 302 void slot_cancelSend(); 302 303 void massMessageToggled(bool); 303 304 void slot_resettitle();
