summaryrefslogtreecommitdiffabout
path: root/kmicromail/mainwindow.cpp
authorzautrix <zautrix>2004-11-07 17:35:51 (UTC)
committer zautrix <zautrix>2004-11-07 17:35:51 (UTC)
commitd90d17044d7daf6677074b0964d59f94407157d5 (patch) (unidiff)
tree82bf4f2001465637572534650769a864c15a6f7c /kmicromail/mainwindow.cpp
parentb6ef669713ee1d52adcfc9754dd039a4ff6675da (diff)
downloadkdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.zip
kdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.tar.gz
kdepimpi-d90d17044d7daf6677074b0964d59f94407157d5.tar.bz2
some mail fixes and warnings removed
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
@@ -46,129 +46,130 @@ MainWindow::MainWindow( QWidget *parent, const char *name, WFlags flags )
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 );