-rw-r--r-- | kmicromail/mainwindow.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 8c0a4cb..0e4a64f 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -1,114 +1,115 @@ | |||
1 | 1 | ||
2 | // CHANGED 2004-08-06 Lutz Rogowski | 2 | // CHANGED 2004-08-06 Lutz Rogowski |
3 | #include <qlabel.h> | 3 | #include <qlabel.h> |
4 | #include <qvbox.h> | 4 | #include <qvbox.h> |
5 | #include <qheader.h> | 5 | #include <qheader.h> |
6 | #include <qtimer.h> | 6 | #include <qtimer.h> |
7 | #include <qlayout.h> | 7 | #include <qlayout.h> |
8 | //#include <kdialog.h> | 8 | //#include <kdialog.h> |
9 | #include <kiconloader.h> | 9 | #include <kiconloader.h> |
10 | #include <kapplication.h> | 10 | #include <kapplication.h> |
11 | 11 | ||
12 | #ifdef DESKTOP_VERSION | 12 | #ifdef DESKTOP_VERSION |
13 | #include <qapplication.h> | 13 | #include <qapplication.h> |
14 | #include <qstatusbar.h> | 14 | #include <qstatusbar.h> |
15 | #include <kabc/stdaddressbook.h> | 15 | #include <kabc/stdaddressbook.h> |
16 | extern QStatusBar* globalSstatusBarMainWindow; | 16 | extern QStatusBar* globalSstatusBarMainWindow; |
17 | #else | 17 | #else |
18 | #include <qpe/qpeapplication.h> | 18 | #include <qpe/qpeapplication.h> |
19 | #include <klocale.h> | ||
19 | #endif | 20 | #endif |
20 | #include "defines.h" | 21 | #include "defines.h" |
21 | #include "mainwindow.h" | 22 | #include "mainwindow.h" |
22 | #include <KDGanttMinimizeSplitter.h> | 23 | #include <KDGanttMinimizeSplitter.h> |
23 | 24 | ||
24 | #include "koprefs.h" | 25 | #include "koprefs.h" |
25 | 26 | ||
26 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | 27 | MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) |
27 | : QMainWindow( parent, name ) //, flags ) | 28 | : QMainWindow( parent, name ) //, flags ) |
28 | { | 29 | { |
29 | #ifdef DESKTOP_VERSION | 30 | #ifdef DESKTOP_VERSION |
30 | globalSstatusBarMainWindow = statusBar(); | 31 | globalSstatusBarMainWindow = statusBar(); |
31 | #endif | 32 | #endif |
32 | setCaption( i18n( "KOpieMail/Pi" ) ); | 33 | setCaption( i18n( "KOpieMail/Pi" ) ); |
33 | setToolBarsMovable( false ); | 34 | setToolBarsMovable( false ); |
34 | //KABC::StdAddressBook::self(); | 35 | //KABC::StdAddressBook::self(); |
35 | toolBar = new QToolBar( this ); | 36 | toolBar = new QToolBar( this ); |
36 | menuBar = new QPEMenuBar( toolBar ); | 37 | menuBar = new QPEMenuBar( toolBar ); |
37 | mailMenu = new QPopupMenu( menuBar ); | 38 | mailMenu = new QPopupMenu( menuBar ); |
38 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); | 39 | menuBar->insertItem( i18n( "Mail" ), mailMenu ); |
39 | settingsMenu = new QPopupMenu( menuBar ); | 40 | settingsMenu = new QPopupMenu( menuBar ); |
40 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); | 41 | menuBar->insertItem( i18n( "Settings" ), settingsMenu ); |
41 | 42 | ||
42 | addToolBar( toolBar ); | 43 | addToolBar( toolBar ); |
43 | toolBar->setHorizontalStretchable( true ); | 44 | toolBar->setHorizontalStretchable( true ); |
44 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), | 45 | QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), |
45 | 0, 0, this ); | 46 | 0, 0, this ); |
46 | connect(getMail, SIGNAL( activated() ), | 47 | connect(getMail, SIGNAL( activated() ), |
47 | SLOT( slotGetAllMail() ) ); | 48 | SLOT( slotGetAllMail() ) ); |
48 | getMail->addTo( mailMenu ); | 49 | getMail->addTo( mailMenu ); |
49 | 50 | ||
50 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), | 51 | getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), |
51 | 0, 0, this ); | 52 | 0, 0, this ); |
52 | getMail->addTo( toolBar ); | 53 | getMail->addTo( toolBar ); |
53 | getMail->addTo( mailMenu ); | 54 | getMail->addTo( mailMenu ); |
54 | connect(getMail, SIGNAL( activated() ), | 55 | connect(getMail, SIGNAL( activated() ), |
55 | SLOT( slotGetMail() ) ); | 56 | SLOT( slotGetMail() ) ); |
56 | 57 | ||
57 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), | 58 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), |
58 | 0, 0, this ); | 59 | 0, 0, this ); |
59 | composeMail->addTo( toolBar ); | 60 | composeMail->addTo( toolBar ); |
60 | composeMail->addTo( mailMenu ); | 61 | composeMail->addTo( mailMenu ); |
61 | 62 | ||
62 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , | 63 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , |
63 | 0, 0, this ); | 64 | 0, 0, this ); |
64 | sendQueued->addTo( toolBar ); | 65 | sendQueued->addTo( toolBar ); |
65 | sendQueued->addTo( mailMenu ); | 66 | sendQueued->addTo( mailMenu ); |
66 | 67 | ||
67 | /* | 68 | /* |
68 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, | 69 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, |
69 | 0, 0, this ); | 70 | 0, 0, this ); |
70 | syncFolders->addTo( toolBar ); | 71 | syncFolders->addTo( toolBar ); |
71 | syncFolders->addTo( mailMenu ); | 72 | syncFolders->addTo( mailMenu ); |
72 | */ | 73 | */ |
73 | 74 | ||
74 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , | 75 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , |
75 | 0, 0, this, 0, true ); | 76 | 0, 0, this, 0, true ); |
76 | showFolders->addTo( toolBar ); | 77 | showFolders->addTo( toolBar ); |
77 | showFolders->addTo( mailMenu ); | 78 | showFolders->addTo( mailMenu ); |
78 | showFolders->setOn( true ); | 79 | showFolders->setOn( true ); |
79 | connect(showFolders, SIGNAL( toggled(bool) ), | 80 | connect(showFolders, SIGNAL( toggled(bool) ), |
80 | SLOT( slotShowFolders(bool) ) ); | 81 | SLOT( slotShowFolders(bool) ) ); |
81 | 82 | ||
82 | /* | 83 | /* |
83 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), | 84 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), |
84 | 0, 0, this ); | 85 | 0, 0, this ); |
85 | searchMails->addTo( toolBar ); | 86 | searchMails->addTo( toolBar ); |
86 | searchMails->addTo( mailMenu ); | 87 | searchMails->addTo( mailMenu ); |
87 | */ | 88 | */ |
88 | 89 | ||
89 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 90 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
90 | deleteMails->addTo( toolBar ); | 91 | deleteMails->addTo( toolBar ); |
91 | deleteMails->addTo( mailMenu ); | 92 | deleteMails->addTo( mailMenu ); |
92 | connect( deleteMails, SIGNAL( activated() ), | 93 | connect( deleteMails, SIGNAL( activated() ), |
93 | SLOT( slotDeleteMail() ) ); | 94 | SLOT( slotDeleteMail() ) ); |
94 | 95 | ||
95 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , | 96 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , |
96 | 0, 0, this ); | 97 | 0, 0, this ); |
97 | editSettings->addTo( settingsMenu ); | 98 | editSettings->addTo( settingsMenu ); |
98 | connect( editSettings, SIGNAL( activated() ), | 99 | connect( editSettings, SIGNAL( activated() ), |
99 | SLOT( slotEditSettings() ) ); | 100 | SLOT( slotEditSettings() ) ); |
100 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , | 101 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , |
101 | 0, 0, this ); | 102 | 0, 0, this ); |
102 | editAccounts->addTo( settingsMenu ); | 103 | editAccounts->addTo( settingsMenu ); |
103 | codecMenu = new QPopupMenu( menuBar ); | 104 | codecMenu = new QPopupMenu( menuBar ); |
104 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); | 105 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); |
105 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); | 106 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); |
106 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); | 107 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); |
107 | codecMenu->insertItem( "Chinese (big-5)",3,3); | 108 | codecMenu->insertItem( "Chinese (big-5)",3,3); |
108 | codecMenu->insertItem( "Unicode (utf-8)",4,4); | 109 | codecMenu->insertItem( "Unicode (utf-8)",4,4); |
109 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); | 110 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); |
110 | //disabled | 111 | //disabled |
111 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); | 112 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); |
112 | //setCentralWidget( view ); | 113 | //setCentralWidget( view ); |
113 | 114 | ||
114 | QVBox* wrapperBox = new QVBox( this ); | 115 | QVBox* wrapperBox = new QVBox( this ); |