From e715eca23297fb10dcf70e4c8bb2712413d16e3d Mon Sep 17 00:00:00 2001 From: Soren Stoutner Date: Wed, 11 Oct 2023 15:23:42 -0700 Subject: [PATCH] Additional fix for notifications on Xfce. https://redmine.stoutner.com/issues/1017 --- changelog | 11 + doc/index.docbook | 281 +++++++++++--------- src/com.stoutner.privacybrowser.appdata.xml | 14 + src/dialogs/AddBookmarkDialog.cpp | 11 +- src/dialogs/AddBookmarkDialog.h | 2 +- src/dialogs/AddFolderDialog.cpp | 2 +- src/dialogs/BookmarksDialog.cpp | 3 +- src/dialogs/CookiesDialog.cpp | 2 +- src/dialogs/EditBookmarkDialog.cpp | 3 +- src/dialogs/EditFolderDialog.cpp | 2 +- src/helpers/UserAgentHelper.cpp | 10 +- src/privacybrowser.1 | 2 +- src/ui.rcs/browserwindowui.rc | 2 +- src/uis/AddBookmarkDialog.ui | 10 +- src/uis/BookmarksDialog.ui | 2 +- src/uis/CookiesDialog.ui | 4 +- src/uis/EditBookmarkDialog.ui | 4 - src/widgets/PrivacyWebEngineView.h | 6 +- src/widgets/TabWidget.cpp | 6 +- src/widgets/TabWidget.h | 2 +- src/windows/BrowserWindow.cpp | 11 +- 21 files changed, 216 insertions(+), 174 deletions(-) diff --git a/changelog b/changelog index da1fc7f..d8447b0 100644 --- a/changelog +++ b/changelog @@ -1,3 +1,14 @@ +# Version 0.5 (11 October 2023) + * Add bookmarks. + * Add zoom controls to the status bar and a default zoom shortcut. + * Add keyboard shortcuts for the URL toolbar actions. + * Add an action to view page source. + * Change the domain settings combo boxes to list enabled above disabled. + * File downloads can now show the size before the download begins. + * Add PIE (Position Independent Executable) compiler flags. + * Fix a bug that sometimes allowed multiple domain settings to be created. + * Fix the download notification not being cleared on Xfce. + # Version 0.4 (13 June 2023) * Add a setting to control spatial navigation. * Add an action to reload and bypass cache. diff --git a/doc/index.docbook b/doc/index.docbook index fd5d536..2278261 100644 --- a/doc/index.docbook +++ b/doc/index.docbook @@ -44,7 +44,7 @@ &FDLNotice; - 2023-10-10 + 2023-10-11 &privacybrowser; version 0.5 @@ -1262,65 +1262,65 @@ - - + + - &Ctrl;B + &Ctrl;&Alt;B Bookmarks - Add Bookmark + View Bookmarks Toolbar - Add a new bookmark. + Toggle the visibility of the bookmarks toolbar. - - + + - &Meta;F + &Ctrl;B Bookmarks - Add Folder + Add Bookmark - Add a bookmark folder. The meta key on most keyboards is the Windows key. + Add a new bookmark. - - + + - &Ctrl;&Alt;B + &Meta;F Bookmarks - View Bookmarks Toolbar + Add Folder - Toggle the visibility of the bookmarks toolbar. + Add a bookmark folder. The meta key on most keyboards is the Windows key. @@ -1521,146 +1521,165 @@ - - - Cookies Dialog + + + Cookies Dialog - - The cookies dialog is accessed through (see ). - + + The cookies dialog is accessed through (see ). + - - Commands + + Commands - - - - - - A - - + + + + + + A + + - - - Open the add cookie dialog. - - - + + + Open the add cookie dialog. + + + - - - - - E - - + + + + + E + + - - - Open the edit cookie dialog. This command is only valid if a cookie is currently selected. - - - + + + Open the edit cookie dialog. This command is only valid if a cookie is currently selected. + + + - - - - - D or - - + + + + + D or + + - - - Delete the currently selected cookies. A dialog will confirm the deletion before it is processed. - - - + + + Delete the currently selected cookies. A dialog will confirm the deletion before it is processed. + + + - - - - - L - - + + + + + L + + - - - Delete all the cookies. A dialog will confirm the deletion before it is processed. - - - + + + Delete all the cookies. A dialog will confirm the deletion before it is processed. + + + - - - - - C or &Ctrl;Q - - + + + + + C or &Ctrl;Q + + - - - Close the cookies dialog. - - - - - - + + + Close the cookies dialog. + + + + + + - - - Save Dialog + + + Save Dialog - - The save dialog pops up when a download is initiated. - + + The save dialog pops up when a download is initiated. + - - Commands + + Commands - - - - - - S - - + + + + + + S + + - - - Save the file. - - - + + + Save the file. + + + - - - - - C or &Ctrl;Q - - + + + + + C or &Ctrl;Q + + - - - Close the save dialog without saving the file. - - - - - - + + + Close the save dialog without saving the file. + + + + + + Changelog + + + 0.5 - 11 October 2023 + + + Add bookmarks. + Add zoom controls to the status bar and a + default zoom shortcut. + Add keyboard shortcuts for the URL toolbar actions. + Add an action to view page source. + Change the domain settings combo boxes to list + enabled above disabled. + File downloads can now show the size before the download begins. + Add PIE (Position Independent Executable) compiler flags. + Fix a bug that sometimes allowed multiple domain settings to be created. + Fix the download notification not being cleared on Xfce. + + + <ulink url="https://www.stoutner.com/privacy-browser-pc-0-4/">0.4</ulink> - diff --git a/src/com.stoutner.privacybrowser.appdata.xml b/src/com.stoutner.privacybrowser.appdata.xml index b9d8a0d..63ec01c 100644 --- a/src/com.stoutner.privacybrowser.appdata.xml +++ b/src/com.stoutner.privacybrowser.appdata.xml @@ -44,6 +44,20 @@ <launchable type="desktop-id">com.stoutner.privacybrowser.desktop</launchable> <releases> + <release version="0.5" date="2023-10-11"> + <description> + <p>Add bookmarks.</p> + <p>Add zoom controls to the status bar and a default zoom shortcut.</p> + <p>Add keyboard shortcuts for the URL toolbar actions.</p> + <p>Add an action to view page source.</p> + <p>Change the domain settings combo boxes to list enabled above disabled.</p> + <p>File downloads can now show the size before the download begins.</p> + <p>Add PIE (Position Independent Executable) compiler flags.</p> + <p>Fix a bug that sometimes allowed multiple domain settings to be created.</p> + <p>Fix the download notification not being cleared on Xfce.</p> + </description> + </release> + <release version="0.4" date="2023-06-13"> <description> <p>Add a setting to control spatial navigation.</p> diff --git a/src/dialogs/AddBookmarkDialog.cpp b/src/dialogs/AddBookmarkDialog.cpp index e69543e..9f977af 100644 --- a/src/dialogs/AddBookmarkDialog.cpp +++ b/src/dialogs/AddBookmarkDialog.cpp @@ -45,7 +45,7 @@ AddBookmarkDialog::AddBookmarkDialog(const QString &bookmarkName, const QString addBookmarkDialogUi.setupUi(this); // Get handles for the widgets. - defaultFavoriteIconRadioButtonPointer = addBookmarkDialogUi.defaultFavoriteIconRadioButton; + websiteFavoriteIconRadioButtonPointer = addBookmarkDialogUi.websiteFavoriteIconRadioButton; customFavoriteIconRadioButtonPointer = addBookmarkDialogUi.customFavoriteIconRadioButton; parentFolderTreeWidgetPointer = addBookmarkDialogUi.parentFolderTreeWidget; bookmarkNameLineEditPointer = addBookmarkDialogUi.bookmarkNameLineEdit; @@ -53,8 +53,9 @@ AddBookmarkDialog::AddBookmarkDialog(const QString &bookmarkName, const QString QPushButton *browseButtonPointer = addBookmarkDialogUi.browseButton; QDialogButtonBox *dialogButtonBoxPointer = addBookmarkDialogUi.dialogButtonBox; - // Set the default favorite icon. - defaultFavoriteIconRadioButtonPointer->setIcon(favoriteIcon); + // Set the icons. + websiteFavoriteIconRadioButtonPointer->setIcon(favoriteIcon); + customFavoriteIconRadioButtonPointer->setIcon(QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet")))); // Instantiate a folder helper. folderHelperPointer = new FolderHelper(); @@ -73,7 +74,7 @@ AddBookmarkDialog::AddBookmarkDialog(const QString &bookmarkName, const QString // Populate the bookmarks tree widget item. bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks")); - bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks")); + bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new")))); bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0")); // Add the bookmarks tree widget item to the root of the tree. @@ -125,7 +126,7 @@ void AddBookmarkDialog::addBookmark() QTreeWidgetItem *selectedFolderPointer = selectedFoldersList.first(); // Get the favorite icon. - QIcon favoriteIcon = defaultFavoriteIconRadioButtonPointer->isChecked() ? defaultFavoriteIconRadioButtonPointer->icon() : customFavoriteIconRadioButtonPointer->icon(); + QIcon favoriteIcon = websiteFavoriteIconRadioButtonPointer->isChecked() ? websiteFavoriteIconRadioButtonPointer->icon() : customFavoriteIconRadioButtonPointer->icon(); // Create a bookmark struct. BookmarkStruct *bookmarkStructPointer = new BookmarkStruct; diff --git a/src/dialogs/AddBookmarkDialog.h b/src/dialogs/AddBookmarkDialog.h index 71e8165..311f139 100644 --- a/src/dialogs/AddBookmarkDialog.h +++ b/src/dialogs/AddBookmarkDialog.h @@ -57,7 +57,7 @@ private: QLineEdit *bookmarkNameLineEditPointer; QLineEdit *bookmarkUrlLineEditPointer; QRadioButton *customFavoriteIconRadioButtonPointer; - QRadioButton *defaultFavoriteIconRadioButtonPointer; QTreeWidget *parentFolderTreeWidgetPointer; + QRadioButton *websiteFavoriteIconRadioButtonPointer; }; #endif diff --git a/src/dialogs/AddFolderDialog.cpp b/src/dialogs/AddFolderDialog.cpp index 37b8845..ec41ce3 100644 --- a/src/dialogs/AddFolderDialog.cpp +++ b/src/dialogs/AddFolderDialog.cpp @@ -71,7 +71,7 @@ AddFolderDialog::AddFolderDialog(const QIcon ¤tWebsiteFavoriteIcon, const // Populate the bookmarks tree widget item. bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks")); - bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks")); + bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new")))); bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0")); // Add the bookmarks tree widget item to the root of the tree. diff --git a/src/dialogs/BookmarksDialog.cpp b/src/dialogs/BookmarksDialog.cpp index be150cc..0fa2b4f 100644 --- a/src/dialogs/BookmarksDialog.cpp +++ b/src/dialogs/BookmarksDialog.cpp @@ -161,7 +161,8 @@ void BookmarksDialog::populateBookmarks() const QList<QStandardItem*> bookmarksRootItemList; // Create the root items. - QStandardItem *rootItemNamePointer = new QStandardItem(QIcon::fromTheme("bookmarks"), i18nc("The bookmarks root tree widget name", "Bookmarks")); + QStandardItem *rootItemNamePointer = new QStandardItem(QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new"))), + i18nc("The bookmarks root tree widget name", "Bookmarks")); QStandardItem *rootItemUrlPointer = new QStandardItem(QLatin1String("")); QStandardItem *rootItemDatabaseIdPonter = new QStandardItem(QLatin1String("-1")); // The root item doesn't have a database ID. QStandardItem *rootItemDisplayOrderPointer = new QStandardItem(QLatin1String("-1")); // The root item doesn't have a display order. diff --git a/src/dialogs/CookiesDialog.cpp b/src/dialogs/CookiesDialog.cpp index 3dc357f..4ca8c1c 100644 --- a/src/dialogs/CookiesDialog.cpp +++ b/src/dialogs/CookiesDialog.cpp @@ -259,7 +259,7 @@ CookiesDialog::CookiesDialog(std::list<QNetworkCookie> *originalCookieListPointe QDialogButtonBox::ActionRole); // Set the button icons. - durableCookiesButtonPointer->setIcon(QIcon::fromTheme("view-visible")); + durableCookiesButtonPointer->setIcon(QIcon::fromTheme("view-visible", QIcon::fromTheme(QLatin1String("appointment-new")))); // Connect the buttons. connect(addCookieButtonPointer, SIGNAL(clicked()), this, SLOT(showAddCookieDialog())); diff --git a/src/dialogs/EditBookmarkDialog.cpp b/src/dialogs/EditBookmarkDialog.cpp index 6dd3f71..3a4d770 100644 --- a/src/dialogs/EditBookmarkDialog.cpp +++ b/src/dialogs/EditBookmarkDialog.cpp @@ -57,6 +57,7 @@ EditBookmarkDialog::EditBookmarkDialog(const int databaseId, QIcon ¤tWebsi // Set the favorite icons. currentFavoriteIconRadioButtonPointer->setIcon(bookmarkStructPointer->favoriteIcon); currentWebsiteFavoriteIconRadioButtonPointer->setIcon(currentWebsiteFavoriteIcon); + customFavoriteIconRadioButtonPointer->setIcon(QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet")))); // Instantiate a folder helper. folderHelperPointer = new FolderHelper(); @@ -75,7 +76,7 @@ EditBookmarkDialog::EditBookmarkDialog(const int databaseId, QIcon ¤tWebsi // Populate the bookmarks tree widget item. bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks")); - bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks")); + bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new")))); bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0")); // Add the bookmarks tree widget item to the root of the tree. diff --git a/src/dialogs/EditFolderDialog.cpp b/src/dialogs/EditFolderDialog.cpp index 4d332ce..eb2bdcf 100644 --- a/src/dialogs/EditFolderDialog.cpp +++ b/src/dialogs/EditFolderDialog.cpp @@ -74,7 +74,7 @@ EditFolderDialog::EditFolderDialog(const int databaseId, QIcon ¤tWebsiteFa // Populate the bookmarks tree widget item. bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_NAME_COLUMN, i18nc("The bookmarks root tree widget name", "Bookmarks")); - bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme("bookmarks")); + bookmarksTreeWidgetItemPointer->setIcon(folderHelperPointer->FOLDER_NAME_COLUMN, QIcon::fromTheme(QLatin1String("bookmarks"), QIcon::fromTheme(QLatin1String("bookmark-new")))); bookmarksTreeWidgetItemPointer->setText(folderHelperPointer->FOLDER_ID_COLUMN, QLatin1String("0")); // Add the bookmarks tree widget item to the root of the tree. diff --git a/src/helpers/UserAgentHelper.cpp b/src/helpers/UserAgentHelper.cpp index 0f01bbb..dd8d571 100644 --- a/src/helpers/UserAgentHelper.cpp +++ b/src/helpers/UserAgentHelper.cpp @@ -38,11 +38,11 @@ const QString UserAgentHelper::SAFARI_MACOS_DATABASE = QLatin1String("Safari mac // Define the public user agent constants. const QString UserAgentHelper::PRIVACY_BROWSER_USER_AGENT = QLatin1String("PrivacyBrowser/1.0"); -const QString UserAgentHelper::FIREFOX_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Firefox/102.0"); -const QString UserAgentHelper::CHROMIUM_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/113.0.0.0 Safari/537.36"); -const QString UserAgentHelper::FIREFOX_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/113.0"); -const QString UserAgentHelper::CHROME_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36"); -const QString UserAgentHelper::EDGE_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/114.0.0.0 Safari/537.36 Edg/114.0.1823.37"); +const QString UserAgentHelper::FIREFOX_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64; rv:109.0) Gecko/20100101 Firefox/115.0"); +const QString UserAgentHelper::CHROMIUM_LINUX_USER_AGENT = QLatin1String("Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"); +const QString UserAgentHelper::FIREFOX_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/118.0"); +const QString UserAgentHelper::CHROME_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36"); +const QString UserAgentHelper::EDGE_WINDOWS_USER_AGENT = QLatin1String("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/117.0.0.0 Safari/537.36 Edg/117.0.2045.60"); const QString UserAgentHelper::SAFARI_MACOS_USER_AGENT = QLatin1String("Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.4 Safari/605.1.15"); // Construct the class. diff --git a/src/privacybrowser.1 b/src/privacybrowser.1 index 19f6e78..e1eee5f 100644 --- a/src/privacybrowser.1 +++ b/src/privacybrowser.1 @@ -16,7 +16,7 @@ .\" along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>. .\" Title Header. -.TH "Privacy Browser" 1 "13 June 2023" "version 0.4" "Privacy Browser User Manual" +.TH "Privacy Browser" 1 "11 October 2023" "version 0.5" "Privacy Browser User Manual" .\" Section Header - Name. .SH NAME diff --git a/src/ui.rcs/browserwindowui.rc b/src/ui.rcs/browserwindowui.rc index c0e5a19..adcfa9d 100644 --- a/src/ui.rcs/browserwindowui.rc +++ b/src/ui.rcs/browserwindowui.rc @@ -117,6 +117,6 @@ <Action name="hide_find_actions" /> </ToolBar> - <!-- The bookmarks toolbar. --> + <!-- The bookmarks toolbar. The newline aspect of this doesn't currently work. --> <ToolBar name="bookmarks_toolbar" iconText="icontextright" newline="true" hidden="true"> <text>Bookmarks Toolbar</text> </ToolBar> </gui> diff --git a/src/uis/AddBookmarkDialog.ui b/src/uis/AddBookmarkDialog.ui index 0fdaf33..d954863 100644 --- a/src/uis/AddBookmarkDialog.ui +++ b/src/uis/AddBookmarkDialog.ui @@ -33,11 +33,11 @@ <number>10</number> </property> - <!-- First row, default favorite icon. --> + <!-- First row, website favorite icon. --> <item> - <widget class="QRadioButton" name="defaultFavoriteIconRadioButton"> + <widget class="QRadioButton" name="websiteFavoriteIconRadioButton"> <property name="text"> - <string>Default favorite icon</string> + <string>Website favorite icon</string> </property> <property name="checked"> @@ -60,10 +60,6 @@ <string>Custom favorite icon</string> </property> - <property name="icon"> - <iconset theme="globe"/> - </property> - <property name="iconSize"> <size> <height>32</height> diff --git a/src/uis/BookmarksDialog.ui b/src/uis/BookmarksDialog.ui index cce8b2a..fb7c4bb 100644 --- a/src/uis/BookmarksDialog.ui +++ b/src/uis/BookmarksDialog.ui @@ -82,7 +82,7 @@ </property> <property name="icon"> - <iconset theme="edit-entry" /> + <iconset theme="document-edit" /> </property> </widget> </item> diff --git a/src/uis/CookiesDialog.ui b/src/uis/CookiesDialog.ui index 32529cb..c5436b1 100644 --- a/src/uis/CookiesDialog.ui +++ b/src/uis/CookiesDialog.ui @@ -61,7 +61,7 @@ </property> <property name="icon"> - <iconset theme="edit-entry" /> + <iconset theme="document-edit" /> </property> </widget> </item> @@ -87,7 +87,7 @@ </property> <property name="icon"> - <iconset theme="delete" /> + <iconset theme="edit-delete" /> </property> </widget> </item> diff --git a/src/uis/EditBookmarkDialog.ui b/src/uis/EditBookmarkDialog.ui index 68a8413..1ecfd7a 100644 --- a/src/uis/EditBookmarkDialog.ui +++ b/src/uis/EditBookmarkDialog.ui @@ -76,10 +76,6 @@ <string>Custom favorite icon</string> </property> - <property name="icon"> - <iconset theme="globe"/> - </property> - <property name="iconSize"> <size> <height>32</height> diff --git a/src/widgets/PrivacyWebEngineView.h b/src/widgets/PrivacyWebEngineView.h index c0c4713..3077681 100644 --- a/src/widgets/PrivacyWebEngineView.h +++ b/src/widgets/PrivacyWebEngineView.h @@ -38,10 +38,10 @@ public: // The public variables. std::list<QNetworkCookie> *cookieListPointer = new std::list<QNetworkCookie>; double defaultZoomFactor = 1.00; - QString domainSettingsName = QStringLiteral(""); - QIcon favoriteIcon = QIcon::fromTheme(QStringLiteral("globe")); + QString domainSettingsName = QLatin1String(""); + QIcon favoriteIcon = QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet"))); bool findCaseSensitive = false; - QString findString = QStringLiteral(""); + QString findString = QLatin1String(""); QWebEngineFindTextResult findTextResult = QWebEngineFindTextResult(); bool isLoading = false; int loadProgressInt = -1; diff --git a/src/widgets/TabWidget.cpp b/src/widgets/TabWidget.cpp index 2f4582a..84cd3ac 100644 --- a/src/widgets/TabWidget.cpp +++ b/src/widgets/TabWidget.cpp @@ -936,9 +936,6 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin // Prevent the notification from being autodeleted if it is closed. Otherwise, the updates to the notification below cause a crash. fileDownloadNotificationPointer->setAutoDelete(false); - // Display the notification. - fileDownloadNotificationPointer->sendEvent(); - // Handle clicks on the cancel button. connect(fileDownloadNotificationPointer, &KNotification::action1Activated, [webEngineDownloadItemPointer, saveFileName] () { @@ -1003,6 +1000,9 @@ void TabWidget::showSaveDialog(QWebEngineDownloadItem *webEngineDownloadItemPoin fileDownloadNotificationPointer->update(); }); + // Display the notification. + fileDownloadNotificationPointer->sendEvent(); + // Start the download. webEngineDownloadItemPointer->accept(); } diff --git a/src/widgets/TabWidget.h b/src/widgets/TabWidget.h index e036a24..41ba64c 100644 --- a/src/widgets/TabWidget.h +++ b/src/widgets/TabWidget.h @@ -139,7 +139,7 @@ private: QWebEnginePage *currentWebEnginePagePointer; QWebEngineProfile *currentWebEngineProfilePointer; QWebEngineSettings *currentWebEngineSettingsPointer; - QIcon defaultFavoriteIcon = QIcon::fromTheme(QStringLiteral("globe")); + QIcon defaultFavoriteIcon = QIcon::fromTheme(QLatin1String("globe"), QIcon::fromTheme(QLatin1String("applications-internet"))); bool isRunningKde = false; QMovie *loadingFavoriteIconMoviePointer; QString searchEngineUrl; diff --git a/src/windows/BrowserWindow.cpp b/src/windows/BrowserWindow.cpp index 805b592..8f8a0b0 100644 --- a/src/windows/BrowserWindow.cpp +++ b/src/windows/BrowserWindow.cpp @@ -225,6 +225,7 @@ BrowserWindow::BrowserWindow(bool firstWindow, QString *initialUrlStringPointer) searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo"), QIcon::fromTheme(QLatin1String("edit-find")))); searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find"))); zoomFactorActionPointer->setIcon(QIcon::fromTheme(QLatin1String("zoom-fit-best"))); + editBookmarksActionPointer->setIcon(QIcon::fromTheme(QLatin1String("bookmark-edit"), QIcon::fromTheme(QLatin1String("bookmark-new")))); viewBookmarksToolBarActionPointer->setIcon(QIcon::fromTheme(QLatin1String("bookmarks"))); domainSettingsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("settings-configure"), QIcon::fromTheme(QLatin1String("preferences-desktop")))); cookiesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("preferences-web-browser-cookies"), QIcon::fromTheme(QLatin1String("appointment-new")))); @@ -342,6 +343,8 @@ BrowserWindow::BrowserWindow(bool firstWindow, QString *initialUrlStringPointer) connect(findCaseSensitiveActionPointer, SIGNAL(triggered()), this, SLOT(toggleFindCaseSensitive())); connect(hideFindTextActionPointer, SIGNAL(triggered()), this, SLOT(hideFindTextActions())); + + // Setup the GUI based on the browserwindowui.rc file. setupGUI(StandardWindowOption::Default, ("browserwindowui.rc")); @@ -644,7 +647,7 @@ void BrowserWindow::addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double // Add the edit folder action to the menu if this is not the root bookmark menu. if (folderId != 0) { - QAction *editFolderActionPointer = menuPointer->addAction(QIcon::fromTheme(QLatin1String("edit-entry")), i18nc("The edit folder action", "Edit Folder"), [=] + QAction *editFolderActionPointer = menuPointer->addAction(QIcon::fromTheme(QLatin1String("document-edit")), i18nc("The edit folder action", "Edit Folder"), [=] { // Get the current tab favorite icon. QIcon currentTabFavoriteIcon = tabWidgetPointer->getCurrentTabFavoritIcon(); @@ -665,7 +668,7 @@ void BrowserWindow::addFinalBookmarkFolderMenuActions(QMenu *menuPointer, double } // Add the delete folder action to the menu. - QAction *deleteFolderActionPointer = menuPointer->addAction(QIcon::fromTheme(QLatin1String("delete")), i18nc("Delete folder context menu entry", "Delete Folder"), [=] + QAction *deleteFolderActionPointer = menuPointer->addAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18nc("Delete folder context menu entry", "Delete Folder"), [=] { // Create an items to delete list. QList<int>* itemsToDeleteListPointer = new QList<int>; @@ -1296,7 +1299,7 @@ void BrowserWindow::showBookmarkContextMenu(const QPoint &point) bookmarkContextMenuPointer->addSeparator(); // Add the edit action to the menu. - bookmarkContextMenuPointer->addAction(QIcon::fromTheme(QLatin1String("edit-entry")), i18nc("Edit bookmark context menu entry", "Edit"), [=] + bookmarkContextMenuPointer->addAction(QIcon::fromTheme(QLatin1String("document-edit")), i18nc("Edit bookmark context menu entry", "Edit"), [=] { // Get the current tab favorite icon. QIcon currentTabFavoriteIcon = tabWidgetPointer->getCurrentTabFavoritIcon(); @@ -1330,7 +1333,7 @@ void BrowserWindow::showBookmarkContextMenu(const QPoint &point) bookmarkContextMenuPointer->addSeparator(); // Add the delete action to the menu. - bookmarkContextMenuPointer->addAction(QIcon::fromTheme(QLatin1String("delete")), i18nc("Delete bookmark context menu entry", "Delete"), [=] + bookmarkContextMenuPointer->addAction(QIcon::fromTheme(QLatin1String("edit-delete")), i18nc("Delete bookmark context menu entry", "Delete"), [=] { // Get the parent folder ID. double parentFolderId = BookmarksDatabase::getParentFolderId(databaseId); -- 2.45.2