[pim/korganizer] /: Todoview - no longer show the todolist in the sidebar in todo view

Allen Winter null at kde.org
Wed Jul 15 14:25:43 BST 2026


Git commit ba201141394e4f830fde21f0d1ced983b4400565 by Allen Winter.
Committed on 15/07/2026 at 12:00.
Pushed by winterz into branch 'master'.

Todoview - no longer show the todolist in the sidebar in todo view

Separately manage sidebar splitter sizes for todoview vs. non-todoview

M  +1    -1    doc/index.docbook
M  +1    -1    src/actionmanager.cpp
M  +26   -6    src/calendarview.cpp
M  +4    -0    src/calendarview.h
M  +12   -0    src/koviewmanager.cpp
M  +1    -0    src/koviewmanager.h
M  +8    -0    src/org.kde.korganizer.appdata.xml

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

diff --git a/doc/index.docbook b/doc/index.docbook
index 4be9ede63..ddda69c77 100644
--- a/doc/index.docbook
+++ b/doc/index.docbook
@@ -622,7 +622,7 @@ journals items from the dates selected in the Date Navigator. The
 month shown in the Date Navigator (the selected days in the month won't change
 the Month view, only month changes).</para>
 
-<para>The To-do View sidebar component lists your to-dos, just like the
+<para>The To-do List sidebar component lists your to-dos, just like the
 <link linkend="todo-view">To-do view</link>. It is useful if you want
 to see your to-dos while using the other views.</para>
 
diff --git a/src/actionmanager.cpp b/src/actionmanager.cpp
index 3e98caaa1..520163602 100644
--- a/src/actionmanager.cpp
+++ b/src/actionmanager.cpp
@@ -706,7 +706,7 @@ void ActionManager::initActions()
     mACollection->addAction(QStringLiteral("show_datenavigator"), mDateNavigatorShowAction);
     connect(mDateNavigatorShowAction, &KToggleAction::triggered, this, &ActionManager::toggleDateNavigator);
 
-    mTodoViewShowAction = new KToggleAction(i18nc("@action:inmenu", "Show To-do View"), this);
+    mTodoViewShowAction = new KToggleAction(i18nc("@action:inmenu", "Show To-do List"), this);
     mACollection->addAction(QStringLiteral("show_todoview"), mTodoViewShowAction);
     connect(mTodoViewShowAction, &KToggleAction::triggered, this, &ActionManager::toggleTodoView);
 
diff --git a/src/calendarview.cpp b/src/calendarview.cpp
index 061b9aa4d..951fed9bc 100644
--- a/src/calendarview.cpp
+++ b/src/calendarview.cpp
@@ -159,6 +159,7 @@ CalendarView::CalendarView(QWidget *parent)
     // hides the widget magically. I know I blamed Akonadi for not showing my
     // calendar more than once.
     mLeftSplitter->setChildrenCollapsible(false);
+    connect(mLeftSplitter, &QSplitter::splitterMoved, this, &CalendarView::leftSplitterMoved);
 
     mDateNavigatorContainer = new DateNavigatorContainer(mLeftSplitter);
     mDateNavigatorContainer->setObjectName(QLatin1StringView("CalendarView::DateNavigator"));
@@ -314,6 +315,15 @@ CalendarView::~CalendarView()
     delete mEventViewer;
 }
 
+void CalendarView::leftSplitterMoved([[maybe_unused]] int pos, [[maybe_unused]] int index)
+{
+    if (mViewManager->currentView()->identifier() == "DefaultTodoView") {
+        mLeftSplitterSizesTodo = mLeftSplitter->sizes();
+    } else {
+        mLeftSplitterSizes = mLeftSplitter->sizes();
+    }
+}
+
 QAbstractItemModel *CalendarView::eventsModel() const
 {
     return mPartStatFilterProxy;
@@ -459,10 +469,8 @@ void CalendarView::readSettings()
     }
     mPanner->setSizes(sizes);
 
-    sizes = geometryConfig.readEntry("Separator2", QList<int>());
-    if (!sizes.isEmpty() && sizes.count() != sizes.count(0)) {
-        mLeftSplitter->setSizes(sizes);
-    }
+    mLeftSplitterSizes = geometryConfig.readEntry("Separator2", QList<int>());
+    mLeftSplitterSizesTodo = geometryConfig.readEntry("Separator2Todo", QList<int>());
 
     mViewManager->readSettings(config.data());
     mTodoList->restoreLayout(config.data(), QStringLiteral("Sidebar Todo View"), true);
