Bug 391804 - kdesvn's window title should show current directory
Summary: kdesvn's window title should show current directory
Status: RESOLVED FIXED
Alias: None
Product: kdesvn
Classification: Applications
Component: General (show other bugs)
Version: GIT (master)
Platform: Other Linux
: NOR wishlist
Target Milestone: ---
Assignee: KDESvn default assignee
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-13 09:49 UTC by David Faure
Modified: 2018-03-15 22:02 UTC (History)
2 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description David Faure 2018-03-13 09:49:16 UTC
While using kdesvn in a large SVN checkout, the kdesvn main window always shows the svn URL in the title bar. It would be much more user-friendly if it could show the current directory, so that one can get "context" easily for the current file list, without having to find the current item in the directory tree on the left.

I can look into implementing this myself, but a pointer would be useful to save time figuring out how to get notified about the change of current directory.
Comment 1 Christian Ehrlicher 2018-03-13 19:44:55 UTC
You're looking for something like this (maybe remove svn root path?):

diff --git a/src/svnfrontend/maintreewidget.cpp b/src/svnfrontend/maintreewidget.cpp
index 0c4d50f8..6b3745f9 100644
--- a/src/svnfrontend/maintreewidget.cpp
+++ b/src/svnfrontend/maintreewidget.cpp
@@ -2236,6 +2236,9 @@ void MainTreeWidget::slotDirSelectionChanged(const QItemSelection &_item, const
         if (Kdesvnsettings::show_navigation_panel()) {
             m_TreeView->setRootIndex(m_Data->m_SortModel->mapFromSource(_t));
         }
+        auto item = m_Data->m_Model->nodeForIndex(_t);
+        if (item)
+            changeCaption(item->fullName());
     } else {
         checkSyncTreeModel();
     }
Comment 2 David Faure 2018-03-15 15:15:30 UTC
Thanks! Very helpful.

https://phabricator.kde.org/D11355
Comment 3 David Faure 2018-03-15 22:02:28 UTC
Git commit 78b0cb0e5d2ad9e169c55e3337d7b10500e17dc0 by David Faure.
Committed on 15/03/2018 at 22:02.
Pushed by dfaure into branch 'master'.

Display relative path (including name of the checkout) in the titlebar

Summary:
My wife requested this a very long time ago ;)
Thanks to Christian Ehrlicher for the hint on how to implement it.

Test Plan:
While navigating in a checkout, the titlebar shows
  <name of checkout>/relative/path

Reviewers: chehrlic

Reviewed By: chehrlic

Differential Revision: https://phabricator.kde.org/D11355

M  +8    -0    src/svnfrontend/maintreewidget.cpp

https://commits.kde.org/kdesvn/78b0cb0e5d2ad9e169c55e3337d7b10500e17dc0