<?xml version="1.0" encoding="UTF-8" standalone="no"?>
-<!--
- Copyright 2016-2017,2021-2023 Soren Stoutner <soren@stoutner.com>.
-
- This file is derived from `security` and `language`, which are part of the Android Material icon set. They are released under the Apache License 2.0. <https://fonts.google.com/icons>
-
- This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
-
- Privacy Browser PC is free software: you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation, either version 3 of the License, or
- (at your option) any later version.
-
- Privacy Browser PC is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>. -->
-
<svg
xmlns="http://www.w3.org/2000/svg"
viewBox="0 0 256 256" >
d="m 127.92021,-183.78553 c -44.041614,0 -79.705747,35.74391 -79.705747,79.78553 0,44.041617 35.664133,79.785537 79.705747,79.785537 44.1214,0 79.86533,-35.74392 79.86533,-79.785537 0,-44.04162 -35.74393,-79.78553 -79.86533,-79.78553 z m 55.29138,47.87132 h -23.53674 c -2.55313,-9.9732 -6.22326,-19.54746 -11.0104,-28.40365 14.68055,5.02648 26.88773,15.23903 34.54714,28.40365 z M 128,-167.50929 c 6.6222,9.57427 11.80825,20.18574 15.23903,31.59508 h -30.47807 c 3.43078,-11.40934 8.61684,-22.02081 15.23904,-31.59508 z M 66.245993,-88.042889 C 64.969425,-93.149168 64.171571,-98.494798 64.171571,-104 c 0,-5.5052 0.797855,-10.85083 2.074422,-15.95711 h 26.96751 c -0.63829,5.26585 -1.117,10.5317 -1.117,15.95711 0,5.425417 0.47872,10.691263 1.117,15.957111 z m 6.542412,15.957108 H 96.32514 c 2.553137,9.973191 6.22327,19.547449 11.0104,28.403644 C 92.655006,-48.708619 80.44782,-58.841391 72.788405,-72.085781 Z M 96.32514,-135.91421 H 72.788405 c 7.659415,-13.2444 19.866601,-23.37717 34.547135,-28.40365 -4.78713,8.85619 -8.457263,18.43045 -11.0104,28.40365 z M 128,-40.49071 c -6.6222,-9.574268 -11.80826,-20.185747 -15.23904,-31.595071 h 30.47807 C 139.80825,-60.676457 134.6222,-50.064978 128,-40.49071 Z m 18.66982,-47.552179 h -37.33964 c -0.71801,-5.265848 -1.27656,-10.531694 -1.27656,-15.957111 0,-5.42541 0.55854,-10.77105 1.27656,-15.95711 h 37.33964 c 0.71811,5.18606 1.27656,10.5317 1.27656,15.95711 0,5.425417 -0.55844,10.691263 -1.27656,15.957111 z m 1.99463,44.360752 c 4.78714,-8.856195 8.45727,-18.430453 11.0104,-28.403644 h 23.53674 c -7.65941,13.164605 -19.86659,23.377162 -34.54714,28.403644 z m 14.12204,-44.360752 c 0.63828,-5.265848 1.117,-10.531694 1.117,-15.957111 0,-5.42541 -0.47871,-10.69126 -1.117,-15.95711 h 26.96752 c 1.27656,5.10628 2.07441,10.45191 2.07441,15.95711 0,5.505202 -0.79784,10.850832 -2.07441,15.957111 z" />
</g>
</svg>
+
+<!--
+ Copyright 2016-2017,2021-2023 Soren Stoutner <soren@stoutner.com>.
+
+ This file is derived from `security` and `language`, which are part of the Android Material icon set. They are released under the Apache License 2.0. <https://fonts.google.com/icons>
+
+ This file is part of Privacy Browser PC <https://www.stoutner.com/privacy-browser-pc>.
+
+ Privacy Browser PC is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ Privacy Browser PC is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with Privacy Browser PC. If not, see <http://www.gnu.org/licenses/>.
+
+ This copyright notice is moved to the bottom of the file to make Gnome's SVG parser happy. -->
// Construct the class.
TabWidget::TabWidget(QWidget *parent) : QWidget(parent)
{
+ // Create a QProcess to check if KDE is running.
+ QProcess *checkIfRunningKdeQProcessPointer = new QProcess();
+
+ // Create an argument string list that contains `ksmserver` (KDE Session Manager).
+ QStringList argument = QStringList(QLatin1String("ksmserver"));
+
+ // Run `pidof` to check for the presence of `ksmserver`.
+ checkIfRunningKdeQProcessPointer->start(QLatin1String("pidof"), argument);
+
+ // Monitor any standard output.
+ connect(checkIfRunningKdeQProcessPointer, &QProcess::readyReadStandardOutput, [this]
+ {
+ // If there is any standard output, `ksmserver` is running.
+ isRunningKde = true;
+ });
+
// Instantiate the user agent helper.
userAgentHelperPointer = new UserAgentHelper();
QWebEngineSettings *webEngineSettingsPointer = webEnginePagePointer->settings();
// Update the URL line edit when the URL changes.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::urlChanged, [privacyWebEngineViewPointer, this] (const QUrl &newUrl)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::urlChanged, [this, privacyWebEngineViewPointer] (const QUrl &newUrl)
{
// Only update the UI if this is the current tab.
if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
});
// Connect the loading favorite icon movie to the tab icon.
- connect(loadingFavoriteIconMoviePointer, &QMovie::frameChanged, [privacyWebEngineViewPointer, this]
+ connect(loadingFavoriteIconMoviePointer, &QMovie::frameChanged, [this, privacyWebEngineViewPointer]
{
// Get the index for this tab.
int tabIndex = qTabWidgetPointer->indexOf(privacyWebEngineViewPointer);
});
// Update the icon when it changes.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::iconChanged, [privacyWebEngineViewPointer, this] (const QIcon &newFavoriteIcon)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::iconChanged, [this, privacyWebEngineViewPointer] (const QIcon &newFavoriteIcon)
{
// Store the favorite icon in the privacy web engine view.
if (newFavoriteIcon.isNull())
});
// Update the progress bar and the favorite icon when a load is started.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadStarted, [privacyWebEngineViewPointer, this] ()
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadStarted, [this, privacyWebEngineViewPointer] ()
{
// Set the privacy web engine view to be loading.
privacyWebEngineViewPointer->isLoading = true;
});
// Update the progress bar when a load progresses.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadProgress, [privacyWebEngineViewPointer, this] (const int progress)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadProgress, [this, privacyWebEngineViewPointer] (const int progress)
{
// Store the load progress.
privacyWebEngineViewPointer->loadProgressInt = progress;
});
// Update the progress bar when a load finishes.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadFinished, [privacyWebEngineViewPointer, this] ()
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::loadFinished, [this, privacyWebEngineViewPointer] ()
{
// Set the privacy web engine view to be not loading.
privacyWebEngineViewPointer->isLoading = false;
});
// Display HTTP Ping blocked dialogs.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::displayHttpPingBlockedDialog, [privacyWebEngineViewPointer, this] (const QString &httpPingUrl)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::displayHttpPingBlockedDialog, [this, privacyWebEngineViewPointer] (const QString &httpPingUrl)
{
// Only display the HTTP Ping blocked dialog if this is the current tab.
if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
webEngineSettingsPointer->setAttribute(QWebEngineSettings::PluginsEnabled, true);
// Update the cookies action.
- connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::updateCookiesAction, [privacyWebEngineViewPointer, this] (const int numberOfCookies)
+ connect(privacyWebEngineViewPointer, &PrivacyWebEngineView::updateCookiesAction, [this, privacyWebEngineViewPointer] (const int numberOfCookies)
{
// Update the cookie action if the specified privacy WebEngine view is the current privacy WebEngine view.
if (privacyWebEngineViewPointer == currentPrivacyWebEngineViewPointer)
void TabWidget::findTextFinished(const QWebEngineFindTextResult &findTextResult)
{
- // Update the find text UI if it wasn't simply wiping the current find text selection. Otherwise the UI temporarially flashes `0/0`.
+ // Update the find text UI if it wasn't simply wiping the current find text selection. Otherwise the UI temporarily flashes `0/0`.
if (wipingCurrentFindTextSelection) // The current selection is being wiped.
{
// Reset the flag.
QString suggestedFileName = webEngineDownloadItemPointer->suggestedFileName();
int totalBytes = webEngineDownloadItemPointer->totalBytes();
- // Check to see if local storage (cookies) is enabled.
- if (currentPrivacyWebEngineViewPointer->localStorageEnabled) // Local storage (cookies) is enabled. Use WebEngine's downloader.
+ // Check to see if Privacy Browser is not running KDE or if local storage (cookies) is enabled.
+ if (!isRunningKde || currentPrivacyWebEngineViewPointer->localStorageEnabled) // KDE is not running or local storage (cookies) is enabled. Use WebEngine's downloader.
{
// Instantiate the save dialog.
SaveDialog *saveDialogPointer = new SaveDialog(downloadUrl, mimeTypeString, totalBytes);
if (downloadDirectory == QLatin1String("System Download Directory"))
downloadDirectory = QStandardPaths::writableLocation(QStandardPaths::DownloadLocation);
- // Display a save file dialog.
+ // Get a file path from the file picker.
QString saveFilePath = QFileDialog::getSaveFileName(this, i18nc("Save file dialog caption", "Save File"), downloadDirectory + QLatin1Char('/') + suggestedFileName);
// Process the save file path.
webEngineDownloadItemPointer->cancel();
}
}
- else // Local storage (cookies) is disabled. Use KDE's native downloader.
+ else // KDE is running and local storage (cookies) is disabled. Use KDE's native downloader.
// This must use the show command to launch a separate dialog which cancels WebEngine's automatic background download of the file to a temporary location.
{
// Instantiate the save dialog. `true` instructs it to use the native downloader
SaveDialog *saveDialogPointer = new SaveDialog(downloadUrl, mimeTypeString, totalBytes, suggestedFileName, true);
// Connect the save button.
- connect(saveDialogPointer, SIGNAL(useNativeDownloader(QUrl &, QString &)), this, SLOT(useNativeDownloader(QUrl &, QString &)));
+ connect(saveDialogPointer, SIGNAL(useNativeKdeDownloader(QUrl &, QString &)), this, SLOT(useNativeKdeDownloader(QUrl &, QString &)));
// Show the dialog.
saveDialogPointer->show();
emit hideProgressBar();
}
-void TabWidget::useNativeDownloader(QUrl &downloadUrl, QString &suggestedFileName)
+void TabWidget::useNativeKdeDownloader(QUrl &downloadUrl, QString &suggestedFileName)
{
// Get the download directory.
QString downloadDirectory = Settings::downloadLocation();
findCaseSensitiveActionPointer->setText(i18nc("Find Case Sensitive action", "Find Case Sensitive"));
hideFindTextActionPointer->setText(i18nc("Hide Find Text action", "Hide Find Text"));
- // Set the action icons.
+ // Set the action icons. Gnome doesn't contain some of the icons that KDE has.
+ // The toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
newTabActionPointer->setIcon(QIcon::fromTheme(QLatin1String("tab-new")));
newWindowActionPointer->setIcon(QIcon::fromTheme(QLatin1String("window-new")));
- userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode"));
- userAgentWebEngineDefaultActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
- userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr")));
- userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium")));
- userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr")));
- userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium")));
- userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
- userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
- userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties")));
- searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
- searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
- searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
- searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google")));
- searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
- searchEngineYahooActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo")));
- searchEngineCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("search")));
- zoomFactorActionPointer->setIcon(QIcon::fromTheme(QLatin1String("zoom")));
- domainSettingsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("settings-configure")));
- cookiesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("preferences-web-browser-cookies")));
- domStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("code-class")));
- findCaseSensitiveActionPointer->setIcon(QIcon::fromTheme(QLatin1String("format-text-lowercase")));
+ userAgentPrivacyBrowserActionPointer->setIcon(QIcon(":/icons/privacy-mode.svg"));
+ userAgentWebEngineDefaultActionPointer->setIcon(QIcon::fromTheme(QLatin1String("qtlogo"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+ QIcon::fromTheme(QLatin1String("contact-new")))));
+ userAgentFirefoxLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+ QIcon::fromTheme(QLatin1String("contact-new")))));
+ userAgentChromiumLinuxActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+ QIcon::fromTheme(QLatin1String("contact-new")))));
+ userAgentFirefoxWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+ QIcon::fromTheme(QLatin1String("contact-new")))));
+ userAgentChromeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"),
+ QIcon::fromTheme(QLatin1String("contact-new")))));
+ userAgentEdgeWindowsActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+ userAgentSafariMacosActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+ userAgentCustomActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+ searchEngineMojeekActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+ searchEngineMonoclesActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+ searchEngineMetagerActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+ searchEngineGoogleActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google"), QIcon::fromTheme(QLatin1String("edit-find"))));
+ searchEngineBingActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+ 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")));
+ 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"))));
+ domStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("code-class"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/gtk-unindent-ltr.png"))));
+ findCaseSensitiveActionPointer->setIcon(QIcon::fromTheme(QLatin1String("format-text-lowercase"), QIcon::fromTheme(QLatin1String("/usr/share/icons/gnome/32x32/apps/fonts.png"))));
hideFindTextActionPointer->setIcon(QIcon::fromTheme(QLatin1String("window-close-symbolic")));
// Create the key sequences.
// Instantiate a settings config dialog from the settings.kcfg file.
configDialogPointer = new KConfigDialog(this, QLatin1String("settings"), kConfigSkeletonPointer);
+ // Create a settings icon string.
+ QString settingsIconString;
+
+ // Get a settings icon that matches the theme.
+ if (QIcon::hasThemeIcon("breeze-settings"))
+ {
+ // KDE uses breeze-settings.
+ settingsIconString = QLatin1String("breeze-settings");
+ }
+ else
+ {
+ // Gnome uses preferences-desktop.
+ settingsIconString = QLatin1String("preferences-desktop");
+ }
+
// Add the settings widgets as config dialog pages.
- configDialogPointer->addPage(privacySettingsWidgetPointer, i18nc("Settings tab title", "Privacy"), QLatin1String("privacy-browser"));
- configDialogPointer->addPage(generalSettingsWidgetPointer, i18nc("Settings tab title", "General"), QLatin1String("breeze-settings"));
+ configDialogPointer->addPage(privacySettingsWidgetPointer, i18nc("Settings tab title", "Privacy"), QLatin1String("privacybrowser"));
+ configDialogPointer->addPage(generalSettingsWidgetPointer, i18nc("Settings tab title", "General"), settingsIconString);
configDialogPointer->addPage(spellCheckSettingsWidgetPointer, i18nc("Settings tab title", "Spell Check"), QLatin1String("tools-check-spelling"));
// Get handles for the buttons.
// Set the icon according to the status.
if (javaScriptEnabled)
- javaScriptActionPointer->setIcon(QIcon(QStringLiteral(":/icons/javascript-warning")));
+ javaScriptActionPointer->setIcon(QIcon(QLatin1String(":/icons/javascript-warning.svg")));
else
- javaScriptActionPointer->setIcon(QIcon(QStringLiteral(":/icons/privacy-mode")));
+ javaScriptActionPointer->setIcon(QIcon(QLatin1String(":/icons/privacy-mode.svg")));
// Set the action checked status.
javaScriptActionPointer->setChecked(javaScriptEnabled);
// Update the local storage status.
localStorageEnabled = isEnabled;
- // Update the icon.
+ // Update the icon. On Gnome, the toolbar icons don't pick up unless the size is explicit, probably because the toolbar ends up being an intermediate size.
if (localStorageEnabled)
- localStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("disk-quota-high")));
+ localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota-high"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/actions/filesaveas.png"))));
else
- localStorageActionPointer->setIcon(QIcon::fromTheme(QStringLiteral("disk-quota")));
+ localStorageActionPointer->setIcon(QIcon::fromTheme(QLatin1String("disk-quota"), QIcon(QLatin1String("/usr/share/icons/gnome/32x32/apps/kfm.png"))));
// Set the action checked status.
localStorageActionPointer->setChecked(localStorageEnabled);
// Check the Mojeek user agent action.
searchEngineMojeekActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Mojeek"));
}
// Check the Monocles user agent action.
searchEngineMonoclesActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Monocles"));
}
// Check the MetaGer user agent action.
searchEngineMetagerActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - MetaGer"));
}
// Check the Google user agent action.
searchEngineGoogleActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-google"), QIcon::fromTheme(QLatin1String("edit-find"))));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Google"));
}
// Check the Bing user agent action.
searchEngineBingActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Bing"));
}
// Check the Yahoo user agent action.
searchEngineYahooActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("im-yahoo"), QIcon::fromTheme(QLatin1String("edit-find"))));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Yahoo"));
}
// Check the user agent.
searchEngineCustomActionPointer->setChecked(true);
+ // Update the search engine menu action icon.
+ searchEngineMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("edit-find")));
+
// Update the search engine menu action text.
searchEngineMenuActionPointer->setText(i18nc("The main search engine menu action", "Search Engine - Custom"));
// Check the Privacy Browser user agent action.
userAgentPrivacyBrowserActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon(":/icons/privacy-mode.svg"));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Privacy Browser"));
}
// check the WebEngine default user agent action.
userAgentWebEngineDefaultActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("qtlogo"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - WebEngine default"));
}
// Check the Firefox on Linux user agent action.
userAgentFirefoxLinuxActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Firefox on Linux"));
}
// Check the Chromium on Linux user agent action.
userAgentChromiumLinuxActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Chromium on Linux"));
}
// Check the Firefox on Windows user agent action.
userAgentFirefoxWindowsActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("firefox-esr"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Firefox on Windows"));
}
// Check the Chrome on Windows user agent action.
userAgentChromeWindowsActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("chromium"), QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new")))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Chrome on Windows"));
}
// Check the Edge on Windows user agent action.
userAgentEdgeWindowsActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Edge on Windows"));
}
// Check the Safari on macOS user agent action.
userAgentSafariMacosActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Safari on macOS"));
}
// Check the user agent.
userAgentCustomActionPointer->setChecked(true);
+ // Update the user agent menu action icon.
+ userAgentMenuActionPointer->setIcon(QIcon::fromTheme(QLatin1String("user-group-properties"), QIcon::fromTheme(QLatin1String("contact-new"))));
+
// Update the user agent menu action text.
userAgentMenuActionPointer->setText(i18nc("The main user agent menu action", "User Agent - Custom"));