@@ -492,11 +500,14 @@ void CalendarView::writeSettings()
         geometryConfig.writeEntry("Separator1", list);
     }
 
-    list = mLeftSplitter->sizes();
+    list = mLeftSplitterSizes;
     if (list.count() != list.count(0) && mSplitterSizesValid) {
         geometryConfig.writeEntry("Separator2", list);
     }
-
+    list = mLeftSplitterSizesTodo;
+    if (list.count() != list.count(0) && mSplitterSizesValid) {
+        geometryConfig.writeEntry("Separator2Todo", list);
+    }
     mViewManager->writeSettings(config.data());
     mTodoList->saveLayout(config.data(), QStringLiteral("Sidebar Todo View"));
 
@@ -785,6 +796,15 @@ void CalendarView::updateView(const QDate &start, const QDate &end, const QDate
 {
     const bool currentViewIsTodoView = mViewManager->currentView()->identifier() == "DefaultTodoView";
 
+    /* Never show the todolist in the sidebar when in todoview mode */
+    if (currentViewIsTodoView) {
+        mTodoList->setVisible(false);
+        mLeftSplitter->setSizes(mLeftSplitterSizesTodo);
+    } else {
+        mTodoList->setVisible(mViewManager->isTodoListShown());
+        mLeftSplitter->setSizes(mLeftSplitterSizes);
+    }
+
     if (updateTodos && mTodoList->isVisible()) {
         // Update the sidepane todoView
         mTodoList->updateView();
diff --git a/src/calendarview.h b/src/calendarview.h
index 1e9593f55..2d13da825 100644
--- a/src/calendarview.h
+++ b/src/calendarview.h
@@ -593,6 +593,8 @@ public Q_SLOTS:
     void collectionSelected(const Akonadi::Collection &collection);
     void collectionDeselected(const Akonadi::Collection &collection);
 
+    void leftSplitterMoved(int, int);
+
     /** Popup the "What's New" dialog **/
     void slotWhatsNew();
 
@@ -702,6 +704,8 @@ private:
 
     QSplitter *mPanner = nullptr;
     QSplitter *mLeftSplitter = nullptr;
+    QList<int> mLeftSplitterSizes;
+    QList<int> mLeftSplitterSizesTodo;
     QWidget *mLeftFrame = nullptr;
     QStackedWidget *mRightFrame = nullptr;
     CalendarSupport::MessageWidget *mMessageWidget = nullptr;
diff --git a/src/koviewmanager.cpp b/src/koviewmanager.cpp
index 31008bf59..1306f90c5 100644
--- a/src/koviewmanager.cpp
+++ b/src/koviewmanager.cpp
@@ -340,6 +340,18 @@ void KOViewManager::connectTodoView(KOTodoView *todoView)
     connect(todoView, &KOTodoView::fullViewChanged, mMainView, &CalendarView::changeFullView);
 }
 
+bool KOViewManager::isTodoListShown()
+{
+    const KActionCollection *ac = getActionCollection();
+    if (ac) {
+        const QAction *action = ac->action(QStringLiteral("show_todoview"));
+        if (action) {
+            return action->isChecked();
+        }
+    }
+    return false;
+}
+
 void KOViewManager::zoomInHorizontally()
 {
     if (mAgendaView == mCurrentView) {
diff --git a/src/koviewmanager.h b/src/koviewmanager.h
index a0033f868..3af7c87bc 100644
--- a/src/koviewmanager.h
+++ b/src/koviewmanager.h
@@ -120,6 +120,7 @@ public:
     [[nodiscard]] QAction *viewToAction(const QString &, RangeMode) const;
     void viewActionEnable(QObject *);
     void viewActionEnable(QAction *);
+    bool isTodoListShown();
 
 Q_SIGNALS:
     void configChanged();
diff --git a/src/org.kde.korganizer.appdata.xml b/src/org.kde.korganizer.appdata.xml
index c5a29f6fc..a389b91a0 100644
--- a/src/org.kde.korganizer.appdata.xml
+++ b/src/org.kde.korganizer.appdata.xml
@@ -463,6 +463,14 @@
     <binary>korganizer</binary>
   </provides>
   <releases>
+    <release version="6.8.40" type="snapshot">
+      <description>
+        <p>Features</p>
+        <ul>
+          <li>Todo view: the mini todolist is no longer shown in the sidebar; the mini todolist can still be shown in all the other views if the Settings->Sidebar->Show Todo List option is enabled</li>
+        </ul>
+      </description>
+    </release>
     <release version="6.8.0" type="snapshot">
       <description>
         <p>Bug Fixes</p>


More information about the kde-doc-english mailing list