Changeset View
Changeset View
Standalone View
Standalone View
src/Gui/KSMainWindow.cpp
Show First 20 Lines • Show All 272 Lines • ▼ Show 20 Line(s) | |||||
273 | void KSMainWindow::showImageSharedFeedback(bool error, const QString &message) | 273 | void KSMainWindow::showImageSharedFeedback(bool error, const QString &message) | ||
274 | { | 274 | { | ||
275 | if (error) { | 275 | if (error) { | ||
276 | mMessageWidget->setMessageType(KMessageWidget::Error); | 276 | mMessageWidget->setMessageType(KMessageWidget::Error); | ||
277 | mMessageWidget->setText(i18n("There was a problem sharing the image: %1", message)); | 277 | mMessageWidget->setText(i18n("There was a problem sharing the image: %1", message)); | ||
278 | mMessageWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-error"))); | 278 | mMessageWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-error"))); | ||
279 | } else { | 279 | } else { | ||
280 | mMessageWidget->setMessageType(KMessageWidget::Positive); | 280 | mMessageWidget->setMessageType(KMessageWidget::Positive); | ||
281 | if (message.isEmpty()) | ||||
282 | mMessageWidget->setText(i18n("Image shared")); | ||||
283 | else | ||||
281 | mMessageWidget->setText(i18n("You can find the shared image at: <a href=\"%1\">%1</a>", message)); | 284 | mMessageWidget->setText(i18n("You can find the shared image at: <a href=\"%1\">%1</a>", message)); | ||
282 | mMessageWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok-apply"))); | 285 | mMessageWidget->setIcon(QIcon::fromTheme(QStringLiteral("dialog-ok-apply"))); | ||
283 | } | 286 | } | ||
284 | 287 | | |||
285 | mMessageWidget->animatedShow(); | 288 | mMessageWidget->animatedShow(); | ||
286 | QTimer::singleShot(20000, mMessageWidget, &KMessageWidget::animatedHide); | 289 | QTimer::singleShot(20000, mMessageWidget, &KMessageWidget::animatedHide); | ||
287 | } | 290 | } | ||
288 | 291 | | |||
▲ Show 20 Lines • Show All 46 Lines • Show Last 20 Lines |