Changeset 6000

Show
Ignore:
Timestamp:
01/08/08 06:03:05 (8 months ago)
Author:
flynd
Message:

Use new history dialog instead of old user info tab.

Location:
branches/qt-gui_qt4/src
Files:
4 modified

Legend:

Unmodified
Added
Removed
  • branches/qt-gui_qt4/src/core/systemmenu.cpp

    r5892 r6000  
    3939#include "dialogs/awaymsgdlg.h" 
    4040#include "dialogs/editgrpdlg.h" 
     41#include "dialogs/historydlg.h" 
    4142#include "dialogs/logwindow.h" 
    4243#include "dialogs/ownermanagerdlg.h" 
     
    553554  // System sub menu 
    554555  myOwnerAdmMenu = new QMenu(protoName); 
    555   connect(myOwnerAdmMenu, SIGNAL(triggered(QAction*)), SLOT(ownerAdmFunction(QAction*))); 
    556   myOwnerAdmInfoAction = myOwnerAdmMenu->addAction(tr("&Info...")); 
    557   myOwnerAdmInfoAction->setData(mnuUserGeneral); 
    558   myOwnerAdmHistoryAction = myOwnerAdmMenu->addAction(tr("View &History...")); 
    559   myOwnerAdmHistoryAction->setData(mnuUserHistory); 
     556  myOwnerAdmInfoAction = myOwnerAdmMenu->addAction(tr("&Info..."), this, SLOT(viewInfo())); 
     557  myOwnerAdmHistoryAction = myOwnerAdmMenu->addAction(tr("View &History..."), this, SLOT(viewHistory())); 
    560558 
    561559  // Status sub menu 
     
    674672} 
    675673 
    676 void OwnerData::ownerAdmFunction(QAction* action) 
    677 { 
    678   int id = action->data().toInt(); 
    679  
     674void OwnerData::viewInfo() 
     675{ 
    680676  ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
    681677  if (o == NULL) 
     
    684680  QString userid = o->IdString(); 
    685681  gUserManager.DropOwner(myPpid); 
    686   LicqGui::instance()->showInfoDialog(id, userid, myPpid); 
     682  LicqGui::instance()->showInfoDialog(mnuUserGeneral, userid, myPpid); 
     683} 
     684 
     685void OwnerData::viewHistory() 
     686{ 
     687  ICQOwner* o = gUserManager.FetchOwner(myPpid, LOCK_R); 
     688  if (o == NULL) 
     689    return; 
     690 
     691  QString userid = o->IdString(); 
     692  gUserManager.DropOwner(myPpid); 
     693  new HistoryDlg(userid, myPpid); 
    687694} 
    688695 
  • branches/qt-gui_qt4/src/core/systemmenu.h

    r5885 r6000  
    243243private slots: 
    244244  void aboutToShowStatusMenu(); 
    245   void ownerAdmFunction(QAction* action); 
     245  void viewInfo(); 
     246  void viewHistory(); 
    246247  void setStatus(QAction* action); 
    247248  void toggleInvisibleStatus(); 
  • branches/qt-gui_qt4/src/core/usermenu.cpp

    r5892 r6000  
    3838#include "dialogs/customautorespdlg.h" 
    3939#include "dialogs/gpgkeyselect.h" 
     40#include "dialogs/historydlg.h" 
    4041#include "dialogs/keyrequestdlg.h" 
    4142#include "dialogs/reqauthdlg.h" 
     
    382383void UserMenu::viewHistory() 
    383384{ 
    384   LicqGui::instance()->showInfoDialog(mnuUserHistory, myId, myPpid); 
     385  new HistoryDlg(myId, myPpid); 
    385386} 
    386387 
  • branches/qt-gui_qt4/src/userevents/usereventcommon.cpp

    r5837 r6000  
    4444#include "core/usermenu.h" 
    4545 
     46#include "dialogs/historydlg.h" 
    4647#include "dialogs/keyrequestdlg.h" 
    4748 
     
    373374void UserEventCommon::slotShowHistory() 
    374375{ 
    375   LicqGui::instance()->showInfoDialog(mnuUserHistory, myUsers.front().c_str(), myPpid, true); 
     376  new HistoryDlg(myUsers.front().c_str(), myPpid); 
    376377} 
    377378