1
mirror of https://invent.kde.org/network/falkon.git synced 2024-12-20 10:46:35 +01:00

Ask when closing multiple tabs option added to Preferences

This commit is contained in:
nowrep 2011-07-19 21:38:11 +02:00
parent 4c325ed108
commit 1403720b64
4 changed files with 21 additions and 9 deletions

View File

@ -1153,7 +1153,7 @@ bool QupZilla::quitApp()
settings.beginGroup("Web-URL-Settings");
int afterLaunch = settings.value("afterLaunch",0).toInt();
settings.endGroup();
bool askOnClose = !settings.value("Browser-View-Settings/DontAskOnClosing", false).toBool();
bool askOnClose = settings.value("Browser-Tabs-Settings/AskOnClosing", false).toBool();
if (askOnClose && afterLaunch != 2 && m_tabWidget->count() > 1) {
QDialog* dialog = new QDialog(this);
@ -1164,7 +1164,7 @@ bool QupZilla::quitApp()
if (dialog->exec() != QDialog::Accepted)
return false;
if (ui->dontAskAgain->isChecked())
settings.setValue("Browser-View-Settings/DontAskOnClosing", true);
settings.setValue("Browser-Tabs-Settings/AskOnClosing", false);
}
mApp->quitApplication();

View File

@ -42,7 +42,11 @@ LocationBar::LocationBar(QupZilla* mainClass)
m_siteIcon->setMaximumSize(35, 25);
m_siteIcon->setMinimumSize(35, 25);
m_siteIcon->setToolTip(tr("Show informations about this page"));
#if QT_VERSION == 0x040800
m_siteIcon->setStyleSheet("QToolButton{border-image: url(:/icons/locationbar/searchchoose.png); margin-left:2px; padding-left: 4px; }");
#else
m_siteIcon->setStyleSheet("QToolButton{border-image: url(:/icons/locationbar/searchchoose.png); margin-left:2px;}");
#endif
m_siteIcon->setFocusPolicy(Qt::ClickFocus);
m_rssIcon = new ClickableLabel(this);
@ -262,7 +266,6 @@ void LocationBar::keyPressEvent(QKeyEvent *event)
{
if (event->key() == Qt::Key_Escape) {
setText(m_webView->url().toEncoded());
qDebug(m_webView->url().toEncoded());
event->accept();
return;
}

View File

@ -146,6 +146,7 @@ Preferences::Preferences(QupZilla* mainClass, QWidget* parent) :
ui->hideCloseOnTab->setChecked( settings.value("hideCloseButtonWithOneTab",false).toBool() );
ui->hideTabsOnTab->setChecked( settings.value("hideTabsWithOneTab",false).toBool() );
ui->activateLastTab->setChecked( settings.value("ActivateLastTabWhenClosingActual", false).toBool() );
ui->askWhenClosingMultipleTabs->setChecked( settings.value("AskOnClosing", false).toBool() );
settings.endGroup();
//AddressBar
settings.beginGroup("AddressBar");
@ -604,6 +605,7 @@ void Preferences::saveSettings()
settings.setValue("hideCloseButtonWithOneTab",ui->hideCloseOnTab->isChecked());
settings.setValue("hideTabsWithOneTab",ui->hideTabsOnTab->isChecked() );
settings.setValue("ActivateLastTabWhenClosingActual", ui->activateLastTab->isChecked());
settings.setValue("AskOnClosing", ui->askWhenClosingMultipleTabs->isChecked());
settings.endGroup();
//DOWNLOADS

View File

@ -719,35 +719,35 @@
</property>
</widget>
</item>
<item row="6" column="0" colspan="4">
<item row="7" column="0" colspan="4">
<widget class="QLabel" name="label_25">
<property name="text">
<string>&lt;b&gt;Address Bar behaviour&lt;/b&gt;</string>
</property>
</widget>
</item>
<item row="7" column="1" colspan="3">
<item row="8" column="1" colspan="3">
<widget class="QCheckBox" name="selectAllOnFocus">
<property name="text">
<string>Select all text by double clicking in address bar</string>
</property>
</widget>
</item>
<item row="8" column="1" colspan="3">
<item row="9" column="1" colspan="3">
<widget class="QCheckBox" name="addComWithCtrl">
<property name="text">
<string>Add .com domain by pressing CTRL key</string>
</property>
</widget>
</item>
<item row="9" column="1" colspan="3">
<item row="10" column="1" colspan="3">
<widget class="QCheckBox" name="addCountryWithAlt">
<property name="text">
<string>Add .co.uk domain by pressing ALT key</string>
</property>
</widget>
</item>
<item row="10" column="1">
<item row="11" column="1">
<spacer name="verticalSpacer_8">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -760,7 +760,7 @@
</property>
</spacer>
</item>
<item row="5" column="1">
<item row="6" column="1">
<spacer name="verticalSpacer_7">
<property name="orientation">
<enum>Qt::Vertical</enum>
@ -780,6 +780,13 @@
</property>
</widget>
</item>
<item row="5" column="1">
<widget class="QCheckBox" name="askWhenClosingMultipleTabs">
<property name="text">
<string>Ask when closing multiple tabs</string>
</property>
</widget>
</item>
</layout>
</widget>
<widget class="QWidget" name="stackedWidgetPage4">