-rw-r--r-- | kmicromail/mainwindow.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/kmicromail/mainwindow.cpp b/kmicromail/mainwindow.cpp index 4c58909..9a52d1b 100644 --- a/kmicromail/mainwindow.cpp +++ b/kmicromail/mainwindow.cpp | |||
@@ -59,358 +59,358 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags ) | |||
59 | 59 | ||
60 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), | 60 | composeMail = new QAction( i18n( "Compose new mail" ), SmallIcon("composemail"), |
61 | 0, 0, this ); | 61 | 0, 0, this ); |
62 | composeMail->addTo( toolBar ); | 62 | composeMail->addTo( toolBar ); |
63 | composeMail->addTo( mailMenu ); | 63 | composeMail->addTo( mailMenu ); |
64 | 64 | ||
65 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , | 65 | sendQueued = new QAction( i18n( "Send queued mails" ), SmallIcon("sendqueued") , |
66 | 0, 0, this ); | 66 | 0, 0, this ); |
67 | sendQueued->addTo( toolBar ); | 67 | sendQueued->addTo( toolBar ); |
68 | sendQueued->addTo( mailMenu ); | 68 | sendQueued->addTo( mailMenu ); |
69 | 69 | ||
70 | /* | 70 | /* |
71 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, | 71 | syncFolders = new QAction( i18n( "Sync mailfolders" ), ICON_SYNC, |
72 | 0, 0, this ); | 72 | 0, 0, this ); |
73 | syncFolders->addTo( toolBar ); | 73 | syncFolders->addTo( toolBar ); |
74 | syncFolders->addTo( mailMenu ); | 74 | syncFolders->addTo( mailMenu ); |
75 | */ | 75 | */ |
76 | 76 | ||
77 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , | 77 | showFolders = new QAction( i18n( "Show/Hide folders" ), SmallIcon("showfolders") , |
78 | 0, 0, this, 0, true ); | 78 | 0, 0, this, 0, true ); |
79 | showFolders->addTo( toolBar ); | 79 | showFolders->addTo( toolBar ); |
80 | showFolders->addTo( mailMenu ); | 80 | showFolders->addTo( mailMenu ); |
81 | showFolders->setOn( true ); | 81 | showFolders->setOn( true ); |
82 | connect(showFolders, SIGNAL( toggled(bool) ), | 82 | connect(showFolders, SIGNAL( toggled(bool) ), |
83 | SLOT( slotShowFolders(bool) ) ); | 83 | SLOT( slotShowFolders(bool) ) ); |
84 | 84 | ||
85 | /* | 85 | /* |
86 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), | 86 | searchMails = new QAction( i18n( "Search mails" ), SmallIcon("find") ), |
87 | 0, 0, this ); | 87 | 0, 0, this ); |
88 | searchMails->kopddTo( toolBar ); | 88 | searchMails->kopddTo( toolBar ); |
89 | searchMails->addTo( mailMenu ); | 89 | searchMails->addTo( mailMenu ); |
90 | */ | 90 | */ |
91 | 91 | ||
92 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); | 92 | deleteMails = new QAction(i18n("Delete Mail"), SmallIcon("trash"), 0, 0, this); |
93 | deleteMails->addTo( toolBar ); | 93 | deleteMails->addTo( toolBar ); |
94 | deleteMails->addTo( mailMenu ); | 94 | deleteMails->addTo( mailMenu ); |
95 | connect( deleteMails, SIGNAL( activated() ), | 95 | connect( deleteMails, SIGNAL( activated() ), |
96 | SLOT( slotDeleteAllMail() ) ); | 96 | SLOT( slotDeleteAllMail() ) ); |
97 | 97 | ||
98 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , | 98 | editSettings = new QAction( i18n( "Edit settings" ), SmallIcon("SettingsIcon") , |
99 | 0, 0, this ); | 99 | 0, 0, this ); |
100 | editSettings->addTo( settingsMenu ); | 100 | editSettings->addTo( settingsMenu ); |
101 | connect( editSettings, SIGNAL( activated() ), | 101 | connect( editSettings, SIGNAL( activated() ), |
102 | SLOT( slotEditSettings() ) ); | 102 | SLOT( slotEditSettings() ) ); |
103 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , | 103 | editAccounts = new QAction( i18n( "Configure accounts" ), SmallIcon("editaccounts") , |
104 | 0, 0, this ); | 104 | 0, 0, this ); |
105 | editAccounts->addTo( settingsMenu ); | 105 | editAccounts->addTo( settingsMenu ); |
106 | codecMenu = new QPopupMenu( menuBar ); | 106 | codecMenu = new QPopupMenu( menuBar ); |
107 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); | 107 | codecMenu->insertItem( "Western (iso-8859-1)",0,0); |
108 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); | 108 | codecMenu->insertItem( "Cyrillic (iso-8859-5)",1,1); |
109 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); | 109 | codecMenu->insertItem( "Western (iso-8859-15)",2,2); |
110 | codecMenu->insertItem( "Chinese (big-5)",3,3); | 110 | codecMenu->insertItem( "Chinese (big-5)",3,3); |
111 | codecMenu->insertItem( "Unicode (utf-8)",4,4); | 111 | codecMenu->insertItem( "Unicode (utf-8)",4,4); |
112 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); | 112 | codecMenu->insertItem( "Userdefined ("+KOPrefs::instance()->mSendCodec+")",5,5); |
113 | //disabled | 113 | //disabled |
114 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); | 114 | //settingsMenu->insertItem( i18n("Codec for new mails"), codecMenu); |
115 | //setCentralWidget( view ); | 115 | //setCentralWidget( view ); |
116 | 116 | ||
117 | QVBox* wrapperBox = new QVBox( this ); | 117 | QVBox* wrapperBox = new QVBox( this ); |
118 | setCentralWidget( wrapperBox ); | 118 | setCentralWidget( wrapperBox ); |
119 | 119 | ||
120 | // QWidget *view = new QWidget( wrapperBox ); | 120 | // QWidget *view = new QWidget( wrapperBox ); |
121 | KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); | 121 | KDGanttMinimizeSplitter* splithor = new KDGanttMinimizeSplitter( Qt::Vertical, wrapperBox); |
122 | splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); | 122 | splithor->setMinimizeDirection( KDGanttMinimizeSplitter::Down); |
123 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); | 123 | KDGanttMinimizeSplitter* split = new KDGanttMinimizeSplitter( Qt::Horizontal, splithor); |
124 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); | 124 | split->setMinimizeDirection( KDGanttMinimizeSplitter::Left); |
125 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); | 125 | //layout = new QBoxLayout ( split, QBoxLayout::LeftToRight ); |
126 | subLE = 0; | 126 | subLE = 0; |
127 | fromLE = 0; | 127 | fromLE = 0; |
128 | toLE = 0; | 128 | toLE = 0; |
129 | if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { | 129 | if ( KOPrefs::instance()->mShowInfoSub || KOPrefs::instance()->mShowInfoFrom || KOPrefs::instance()->mShowInfoTo ) { |
130 | QWidget* infoBox = new QWidget( splithor ); | 130 | QWidget* infoBox = new QWidget( splithor ); |
131 | QGridLayout *griLay = new QGridLayout( infoBox, 2,2); | 131 | QGridLayout *griLay = new QGridLayout( infoBox, 2,2); |
132 | if ( KOPrefs::instance()->mShowInfoSub ) { | 132 | if ( KOPrefs::instance()->mShowInfoSub ) { |
133 | griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); | 133 | griLay->addWidget( new QLabel ( i18n("Su:"), infoBox ),0,0 ); |
134 | griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; | 134 | griLay->addWidget( subLE = new QLineEdit( infoBox ),0,1) ; |
135 | } | 135 | } |
136 | if ( KOPrefs::instance()->mShowInfoFrom ) { | 136 | if ( KOPrefs::instance()->mShowInfoFrom ) { |
137 | griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); | 137 | griLay->addWidget( new QLabel ( i18n("Fr:"), infoBox ),1,0 ); |
138 | griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; | 138 | griLay->addWidget( fromLE = new QLineEdit( infoBox ),1,1) ; |
139 | } | 139 | } |
140 | if ( KOPrefs::instance()->mShowInfoTo ) { | 140 | if ( KOPrefs::instance()->mShowInfoTo ) { |
141 | griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); | 141 | griLay->addWidget( new QLabel ( i18n("To:"), infoBox ),2,0 ); |
142 | griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; | 142 | griLay->addWidget( toLE = new QLineEdit( infoBox ),2,1) ; |
143 | } | 143 | } |
144 | infoBox->setMaximumHeight( infoBox->sizeHint().height() ); | 144 | infoBox->setMaximumHeight( infoBox->sizeHint().height() ); |
145 | if ( !KOPrefs::instance()->mShowInfoStart ) { | 145 | if ( !KOPrefs::instance()->mShowInfoStart ) { |
146 | QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); | 146 | QTimer::singleShot( 1,splithor, SLOT ( toggle() ) ); |
147 | } | 147 | } |
148 | } | 148 | } |
149 | 149 | ||
150 | 150 | ||
151 | folderView = new AccountView( split ); | 151 | folderView = new AccountView( split ); |
152 | folderView->header()->hide(); | 152 | folderView->header()->hide(); |
153 | folderView->setRootIsDecorated( false ); | 153 | folderView->setRootIsDecorated( false ); |
154 | folderView->addColumn( i18n( "Mailbox" ) ); | 154 | folderView->addColumn( i18n( "Mailbox" ) ); |
155 | 155 | ||
156 | //layout->addWidget( folderView ); | 156 | //layout->addWidget( folderView ); |
157 | 157 | ||
158 | mailView = new QListView( split ); | 158 | mailView = new QListView( split ); |
159 | mailView->addColumn( i18n( " " ) ); | 159 | mailView->addColumn( i18n( " " ) ); |
160 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); | 160 | mailView->addColumn( i18n( "Subject" ),QListView::Manual ); |
161 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); | 161 | mailView->addColumn( i18n( "Sender" ),QListView::Manual ); |
162 | mailView->addColumn( i18n( "Size" ),QListView::Manual); | 162 | mailView->addColumn( i18n( "Size" ),QListView::Manual); |
163 | mailView->addColumn( i18n( "Date" ),QListView::Manual); | 163 | mailView->addColumn( i18n( "Date" ),QListView::Manual); |
164 | if ( KOPrefs::instance()->mShowToField ) | 164 | if ( KOPrefs::instance()->mShowToField ) |
165 | mailView->addColumn( i18n( "To" ),QListView::Manual); | 165 | mailView->addColumn( i18n( "To" ),QListView::Manual); |
166 | mailView->setAllColumnsShowFocus(true); | 166 | mailView->setAllColumnsShowFocus(true); |
167 | //mailView->setSorting(-1); | 167 | //mailView->setSorting(-1); |
168 | mailView->setRootIsDecorated( false ); | 168 | mailView->setRootIsDecorated( false ); |
169 | statusWidget = new StatusWidget( wrapperBox ); | 169 | statusWidget = new StatusWidget( wrapperBox ); |
170 | statusWidget->hide(); | 170 | statusWidget->hide(); |
171 | 171 | ||
172 | //layout->addWidget( mailView ); | 172 | //layout->addWidget( mailView ); |
173 | //layout->setStretchFactor( folderView, 1 ); | 173 | //layout->setStretchFactor( folderView, 1 ); |
174 | //layout->setStretchFactor( mailView, 2 ); | 174 | //layout->setStretchFactor( mailView, 2 ); |
175 | 175 | ||
176 | slotAdjustLayout(); | 176 | slotAdjustLayout(); |
177 | #ifndef DESKTOP_VERSION | 177 | #ifndef DESKTOP_VERSION |
178 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); | 178 | QPEApplication::setStylusOperation( mailView->viewport(),QPEApplication::RightOnHold); |
179 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); | 179 | QPEApplication::setStylusOperation( folderView->viewport(),QPEApplication::RightOnHold); |
180 | if ( subLE ) | 180 | if ( subLE ) |
181 | QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); | 181 | QPEApplication::setStylusOperation( subLE ,QPEApplication::RightOnHold); |
182 | if ( fromLE ) | 182 | if ( fromLE ) |
183 | QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); | 183 | QPEApplication::setStylusOperation( fromLE ,QPEApplication::RightOnHold); |
184 | if ( toLE ) | 184 | if ( toLE ) |
185 | QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); | 185 | QPEApplication::setStylusOperation( toLE ,QPEApplication::RightOnHold); |
186 | #endif | 186 | #endif |
187 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, | 187 | connect( mailView, SIGNAL( doubleClicked (QListViewItem* )),this, |
188 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 188 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
189 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, | 189 | connect( mailView, SIGNAL( returnPressed (QListViewItem* )),this, |
190 | SLOT( mailLeftClicked(QListViewItem*) ) ); | 190 | SLOT( mailLeftClicked(QListViewItem*) ) ); |
191 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, | 191 | connect( mailView, SIGNAL( mouseButtonPressed(int,QListViewItem*,const QPoint&,int) ),this, |
192 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); | 192 | SLOT( mailHold(int,QListViewItem*,const QPoint&,int) ) ); |
193 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), | 193 | connect(folderView, SIGNAL(refreshMailview(const QValueList<RecMailP>&)), |
194 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); | 194 | this,SLOT(refreshMailView(const QValueList<RecMailP>&))); |
195 | 195 | ||
196 | connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, | 196 | connect( mailView, SIGNAL( currentChanged (QListViewItem* )),this, |
197 | SLOT( setInfoFields(QListViewItem*) ) ); | 197 | SLOT( setInfoFields(QListViewItem*) ) ); |
198 | 198 | ||
199 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); | 199 | connect( composeMail, SIGNAL( activated() ), SLOT( slotComposeMail() ) ); |
200 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); | 200 | connect( sendQueued, SIGNAL( activated() ), SLOT( slotSendQueued() ) ); |
201 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); | 201 | // connect( searchMails, SIGNAL( activated() ), SLOT( slotSearchMails() ) ); |
202 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); | 202 | connect( editAccounts, SIGNAL( activated() ), SLOT( slotEditAccounts() ) ); |
203 | //mailView->setMultiSelection ( true ); | 203 | //mailView->setMultiSelection ( true ); |
204 | mailView->setSelectionMode( QListView::Extended ); | 204 | mailView->setSelectionMode( QListView::Extended ); |
205 | QValueList<int> list; | 205 | QValueList<int> list; |
206 | int fw = 100; | 206 | int fw = 100; |
207 | if ( QApplication::desktop()->width() > 320 ) | 207 | if ( QApplication::desktop()->width() > 320 ) |
208 | fw = 50; | 208 | fw = 50; |
209 | list.append( fw ); | 209 | list.append( fw ); |
210 | list.append( 100 ); | 210 | list.append( 100 ); |
211 | split->setSizes( list ); | 211 | split->setSizes( list ); |
212 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); | 212 | QTimer::singleShot( 1000, this, SLOT( slotAdjustColumns() ) ); |
213 | mailView->setShowSortIndicator ( true ); | 213 | mailView->setShowSortIndicator ( true ); |
214 | QLabel *spacer = new QLabel( toolBar ); | 214 | QLabel *spacer = new QLabel( toolBar ); |
215 | spacer->setBackgroundMode( QWidget::PaletteButton ); | 215 | spacer->setBackgroundMode( QWidget::PaletteButton ); |
216 | toolBar->setStretchableWidget( spacer ); | 216 | toolBar->setStretchableWidget( spacer ); |
217 | 217 | ||
218 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); | 218 | QAction* closeMail = new QAction(i18n("Close"),SmallIcon("exit"), 0, 0, this); |
219 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); | 219 | connect( closeMail, SIGNAL( activated() ), SLOT( close() ) ); |
220 | if ( QApplication::desktop()->width() > 320 ) | 220 | if ( QApplication::desktop()->width() > 320 ) |
221 | closeMail->addTo(toolBar); | 221 | closeMail->addTo(toolBar); |
222 | closeMail->addTo(mailMenu); | 222 | closeMail->addTo(mailMenu); |
223 | 223 | ||
224 | 224 | ||
225 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); | 225 | QPopupMenu* helpMenu = new QPopupMenu( menuBar ); |
226 | menuBar->insertItem( i18n( "Help" ), helpMenu ); | 226 | menuBar->insertItem( i18n( "Help" ), helpMenu ); |
227 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); | 227 | QAction* li = new QAction(i18n("About"), QPixmap(), 0, 0, this); |
228 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); | 228 | connect( li, SIGNAL( activated() ), SLOT( showAbout()) ); |
229 | li->addTo(helpMenu); | 229 | li->addTo(helpMenu); |
230 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); | 230 | li = new QAction(i18n("Licence"),QPixmap(), 0, 0, this); |
231 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); | 231 | connect( li, SIGNAL( activated() ), SLOT( showLicence()) ); |
232 | li->addTo(helpMenu); | 232 | li->addTo(helpMenu); |
233 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); | 233 | li = new QAction(i18n("LibEtPan Licence"), QPixmap(), 0, 0, this); |
234 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); | 234 | connect( li, SIGNAL( activated() ), SLOT( showEtpanLicence()) ); |
235 | li->addTo(helpMenu); | 235 | li->addTo(helpMenu); |
236 | connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); | 236 | connect( codecMenu, SIGNAL( activated(int) ), this, SLOT( slotSetCodec( int )) ); |
237 | slotSetCodec( KOPrefs::instance()->mCurrentCodec ); | 237 | slotSetCodec( KOPrefs::instance()->mCurrentCodec ); |
238 | menuBar->setMaximumWidth( menuBar->sizeHint().width()); | 238 | menuBar->setMaximumWidth( menuBar->sizeHint().width()); |
239 | //menuBar->setMaximumSize( menuBar->sizeHint()); | 239 | //menuBar->setMaximumSize( menuBar->sizeHint()); |
240 | #ifdef DESKTOP_VERSION | 240 | #ifdef DESKTOP_VERSION |
241 | resize ( 640, 480 ); | 241 | resize ( 640, 480 ); |
242 | #endif | 242 | #endif |
243 | } | 243 | } |
244 | 244 | ||
245 | MainWindow::~MainWindow() | 245 | MainWindow::~MainWindow() |
246 | { | 246 | { |
247 | } | 247 | } |
248 | 248 | ||
249 | void MainWindow::setInfoFields(QListViewItem* item ) | 249 | void MainWindow::setInfoFields(QListViewItem* item ) |
250 | { | 250 | { |
251 | if ( item == 0) { | 251 | if ( item == 0) { |
252 | if ( subLE ) subLE->setText(""); | 252 | if ( subLE ) subLE->setText(""); |
253 | if ( fromLE ) fromLE->setText(""); | 253 | if ( fromLE ) fromLE->setText(""); |
254 | if ( toLE ) toLE->setText(""); | 254 | if ( toLE ) toLE->setText(""); |
255 | return; | 255 | return; |
256 | } | 256 | } |
257 | RecMailP mail = ((MailListViewItem*)item)->data(); | 257 | RecMailP mail = ((MailListViewItem*)item)->data(); |
258 | if ( subLE ) subLE->setText(mail->getSubject()); | 258 | if ( subLE ) subLE->setText(mail->getSubject()); |
259 | if ( fromLE ) fromLE->setText(mail->getFrom()); | 259 | if ( fromLE ) fromLE->setText(mail->getFrom()); |
260 | if ( toLE ) toLE->setText(mail->To().join(";" )); | 260 | if ( toLE ) toLE->setText(mail->To().join(";" )); |
261 | if ( subLE ) subLE->setCursorPosition(0); | 261 | if ( subLE ) subLE->setCursorPosition(0); |
262 | if ( fromLE ) fromLE->setCursorPosition(0); | 262 | if ( fromLE ) fromLE->setCursorPosition(0); |
263 | if ( toLE ) toLE->setCursorPosition(0); | 263 | if ( toLE ) toLE->setCursorPosition(0); |
264 | 264 | ||
265 | } | 265 | } |
266 | void MainWindow::slotSetCodec( int codec ) | 266 | void MainWindow::slotSetCodec( int codec ) |
267 | { | 267 | { |
268 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); | 268 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, false ); |
269 | //qDebug("codec %d ", codec); | 269 | //qDebug("codec %d ", codec); |
270 | KOPrefs::instance()->mCurrentCodec = codec; | 270 | KOPrefs::instance()->mCurrentCodec = codec; |
271 | KOPrefs::instance()->isDirty = true; | 271 | KOPrefs::instance()->isDirty = true; |
272 | QString name; | 272 | QString name; |
273 | switch ( codec ) { | 273 | switch ( codec ) { |
274 | case 0: | 274 | case 0: |
275 | name = "iso-8859-1"; | 275 | name = "iso-8859-1"; |
276 | break; | 276 | break; |
277 | case 1: | 277 | case 1: |
278 | name = "iso-8859-5"; | 278 | name = "iso-8859-5"; |
279 | break; | 279 | break; |
280 | case 2: | 280 | case 2: |
281 | name = "iso-8859-15"; | 281 | name = "iso-8859-15"; |
282 | break; | 282 | break; |
283 | case 3: | 283 | case 3: |
284 | name = "big-5"; | 284 | name = "big-5"; |
285 | break; | 285 | break; |
286 | case 4: | 286 | case 4: |
287 | name = "utf-8"; | 287 | name = "utf-8"; |
288 | break; | 288 | break; |
289 | case 5: | 289 | case 5: |
290 | name = KOPrefs::instance()->mSendCodec.lower(); | 290 | name = KOPrefs::instance()->mSendCodec.lower(); |
291 | break; | 291 | break; |
292 | } | 292 | } |
293 | KOPrefs::instance()->mCurrentCodeName = name ; | 293 | KOPrefs::instance()->mCurrentCodeName = name ; |
294 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); | 294 | codecMenu->changeItem ( 5, "Userdefined ("+KOPrefs::instance()->mSendCodec+")"); |
295 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); | 295 | codecMenu->setItemChecked(KOPrefs::instance()->mCurrentCodec, true ); |
296 | } | 296 | } |
297 | void MainWindow::showLicence() | 297 | void MainWindow::showLicence() |
298 | { | 298 | { |
299 | KApplication::showLicence(); | 299 | KApplication::showLicence(); |
300 | } | 300 | } |
301 | void MainWindow::showAbout() | 301 | void MainWindow::showAbout() |
302 | { | 302 | { |
303 | QString version; | 303 | QString version; |
304 | #include <../version> | 304 | #include <../version> |
305 | 305 | ||
306 | QString cap = "About KOpieMail/Pi"; | 306 | QString cap = "About KOpieMail/Pi"; |
307 | QString text =i18n("KOpieMail/Platform-independent\n") + | 307 | QString text =i18n("KOpieMail/Platform-independent\n") + |
308 | "(OM/Pi) " + version + " - " | 308 | "(OM/Pi) " + version + " - " |
309 | 309 | ||
310 | #ifdef DESKTOP_VERSION | 310 | #ifdef DESKTOP_VERSION |
311 | "Desktop Edition\n" | 311 | "Desktop Edition\n" |
312 | #else | 312 | #else |
313 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" | 313 | "PDA-Edition\nfor: Zaurus 5x00 / 7x0 / 8x0\n" |
314 | #endif | 314 | #endif |
315 | "www.pi-sync.net\n\n" | 315 | "www.pi-sync.info\n\n" |
316 | 316 | ||
317 | 317 | ||
318 | 318 | ||
319 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.net>\n" | 319 | "Copyright (c) 2004 Lutz Rogowski <lutz@pi-sync.info>\n" |
320 | "KOpieMail/Pi is based on Opie Mail\n" | 320 | "KOpieMail/Pi is based on Opie Mail\n" |
321 | "Copyright (c) Rajko Albrecht and the Opie team\n" | 321 | "Copyright (c) Rajko Albrecht and the Opie team\n" |
322 | "KOpieMail/Pi is licensed under the GPL\n" | 322 | "KOpieMail/Pi is licensed under the GPL\n" |
323 | "\n" | 323 | "\n" |
324 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" | 324 | "KOpieMail/Pi uses LibEtPan - a mail stuff library\n" |
325 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" | 325 | "Copyright (C) 2001, 2002 - DINH Viet Hoa\n" |
326 | "libEtPan has its own licence - see LibEtPan licence\n"; | 326 | "libEtPan has its own licence - see LibEtPan licence\n"; |
327 | 327 | ||
328 | KApplication::showText( cap, text ); | 328 | KApplication::showText( cap, text ); |
329 | } | 329 | } |
330 | void MainWindow::showEtpanLicence() | 330 | void MainWindow::showEtpanLicence() |
331 | { | 331 | { |
332 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); | 332 | KApplication::showFile( "LibEtPan licence", "kdepim/kopiemail/COPYRIGHTlibetpan" ); |
333 | 333 | ||
334 | } | 334 | } |
335 | void MainWindow::appMessage(const QCString &, const QByteArray &) | 335 | void MainWindow::appMessage(const QCString &, const QByteArray &) |
336 | { | 336 | { |
337 | qDebug("appMessage implemented by subclass"); | 337 | qDebug("appMessage implemented by subclass"); |
338 | } | 338 | } |
339 | 339 | ||
340 | void MainWindow::slotAdjustLayout() { | 340 | void MainWindow::slotAdjustLayout() { |
341 | 341 | ||
342 | /* | 342 | /* |
343 | QWidget *d = QApplication::desktop(); | 343 | QWidget *d = QApplication::desktop(); |
344 | 344 | ||
345 | if ( d->width() < d->height() ) { | 345 | if ( d->width() < d->height() ) { |
346 | layout->setDirection( QBoxLayout::TopToBottom ); | 346 | layout->setDirection( QBoxLayout::TopToBottom ); |
347 | } else { | 347 | } else { |
348 | layout->setDirection( QBoxLayout::LeftToRight ); | 348 | layout->setDirection( QBoxLayout::LeftToRight ); |
349 | } | 349 | } |
350 | */ | 350 | */ |
351 | } | 351 | } |
352 | 352 | ||
353 | void MainWindow::slotAdjustColumns() | 353 | void MainWindow::slotAdjustColumns() |
354 | { | 354 | { |
355 | bool hidden = folderView->isHidden(); | 355 | bool hidden = folderView->isHidden(); |
356 | if ( hidden ) folderView->show(); | 356 | if ( hidden ) folderView->show(); |
357 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 357 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
358 | if ( hidden ) folderView->hide(); | 358 | if ( hidden ) folderView->hide(); |
359 | 359 | ||
360 | mailView->setColumnWidth( 0, 10 ); | 360 | mailView->setColumnWidth( 0, 10 ); |
361 | mailView->setColumnWidth( 1, 100 ); | 361 | mailView->setColumnWidth( 1, 100 ); |
362 | mailView->setColumnWidth( 2, 100 ); | 362 | mailView->setColumnWidth( 2, 100 ); |
363 | mailView->setColumnWidth( 3, 50 ); | 363 | mailView->setColumnWidth( 3, 50 ); |
364 | mailView->setColumnWidth( 4, 120 ); | 364 | mailView->setColumnWidth( 4, 120 ); |
365 | if ( KOPrefs::instance()->mShowToField ) | 365 | if ( KOPrefs::instance()->mShowToField ) |
366 | mailView->setColumnWidth( 5, 100 ); | 366 | mailView->setColumnWidth( 5, 100 ); |
367 | } | 367 | } |
368 | 368 | ||
369 | void MainWindow::slotEditSettings() | 369 | void MainWindow::slotEditSettings() |
370 | { | 370 | { |
371 | } | 371 | } |
372 | 372 | ||
373 | void MainWindow::slotShowFolders( bool ) | 373 | void MainWindow::slotShowFolders( bool ) |
374 | { | 374 | { |
375 | qDebug("not implemented: "); | 375 | qDebug("not implemented: "); |
376 | } | 376 | } |
377 | 377 | ||
378 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) | 378 | void MainWindow::refreshMailView(const QValueList<RecMailP>&) |
379 | { | 379 | { |
380 | qDebug("not implemented: "); | 380 | qDebug("not implemented: "); |
381 | } | 381 | } |
382 | 382 | ||
383 | void MainWindow::mailLeftClicked(QListViewItem * ) | 383 | void MainWindow::mailLeftClicked(QListViewItem * ) |
384 | { | 384 | { |
385 | qDebug("not implemented: "); | 385 | qDebug("not implemented: "); |
386 | } | 386 | } |
387 | 387 | ||
388 | void MainWindow::displayMail() | 388 | void MainWindow::displayMail() |
389 | { | 389 | { |
390 | qDebug("not implemented: "); | 390 | qDebug("not implemented: "); |
391 | } | 391 | } |
392 | 392 | ||
393 | void MainWindow::slotDeleteMail() | 393 | void MainWindow::slotDeleteMail() |
394 | { | 394 | { |
395 | qDebug("not implemented: "); | 395 | qDebug("not implemented: "); |
396 | } | 396 | } |
397 | 397 | ||
398 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) | 398 | void MainWindow::mailHold(int, QListViewItem *,const QPoint&,int ) |
399 | { | 399 | { |
400 | qDebug("not implemented: "); | 400 | qDebug("not implemented: "); |
401 | } | 401 | } |
402 | 402 | ||
403 | void MainWindow::slotSendQueued() | 403 | void MainWindow::slotSendQueued() |
404 | { | 404 | { |
405 | qDebug("not implemented: "); | 405 | qDebug("not implemented: "); |
406 | } | 406 | } |
407 | 407 | ||
408 | void MainWindow::slotEditAccounts() | 408 | void MainWindow::slotEditAccounts() |
409 | { | 409 | { |
410 | qDebug("not implemented: "); | 410 | qDebug("not implemented: "); |
411 | } | 411 | } |
412 | 412 | ||
413 | void MainWindow::slotComposeMail() | 413 | void MainWindow::slotComposeMail() |
414 | { | 414 | { |
415 | qDebug("not implemented: "); | 415 | qDebug("not implemented: "); |
416 | } | 416 | } |