diff --git a/bin/locale/sk_SK.qm b/bin/locale/sk_SK.qm index 8a8b29026..821c232ea 100644 Binary files a/bin/locale/sk_SK.qm and b/bin/locale/sk_SK.qm differ diff --git a/src/app/mainapplication.cpp b/src/app/mainapplication.cpp index 0aef8c387..4f68c655b 100644 --- a/src/app/mainapplication.cpp +++ b/src/app/mainapplication.cpp @@ -178,10 +178,6 @@ void MainApplication::loadSettings() QupZilla* MainApplication::getWindow() { - QupZilla *active = qobject_cast(QApplication::activeWindow()); - if (active) - return active; - for(int i=0; ishow(); connect(newWindow, SIGNAL(message(MainApplication::MessageType,bool)), this, SLOT(sendMessages(MainApplication::MessageType,bool))); m_mainWindows.append(newWindow); + newWindow->show(); } void MainApplication::connectDatabase() @@ -282,7 +278,6 @@ void MainApplication::quitApplication() return; } - delete m_updater; m_isClosing = true; if (m_mainWindows.count() > 0) diff --git a/src/app/mainapplication.h b/src/app/mainapplication.h index ff955bc5f..fc9fd8874 100644 --- a/src/app/mainapplication.h +++ b/src/app/mainapplication.h @@ -67,8 +67,8 @@ public: inline QString getActiveLanguage() { return m_activeLanguage; } inline bool isClosing() { return m_isClosing; } inline bool isExited() { return m_isExited; } - inline int windowCount() { return m_mainWindows.count(); } bool checkProfileDir(); + inline int windowCount() { return m_mainWindows.count(); } QupZilla* getWindow(); BookmarksManager* bookmarksManager(); diff --git a/src/app/qupzilla.cpp b/src/app/qupzilla.cpp index e77e30899..77a1112d0 100644 --- a/src/app/qupzilla.cpp +++ b/src/app/qupzilla.cpp @@ -655,7 +655,7 @@ void QupZilla::closeEvent(QCloseEvent* event) if (mApp->isClosing()) return; if (mApp->windowCount() == 1) { - quitApp(); + quitApp() ? event->accept() : event->ignore(); return; } @@ -664,20 +664,22 @@ void QupZilla::closeEvent(QCloseEvent* event) event->accept(); } -void QupZilla::quitApp() +bool QupZilla::quitApp() { QSettings settings(m_activeProfil+"settings.ini", QSettings::IniFormat); settings.beginGroup("Web-URL-Settings"); if (settings.value("afterLaunch",0).toInt()!=2 && m_tabWidget->count()>1) { QMessageBox::StandardButton button = QMessageBox::warning(this, tr("There are still open tabs"), - tr("There are still %1 open tabs and your session won't be stored. Are you sure to quit?").arg(m_tabWidget->count()), QMessageBox::Yes | QMessageBox::No); + tr("There are still %1 open tabs and your session won't be stored. Are you sure to quit?").arg(m_tabWidget->count()), QMessageBox::Yes | QMessageBox::No); if (button != QMessageBox::Yes) - return; + return false; } settings.endGroup(); + mApp->aboutToCloseWindow(this); mApp->quitApplication(); + return true; } QupZilla::~QupZilla() diff --git a/src/app/qupzilla.h b/src/app/qupzilla.h index 4edb24dfe..45d8cb0e0 100644 --- a/src/app/qupzilla.h +++ b/src/app/qupzilla.h @@ -182,7 +182,7 @@ private slots: void fullScreen(bool make); void startPrivate(bool state); - void quitApp(); + bool quitApp(); private: void setupUi(); diff --git a/src/downloads/downloadmanager.cpp b/src/downloads/downloadmanager.cpp index 821dec3e3..11171f266 100644 --- a/src/downloads/downloadmanager.cpp +++ b/src/downloads/downloadmanager.cpp @@ -241,7 +241,7 @@ bool DownloadManager::canClose() void DownloadManager::closeEvent(QCloseEvent *e) { - if (!mApp->getWindow()) { // No main windows -> we are going to quit + if (mApp->windowCount() == 0) { // No main windows -> we are going to quit if (!canClose()){ QMessageBox::StandardButton button = QMessageBox::warning(this, tr("Warning"), tr("Are you sure to quit? All uncompleted downloads will be cancelled!"), QMessageBox::Yes | QMessageBox::No); diff --git a/src/preferences/preferences.cpp b/src/preferences/preferences.cpp index f20eb54c5..f92b9b245 100644 --- a/src/preferences/preferences.cpp +++ b/src/preferences/preferences.cpp @@ -170,7 +170,6 @@ Preferences::Preferences(QupZilla* mainClass, QWidget *parent) : else ui->useDefined->setChecked(true); connect(ui->useDefined, SIGNAL(toggled(bool)), this, SLOT(downLocChanged(bool))); - ui->closeDownDialogOnFinish->setChecked( settings.value("autoCloseOnFinish",false).toBool() ); connect(ui->downButt, SIGNAL(clicked()), this, SLOT(chooseDownPath())); downLocChanged(ui->useDefined->isChecked()); settings.endGroup(); @@ -431,7 +430,6 @@ void Preferences::saveSettings() text+="/"; settings.setValue("defaultDownloadPath",text); } - settings.setValue("autoCloseOnFinish",ui->closeDownDialogOnFinish->isChecked()); settings.endGroup(); //BROWSING diff --git a/src/preferences/preferences.ui b/src/preferences/preferences.ui index 7e4b8e345..b00a46233 100644 --- a/src/preferences/preferences.ui +++ b/src/preferences/preferences.ui @@ -1039,27 +1039,20 @@ - - - Automatically close download dialog after finish - - - - Ask everytime for download location - + Use defined location: - + @@ -1073,7 +1066,7 @@ - + Qt::Vertical @@ -1086,36 +1079,7 @@ - - - - Qt::Horizontal - - - QSizePolicy::Fixed - - - - 20 - 20 - - - - - - - - Qt::Horizontal - - - - 40 - 20 - - - - - + Qt::Horizontal @@ -1128,7 +1092,7 @@ - + Qt::Horizontal diff --git a/translations/sk_SK.ts b/translations/sk_SK.ts index 2fa5f3090..e56b1d47a 100644 --- a/translations/sk_SK.ts +++ b/translations/sk_SK.ts @@ -1495,7 +1495,7 @@ neexistuje! SSL Manager - + Správca SSL @@ -2052,12 +2052,12 @@ Prosím pridajte si nejaký kliknutím na RSS ikonku v navigačnom riadku. <b>Organization: </b> - <b>Organizácia: </b> + <b>Organizácia: </b> <b>Domain Name: </b> - <b>Doména: </b> + <b>Doména: </b> @@ -2077,7 +2077,7 @@ Prosím pridajte si nejaký kliknutím na RSS ikonku v navigačnom riadku. <b>Expiration Date: </b> - <b>Platnosť do: </b> + <b>Platnosť do: </b>