Skip to content

Commit

Permalink
Better "Download Finished" message box
Browse files Browse the repository at this point in the history
  • Loading branch information
veloman-yunkan committed Nov 6, 2024
1 parent 1480944 commit 33702e8
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions resources/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"donate-to-support-kiwix":"Donate to support Kiwix",
"exit":"Exit",
"save-file-as-window-title":"Save File as",
"download-finished": "Download Finished",
"download-finished-message":"The document has been downloaded.",
"file":"File",
"edit":"Edit",
Expand Down
1 change: 1 addition & 0 deletions resources/i18n/qqq.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@
"donate-to-support-kiwix": "Represents the action of donating to support the Kiwix Organization.",
"exit": "Represents the action of exiting the desktop application",
"save-file-as-window-title": "Title text of the window prompting user to save as a new file.",
"download-finished": "Title of the message box announcing the completion of a download",
"download-finished-message": "Text displayed when the download action has been completed",
"file": "{{Identical|File}}",
"edit": "{{Identical|Edit}}",
Expand Down
9 changes: 5 additions & 4 deletions src/kprofile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@

#include "kiwixapp.h"
#include <QFileDialog>
#include <QMessageBox>
#include <QWebEngineSettings>
#include "kiwixmessagebox.h"

#if QT_VERSION < QT_VERSION_CHECK(6, 0, 0)
#define DownloadFinishedSignal WebEngineDownloadType::finished
Expand Down Expand Up @@ -88,9 +88,10 @@ void KProfile::startDownload(WebEngineDownloadType* download)

void KProfile::downloadFinished()
{
QMessageBox msgBox;
msgBox.setText(gt("download-finished-message"));
msgBox.exec();
showInfoBox(gt("download-finished"),
gt("download-finished-message"),
KiwixApp::instance()->getMainWindow()
);
}

void ExternalReqInterceptor::interceptRequest(QWebEngineUrlRequestInfo &info)
Expand Down

0 comments on commit 33702e8

Please sign in to comment.