diff options
| author | Méven Car <[email protected]> | 2023-08-28 10:13:21 +0200 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2023-08-28 14:08:53 +0200 |
| commit | 0cbc912319f503e94f13b8f06bd83f6e945dd26f (patch) | |
| tree | 5bb975051825f40ba7d1f754aaaed8ba90082789 | |
| parent | b45c57332f17fa82eb816179f20a84e392e51060 (diff) | |
Use KMessageBox::warningContinueCancel when appropriate
This will prevent saving the "Cancel" + "don't show again" result, which is meaningless.
| -rw-r--r-- | src/dolphinmainwindow.cpp | 2 | ||||
| -rw-r--r-- | src/settings/dolphin_generalsettings.kcfg | 4 | ||||
| -rw-r--r-- | src/settings/interface/confirmationssettingspage.cpp | 8 | ||||
| -rw-r--r-- | src/views/dolphinview.cpp | 2 |
4 files changed, 8 insertions, 8 deletions
diff --git a/src/dolphinmainwindow.cpp b/src/dolphinmainwindow.cpp index 38843f82c..637cd55af 100644 --- a/src/dolphinmainwindow.cpp +++ b/src/dolphinmainwindow.cpp @@ -1162,7 +1162,7 @@ void DolphinMainWindow::openTerminalHere() if (urls.count() > 5) { QString question = i18np("Are you sure you want to open 1 terminal window?", "Are you sure you want to open %1 terminal windows?", urls.count()); - const int answer = KMessageBox::warningTwoActions( + const int answer = KMessageBox::warningContinueCancel( this, question, {}, diff --git a/src/settings/dolphin_generalsettings.kcfg b/src/settings/dolphin_generalsettings.kcfg index 9bb202b71..2abd7da49 100644 --- a/src/settings/dolphin_generalsettings.kcfg +++ b/src/settings/dolphin_generalsettings.kcfg @@ -145,11 +145,11 @@ <group name="Notification Messages"> <entry name="ConfirmOpenManyFolders" type="Bool"> <label>Ask for confirmation when opening many folders at once.</label> - <default>false</default> + <default>true</default> </entry> <entry name="ConfirmOpenManyTerminals" type="Bool"> <label>Ask for confirmation when opening many terminals at once.</label> - <default>false</default> + <default>true</default> </entry> </group> </kcfg> diff --git a/src/settings/interface/confirmationssettingspage.cpp b/src/settings/interface/confirmationssettingspage.cpp index 491f8261f..5f1abb4cd 100644 --- a/src/settings/interface/confirmationssettingspage.cpp +++ b/src/settings/interface/confirmationssettingspage.cpp @@ -136,8 +136,8 @@ void ConfirmationsSettingsPage::applySettings() GeneralSettings *settings = GeneralSettings::self(); settings->setConfirmClosingMultipleTabs(m_confirmClosingMultipleTabs->isChecked()); - settings->setConfirmOpenManyFolders(!m_confirmOpenManyFolders->isChecked()); - settings->setConfirmOpenManyTerminals(!m_confirmOpenManyTerminals->isChecked()); + settings->setConfirmOpenManyFolders(m_confirmOpenManyFolders->isChecked()); + settings->setConfirmOpenManyTerminals(m_confirmOpenManyTerminals->isChecked()); #if HAVE_TERMINAL settings->setConfirmClosingTerminalRunningProgram(m_confirmClosingTerminalRunningProgram->isChecked()); @@ -182,8 +182,8 @@ void ConfirmationsSettingsPage::loadSettings() // KMessageBox for its dontshowAgain settings are true => Yes, false => No, No value => ask // we use default = false to not write false into the rc file, but have no value // the UI has inversed meaning compared to the interpretation - m_confirmOpenManyFolders->setChecked(!GeneralSettings::confirmOpenManyFolders()); - m_confirmOpenManyTerminals->setChecked(!GeneralSettings::confirmOpenManyTerminals()); + m_confirmOpenManyFolders->setChecked(GeneralSettings::confirmOpenManyFolders()); + m_confirmOpenManyTerminals->setChecked(GeneralSettings::confirmOpenManyTerminals()); #if HAVE_TERMINAL m_confirmClosingTerminalRunningProgram->setChecked(GeneralSettings::confirmClosingTerminalRunningProgram()); diff --git a/src/views/dolphinview.cpp b/src/views/dolphinview.cpp index d525df4c6..d0d524196 100644 --- a/src/views/dolphinview.cpp +++ b/src/views/dolphinview.cpp @@ -1058,7 +1058,7 @@ void DolphinView::slotItemsActivated(const KItemSet &indexes) if (indexes.count() > 5) { QString question = i18np("Are you sure you want to open 1 item?", "Are you sure you want to open %1 items?", indexes.count()); - const int answer = KMessageBox::warningTwoActions( + const int answer = KMessageBox::warningContinueCancel( this, question, {}, |
