-rw-r--r-- | noncore/net/mail/composemail.cpp | 2 | ||||
-rw-r--r-- | noncore/net/mail/nntpgroupsui.ui | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/noncore/net/mail/composemail.cpp b/noncore/net/mail/composemail.cpp index 449fdf1..154c1d5 100644 --- a/noncore/net/mail/composemail.cpp +++ b/noncore/net/mail/composemail.cpp | |||
@@ -1,307 +1,307 @@ | |||
1 | 1 | ||
2 | #include "composemail.h" | 2 | #include "composemail.h" |
3 | 3 | ||
4 | #include <libmailwrapper/smtpwrapper.h> | 4 | #include <libmailwrapper/smtpwrapper.h> |
5 | #include <libmailwrapper/storemail.h> | 5 | #include <libmailwrapper/storemail.h> |
6 | #include <libmailwrapper/abstractmail.h> | 6 | #include <libmailwrapper/abstractmail.h> |
7 | #include <libmailwrapper/mailtypes.h> | 7 | #include <libmailwrapper/mailtypes.h> |
8 | 8 | ||
9 | /* OPIE */ | 9 | /* OPIE */ |
10 | #include <opie2/ofiledialog.h> | 10 | #include <opie2/ofiledialog.h> |
11 | #include <opie2/odebug.h> | 11 | #include <opie2/odebug.h> |
12 | #include <qpe/resource.h> | 12 | #include <qpe/resource.h> |
13 | #include <qpe/config.h> | 13 | #include <qpe/config.h> |
14 | #include <qpe/global.h> | 14 | #include <qpe/global.h> |
15 | #include <qpe/contact.h> | 15 | #include <qpe/contact.h> |
16 | 16 | ||
17 | /* QT */ | 17 | /* QT */ |
18 | #include <qt.h> | 18 | #include <qt.h> |
19 | 19 | ||
20 | 20 | ||
21 | using namespace Opie::Core; | 21 | using namespace Opie::Core; |
22 | using namespace Opie::Ui; | 22 | using namespace Opie::Ui; |
23 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) | 23 | ComposeMail::ComposeMail( Settings *s, QWidget *parent, const char *name, bool modal, WFlags flags ) |
24 | : ComposeMailUI( parent, name, modal, flags ) | 24 | : ComposeMailUI( parent, name, modal, flags ) |
25 | { | 25 | { |
26 | settings = s; | 26 | settings = s; |
27 | m_replyid = ""; | 27 | m_replyid = ""; |
28 | 28 | ||
29 | QString vfilename = Global::applicationFileName("addressbook", | 29 | QString vfilename = Global::applicationFileName("addressbook", |
30 | "businesscard.vcf"); | 30 | "businesscard.vcf"); |
31 | Contact c; | 31 | Contact c; |
32 | if (QFile::exists(vfilename)) { | 32 | if (QFile::exists(vfilename)) { |
33 | c = Contact::readVCard( vfilename )[0]; | 33 | c = Contact::readVCard( vfilename )[0]; |
34 | } | 34 | } |
35 | 35 | ||
36 | QStringList mails = c.emailList(); | 36 | QStringList mails = c.emailList(); |
37 | QString defmail = c.defaultEmail(); | 37 | QString defmail = c.defaultEmail(); |
38 | 38 | ||
39 | if (defmail.length()!=0) { | 39 | if (defmail.length()!=0) { |
40 | fromBox->insertItem(defmail); | 40 | fromBox->insertItem(defmail); |
41 | } | 41 | } |
42 | QStringList::ConstIterator sit = mails.begin(); | 42 | QStringList::ConstIterator sit = mails.begin(); |
43 | for (;sit!=mails.end();++sit) { | 43 | for (;sit!=mails.end();++sit) { |
44 | if ( (*sit)==defmail) | 44 | if ( (*sit)==defmail) |
45 | continue; | 45 | continue; |
46 | fromBox->insertItem((*sit)); | 46 | fromBox->insertItem((*sit)); |
47 | } | 47 | } |
48 | senderNameEdit->setText(c.firstName()+" "+c.lastName()); | 48 | senderNameEdit->setText(c.firstName()+" "+c.lastName()); |
49 | Config cfg( "mail" ); | 49 | Config cfg( "mail" ); |
50 | cfg.setGroup( "Compose" ); | 50 | cfg.setGroup( "Compose" ); |
51 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); | 51 | checkBoxLater->setChecked( cfg.readBoolEntry( "sendLater", false ) ); |
52 | 52 | ||
53 | attList->addColumn( tr( "Name" ) ); | 53 | attList->addColumn( tr( "Name" ) ); |
54 | attList->addColumn( tr( "Size" ) ); | 54 | attList->addColumn( tr( "Size" ) ); |
55 | 55 | ||
56 | QList<Account> accounts = settings->getAccounts(); | 56 | QList<Account> accounts = settings->getAccounts(); |
57 | 57 | ||
58 | Account *it; | 58 | Account *it; |
59 | for ( it = accounts.first(); it; it = accounts.next() ) { | 59 | for ( it = accounts.first(); it; it = accounts.next() ) { |
60 | if ( it->getType()==MAILLIB::A_SMTP ) { | 60 | if ( it->getType()==MAILLIB::A_SMTP ) { |
61 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); | 61 | SMTPaccount *smtp = static_cast<SMTPaccount *>(it); |
62 | smtpAccountBox->insertItem( smtp->getAccountName() ); | 62 | smtpAccountBox->insertItem( smtp->getAccountName() ); |
63 | smtpAccounts.append( smtp ); | 63 | smtpAccounts.append( smtp ); |
64 | } | 64 | } |
65 | } | 65 | } |
66 | 66 | ||
67 | if ( smtpAccounts.count() > 0 ) { | 67 | if ( smtpAccounts.count() > 0 ) { |
68 | fillValues( smtpAccountBox->currentItem() ); | 68 | fillValues( smtpAccountBox->currentItem() ); |
69 | } else { | 69 | } else { |
70 | QMessageBox::information( this, tr( "Problem" ), | 70 | QMessageBox::information( this, tr( "Problem" ), |
71 | tr( "<p>Please create an SMTP account first.</p>" ), | 71 | tr( "<p>Please create an SMTP account first.</p>" ), |
72 | tr( "Ok" ) ); | 72 | tr( "Ok" ) ); |
73 | return; | 73 | return; |
74 | } | 74 | } |
75 | 75 | ||
76 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); | 76 | connect( smtpAccountBox, SIGNAL( activated(int) ), SLOT( fillValues(int) ) ); |
77 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); | 77 | connect( toButton, SIGNAL( clicked() ), SLOT( pickAddressTo() ) ); |
78 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); | 78 | connect( ccButton, SIGNAL( clicked() ), SLOT( pickAddressCC() ) ); |
79 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); | 79 | connect( bccButton, SIGNAL( clicked() ), SLOT( pickAddressBCC() ) ); |
80 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); | 80 | connect( replyButton, SIGNAL( clicked() ), SLOT( pickAddressReply() ) ); |
81 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); | 81 | connect( addButton, SIGNAL( clicked() ), SLOT( addAttachment() ) ); |
82 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); | 82 | connect( deleteButton, SIGNAL( clicked() ), SLOT( removeAttachment() ) ); |
83 | } | 83 | } |
84 | 84 | ||
85 | void ComposeMail::pickAddress( QLineEdit *line ) | 85 | void ComposeMail::pickAddress( QLineEdit *line ) |
86 | { | 86 | { |
87 | QString names = AddressPicker::getNames(); | 87 | QString names = AddressPicker::getNames(); |
88 | if ( line->text().isEmpty() ) { | 88 | if ( line->text().isEmpty() ) { |
89 | line->setText( names ); | 89 | line->setText( names ); |
90 | } else if ( !names.isEmpty() ) { | 90 | } else if ( !names.isEmpty() ) { |
91 | line->setText( line->text() + ", " + names ); | 91 | line->setText( line->text() + ", " + names ); |
92 | } | 92 | } |
93 | } | 93 | } |
94 | 94 | ||
95 | 95 | ||
96 | void ComposeMail::setTo( const QString & to ) | 96 | void ComposeMail::setTo( const QString & to ) |
97 | { | 97 | { |
98 | toLine->setText( to ); | 98 | toLine->setText( to ); |
99 | } | 99 | } |
100 | 100 | ||
101 | void ComposeMail::setSubject( const QString & subject ) | 101 | void ComposeMail::setSubject( const QString & subject ) |
102 | { | 102 | { |
103 | subjectLine->setText( subject ); | 103 | subjectLine->setText( subject ); |
104 | } | 104 | } |
105 | 105 | ||
106 | void ComposeMail::setInReplyTo( const QString & messageId ) | 106 | void ComposeMail::setInReplyTo( const QString & messageId ) |
107 | { | 107 | { |
108 | m_replyid = messageId; | 108 | m_replyid = messageId; |
109 | } | 109 | } |
110 | 110 | ||
111 | void ComposeMail::setMessage( const QString & text ) | 111 | void ComposeMail::setMessage( const QString & text ) |
112 | { | 112 | { |
113 | message->setText( text ); | 113 | message->setText( text ); |
114 | } | 114 | } |
115 | 115 | ||
116 | 116 | ||
117 | void ComposeMail::pickAddressTo() | 117 | void ComposeMail::pickAddressTo() |
118 | { | 118 | { |
119 | pickAddress( toLine ); | 119 | pickAddress( toLine ); |
120 | } | 120 | } |
121 | 121 | ||
122 | void ComposeMail::pickAddressCC() | 122 | void ComposeMail::pickAddressCC() |
123 | { | 123 | { |
124 | pickAddress( ccLine ); | 124 | pickAddress( ccLine ); |
125 | } | 125 | } |
126 | 126 | ||
127 | void ComposeMail::pickAddressBCC() | 127 | void ComposeMail::pickAddressBCC() |
128 | { | 128 | { |
129 | pickAddress( bccLine ); | 129 | pickAddress( bccLine ); |
130 | } | 130 | } |
131 | 131 | ||
132 | void ComposeMail::pickAddressReply() | 132 | void ComposeMail::pickAddressReply() |
133 | { | 133 | { |
134 | pickAddress( replyLine ); | 134 | pickAddress( replyLine ); |
135 | } | 135 | } |
136 | 136 | ||
137 | void ComposeMail::fillValues( int ) | 137 | void ComposeMail::fillValues( int ) |
138 | { | 138 | { |
139 | #if 0 | 139 | #if 0 |
140 | SMTPaccount *smtp = smtpAccounts.at( current ); | 140 | SMTPaccount *smtp = smtpAccounts.at( current ); |
141 | ccLine->clear(); | 141 | ccLine->clear(); |
142 | if ( smtp->getUseCC() ) { | 142 | if ( smtp->getUseCC() ) { |
143 | ccLine->setText( smtp->getCC() ); | 143 | ccLine->setText( smtp->getCC() ); |
144 | } | 144 | } |
145 | bccLine->clear(); | 145 | bccLine->clear(); |
146 | if ( smtp->getUseBCC() ) { | 146 | if ( smtp->getUseBCC() ) { |
147 | bccLine->setText( smtp->getBCC() ); | 147 | bccLine->setText( smtp->getBCC() ); |
148 | } | 148 | } |
149 | replyLine->clear(); | 149 | replyLine->clear(); |
150 | if ( smtp->getUseReply() ) { | 150 | if ( smtp->getUseReply() ) { |
151 | replyLine->setText( smtp->getReply() ); | 151 | replyLine->setText( smtp->getReply() ); |
152 | } | 152 | } |
153 | sigMultiLine->setText( smtp->getSignature() ); | 153 | sigMultiLine->setText( smtp->getSignature() ); |
154 | #endif | 154 | #endif |
155 | } | 155 | } |
156 | 156 | ||
157 | void ComposeMail::slotAdjustColumns() | 157 | void ComposeMail::slotAdjustColumns() |
158 | { | 158 | { |
159 | int currPage = tabWidget->currentPageIndex(); | 159 | int currPage = tabWidget->currentPageIndex(); |
160 | 160 | ||
161 | tabWidget->showPage( attachTab ); | 161 | tabWidget->showPage( attachTab ); |
162 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); | 162 | attList->setColumnWidth( 0, attList->visibleWidth() - 80 ); |
163 | attList->setColumnWidth( 1, 80 ); | 163 | attList->setColumnWidth( 1, 80 ); |
164 | 164 | ||
165 | tabWidget->setCurrentPage( currPage ); | 165 | tabWidget->setCurrentPage( currPage ); |
166 | } | 166 | } |
167 | 167 | ||
168 | void ComposeMail::addAttachment() | 168 | void ComposeMail::addAttachment() |
169 | { | 169 | { |
170 | DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); | 170 | DocLnk lnk = OFileDialog::getOpenFileName( 1, "/" ); |
171 | if ( !lnk.name().isEmpty() ) { | 171 | if ( !lnk.name().isEmpty() ) { |
172 | Attachment *att = new Attachment( lnk ); | 172 | Attachment *att = new Attachment( lnk ); |
173 | (void) new AttachViewItem( attList, att ); | 173 | (void) new AttachViewItem( attList, att ); |
174 | } | 174 | } |
175 | } | 175 | } |
176 | 176 | ||
177 | void ComposeMail::removeAttachment() | 177 | void ComposeMail::removeAttachment() |
178 | { | 178 | { |
179 | if ( !attList->currentItem() ) { | 179 | if ( !attList->currentItem() ) { |
180 | QMessageBox::information( this, tr( "Error" ), | 180 | QMessageBox::information( this, tr( "Error" ), |
181 | tr( "<p>Please select a File.</p>" ), | 181 | tr( "<p>Please select a File.</p>" ), |
182 | tr( "Ok" ) ); | 182 | tr( "Ok" ) ); |
183 | } else { | 183 | } else { |
184 | attList->takeItem( attList->currentItem() ); | 184 | attList->takeItem( attList->currentItem() ); |
185 | } | 185 | } |
186 | } | 186 | } |
187 | 187 | ||
188 | void ComposeMail::accept() | 188 | void ComposeMail::accept() |
189 | { | 189 | { |
190 | if ( checkBoxLater->isChecked() ) { | 190 | if ( checkBoxLater->isChecked() ) { |
191 | odebug << "Send later" << oendl; | 191 | odebug << "Send later" << oendl; |
192 | } | 192 | } |
193 | 193 | ||
194 | #if 0 | 194 | #if 0 |
195 | odebug << "Sending Mail with " | 195 | odebug << "Sending Mail with " |
196 | << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; | 196 | << smtpAccounts.at( smtpAccountBox->currentItem() )->getAccountName() << oendl; |
197 | #endif | 197 | #endif |
198 | Opie::Core::OSmartPointer<Mail> mail=new Mail; | 198 | Opie::Core::OSmartPointer<Mail> mail=new Mail; |
199 | 199 | ||
200 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); | 200 | SMTPaccount *smtp = smtpAccounts.at( smtpAccountBox->currentItem() ); |
201 | mail->setMail(fromBox->currentText()); | 201 | mail->setMail(fromBox->currentText()); |
202 | 202 | ||
203 | if ( !toLine->text().isEmpty() ) { | 203 | if ( !toLine->text().isEmpty() ) { |
204 | mail->setTo( toLine->text() ); | 204 | mail->setTo( toLine->text() ); |
205 | } else { | 205 | } else { |
206 | QMessageBox::warning(0,tr("Sending mail"), | 206 | QMessageBox::warning(0,tr("Sending mail"), |
207 | tr("No Receiver spezified" ) ); | 207 | tr("No Receiver specified" ) ); |
208 | return; | 208 | return; |
209 | } | 209 | } |
210 | mail->setName(senderNameEdit->text()); | 210 | mail->setName(senderNameEdit->text()); |
211 | mail->setCC( ccLine->text() ); | 211 | mail->setCC( ccLine->text() ); |
212 | mail->setBCC( bccLine->text() ); | 212 | mail->setBCC( bccLine->text() ); |
213 | mail->setReply( replyLine->text() ); | 213 | mail->setReply( replyLine->text() ); |
214 | mail->setSubject( subjectLine->text() ); | 214 | mail->setSubject( subjectLine->text() ); |
215 | if (!m_replyid.isEmpty()) { | 215 | if (!m_replyid.isEmpty()) { |
216 | QStringList ids; | 216 | QStringList ids; |
217 | ids.append(m_replyid); | 217 | ids.append(m_replyid); |
218 | mail->setInreply(ids); | 218 | mail->setInreply(ids); |
219 | } | 219 | } |
220 | QString txt = message->text(); | 220 | QString txt = message->text(); |
221 | if ( !sigMultiLine->text().isEmpty() ) { | 221 | if ( !sigMultiLine->text().isEmpty() ) { |
222 | txt.append( "\n--\n" ); | 222 | txt.append( "\n--\n" ); |
223 | txt.append( sigMultiLine->text() ); | 223 | txt.append( sigMultiLine->text() ); |
224 | } | 224 | } |
225 | mail->setMessage( txt ); | 225 | mail->setMessage( txt ); |
226 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 226 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
227 | while ( it != NULL ) { | 227 | while ( it != NULL ) { |
228 | mail->addAttachment( it->getAttachment() ); | 228 | mail->addAttachment( it->getAttachment() ); |
229 | it = (AttachViewItem *) it->nextSibling(); | 229 | it = (AttachViewItem *) it->nextSibling(); |
230 | } | 230 | } |
231 | 231 | ||
232 | SMTPwrapper wrapper( smtp ); | 232 | SMTPwrapper wrapper( smtp ); |
233 | wrapper.sendMail( mail,checkBoxLater->isChecked() ); | 233 | wrapper.sendMail( mail,checkBoxLater->isChecked() ); |
234 | 234 | ||
235 | QDialog::accept(); | 235 | QDialog::accept(); |
236 | } | 236 | } |
237 | 237 | ||
238 | void ComposeMail::reject() | 238 | void ComposeMail::reject() |
239 | { | 239 | { |
240 | int yesno = QMessageBox::warning(0,tr("Store message"), | 240 | int yesno = QMessageBox::warning(0,tr("Store message"), |
241 | tr("Store message into drafts?"), | 241 | tr("Store message into drafts?"), |
242 | tr("Yes"), | 242 | tr("Yes"), |
243 | tr("No"),QString::null,0,1); | 243 | tr("No"),QString::null,0,1); |
244 | 244 | ||
245 | if (yesno == 0) { | 245 | if (yesno == 0) { |
246 | Opie::Core::OSmartPointer<Mail> mail=new Mail(); | 246 | Opie::Core::OSmartPointer<Mail> mail=new Mail(); |
247 | mail->setMail(fromBox->currentText()); | 247 | mail->setMail(fromBox->currentText()); |
248 | mail->setTo( toLine->text() ); | 248 | mail->setTo( toLine->text() ); |
249 | mail->setName(senderNameEdit->text()); | 249 | mail->setName(senderNameEdit->text()); |
250 | mail->setCC( ccLine->text() ); | 250 | mail->setCC( ccLine->text() ); |
251 | mail->setBCC( bccLine->text() ); | 251 | mail->setBCC( bccLine->text() ); |
252 | mail->setReply( replyLine->text() ); | 252 | mail->setReply( replyLine->text() ); |
253 | mail->setSubject( subjectLine->text() ); | 253 | mail->setSubject( subjectLine->text() ); |
254 | if (!m_replyid.isEmpty()) { | 254 | if (!m_replyid.isEmpty()) { |
255 | QStringList ids; | 255 | QStringList ids; |
256 | ids.append(m_replyid); | 256 | ids.append(m_replyid); |
257 | mail->setInreply(ids); | 257 | mail->setInreply(ids); |
258 | } | 258 | } |
259 | QString txt = message->text(); | 259 | QString txt = message->text(); |
260 | if ( !sigMultiLine->text().isEmpty() ) { | 260 | if ( !sigMultiLine->text().isEmpty() ) { |
261 | txt.append( "\n--\n" ); | 261 | txt.append( "\n--\n" ); |
262 | txt.append( sigMultiLine->text() ); | 262 | txt.append( sigMultiLine->text() ); |
263 | } | 263 | } |
264 | odebug << txt << oendl; | 264 | odebug << txt << oendl; |
265 | mail->setMessage( txt ); | 265 | mail->setMessage( txt ); |
266 | 266 | ||
267 | /* only use the default drafts folder name! */ | 267 | /* only use the default drafts folder name! */ |
268 | Storemail wrapper(AbstractMail::draftFolder()); | 268 | Storemail wrapper(AbstractMail::draftFolder()); |
269 | wrapper.storeMail(mail); | 269 | wrapper.storeMail(mail); |
270 | 270 | ||
271 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); | 271 | AttachViewItem *it = (AttachViewItem *) attList->firstChild(); |
272 | /* attachments we will ignore! */ | 272 | /* attachments we will ignore! */ |
273 | if ( it != NULL ) { | 273 | if ( it != NULL ) { |
274 | QMessageBox::warning(0,tr("Store message"), | 274 | QMessageBox::warning(0,tr("Store message"), |
275 | tr("<center>Attachments will not be stored in \"Draft\" folder</center>")); | 275 | tr("<center>Attachments will not be stored in \"Draft\" folder</center>")); |
276 | } | 276 | } |
277 | } | 277 | } |
278 | QDialog::reject(); | 278 | QDialog::reject(); |
279 | } | 279 | } |
280 | 280 | ||
281 | ComposeMail::~ComposeMail() | 281 | ComposeMail::~ComposeMail() |
282 | { | 282 | { |
283 | } | 283 | } |
284 | 284 | ||
285 | void ComposeMail::reEditMail(const RecMailP¤t) | 285 | void ComposeMail::reEditMail(const RecMailP¤t) |
286 | { | 286 | { |
287 | RecMailP data = current; | 287 | RecMailP data = current; |
288 | message->setText(data->Wrapper()->fetchBody(current)->Bodytext()); | 288 | message->setText(data->Wrapper()->fetchBody(current)->Bodytext()); |
289 | subjectLine->setText( data->getSubject()); | 289 | subjectLine->setText( data->getSubject()); |
290 | toLine->setText(data->To().join(",")); | 290 | toLine->setText(data->To().join(",")); |
291 | ccLine->setText(data->CC().join(",")); | 291 | ccLine->setText(data->CC().join(",")); |
292 | bccLine->setText(data->Bcc().join(",")); | 292 | bccLine->setText(data->Bcc().join(",")); |
293 | replyLine->setText(data->Replyto()); | 293 | replyLine->setText(data->Replyto()); |
294 | } | 294 | } |
295 | 295 | ||
296 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) | 296 | AttachViewItem::AttachViewItem( QListView *parent, Attachment *att ) |
297 | : QListViewItem( parent ) | 297 | : QListViewItem( parent ) |
298 | { | 298 | { |
299 | attachment = att; | 299 | attachment = att; |
300 | odebug << att->getMimeType() << oendl; | 300 | odebug << att->getMimeType() << oendl; |
301 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? | 301 | setPixmap( 0, attachment->getDocLnk().pixmap().isNull() ? |
302 | Resource::loadPixmap( "UnknownDocument-14" ) : | 302 | Resource::loadPixmap( "UnknownDocument-14" ) : |
303 | attachment->getDocLnk().pixmap() ); | 303 | attachment->getDocLnk().pixmap() ); |
304 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); | 304 | setText( 0, att->getName().isEmpty() ? att->getFileName() : att->getName() ); |
305 | setText( 1, QString::number( att->getSize() ) ); | 305 | setText( 1, QString::number( att->getSize() ) ); |
306 | } | 306 | } |
307 | 307 | ||
diff --git a/noncore/net/mail/nntpgroupsui.ui b/noncore/net/mail/nntpgroupsui.ui index 2902731..374884b 100644 --- a/noncore/net/mail/nntpgroupsui.ui +++ b/noncore/net/mail/nntpgroupsui.ui | |||
@@ -1,129 +1,129 @@ | |||
1 | <!DOCTYPE UI><UI> | 1 | <!DOCTYPE UI><UI> |
2 | <class>NNTPGroupsUI</class> | 2 | <class>NNTPGroupsUI</class> |
3 | <widget> | 3 | <widget> |
4 | <class>QWidget</class> | 4 | <class>QWidget</class> |
5 | <property stdset="1"> | 5 | <property stdset="1"> |
6 | <name>name</name> | 6 | <name>name</name> |
7 | <cstring>NNTPGroupsUI</cstring> | 7 | <cstring>NNTPGroupsUI</cstring> |
8 | </property> | 8 | </property> |
9 | <property stdset="1"> | 9 | <property stdset="1"> |
10 | <name>geometry</name> | 10 | <name>geometry</name> |
11 | <rect> | 11 | <rect> |
12 | <x>0</x> | 12 | <x>0</x> |
13 | <y>0</y> | 13 | <y>0</y> |
14 | <width>254</width> | 14 | <width>254</width> |
15 | <height>330</height> | 15 | <height>330</height> |
16 | </rect> | 16 | </rect> |
17 | </property> | 17 | </property> |
18 | <property stdset="1"> | 18 | <property stdset="1"> |
19 | <name>caption</name> | 19 | <name>caption</name> |
20 | <string>newsgroupslist</string> | 20 | <string>newsgroupslist</string> |
21 | </property> | 21 | </property> |
22 | <property> | 22 | <property> |
23 | <name>layoutMargin</name> | 23 | <name>layoutMargin</name> |
24 | </property> | 24 | </property> |
25 | <property> | 25 | <property> |
26 | <name>layoutSpacing</name> | 26 | <name>layoutSpacing</name> |
27 | </property> | 27 | </property> |
28 | <vbox> | 28 | <vbox> |
29 | <property stdset="1"> | 29 | <property stdset="1"> |
30 | <name>margin</name> | 30 | <name>margin</name> |
31 | <number>1</number> | 31 | <number>1</number> |
32 | </property> | 32 | </property> |
33 | <property stdset="1"> | 33 | <property stdset="1"> |
34 | <name>spacing</name> | 34 | <name>spacing</name> |
35 | <number>1</number> | 35 | <number>1</number> |
36 | </property> | 36 | </property> |
37 | <widget> | 37 | <widget> |
38 | <class>QListView</class> | 38 | <class>QListView</class> |
39 | <column> | 39 | <column> |
40 | <property> | 40 | <property> |
41 | <name>text</name> | 41 | <name>text</name> |
42 | <string>Newsgroups</string> | 42 | <string>Newsgroups</string> |
43 | </property> | 43 | </property> |
44 | <property> | 44 | <property> |
45 | <name>clickable</name> | 45 | <name>clickable</name> |
46 | <bool>true</bool> | 46 | <bool>true</bool> |
47 | </property> | 47 | </property> |
48 | <property> | 48 | <property> |
49 | <name>resizeable</name> | 49 | <name>resizeable</name> |
50 | <bool>true</bool> | 50 | <bool>true</bool> |
51 | </property> | 51 | </property> |
52 | </column> | 52 | </column> |
53 | <property stdset="1"> | 53 | <property stdset="1"> |
54 | <name>name</name> | 54 | <name>name</name> |
55 | <cstring>GroupListView</cstring> | 55 | <cstring>GroupListView</cstring> |
56 | </property> | 56 | </property> |
57 | <property> | 57 | <property> |
58 | <name>whatsThis</name> | 58 | <name>whatsThis</name> |
59 | <string>List of groups from the server. On start, only subscribed groups are listed.</string> | 59 | <string>List of groups from the server. On start, only subscribed groups are listed.</string> |
60 | </property> | 60 | </property> |
61 | </widget> | 61 | </widget> |
62 | <widget> | 62 | <widget> |
63 | <class>QLayoutWidget</class> | 63 | <class>QLayoutWidget</class> |
64 | <property stdset="1"> | 64 | <property stdset="1"> |
65 | <name>name</name> | 65 | <name>name</name> |
66 | <cstring>Layout1</cstring> | 66 | <cstring>Layout1</cstring> |
67 | </property> | 67 | </property> |
68 | <hbox> | 68 | <hbox> |
69 | <property stdset="1"> | 69 | <property stdset="1"> |
70 | <name>margin</name> | 70 | <name>margin</name> |
71 | <number>0</number> | 71 | <number>0</number> |
72 | </property> | 72 | </property> |
73 | <property stdset="1"> | 73 | <property stdset="1"> |
74 | <name>spacing</name> | 74 | <name>spacing</name> |
75 | <number>6</number> | 75 | <number>6</number> |
76 | </property> | 76 | </property> |
77 | <widget> | 77 | <widget> |
78 | <class>QLabel</class> | 78 | <class>QLabel</class> |
79 | <property stdset="1"> | 79 | <property stdset="1"> |
80 | <name>name</name> | 80 | <name>name</name> |
81 | <cstring>filterlabel</cstring> | 81 | <cstring>filterlabel</cstring> |
82 | </property> | 82 | </property> |
83 | <property stdset="1"> | 83 | <property stdset="1"> |
84 | <name>text</name> | 84 | <name>text</name> |
85 | <string>Groupfilter:</string> | 85 | <string>Groupfilter:</string> |
86 | </property> | 86 | </property> |
87 | </widget> | 87 | </widget> |
88 | <widget> | 88 | <widget> |
89 | <class>QLineEdit</class> | 89 | <class>QLineEdit</class> |
90 | <property stdset="1"> | 90 | <property stdset="1"> |
91 | <name>name</name> | 91 | <name>name</name> |
92 | <cstring>Groupfilteredit</cstring> | 92 | <cstring>Groupfilteredit</cstring> |
93 | </property> | 93 | </property> |
94 | <property> | 94 | <property> |
95 | <name>whatsThis</name> | 95 | <name>whatsThis</name> |
96 | <string>Enter a filter string here. | 96 | <string>Enter a filter string here. |
97 | Then hit "get newsgroup list" again and only groups starting | 97 | Then hit "get newsgroup list" again and only groups starting |
98 | with that filter will be listet.</string> | 98 | with that filter will be listed.</string> |
99 | </property> | 99 | </property> |
100 | </widget> | 100 | </widget> |
101 | </hbox> | 101 | </hbox> |
102 | </widget> | 102 | </widget> |
103 | <widget> | 103 | <widget> |
104 | <class>QPushButton</class> | 104 | <class>QPushButton</class> |
105 | <property stdset="1"> | 105 | <property stdset="1"> |
106 | <name>name</name> | 106 | <name>name</name> |
107 | <cstring>GetNGButton</cstring> | 107 | <cstring>GetNGButton</cstring> |
108 | </property> | 108 | </property> |
109 | <property stdset="1"> | 109 | <property stdset="1"> |
110 | <name>text</name> | 110 | <name>text</name> |
111 | <string>Get newsgroup list from server</string> | 111 | <string>Get newsgroup list from server</string> |
112 | </property> | 112 | </property> |
113 | <property> | 113 | <property> |
114 | <name>whatsThis</name> | 114 | <name>whatsThis</name> |
115 | <string>Retrieve the list of groups from server</string> | 115 | <string>Retrieve the list of groups from server</string> |
116 | </property> | 116 | </property> |
117 | </widget> | 117 | </widget> |
118 | </vbox> | 118 | </vbox> |
119 | </widget> | 119 | </widget> |
120 | <connections> | 120 | <connections> |
121 | <connection> | 121 | <connection> |
122 | <sender>GetNGButton</sender> | 122 | <sender>GetNGButton</sender> |
123 | <signal>clicked()</signal> | 123 | <signal>clicked()</signal> |
124 | <receiver>NNTPGroupsUI</receiver> | 124 | <receiver>NNTPGroupsUI</receiver> |
125 | <slot>slotGetNG()</slot> | 125 | <slot>slotGetNG()</slot> |
126 | </connection> | 126 | </connection> |
127 | <slot access="protected">slotGetNG()</slot> | 127 | <slot access="protected">slotGetNG()</slot> |
128 | </connections> | 128 | </connections> |
129 | </UI> | 129 | </UI> |