diff --git a/src/lokalize.notifyrc b/src/lokalize.notifyrc --- a/src/lokalize.notifyrc +++ b/src/lokalize.notifyrc @@ -288,3 +288,11 @@ Name[zh_CN]=正在扫描源文件夹... Name[zh_TW]=正在掃描包含原始檔的資料夾中… Action=Popup + +[Event/BatchTranslation] +Name=Batch translation has been scheduled +Action=Popup + +[Event/BatchTranslationCompleted] +Name=Batch translation has been completed +Action=Popup diff --git a/src/tm/tmview.cpp b/src/tm/tmview.cpp --- a/src/tm/tmview.cpp +++ b/src/tm/tmview.cpp @@ -36,9 +36,9 @@ #include "diff.h" #include "xlifftextedit.h" +#include #include #include -#include #include #include @@ -301,11 +301,10 @@ msg += ' '; msg += i18nc("@info", "No suggestions with exact matches were found."); } - - KPassivePopup::message(KPassivePopup::Balloon, - i18nc("@title", "Batch translation complete"), - msg, - this); + KNotification* notification = new KNotification("BatchTranslationCompleted", this); + notification->setTitle(i18nc("@title", "Batch translation")); + notification->setText(msg); + notification->sendEvent(); } void TMView::slotBatchTranslate() @@ -316,11 +315,10 @@ slotFileLoaded(m_catalog->url()); else if (m_jobs.isEmpty()) return slotBatchSelectDone(); - KPassivePopup::message(KPassivePopup::Balloon, - i18nc("@title", "Batch translation"), - i18nc("@info", "Batch translation has been scheduled."), - this); - + KNotification* notification = new KNotification("BatchTranslation", this); + notification->setTitle(i18nc("@title", "Batch translation")); + notification->setText(i18nc("@info", "Batch translation has been scheduled.")); + notification->sendEvent(); } void TMView::slotBatchTranslateFuzzy() @@ -331,11 +329,10 @@ slotFileLoaded(m_catalog->url()); else if (m_jobs.isEmpty()) slotBatchSelectDone(); - KPassivePopup::message(KPassivePopup::Balloon, - i18nc("@title", "Batch translation"), - i18nc("@info", "Batch translation has been scheduled."), - this); - + KNotification* notification = new KNotification("BatchTranslation", this); + notification->setTitle(i18nc("@title", "Batch translation")); + notification->setText(i18nc("@info", "Batch translation has been scheduled.")); + notification->sendEvent(); } void TMView::slotNewEntryDisplayed()