mirror of
https://invent.kde.org/network/falkon.git
synced 2024-12-20 10:46:35 +01:00
Fixed recalculating size of tabs after unpinning tab.
+ other small improvements / fixes
This commit is contained in:
parent
b25489ae8c
commit
f09e5c981c
@ -37,18 +37,18 @@ void CommandLineOptions::showHelp()
|
|||||||
const char* help = " Usage: qupzilla [options] URL \n"
|
const char* help = " Usage: qupzilla [options] URL \n"
|
||||||
"\n"
|
"\n"
|
||||||
" QupZilla options:\n"
|
" QupZilla options:\n"
|
||||||
" -h or --help print this message \n"
|
" -h or --help print this message \n"
|
||||||
" -a or --authors print QupZilla authors \n"
|
" -a or --authors print QupZilla authors \n"
|
||||||
" -v or --version print QupZilla version \n"
|
" -v or --version print QupZilla version \n"
|
||||||
"\n"
|
"\n"
|
||||||
" -p or --profile=<profile> start with specified profile \n"
|
" -p=PROFILE or --profile=PROFILE start with specified profile \n"
|
||||||
" -np or --no-plugins start without plugins \n"
|
" -ne or --no-extensions start without extensions\n"
|
||||||
"\n"
|
"\n"
|
||||||
" Options to control running QupZilla:\n"
|
" Options to control running QupZilla:\n"
|
||||||
" -nt or --new-tab open new tab\n"
|
" -nt or --new-tab open new tab\n"
|
||||||
" -nw or --new-window open new window\n"
|
" -nw or --new-window open new window\n"
|
||||||
" -pb or --private-browsing start private browsing\n"
|
" -pb or --private-browsing start private browsing\n"
|
||||||
" -dm or --download-manager show download manager\n"
|
" -dm or --download-manager show download manager\n"
|
||||||
"\n"
|
"\n"
|
||||||
" QupZilla is a new, fast and secure web browser\n"
|
" QupZilla is a new, fast and secure web browser\n"
|
||||||
" based on WebKit core (http://webkit.org) and\n"
|
" based on WebKit core (http://webkit.org) and\n"
|
||||||
@ -106,7 +106,7 @@ void CommandLineOptions::parseActions()
|
|||||||
m_actions.append(pair);
|
m_actions.append(pair);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (arg.startsWith("-np") || arg.startsWith("--no-plugins")) {
|
if (arg.startsWith("-ne") || arg.startsWith("--no-extensions")) {
|
||||||
ActionPair pair;
|
ActionPair pair;
|
||||||
pair.action = Qz::CL_StartWithoutAddons;
|
pair.action = Qz::CL_StartWithoutAddons;
|
||||||
pair.text = "";
|
pair.text = "";
|
||||||
|
@ -57,7 +57,6 @@
|
|||||||
#include <QSettings>
|
#include <QSettings>
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
#include <QTranslator>
|
#include <QTranslator>
|
||||||
#include <QMessageBox>
|
|
||||||
|
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
#define DEFAULT_CHECK_UPDATES true
|
#define DEFAULT_CHECK_UPDATES true
|
||||||
@ -90,20 +89,19 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||||||
, m_networkmanager(0)
|
, m_networkmanager(0)
|
||||||
, m_cookiejar(0)
|
, m_cookiejar(0)
|
||||||
, m_rssmanager(0)
|
, m_rssmanager(0)
|
||||||
, m_updater(0)
|
|
||||||
, m_plugins(0)
|
, m_plugins(0)
|
||||||
, m_bookmarksModel(0)
|
, m_bookmarksModel(0)
|
||||||
, m_downloadManager(0)
|
, m_downloadManager(0)
|
||||||
, m_autofill(0)
|
, m_autofill(0)
|
||||||
, m_networkCache(new QNetworkDiskCache)
|
, m_networkCache(new QNetworkDiskCache(this))
|
||||||
, m_desktopNotifications(0)
|
, m_desktopNotifications(0)
|
||||||
, m_iconProvider(new IconProvider(this))
|
, m_iconProvider(new IconProvider(this))
|
||||||
, m_searchEnginesManager(0)
|
, m_searchEnginesManager(0)
|
||||||
, m_dbWriter(new DatabaseWriter())
|
, m_dbWriter(new DatabaseWriter(this))
|
||||||
, m_isClosing(false)
|
, m_isClosing(false)
|
||||||
, m_isStateChanged(false)
|
, m_isStateChanged(false)
|
||||||
, m_isExited(false)
|
|
||||||
, m_isRestoring(false)
|
, m_isRestoring(false)
|
||||||
|
, m_startingAfterCrash(false)
|
||||||
, m_databaseConnected(false)
|
, m_databaseConnected(false)
|
||||||
{
|
{
|
||||||
#if defined(Q_WS_X11) && !defined(NO_SYSTEM_DATAPATH)
|
#if defined(Q_WS_X11) && !defined(NO_SYSTEM_DATAPATH)
|
||||||
@ -174,7 +172,7 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||||||
foreach(const QString & message, messages) {
|
foreach(const QString & message, messages) {
|
||||||
sendMessage(message);
|
sendMessage(message);
|
||||||
}
|
}
|
||||||
m_isExited = true;
|
m_isClosing = true;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -211,13 +209,10 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||||||
|
|
||||||
Settings::createSettings(m_activeProfil + "settings.ini");
|
Settings::createSettings(m_activeProfil + "settings.ini");
|
||||||
|
|
||||||
Settings settings2;
|
Settings settings;
|
||||||
settings2.beginGroup("SessionRestore");
|
m_startingAfterCrash = settings.value("SessionRestore/isRunning", false).toBool();
|
||||||
if (settings2.value("isRunning", false).toBool()) {
|
bool checkUpdates = settings.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool();
|
||||||
settings2.setValue("isCrashed", true);
|
settings.setValue("SessionRestore/isRunning", true);
|
||||||
}
|
|
||||||
settings2.setValue("isRunning", true);
|
|
||||||
settings2.endGroup();
|
|
||||||
|
|
||||||
translateApp();
|
translateApp();
|
||||||
|
|
||||||
@ -228,10 +223,6 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||||||
connect(qupzilla, SIGNAL(message(Qz::AppMessageType, bool)), this, SLOT(sendMessages(Qz::AppMessageType, bool)));
|
connect(qupzilla, SIGNAL(message(Qz::AppMessageType, bool)), this, SLOT(sendMessages(Qz::AppMessageType, bool)));
|
||||||
connect(qupzilla, SIGNAL(startingCompleted()), this, SLOT(restoreCursor()));
|
connect(qupzilla, SIGNAL(startingCompleted()), this, SLOT(restoreCursor()));
|
||||||
|
|
||||||
if (settings2.value("Web-Browser-Settings/CheckUpdates", DEFAULT_CHECK_UPDATES).toBool()) {
|
|
||||||
m_updater = new Updater(qupzilla);
|
|
||||||
}
|
|
||||||
|
|
||||||
loadSettings();
|
loadSettings();
|
||||||
networkManager()->loadCertificates();
|
networkManager()->loadCertificates();
|
||||||
|
|
||||||
@ -239,6 +230,10 @@ MainApplication::MainApplication(const QList<CommandLineOptions::ActionPair> &cm
|
|||||||
plugins()->loadPlugins();
|
plugins()->loadPlugins();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (checkUpdates) {
|
||||||
|
new Updater(qupzilla);
|
||||||
|
}
|
||||||
|
|
||||||
QTimer::singleShot(0, this, SLOT(postLaunch()));
|
QTimer::singleShot(0, this, SLOT(postLaunch()));
|
||||||
#ifdef Q_WS_WIN
|
#ifdef Q_WS_WIN
|
||||||
QTimer::singleShot(10 * 1000, this, SLOT(setupJumpList()));
|
QTimer::singleShot(10 * 1000, this, SLOT(setupJumpList()));
|
||||||
@ -602,7 +597,6 @@ void MainApplication::saveSettings()
|
|||||||
Settings settings;
|
Settings settings;
|
||||||
settings.beginGroup("SessionRestore");
|
settings.beginGroup("SessionRestore");
|
||||||
settings.setValue("isRunning", false);
|
settings.setValue("isRunning", false);
|
||||||
settings.setValue("isCrashed", false);
|
|
||||||
settings.endGroup();
|
settings.endGroup();
|
||||||
|
|
||||||
settings.beginGroup("Web-Browser-Settings");
|
settings.beginGroup("Web-Browser-Settings");
|
||||||
@ -767,10 +761,6 @@ bool MainApplication::saveStateSlot()
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
Settings settings;
|
|
||||||
settings.beginGroup("SessionRestore");
|
|
||||||
settings.setValue("restoreSession", false);
|
|
||||||
|
|
||||||
QFile file(m_activeProfil + "session.dat");
|
QFile file(m_activeProfil + "session.dat");
|
||||||
file.open(QIODevice::WriteOnly);
|
file.open(QIODevice::WriteOnly);
|
||||||
QDataStream stream(&file);
|
QDataStream stream(&file);
|
||||||
@ -793,9 +783,6 @@ bool MainApplication::saveStateSlot()
|
|||||||
}
|
}
|
||||||
file.close();
|
file.close();
|
||||||
|
|
||||||
settings.setValue("restoreSession", true);
|
|
||||||
settings.endGroup();
|
|
||||||
|
|
||||||
QupZilla* qupzilla_ = getWindow();
|
QupZilla* qupzilla_ = getWindow();
|
||||||
if (qupzilla_ && m_mainWindows.count() == 1) {
|
if (qupzilla_ && m_mainWindows.count() == 1) {
|
||||||
qupzilla_->tabWidget()->savePinnedTabs();
|
qupzilla_->tabWidget()->savePinnedTabs();
|
||||||
@ -814,28 +801,12 @@ bool MainApplication::restoreStateSlot(QupZilla* window)
|
|||||||
}
|
}
|
||||||
|
|
||||||
m_isRestoring = true;
|
m_isRestoring = true;
|
||||||
Settings settings;
|
|
||||||
int afterStart = settings.value("Web-URL-Settings/afterLaunch", 1).toInt();
|
|
||||||
settings.beginGroup("SessionRestore");
|
|
||||||
if (!settings.value("restoreSession", false).toBool()) {
|
|
||||||
m_isRestoring = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
if (settings.value("isCrashed", false).toBool() && afterStart != 3) {
|
|
||||||
QMessageBox::StandardButton button = QMessageBox::warning(window, tr("Last session crashed"),
|
|
||||||
tr("<b>QupZilla crashed :-(</b><br/>Oops, the last session of QupZilla was interrupted unexpectedly. We apologize for this. Would you like to try restoring the last saved state?"),
|
|
||||||
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
|
||||||
if (button != QMessageBox::Yes) {
|
|
||||||
m_isRestoring = false;
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (!QFile::exists(m_activeProfil + "session.dat")) {
|
if (!QFile::exists(m_activeProfil + "session.dat")) {
|
||||||
m_isRestoring = false;
|
m_isRestoring = false;
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
settings.setValue("isCrashed", false);
|
|
||||||
QFile file(m_activeProfil + "session.dat");
|
QFile file(m_activeProfil + "session.dat");
|
||||||
file.open(QIODevice::ReadOnly);
|
file.open(QIODevice::ReadOnly);
|
||||||
QDataStream stream(&file);
|
QDataStream stream(&file);
|
||||||
|
@ -72,7 +72,7 @@ public:
|
|||||||
inline QString getActiveProfilPath() { return m_activeProfil; }
|
inline QString getActiveProfilPath() { return m_activeProfil; }
|
||||||
inline QString getActiveLanguage() { return m_activeLanguage; }
|
inline QString getActiveLanguage() { return m_activeLanguage; }
|
||||||
inline bool isClosing() { return m_isClosing; }
|
inline bool isClosing() { return m_isClosing; }
|
||||||
inline bool isExited() { return m_isExited; }
|
inline bool isStartingAfterCrash() { return m_startingAfterCrash; }
|
||||||
inline int windowCount() { return m_mainWindows.count(); }
|
inline int windowCount() { return m_mainWindows.count(); }
|
||||||
|
|
||||||
bool checkSettingsDir();
|
bool checkSettingsDir();
|
||||||
@ -132,7 +132,6 @@ private:
|
|||||||
NetworkManager* m_networkmanager;
|
NetworkManager* m_networkmanager;
|
||||||
CookieJar* m_cookiejar;
|
CookieJar* m_cookiejar;
|
||||||
RSSManager* m_rssmanager;
|
RSSManager* m_rssmanager;
|
||||||
Updater* m_updater;
|
|
||||||
PluginProxy* m_plugins;
|
PluginProxy* m_plugins;
|
||||||
BookmarksModel* m_bookmarksModel;
|
BookmarksModel* m_bookmarksModel;
|
||||||
DownloadManager* m_downloadManager;
|
DownloadManager* m_downloadManager;
|
||||||
@ -151,8 +150,8 @@ private:
|
|||||||
|
|
||||||
bool m_isClosing;
|
bool m_isClosing;
|
||||||
bool m_isStateChanged;
|
bool m_isStateChanged;
|
||||||
bool m_isExited;
|
|
||||||
bool m_isRestoring;
|
bool m_isRestoring;
|
||||||
|
bool m_startingAfterCrash;
|
||||||
|
|
||||||
bool m_databaseConnected;
|
bool m_databaseConnected;
|
||||||
QList<PostLaunchAction> m_postLaunchActions;
|
QList<PostLaunchAction> m_postLaunchActions;
|
||||||
|
@ -129,15 +129,10 @@ void QupZilla::postLaunch()
|
|||||||
}
|
}
|
||||||
|
|
||||||
Settings settings;
|
Settings settings;
|
||||||
settings.beginGroup("Web-URL-Settings");
|
int afterLaunch = settings.value("Web-URL-Settings/afterLaunch", 1).toInt();
|
||||||
int afterLaunch = settings.value("afterLaunch", 1).toInt();
|
|
||||||
settings.endGroup();
|
|
||||||
settings.beginGroup("SessionRestore");
|
|
||||||
bool startingAfterCrash = settings.value("isCrashed", false).toBool();
|
|
||||||
settings.endGroup();
|
|
||||||
|
|
||||||
bool addTab = true;
|
bool addTab = true;
|
||||||
QUrl startUrl;
|
QUrl startUrl;
|
||||||
|
|
||||||
switch (afterLaunch) {
|
switch (afterLaunch) {
|
||||||
case 0:
|
case 0:
|
||||||
startUrl = QUrl("");
|
startUrl = QUrl("");
|
||||||
@ -158,9 +153,20 @@ void QupZilla::postLaunch()
|
|||||||
|
|
||||||
switch (m_startBehaviour) {
|
switch (m_startBehaviour) {
|
||||||
case Qz::BW_FirstAppWindow:
|
case Qz::BW_FirstAppWindow:
|
||||||
if (startingAfterCrash || (addTab && afterLaunch == 3)) {
|
if (afterLaunch == 3) {
|
||||||
addTab = !mApp->restoreStateSlot(this);
|
addTab = !mApp->restoreStateSlot(this);
|
||||||
}
|
}
|
||||||
|
else if (mApp->isStartingAfterCrash()) {
|
||||||
|
QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Last session crashed"),
|
||||||
|
tr("<b>QupZilla crashed :-(</b><br/>Oops, the last session "
|
||||||
|
"of QupZilla was interrupted unexpectedly. We apologize "
|
||||||
|
"for this. Would you like to try restoring the last "
|
||||||
|
"saved state?"),
|
||||||
|
QMessageBox::Yes | QMessageBox::No, QMessageBox::Yes);
|
||||||
|
if (button == QMessageBox::Yes) {
|
||||||
|
addTab = !mApp->restoreStateSlot(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case Qz::BW_NewWindow:
|
case Qz::BW_NewWindow:
|
||||||
|
@ -6,10 +6,16 @@
|
|||||||
<rect>
|
<rect>
|
||||||
<x>0</x>
|
<x>0</x>
|
||||||
<y>0</y>
|
<y>0</y>
|
||||||
<width>505</width>
|
<width>550</width>
|
||||||
<height>327</height>
|
<height>350</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>550</width>
|
||||||
|
<height>350</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
<property name="windowTitle">
|
<property name="windowTitle">
|
||||||
<string>Import Bookmarks</string>
|
<string>Import Bookmarks</string>
|
||||||
</property>
|
</property>
|
||||||
@ -81,6 +87,16 @@
|
|||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
</item>
|
</item>
|
||||||
|
<item row="2" column="1">
|
||||||
|
<widget class="QLabel" name="label_3">
|
||||||
|
<property name="text">
|
||||||
|
<string><b>Note:</b> Currently, only import from Html File can import also bookmark folders.</string>
|
||||||
|
</property>
|
||||||
|
<property name="wordWrap">
|
||||||
|
<bool>true</bool>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
</item>
|
||||||
</layout>
|
</layout>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QWidget" name="filePage">
|
<widget class="QWidget" name="filePage">
|
||||||
|
@ -139,7 +139,7 @@ QString QupZillaSchemeReply::reportbugPage()
|
|||||||
bPage.replace("%TITLE%", tr("Report Issue"));
|
bPage.replace("%TITLE%", tr("Report Issue"));
|
||||||
bPage.replace("%REPORT-ISSUE%", tr("Report Issue"));
|
bPage.replace("%REPORT-ISSUE%", tr("Report Issue"));
|
||||||
bPage.replace("%PLUGINS-TEXT%", tr("If you are experiencing problems with QupZilla, please try to disable"
|
bPage.replace("%PLUGINS-TEXT%", tr("If you are experiencing problems with QupZilla, please try to disable"
|
||||||
" all plugins first. <br/>If this does not fix it, then please fill out this form: "));
|
" all extenions first. <br/>If this does not fix it, then please fill out this form: "));
|
||||||
bPage.replace("%EMAIL%", tr("Your E-mail"));
|
bPage.replace("%EMAIL%", tr("Your E-mail"));
|
||||||
bPage.replace("%TYPE%", tr("Issue type"));
|
bPage.replace("%TYPE%", tr("Issue type"));
|
||||||
bPage.replace("%DESCRIPTION%", tr("Issue description"));
|
bPage.replace("%DESCRIPTION%", tr("Issue description"));
|
||||||
@ -301,14 +301,14 @@ QString QupZillaSchemeReply::configPage()
|
|||||||
cPage.replace("%TITLE%", tr("Configuration Information"));
|
cPage.replace("%TITLE%", tr("Configuration Information"));
|
||||||
cPage.replace("%CONFIG%", tr("Configuration Information"));
|
cPage.replace("%CONFIG%", tr("Configuration Information"));
|
||||||
cPage.replace("%INFORMATIONS-ABOUT-VERSION%", tr("Information about version"));
|
cPage.replace("%INFORMATIONS-ABOUT-VERSION%", tr("Information about version"));
|
||||||
cPage.replace("%CONFIG-ABOUT%", tr("This page contains information about QupZilla's current configuration, plugins, etc, all relevant information for troubleshooting. Please include these information when sending bug reports."));
|
cPage.replace("%CONFIG-ABOUT%", tr("This page contains information about QupZilla's current configuration, all relevant information for troubleshooting. Please include these information when sending bug reports."));
|
||||||
cPage.replace("%BROWSER-IDENTIFICATION%", tr("Browser Identification"));
|
cPage.replace("%BROWSER-IDENTIFICATION%", tr("Browser Identification"));
|
||||||
cPage.replace("%PATHS%", tr("Paths"));
|
cPage.replace("%PATHS%", tr("Paths"));
|
||||||
cPage.replace("%BUILD-CONFIG%", tr("Build Configuration"));
|
cPage.replace("%BUILD-CONFIG%", tr("Build Configuration"));
|
||||||
cPage.replace("%PREFS%", tr("Preferences"));
|
cPage.replace("%PREFS%", tr("Preferences"));
|
||||||
cPage.replace("%OPTION%", tr("Option"));
|
cPage.replace("%OPTION%", tr("Option"));
|
||||||
cPage.replace("%VALUE%", tr("Value"));
|
cPage.replace("%VALUE%", tr("Value"));
|
||||||
cPage.replace("%PLUGINS%", tr("Plugins"));
|
cPage.replace("%PLUGINS%", tr("Extensions"));
|
||||||
cPage.replace("%PL-NAME%", tr("Name"));
|
cPage.replace("%PL-NAME%", tr("Name"));
|
||||||
cPage.replace("%PL-VER%", tr("Version"));
|
cPage.replace("%PL-VER%", tr("Version"));
|
||||||
cPage.replace("%PL-AUTH%", tr("Author"));
|
cPage.replace("%PL-AUTH%", tr("Author"));
|
||||||
@ -377,7 +377,7 @@ QString QupZillaSchemeReply::configPage()
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (pluginsString.isEmpty()) {
|
if (pluginsString.isEmpty()) {
|
||||||
pluginsString = QString("<tr><td colspan=4 class=\"no-available-plugins\">%1</td></tr>").arg(tr("No available plugins."));
|
pluginsString = QString("<tr><td colspan=4 class=\"no-available-plugins\">%1</td></tr>").arg(tr("No available extensions."));
|
||||||
}
|
}
|
||||||
|
|
||||||
page.replace("%PLUGINS-INFO%", pluginsString);
|
page.replace("%PLUGINS-INFO%", pluginsString);
|
||||||
|
@ -19,8 +19,8 @@
|
|||||||
|
|
||||||
#include <QTimer>
|
#include <QTimer>
|
||||||
|
|
||||||
DatabaseWriter::DatabaseWriter()
|
DatabaseWriter::DatabaseWriter(QObject *parent)
|
||||||
: QObject()
|
: QObject(parent)
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -28,7 +28,7 @@ class QT_QUPZILLA_EXPORT DatabaseWriter : public QObject
|
|||||||
{
|
{
|
||||||
Q_OBJECT
|
Q_OBJECT
|
||||||
public:
|
public:
|
||||||
explicit DatabaseWriter();
|
explicit DatabaseWriter(QObject* parent = 0);
|
||||||
|
|
||||||
void executeQuery(const QSqlQuery &query);
|
void executeQuery(const QSqlQuery &query);
|
||||||
|
|
||||||
|
@ -92,20 +92,13 @@ void PluginProxy::registerAppEventHandler(const PluginProxy::EventHandlerType &t
|
|||||||
|
|
||||||
void PluginProxy::populateWebViewMenu(QMenu* menu, WebView* view, const QWebHitTestResult &r)
|
void PluginProxy::populateWebViewMenu(QMenu* menu, WebView* view, const QWebHitTestResult &r)
|
||||||
{
|
{
|
||||||
if (!menu || !view || m_loadedPlugins.count() == 0) {
|
if (!menu || !view) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
menu->addSeparator();
|
|
||||||
int count = menu->actions().count();
|
|
||||||
|
|
||||||
foreach(PluginInterface * iPlugin, m_loadedPlugins) {
|
foreach(PluginInterface * iPlugin, m_loadedPlugins) {
|
||||||
iPlugin->populateWebViewMenu(menu, view, r);
|
iPlugin->populateWebViewMenu(menu, view, r);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (menu->actions().count() == count) {
|
|
||||||
menu->removeAction(menu->actions().at(count - 1));
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
bool PluginProxy::processMouseDoubleClick(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
bool PluginProxy::processMouseDoubleClick(const Qz::ObjectName &type, QObject* obj, QMouseEvent* event)
|
||||||
|
@ -217,7 +217,7 @@ void PluginsList::itemChanged(QListWidgetItem* item)
|
|||||||
|
|
||||||
if (item->checkState() == Qt::Checked && !plugin.isLoaded()) {
|
if (item->checkState() == Qt::Checked && !plugin.isLoaded()) {
|
||||||
item->setCheckState(Qt::Unchecked);
|
item->setCheckState(Qt::Unchecked);
|
||||||
QMessageBox::critical(this, tr("Error!"), tr("Cannot load extensions"));
|
QMessageBox::critical(this, tr("Error!"), tr("Cannot load extension!"));
|
||||||
}
|
}
|
||||||
|
|
||||||
item->setData(Qt::UserRole + 10, qVariantFromValue(plugin));
|
item->setData(Qt::UserRole + 10, qVariantFromValue(plugin));
|
||||||
|
@ -310,8 +310,11 @@ void TabBar::pinTab()
|
|||||||
m_pinnedTabsCount--;
|
m_pinnedTabsCount--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Adjust add tab button in proper position
|
// We need to recalculate size of all tabs and repaint tabbar
|
||||||
tabSizeHint(count() - 1);
|
// Unfortunately, Qt doesn't offer refresh() function as a public API
|
||||||
|
|
||||||
|
// So we are calling the lightest function that calls d->refresh()
|
||||||
|
setElideMode(elideMode());
|
||||||
}
|
}
|
||||||
|
|
||||||
void TabBar::pinnedTabClosed()
|
void TabBar::pinnedTabClosed()
|
||||||
|
@ -37,7 +37,6 @@
|
|||||||
#include "networkmanagerproxy.h"
|
#include "networkmanagerproxy.h"
|
||||||
#include "adblockicon.h"
|
#include "adblockicon.h"
|
||||||
|
|
||||||
#include <QTextDocument>
|
|
||||||
#include <QDir>
|
#include <QDir>
|
||||||
#include <QWebHistory>
|
#include <QWebHistory>
|
||||||
#include <QFileSystemWatcher>
|
#include <QFileSystemWatcher>
|
||||||
@ -651,7 +650,7 @@ void WebPage::javaScriptAlert(QWebFrame* originatingFrame, const QString &msg)
|
|||||||
ui->setupUi(dialog);
|
ui->setupUi(dialog);
|
||||||
ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok);
|
ui->buttonBox->setStandardButtons(QDialogButtonBox::Ok);
|
||||||
ui->dontAskAgain->setText(tr("Prevent this page from creating additional dialogs"));
|
ui->dontAskAgain->setText(tr("Prevent this page from creating additional dialogs"));
|
||||||
ui->textLabel->setText(Qt::escape(msg));
|
ui->textLabel->setText(msg);
|
||||||
ui->iconLabel->setPixmap(mApp->style()->standardPixmap(QStyle::SP_MessageBoxInformation));
|
ui->iconLabel->setPixmap(mApp->style()->standardPixmap(QStyle::SP_MessageBoxInformation));
|
||||||
ui->buttonBox->setFocus();
|
ui->buttonBox->setFocus();
|
||||||
dialog->setWindowTitle(tr("JavaScript alert - %1").arg(url().host()));
|
dialog->setWindowTitle(tr("JavaScript alert - %1").arg(url().host()));
|
||||||
|
@ -62,7 +62,7 @@ int main(int argc, char* argv[])
|
|||||||
|
|
||||||
MainApplication app(cmdActions, argc, argv);
|
MainApplication app(cmdActions, argc, argv);
|
||||||
|
|
||||||
if (app.isExited()) {
|
if (app.isClosing()) {
|
||||||
// Not showing any output, otherwise XFCE shows "Failed to execute default browser. I/O error" error
|
// Not showing any output, otherwise XFCE shows "Failed to execute default browser. I/O error" error
|
||||||
// if (argc == 1) {
|
// if (argc == 1) {
|
||||||
// std::cout << "QupZilla already running - activating existing window" << std::endl;
|
// std::cout << "QupZilla already running - activating existing window" << std::endl;
|
||||||
|
Loading…
Reference in New Issue
Block a user