Diffstat (limited to 'noncore/net/mailit/readmail.cpp') (more/less context) (ignore whitespace changes)
-rw-r--r-- | noncore/net/mailit/readmail.cpp | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/noncore/net/mailit/readmail.cpp b/noncore/net/mailit/readmail.cpp index dc98a6f..4eae7f6 100644 --- a/noncore/net/mailit/readmail.cpp +++ b/noncore/net/mailit/readmail.cpp | |||
@@ -54,46 +54,56 @@ void ReadMail::init() | |||
54 | menu->insertItem( tr( "&Mail" ), mailMenu); | 54 | menu->insertItem( tr( "&Mail" ), mailMenu); |
55 | 55 | ||
56 | bar = new QToolBar(this); | 56 | bar = new QToolBar(this); |
57 | 57 | ||
58 | //reply dependant on viewing inbox | 58 | //reply dependant on viewing inbox |
59 | replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ), | 59 | replyButton = new QAction( tr( "Reply" ), Resource::loadPixmap( "mailit/reply" ), |
60 | QString::null, 0, this, 0 ); | 60 | QString::null, 0, this, 0 ); |
61 | connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) ); | 61 | connect(replyButton, SIGNAL(activated()), this, SLOT(reply()) ); |
62 | 62 | replyButton->setWhatsThis(tr("Click here to reply to the selected mail")); | |
63 | |||
63 | forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ), | 64 | forwardButton = new QAction( tr( "Forward" ), Resource::loadPixmap( "mailit/forward" ), |
64 | QString::null, 0, this, 0 ); | 65 | QString::null, 0, this, 0 ); |
65 | connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) ); | 66 | connect(forwardButton, SIGNAL(activated()), this, SLOT(forward()) ); |
67 | forwardButton->setWhatsThis(tr("Click here to forward the selected mail")); | ||
66 | 68 | ||
67 | previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); | 69 | previousButton = new QAction( tr( "Previous" ), Resource::loadPixmap( "back" ), QString::null, 0, this, 0 ); |
68 | connect( previousButton, SIGNAL( activated() ), this, SLOT( previous() ) ); | 70 | connect( previousButton, SIGNAL( activated() ), this, SLOT( previous() ) ); |
69 | previousButton->addTo(bar); | 71 | previousButton->addTo(bar); |
70 | previousButton->addTo(viewMenu); | 72 | previousButton->addTo(viewMenu); |
73 | previousButton->setWhatsThis(tr("Read the previous mail in the list")); | ||
71 | 74 | ||
72 | nextButton = new QAction( tr( "Next" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 ); | 75 | nextButton = new QAction( tr( "Next" ), Resource::loadPixmap( "forward" ), QString::null, 0, this, 0 ); |
73 | connect( nextButton, SIGNAL( activated() ), this, SLOT( next() ) ); | 76 | connect( nextButton, SIGNAL( activated() ), this, SLOT( next() ) ); |
74 | nextButton->addTo(bar); | 77 | nextButton->addTo(bar); |
75 | nextButton->addTo(viewMenu); | 78 | nextButton->addTo(viewMenu); |
79 | previousButton->setWhatsThis(tr("Read the next mail in the list")); | ||
76 | 80 | ||
77 | attatchmentsButton = new QAction( tr( "Attatchments" ), Resource::loadPixmap( "mailit/attach" ), QString::null, 0, this, 0 ); | 81 | attachmentButton = new QAction( tr( "Attatchments" ), Resource::loadPixmap( "mailit/attach" ), QString::null, 0, this, 0 ); |
78 | connect( attatchmentsButton, SIGNAL( activated() ), this, | 82 | connect( attachmentButton, SIGNAL( activated() ), this, |
79 | SLOT( viewAttatchments() ) ); | 83 | SLOT( viewAttachments() ) ); |
80 | attatchmentsButton->addTo(bar); | 84 | attachmentButton->addTo(bar); |
81 | attatchmentsButton->addTo(viewMenu); | 85 | attachmentButton->addTo(viewMenu); |
86 | attachmentButton->setWhatsThis(tr("Click here to add attachments to your mail")); | ||
82 | 87 | ||
83 | plainTextButton = new QAction( tr( "Text Format" ), Resource::loadPixmap( "DocsIcon" ), QString::null, 0, this, 0, TRUE); | 88 | plainTextButton = new QAction( tr( "Text Format" ), Resource::loadPixmap( "DocsIcon" ), QString::null, 0, this, 0, TRUE); |
84 | connect( plainTextButton, SIGNAL( activated() ), this, SLOT( shiftText() ) ); | 89 | connect( plainTextButton, SIGNAL( activated() ), this, SLOT( shiftText() ) ); |
85 | plainTextButton->addTo(bar); | 90 | plainTextButton->addTo(bar); |
86 | plainTextButton->addTo(viewMenu); | 91 | plainTextButton->addTo(viewMenu); |
92 | plainTextButton->setWhatsThis(tr("The mail view has 2 modes:\n" | ||
93 | "<LI><B>RichText</B> shows the mail as HTML with reach features (no standard line breaks)</LI>" | ||
94 | "<LI><B>Plain</B> shows the mail as standard plain text</LI>" | ||
95 | "Click here to switch between those view modes" )); | ||
87 | 96 | ||
88 | deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); | 97 | deleteButton = new QAction( tr( "Delete" ), Resource::loadPixmap( "trash" ), QString::null, 0, this, 0 ); |
89 | connect( deleteButton, SIGNAL( activated() ), this, SLOT( deleteItem() ) ); | 98 | connect( deleteButton, SIGNAL( activated() ), this, SLOT( deleteItem() ) ); |
90 | deleteButton->addTo(bar); | 99 | deleteButton->addTo(bar); |
91 | deleteButton->addTo(mailMenu); | 100 | deleteButton->addTo(mailMenu); |
101 | deleteButton->setWhatsThis(tr("Click here to remove the selected mail")); | ||
92 | 102 | ||
93 | viewMenu->insertItem(Resource::loadPixmap("close"), "Close", this, SLOT(close())); | 103 | viewMenu->insertItem(Resource::loadPixmap("close"), "Close", this, SLOT(close())); |
94 | 104 | ||
95 | emailView = new QTextView( this, "emailView" ); | 105 | emailView = new QTextView( this, "emailView" ); |
96 | 106 | ||
97 | setCentralWidget(emailView); | 107 | setCentralWidget(emailView); |
98 | 108 | ||
99 | mime = new QMimeSourceFactory(); | 109 | mime = new QMimeSourceFactory(); |
@@ -243,18 +253,18 @@ void ReadMail::updateView() | |||
243 | text += "\nAwaiting download\n"; | 253 | text += "\nAwaiting download\n"; |
244 | text += "Size of mail: " + mailStringSize; | 254 | text += "Size of mail: " + mailStringSize; |
245 | } | 255 | } |
246 | 256 | ||
247 | emailView->setText(text); | 257 | emailView->setText(text); |
248 | } | 258 | } |
249 | 259 | ||
250 | if (mail->files.count() == 0) | 260 | if (mail->files.count() == 0) |
251 | attatchmentsButton->setEnabled(FALSE); | 261 | attachmentButton->setEnabled(FALSE); |
252 | else attatchmentsButton->setEnabled(TRUE); | 262 | else attachmentButton->setEnabled(TRUE); |
253 | 263 | ||
254 | setCaption("Examining mail: " + mail->subject); | 264 | setCaption("Examining mail: " + mail->subject); |
255 | } | 265 | } |
256 | 266 | ||
257 | //update view with current EmailListItem (item) | 267 | //update view with current EmailListItem (item) |
258 | void ReadMail::update(QListView *thisView, Email *mailIn) | 268 | void ReadMail::update(QListView *thisView, Email *mailIn) |
259 | { | 269 | { |
260 | view = thisView; | 270 | view = thisView; |
@@ -334,17 +344,17 @@ void ReadMail::updateButtons() | |||
334 | } | 344 | } |
335 | 345 | ||
336 | void ReadMail::shiftText() | 346 | void ReadMail::shiftText() |
337 | { | 347 | { |
338 | plainTxt = ! plainTxt; | 348 | plainTxt = ! plainTxt; |
339 | updateView(); | 349 | updateView(); |
340 | } | 350 | } |
341 | 351 | ||
342 | void ReadMail::viewAttatchments() | 352 | void ReadMail::viewAttachments() |
343 | { | 353 | { |
344 | viewAtt->update(mail, inbox); | 354 | viewAtt->update(mail, inbox); |
345 | viewAtt->showMaximized(); | 355 | viewAtt->showMaximized(); |
346 | } | 356 | } |
347 | 357 | ||
348 | void ReadMail::reply() | 358 | void ReadMail::reply() |
349 | { | 359 | { |
350 | emit replyRequested(*mail, (bool&)TRUE); | 360 | emit replyRequested(*mail, (bool&)TRUE); |