Commit a5cf7683 authored by Stephane Mankowski's avatar Stephane Mankowski

With last version of KDE, KMessageWidget are sometimes empty.

Add missing "Full screen" menu.
parent ba0cc4d2
......@@ -7,6 +7,8 @@ skrooge (2.22.0)
*Correction: Fix Get Hot New Stuff legacy Endpoints
*Correction: Files not able to be checked out on Windows
*Correction: Bad display in dashboard when all accounts of a type are closed
*Correction: With last version of KDE, KMessageWidget are sometimes empty
*Correction: Add missing "Full screen" menu
-- Stephane MANKOWSKI <stephane@mankowski.fr>
......
......@@ -2353,7 +2353,6 @@ void SKGMainPanel::notify(int iTransaction)
/*auto notify = new KNotification(KAboutData::applicationData().componentName() % "_info_event" , this);
notify->setText(message);
notify->sendEvent();*/
displayMessage(message, listGroups.at(indexGroup));
} else {
// Too many message, display a warning panel
......@@ -2380,6 +2379,9 @@ KMessageWidget* SKGMainPanel::getMessageWidget(const QString& iMessage, SKGDocum
if (!iMessage.isEmpty()) {
msg = new KMessageWidget(this);
msg->setText(iMessage);
msg->setIcon(SKGServices::fromTheme(iType == SKGDocument::Positive ? QStringLiteral("dialog-positive") :
iType == SKGDocument::Information ? QStringLiteral("dialog-information") :
iType == SKGDocument::Warning ? QStringLiteral("dialog-warning") : QStringLiteral("dialog-error")));
msg->setMessageType(static_cast<KMessageWidget::MessageType>(iType));
if (!iAction.isEmpty()) {
QUrl url(iAction);
......@@ -2414,6 +2416,7 @@ KMessageWidget* SKGMainPanel::displayMessage(const QString& iMessage, SKGDocumen
if (!iMessage.isEmpty()) {
msg = getMessageWidget(iMessage, iType, iAction, true);
QTimer::singleShot(iType == SKGDocument::Positive ? 5000 : iType == SKGDocument::Information ? 10000 : 20000, Qt::CoarseTimer, msg, &KMessageWidget::deleteLater);
msg->show();
d->m_mainLayout->insertWidget(qMax(d->m_mainLayout->indexOf(d->m_mainWidget) - 1, 0), msg);
// Store message
......
......@@ -36,6 +36,8 @@
<Action name="view_lock"/>
<Action name="view_unlock"/>
</Menu>
<Separator/>
<Action name="fullscreen"/>
</Menu>
<Menu noMerge="1" name="go"><text>Go</text>
<Action name="view_contextmenu"/>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment