diff options
| author | Pan Zhang <[email protected]> | 2026-01-09 17:31:08 +0800 |
|---|---|---|
| committer | Méven Car <[email protected]> | 2026-01-09 14:11:35 +0000 |
| commit | 5b612c6620ced914c7fd239737bef2a6cb55fc50 (patch) | |
| tree | 89f0504d8cc4c49f4266d58ff71d072360627a94 /src/settings/contextmenu | |
| parent | 6a6a9cd363271d632b5b546804473e5cd807bb40 (diff) | |
dolphinmainwindow: Reload context menu plugins when configuration changes
Reload the context menu plugins and share the KFileItemActions with the context menu so it stays up-to-date as the user changes the service menu settings.
This uses a KConfigWatcher to trigger settings reload on "kservicemenurc" changes, covering both internal settings changes and external scripts.
Remove the obsolete restart prompt in ContextMenuSettingsPage since changes are now applied instantly.
BUG: 508722
Diffstat (limited to 'src/settings/contextmenu')
| -rw-r--r-- | src/settings/contextmenu/contextmenusettingspage.cpp | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/src/settings/contextmenu/contextmenusettingspage.cpp b/src/settings/contextmenu/contextmenusettingspage.cpp index 9f9c5c68e..bfc4f8dbc 100644 --- a/src/settings/contextmenu/contextmenusettingspage.cpp +++ b/src/settings/contextmenu/contextmenusettingspage.cpp @@ -39,8 +39,6 @@ const bool ShowDeleteDefault = false; const char VersionControlServicePrefix[] = "_version_control_"; const char DeleteService[] = "_delete"; const char CopyToMoveToService[] = "_copy_to_move_to"; - -bool laterSelected = false; } ContextMenuSettingsPage::ContextMenuSettingsPage(QWidget *parent, const KActionCollection *actions, const QStringList &actionIds) @@ -200,23 +198,6 @@ void ContextMenuSettingsPage::applySettings() if (m_enabledVcsPlugins != enabledPlugins) { VersionControlSettings::setEnabledPlugins(enabledPlugins); VersionControlSettings::self()->save(); - - if (!laterSelected) { - KMessageBox::ButtonCode promptRestart = - KMessageBox::questionTwoActions(window(), - i18nc("@info", - "Dolphin must be restarted to apply the " - "updated version control system settings."), - i18nc("@info", "Restart now?"), - KGuiItem(QApplication::translate("KStandardGuiItem", "&Restart"), QStringLiteral("dialog-restart")), - KGuiItem(QApplication::translate("KStandardGuiItem", "&Later"), QStringLiteral("dialog-later"))); - if (promptRestart == KMessageBox::ButtonCode::PrimaryAction) { - Dolphin::openNewWindow(); - qApp->quit(); - } else { - laterSelected = true; - } - } } } |
