summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
Unidiff
Diffstat (limited to 'kmicromail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r--kmicromail/mainwindow.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp
index 3013931..8c0a4cb 100644
--- a/kmicromail/mainwindow.cpp
+++ b/kmicromail/mainwindow.cpp
@@ -1,302 +1,303 @@
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>
16extern QStatusBar* globalSstatusBarMainWindow; 16extern QStatusBar* globalSstatusBarMainWindow;
17#else 17#else
18#include <qpe/qpeapplication.h> 18#include <qpe/qpeapplication.h>
19#endif 19#endif
20#include "defines.h" 20#include "defines.h"
21#include "mainwindow.h" 21#include "mainwindow.h"
22#include <KDGanttMinimizeSplitter.h> 22#include <KDGanttMinimizeSplitter.h>
23 23
24#include "koprefs.h" 24#include "koprefs.h"
25 25
26MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) 26MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
27 : QMainWindow( parent, name ) //, flags ) 27 : QMainWindow( parent, name ) //, flags )
28{ 28{
29#ifdef DESKTOP_VERSION 29#ifdef DESKTOP_VERSION
30 globalSstatusBarMainWindow = statusBar(); 30 globalSstatusBarMainWindow = statusBar();
31#endif 31#endif
32 setCaption( i18n( "KOpieMail/Pi" ) ); 32 setCaption( i18n( "KOpieMail/Pi" ) );
33 setToolBarsMovable( false ); 33 setToolBarsMovable( false );
34 //KABC::StdAddressBook::self(); 34 //KABC::StdAddressBook::self();
35 toolBar = new QToolBar( this ); 35 toolBar = new QToolBar( this );
36 menuBar = new QPEMenuBar( toolBar ); 36 menuBar = new QPEMenuBar( toolBar );
37 mailMenu = new QPopupMenu( menuBar ); 37 mailMenu = new QPopupMenu( menuBar );
38 menuBar->insertItem( i18n( "Mail" ), mailMenu ); 38 menuBar->insertItem( i18n( "Mail" ), mailMenu );
39 settingsMenu = new QPopupMenu( menuBar ); 39 settingsMenu = new QPopupMenu( menuBar );
40 menuBar->insertItem( i18n( "Settings" ), settingsMenu ); 40 menuBar->insertItem( i18n( "Settings" ), settingsMenu );
41 41
42 addToolBar( toolBar ); 42 addToolBar( toolBar );
43 toolBar->setHorizontalStretchable( true ); 43 toolBar->setHorizontalStretchable( true );
44 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"), 44 QAction* getMail = new QAction( i18n( "Get all new mails" ), SmallIcon("enter"),
45 0, 0, this ); 45 0, 0, this );
46 connect(getMail, SIGNAL( activated() ), 46 connect(getMail, SIGNAL( activated() ),
47 SLOT( slotGetAllMail() ) ); 47 SLOT( slotGetAllMail() ) );
48 getMail->addTo( mailMenu ); 48 getMail->addTo( mailMenu );
49 49
50 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"), 50 getMail = new QAction( i18n( "Get new messages" ), SmallIcon("add"),
51 0, 0, this ); 51 0, 0, this );
52 getMail->addTo( toolBar ); 52 getMail->addTo( toolBar );
53 getMail->addTo( mailMenu ); 53 getMail->addTo( mailMenu );
54 connect(getMail, SIGNAL( activated() ), 54 connect(getMail, SIGNAL( activated() ),
55 SLOT( slotGetMail() ) ); 55 SLOT( slotGetMail() ) );
56 56
57 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), 57 composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"),
58 0, 0, this ); 58 0, 0, this );
59 composeMail->addTo( toolBar ); 59 composeMail->addTo( toolBar );
60 composeMail->addTo( mailMenu ); 60 composeMail->addTo( mailMenu );
61 61
62 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , 62 sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") ,
63 0, 0, this ); 63 0, 0, this );
64 sendQueued->addTo( toolBar ); 64 sendQueued->addTo( toolBar );
65 sendQueued->addTo( mailMenu ); 65 sendQueued->addTo( mailMenu );
66 66
67 /* 67 /*
68 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, 68 syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC,
69 0, 0, this ); 69 0, 0, this );
70 syncFolders->addTo( toolBar ); 70 syncFolders->addTo( toolBar );
71 syncFolders->addTo( mailMenu ); 71 syncFolders->addTo( mailMenu );
72 */ 72 */
73 73
74 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , 74 showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") ,
75 0, 0, this, 0, true ); 75 0, 0, this, 0, true );
76 showFolders->addTo( toolBar ); 76 showFolders->addTo( toolBar );
77 showFolders->addTo( mailMenu ); 77 showFolders->addTo( mailMenu );
78 showFolders->setOn( true ); 78 showFolders->setOn( true );
79 connect(showFolders, SIGNAL( toggled(bool) ), 79 connect(showFolders, SIGNAL( toggled(bool) ),
80 SLOT( slotShowFolders(bool) ) ); 80 SLOT( slotShowFolders(bool) ) );
81 81
82 /* 82 /*
83 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), 83 searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ),
84 0, 0, this ); 84 0, 0, this );
85 searchMails->addTo( toolBar ); 85 searchMails->addTo( toolBar );
86 searchMails->addTo( mailMenu ); 86 searchMails->addTo( mailMenu );
87 */ 87 */
88 88
89 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); 89 deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this);
90 deleteMails->addTo( toolBar ); 90 deleteMails->addTo( toolBar );
91 deleteMails->addTo( mailMenu ); 91 deleteMails->addTo( mailMenu );
92 connect( deleteMails, SIGNAL( activated() ), 92 connect( deleteMails, SIGNAL( activated() ),
93 SLOT( slotDeleteMail() ) ); 93 SLOT( slotDeleteMail() ) );
94 94
95 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , 95 editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") ,
96 0, 0, this ); 96 0, 0, this );
97 editSettings->addTo( settingsMenu ); 97 editSettings->addTo( settingsMenu );
98 connect( editSettings, SIGNAL( activated() ), 98 connect( editSettings, SIGNAL( activated() ),
99 SLOT( slotEditSettings() ) ); 99 SLOT( slotEditSettings() ) );
100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , 100 editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") ,
101 0, 0, this ); 101 0, 0, this );
102 editAccounts->addTo( settingsMenu ); 102 editAccounts->addTo( settingsMenu );
103 codecMenu = new QPopupMenu( menuBar ); 103 codecMenu = new QPopupMenu( menuBar );
104 codecMenu->insertItem( "Western (iso-8859-1)",0,0); 104 codecMenu->insertItem( "Western (iso-8859-1)",0,0);
105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); 105 codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1);
106 codecMenu->insertItem( "Western (iso-8859-15)",2,2); 106 codecMenu->insertItem( "Western (iso-8859-15)",2,2);
107 codecMenu->insertItem( "Chinese (big-5)",3,3); 107 codecMenu->insertItem( "Chinese (big-5)",3,3);
108 codecMenu->insertItem( "Unicode (utf-8)",4,4); 108 codecMenu->insertItem( "Unicode (utf-8)",4,4);
109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); 109 codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5);
110 settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); 110 //disabled
111 //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu);
111 //setCentralWidget( view ); 112 //setCentralWidget( view );
112 113
113 QVBox* wrapperBox = new QVBox( this ); 114 QVBox* wrapperBox = new QVBox( this );
114 setCentralWidget( wrapperBox ); 115 setCentralWidget( wrapperBox );
115 116
116 // QWidget *view = new QWidget( wrapperBox ); 117 // QWidget *view = new QWidget( wrapperBox );
117 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox); 118 KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, wrapperBox);
118 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); 119 split->setMinimizeDirection( KDGanttMinimizeSplitter::Left);
119 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); 120 //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight );
120 121
121 folderView = new AccountView( split ); 122 folderView = new AccountView( split );
122 folderView->header()->hide(); 123 folderView->header()->hide();
123 folderView->setRootIsDecorated( false ); 124 folderView->setRootIsDecorated( false );
124 folderView->addColumn( i18n( "Mailbox" ) ); 125 folderView->addColumn( i18n( "Mailbox" ) );
125 126
126 //layout->addWidget( folderView ); 127 //layout->addWidget( folderView );
127 128
128 mailView = new QListView( split ); 129 mailView = new QListView( split );
129 mailView->addColumn( i18n( " " ) ); 130 mailView->addColumn( i18n( " " ) );
130 mailView->addColumn( i18n( "Subject" ),QListView::Manual ); 131 mailView->addColumn( i18n( "Subject" ),QListView::Manual );
131 mailView->addColumn( i18n( "Sender" ),QListView::Manual ); 132 mailView->addColumn( i18n( "Sender" ),QListView::Manual );
132 mailView->addColumn( i18n( "Size" ),QListView::Manual); 133 mailView->addColumn( i18n( "Size" ),QListView::Manual);
133 mailView->addColumn( i18n( "Date" ),QListView::Manual); 134 mailView->addColumn( i18n( "Date" ),QListView::Manual);
134 mailView->setAllColumnsShowFocus(true); 135 mailView->setAllColumnsShowFocus(true);
135 //mailView->setSorting(-1); 136 //mailView->setSorting(-1);
136 mailView->setRootIsDecorated( false ); 137 mailView->setRootIsDecorated( false );
137 statusWidget = new StatusWidget( wrapperBox ); 138 statusWidget = new StatusWidget( wrapperBox );
138 statusWidget->hide(); 139 statusWidget->hide();
139 140
140 //layout->addWidget( mailView ); 141 //layout->addWidget( mailView );
141 //layout->setStretchFactor( folderView, 1 ); 142 //layout->setStretchFactor( folderView, 1 );
142 //layout->setStretchFactor( mailView, 2 ); 143 //layout->setStretchFactor( mailView, 2 );
143 144
144 slotAdjustLayout(); 145 slotAdjustLayout();
145#ifndef DESKTOP_VERSION 146#ifndef DESKTOP_VERSION
146 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); 147 QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold);
147 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); 148 QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold);
148#endif 149#endif
149 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, 150 connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this,
150 SLOT( mailLeftClicked(QListViewItem*) ) ); 151 SLOT( mailLeftClicked(QListViewItem*) ) );
151 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, 152 connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this,
152 SLOT( mailLeftClicked(QListViewItem*) ) ); 153 SLOT( mailLeftClicked(QListViewItem*) ) );
153 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, 154 connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this,
154 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); 155 SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) );
155 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), 156 connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)),
156 this,SLOT(refreshMailView(const QValueList<RecMailP>&))); 157 this,SLOT(refreshMailView(const QValueList<RecMailP>&)));
157 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); 158 connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) );
158 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); 159 connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) );
159// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); 160// connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) );
160 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); 161 connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) );
161 //mailView->setMultiSelection ( true ); 162 //mailView->setMultiSelection ( true );
162 mailView->setSelectionMode( QListView::Extended ); 163 mailView->setSelectionMode( QListView::Extended );
163 QValueList<int> list; 164 QValueList<int> list;
164 int fw = 100; 165 int fw = 100;
165 if ( QApplication::desktop()->width() > 320 ) 166 if ( QApplication::desktop()->width() > 320 )
166 fw = 50; 167 fw = 50;
167 list.append( fw ); 168 list.append( fw );
168 list.append( 100 ); 169 list.append( 100 );
169 split->setSizes( list ); 170 split->setSizes( list );
170 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); 171 QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) );
171 mailView->setShowSortIndicator ( true ); 172 mailView->setShowSortIndicator ( true );
172 QLabel *spacer = new QLabel( toolBar ); 173 QLabel *spacer = new QLabel( toolBar );
173 spacer->setBackgroundMode( QWidget::PaletteButton ); 174 spacer->setBackgroundMode( QWidget::PaletteButton );
174 toolBar->setStretchableWidget( spacer ); 175 toolBar->setStretchableWidget( spacer );
175 176
176 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); 177 QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this);
177 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); 178 connect( closeMail, SIGNAL( activated() ), SLOT( close() ) );
178 if ( QApplication::desktop()->width() > 320 ) 179 if ( QApplication::desktop()->width() > 320 )
179 closeMail->addTo(toolBar); 180 closeMail->addTo(toolBar);
180 closeMail->addTo(mailMenu); 181 closeMail->addTo(mailMenu);
181 182
182 183
183 QPopupMenu* helpMenu = new QPopupMenu( menuBar ); 184 QPopupMenu* helpMenu = new QPopupMenu( menuBar );
184 menuBar->insertItem( i18n( "Help" ), helpMenu ); 185 menuBar->insertItem( i18n( "Help" ), helpMenu );
185 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); 186 QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this);
186 connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); 187 connect( li, SIGNAL( activated() ), SLOT( showAbout()) );
187 li->addTo(helpMenu); 188 li->addTo(helpMenu);
188 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); 189 li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this);
189 connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); 190 connect( li, SIGNAL( activated() ), SLOT( showLicence()) );
190 li->addTo(helpMenu); 191 li->addTo(helpMenu);
191 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); 192 li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this);
192 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); 193 connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) );
193 li->addTo(helpMenu); 194 li->addTo(helpMenu);
194 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); 195 connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) );
195 slotSetCodec( KOPrefs::instance()->mCurrentCodec ); 196 slotSetCodec( KOPrefs::instance()->mCurrentCodec );
196#ifdef DESKTOP_VERSION 197#ifdef DESKTOP_VERSION
197 resize ( 640, 480 ); 198 resize ( 640, 480 );
198#endif 199#endif
199} 200}
200 201
201MainWindow::~MainWindow() 202MainWindow::~MainWindow()
202{ 203{
203} 204}
204 205
205void MainWindow::slotSetCodec( int codec ) 206void MainWindow::slotSetCodec( int codec )
206{ 207{
207 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); 208 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false );
208 //qDebug("codec %d ", codec); 209 //qDebug("codec %d ", codec);
209 KOPrefs::instance()->mCurrentCodec = codec; 210 KOPrefs::instance()->mCurrentCodec = codec;
210 KOPrefs::instance()->isDirty = true; 211 KOPrefs::instance()->isDirty = true;
211 QString name; 212 QString name;
212 switch ( codec ) { 213 switch ( codec ) {
213 case 0: 214 case 0:
214 name = "iso-8859-1"; 215 name = "iso-8859-1";
215 break; 216 break;
216 case 1: 217 case 1:
217 name = "iso-8859-5"; 218 name = "iso-8859-5";
218 break; 219 break;
219 case 2: 220 case 2:
220 name = "iso-8859-15"; 221 name = "iso-8859-15";
221 break; 222 break;
222 case 3: 223 case 3:
223 name = "big-5"; 224 name = "big-5";
224 break; 225 break;
225 case 4: 226 case 4:
226 name = "utf-8"; 227 name = "utf-8";
227 break; 228 break;
228 case 5: 229 case 5:
229 name = KOPrefs::instance()->mSendCodec.lower(); 230 name = KOPrefs::instance()->mSendCodec.lower();
230 break; 231 break;
231 } 232 }
232 KOPrefs::instance()->mCurrentCodeName = name ; 233 KOPrefs::instance()->mCurrentCodeName = name ;
233 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); 234 codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")");
234 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); 235 codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true );
235} 236}
236void MainWindow::showLicence() 237void MainWindow::showLicence()
237{ 238{
238 KApplication::showLicence(); 239 KApplication::showLicence();
239} 240}
240void MainWindow::showAbout() 241void MainWindow::showAbout()
241{ 242{
242 QString version; 243 QString version;
243#include <../version> 244#include <../version>
244 245
245 QString cap = "About KOpieMail/Pi"; 246 QString cap = "About KOpieMail/Pi";
246 QString text =i18n("KOpieMail/Platform-independent\n") + 247 QString text =i18n("KOpieMail/Platform-independent\n") +
247 "(OM/Pi) " + version + " - " 248 "(OM/Pi) " + version + " - "
248 249
249#ifdef DESKTOP_VERSION 250#ifdef DESKTOP_VERSION
250 "Desktop Edition\n" 251 "Desktop Edition\n"
251#else 252#else
252 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" 253 "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n"
253#endif 254#endif
254 "www.pi-sync.net\n\n" 255 "www.pi-sync.net\n\n"
255 256
256 257
257 258
258"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" 259"Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n"
259 "KOpieMail/Pi is based on Opie Mail\n" 260 "KOpieMail/Pi is based on Opie Mail\n"
260 "Copyright (c) Rajko Albrecht and the Opie team\n" 261 "Copyright (c) Rajko Albrecht and the Opie team\n"
261 "KOpieMail/Pi is licensed under the GPL\n" 262 "KOpieMail/Pi is licensed under the GPL\n"
262 "\n" 263 "\n"
263 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" 264 "KOpieMail/Pi uses LibEtPan - a mail stuff library\n"
264 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" 265 "Copyright (C) 2001, 2002 - DINH Viet Hoa\n"
265 "libEtPan has its own licence - see LibEtPan licence\n"; 266 "libEtPan has its own licence - see LibEtPan licence\n";
266 267
267 KApplication::showText( cap, text ); 268 KApplication::showText( cap, text );
268} 269}
269void MainWindow::showEtpanLicence() 270void MainWindow::showEtpanLicence()
270{ 271{
271 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); 272 KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" );
272 273
273} 274}
274void MainWindow::appMessage(const QCString &, const QByteArray &) 275void MainWindow::appMessage(const QCString &, const QByteArray &)
275{ 276{
276 qDebug("appMessage implemented by subclass"); 277 qDebug("appMessage implemented by subclass");
277} 278}
278 279
279void MainWindow::slotAdjustLayout() { 280void MainWindow::slotAdjustLayout() {
280 281
281 /* 282 /*
282 QWidget *d = QApplication::desktop(); 283 QWidget *d = QApplication::desktop();
283 284
284 if ( d->width() < d->height() ) { 285 if ( d->width() < d->height() ) {
285 layout->setDirection( QBoxLayout::TopToBottom ); 286 layout->setDirection( QBoxLayout::TopToBottom );
286 } else { 287 } else {
287 layout->setDirection( QBoxLayout::LeftToRight ); 288 layout->setDirection( QBoxLayout::LeftToRight );
288 } 289 }
289 */ 290 */
290} 291}
291 292
292void MainWindow::slotAdjustColumns() 293void MainWindow::slotAdjustColumns()
293{ 294{
294 bool hidden = folderView->isHidden(); 295 bool hidden = folderView->isHidden();
295 if ( hidden ) folderView->show(); 296 if ( hidden ) folderView->show();
296 folderView->setColumnWidth( 0, folderView->visibleWidth() ); 297 folderView->setColumnWidth( 0, folderView->visibleWidth() );
297 if ( hidden ) folderView->hide(); 298 if ( hidden ) folderView->hide();
298 299
299 mailView->setColumnWidth( 0, 10 ); 300 mailView->setColumnWidth( 0, 10 );
300 mailView->setColumnWidth( 1, 100 ); 301 mailView->setColumnWidth( 1, 100 );
301 mailView->setColumnWidth( 2, 100 ); 302 mailView->setColumnWidth( 2, 100 );
302 mailView->setColumnWidth( 3, 50 ); 303 mailView->setColumnWidth( 3, 50 );