Changeset 9178


Ignore:
Timestamp:
Sep 26, 2009, 4:39:58 AM (12 years ago)
Author:
charles
Message:

(trunk qt) #2417: Qt client closes when clicking X rather than close to tray

Location:
trunk/qt
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/qt/mainwin.cc

    r8890 r9178  
    1515
    1616#include <QCheckBox>
     17#include <QCloseEvent>
    1718#include <QDesktopServices>
    1819#include <QFileDialog>
     
    287288
    288289void
     290TrMainWindow :: closeEvent( QCloseEvent * event )
     291{
     292    // if they're using a tray icon, close to the tray
     293    // instead of exiting
     294    if( !myPrefs.getBool( Prefs :: SHOW_TRAY_ICON ) )
     295        event->accept( );
     296    else {
     297        toggleWindows( false );
     298        event->ignore( );
     299    }
     300}
     301
     302/****
     303*****
     304****/
     305
     306void
    289307TrMainWindow :: onSessionSourceChanged( )
    290308{
  • trunk/qt/mainwin.h

    r8890 r9178  
    5050{
    5151        Q_OBJECT
     52
     53    private:
     54        virtual void closeEvent( QCloseEvent * event );
    5255
    5356    private:
Note: See TracChangeset for help on using the changeset viewer.