The last part of typo fixes (I really hope)
[kdepim.git] / kmail / secondarywindow.cpp
bloba411ac8da86356558023f547d5c0b69f004f389d
1 /* -*- mode: C++; c-file-style: "gnu" -*-
2 secondarywindow.cpp
4 This file is part of KMail, the KDE mail client.
5 Copyright (c) 2003 Ingo Kloecker <kloecker@kde.org>
7 KMail is free software; you can redistribute it and/or modify it
8 under the terms of the GNU General Public License, version 2, as
9 published by the Free Software Foundation.
11 KMail is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License along
17 with this program; if not, write to the Free Software Foundation, Inc.,
18 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
20 In addition, as a special exception, the copyright holders give
21 permission to link the code of this program with any edition of
22 the Qt library by Trolltech AS, Norway (or with modified versions
23 of Qt that use the same license as Qt), and distribute linked
24 combinations including the two. You must obey the GNU General
25 Public License in all respects for all of the code used other than
26 Qt. If you modify this file, you may extend this exception to
27 your version of the file, but you are not obligated to do so. If
28 you do not wish to do so, delete this exception statement from
29 your version.
33 #include "secondarywindow.h"
34 #include "kmkernel.h"
36 #include <kglobal.h>
38 #include <QCloseEvent>
40 namespace KMail {
42 //---------------------------------------------------------------------------
43 SecondaryWindow::SecondaryWindow( const char * name )
44 : KXmlGuiWindow( 0 )
46 setObjectName( name );
47 // Set this to be the group leader for all subdialogs - this means
48 // modal subdialogs will only affect this window, not the other windows
49 setAttribute( Qt::WA_GroupLeader );
53 //---------------------------------------------------------------------------
54 SecondaryWindow::~SecondaryWindow()
59 //---------------------------------------------------------------------------
60 void SecondaryWindow::closeEvent( QCloseEvent * e )
62 // if there's a system tray applet then just do what needs to be done if a
63 // window is closed.
64 if ( kmkernel->haveSystemTrayApplet() ) {
65 // BEGIN of code borrowed from KMainWindow::closeEvent
66 // Save settings if auto-save is enabled, and settings have changed
67 if ( settingsDirty() && autoSaveSettings() )
68 saveAutoSaveSettings();
70 if ( !queryClose() ) {
71 e->ignore();
73 // END of code borrowed from KMainWindow::closeEvent
74 } else {
75 KMainWindow::closeEvent( e );
79 } // namespace KMail
81 #include "secondarywindow.moc"