Skip to content

Commit

Permalink
Merge pull request #69 from justin-time/email-plus
Browse files Browse the repository at this point in the history
Add explanation for empty email and announcement.
  • Loading branch information
Sync-my-L2P authored and Sync-my-L2P committed May 16, 2015
2 parents 1932ad9 + 17f53de commit ab9dc45
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions message.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -12,12 +12,18 @@ message::message(QWidget *parent) :

void message::updateAuthor(QString author)
{
ui->author_label->setText(author);
if (author.isEmpty())
ui->author_label->setText(tr("Nicht verfügbar"));
else
ui->author_label->setText(author);
}

void message::updateSubject(QString subject)
{
ui->subject_label->setText(subject);
if (subject.isEmpty())
ui->subject_label->setText(tr("Nachricht offline nicht verfügbar!"));
else
ui->subject_label->setText(subject);
}

void message::updateDate(QString date)
Expand All @@ -27,7 +33,10 @@ void message::updateDate(QString date)

void message::updateMessage(QString body)
{
ui->message_body->setText(body);
if (body.isEmpty())
ui->message_body->setText(tr("Bitte verbinde dich mit dem L²P, um die Nachricht zu lesen!"));
else
ui->message_body->setText(body);
}

message::~message()
Expand Down

0 comments on commit ab9dc45

Please sign in to comment.