[pim/korganizer] src: Hide rather than disable the "Configure View" context menu item

Allen Winter <[email protected]>
Newsgroups gmane.comp.kde.cvs
Message-ID <[email protected]>
Git commit eea8fd43223fdf9f3747ad76d9c1d998a4066925 by Allen Winter.
Committed on 25/07/2026 at 12:26.
Pushed by winterz into branch 'master'.

Hide rather than disable the "Configure View" context menu item

M  +1    -1    src/actionmanager.cpp
M  +1    -1    src/koviewmanager.cpp

https://invent.kde.org/pim/korganizer/-/commit/eea8fd43223fdf9f3747ad76d9c1d998a4066925

diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 520163602..0e1325f9e 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -600,7 +600,7 @@ void ActionManager::initActions()
                                              "In the multi-calendar view, starts a dialog that allows configuring the view. "
                                              "Currently only the multi-calendar view is supported. "
                                              "See the Multiple Calendars options in the Views->Agenda Views settings."));
-    mConfigureViewAction->setEnabled(mCalendarView->currentView() && mCalendarView->currentView()->hasConfigurationDialog());
+    mConfigureViewAction->setVisible(mCalendarView->currentView() && mCalendarView->currentView()->hasConfigurationDialog());
     mACollection->addAction(QStringLiteral("configure_view"), mConfigureViewAction);
     connect(mConfigureViewAction, &QAction::triggered, mCalendarView, &CalendarView::configureCurrentView);
 
diff --git a/src/koviewmanager.cpp b/src/koviewmanager.cpp
index 6aca0a4f0..23bfeecf8 100644
--- a/src/koviewmanager.cpp
+++ b/src/koviewmanager.cpp
@@ -212,7 +212,7 @@ void KOViewManager::showView(KOrg::BaseView *view)
     const KActionCollection *ac = getActionCollection();
     if (ac) {
         if (QAction *action = ac->action(QStringLiteral("configure_view"))) {
-            action->setEnabled(view->hasConfigurationDialog());
+            action->setVisible(view->hasConfigurationDialog());
         }
 
         const QStringList zoomActions = QStringList() << QStringLiteral("zoom_in_horizontally") << QStringLiteral("zoom_out_horizontally")
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.