author | harlekin <harlekin> | 2003-12-10 01:24:21 (UTC) |
---|---|---|
committer | harlekin <harlekin> | 2003-12-10 01:24:21 (UTC) |
commit | a908d0ffdb5cee72b7823fc411119b8e1e3faad8 (patch) (unidiff) | |
tree | a5c25c3d49373c705fd541a28f25436dc206be4f /noncore/net/mail/mainwindow.cpp | |
parent | c244afea4a03d7ae948152b5abac2f059fb1e789 (diff) | |
download | opie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.zip opie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.tar.gz opie-a908d0ffdb5cee72b7823fc411119b8e1e3faad8.tar.bz2 |
basis message id handling
Diffstat (limited to 'noncore/net/mail/mainwindow.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mail/mainwindow.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/noncore/net/mail/mainwindow.cpp b/noncore/net/mail/mainwindow.cpp index f19f93d..3edfff1 100644 --- a/noncore/net/mail/mainwindow.cpp +++ b/noncore/net/mail/mainwindow.cpp | |||
@@ -112,74 +112,74 @@ void MainWindow::slotAdjustLayout() { | |||
112 | layout->setDirection( QBoxLayout::LeftToRight ); | 112 | layout->setDirection( QBoxLayout::LeftToRight ); |
113 | } | 113 | } |
114 | delete d; | 114 | delete d; |
115 | } | 115 | } |
116 | 116 | ||
117 | void MainWindow::slotAdjustColumns() | 117 | void MainWindow::slotAdjustColumns() |
118 | { | 118 | { |
119 | bool hidden = folderView->isHidden(); | 119 | bool hidden = folderView->isHidden(); |
120 | if ( hidden ) folderView->show(); | 120 | if ( hidden ) folderView->show(); |
121 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); | 121 | folderView->setColumnWidth( 0, folderView->visibleWidth() ); |
122 | if ( hidden ) folderView->hide(); | 122 | if ( hidden ) folderView->hide(); |
123 | 123 | ||
124 | mailView->setColumnWidth( 0, mailView->visibleWidth() - 130 ); | 124 | mailView->setColumnWidth( 0, mailView->visibleWidth() - 130 ); |
125 | mailView->setColumnWidth( 1, 80 ); | 125 | mailView->setColumnWidth( 1, 80 ); |
126 | mailView->setColumnWidth( 2, 50 ); | 126 | mailView->setColumnWidth( 2, 50 ); |
127 | } | 127 | } |
128 | 128 | ||
129 | void MainWindow::slotShowFolders( bool show ) | 129 | void MainWindow::slotShowFolders( bool show ) |
130 | { | 130 | { |
131 | qDebug( "Show Folders" ); | 131 | qDebug( "Show Folders" ); |
132 | if ( show && folderView->isHidden() ) { | 132 | if ( show && folderView->isHidden() ) { |
133 | qDebug( "-> showing" ); | 133 | qDebug( "-> showing" ); |
134 | folderView->show(); | 134 | folderView->show(); |
135 | } else if ( !show && !folderView->isHidden() ) { | 135 | } else if ( !show && !folderView->isHidden() ) { |
136 | qDebug( "-> hiding" ); | 136 | qDebug( "-> hiding" ); |
137 | folderView->hide(); | 137 | folderView->hide(); |
138 | } | 138 | } |
139 | } | 139 | } |
140 | 140 | ||
141 | void MainWindow::refreshMailView(QList<RecMail>*list) | 141 | void MainWindow::refreshMailView(QList<RecMail>*list) |
142 | { | 142 | { |
143 | MailListViewItem*item = 0; | 143 | MailListViewItem*item = 0; |
144 | mailView->clear(); | 144 | mailView->clear(); |
145 | for (unsigned int i = 0; i < list->count();++i) { | 145 | for (unsigned int i = 0; i < list->count();++i) { |
146 | item = new MailListViewItem(mailView,item); | 146 | item = new MailListViewItem(mailView,item); |
147 | item->storeData(*(list->at(i))); | 147 | item->storeData(*(list->at(i))); |
148 | item->showEntry(); | 148 | item->showEntry(); |
149 | } | 149 | } |
150 | } | 150 | } |
151 | void MainWindow::displayMail(QListViewItem*item) | 151 | void MainWindow::displayMail(QListViewItem*item) |
152 | { | 152 | { |
153 | if (!item) return; | 153 | if (!item) return; |
154 | qDebug("View mail"); | 154 | qDebug("View mail"); |
155 | RecMail mail = ((MailListViewItem*)item)->data(); | 155 | RecMail mail = ((MailListViewItem*)item)->data(); |
156 | RecBody body = folderView->fetchBody(mail); | 156 | RecBody body = folderView->fetchBody(mail); |
157 | 157 | ||
158 | ViewMail readMail( this ); | 158 | ViewMail readMail( this ); |
159 | 159 | ||
160 | readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext() ); | 160 | readMail.setMailInfo( mail.getFrom(), mail.To(), mail.getSubject(), mail.CC(), mail.Bcc(), mail.getDate(), body.Bodytext(), mail.Msgid() ); |
161 | readMail.showMaximized(); | 161 | readMail.showMaximized(); |
162 | readMail.exec(); | 162 | readMail.exec(); |
163 | } | 163 | } |
164 | 164 | ||
165 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * after ) | 165 | MailListViewItem::MailListViewItem(QListView * parent, MailListViewItem * after ) |
166 | :QListViewItem(parent,after),mail_data() | 166 | :QListViewItem(parent,after),mail_data() |
167 | { | 167 | { |
168 | } | 168 | } |
169 | 169 | ||
170 | void MailListViewItem::showEntry() | 170 | void MailListViewItem::showEntry() |
171 | { | 171 | { |
172 | setText(0,mail_data.getSubject()); | 172 | setText(0,mail_data.getSubject()); |
173 | setText(1,mail_data.getFrom()); | 173 | setText(1,mail_data.getFrom()); |
174 | setText(2,mail_data.getDate()); | 174 | setText(2,mail_data.getDate()); |
175 | } | 175 | } |
176 | 176 | ||
177 | void MailListViewItem::storeData(const RecMail&data) | 177 | void MailListViewItem::storeData(const RecMail&data) |
178 | { | 178 | { |
179 | mail_data = data; | 179 | mail_data = data; |
180 | } | 180 | } |
181 | 181 | ||
182 | const RecMail& MailListViewItem::data()const | 182 | const RecMail& MailListViewItem::data()const |
183 | { | 183 | { |
184 | return mail_data; | 184 | return mail_data; |
185 | } | 185 | } |