Version: 1.2 (using KDE 3.1.0) Installed from: Gentoo Compiler: gcc version 3.2.1 20021207 (Gentoo Linux 3.2.1-20021207) OS: Linux (i686) release 2.4.19-gentoo-r9 When bookmarks in konsole, I can not see the whole path because the path is quite long. Using ~ instead of '/home/philippe' would make the name shorter. Is the 'file:' really useful too ? I think you could replace the whole 'file:/home/philippe' by something like '~' or if you want to be more explicit 'HOME'.
Subject: KDE_3_1_BRANCH: kdebase/konsole/konsole CVS commit by waba: Strip file: and replace homedir with ~ in bookmark title. CCMAIL: 55335-done@bugs.kde.org M +15 -0 konsolebookmarkhandler.cpp 1.9.2.1 M +1 -0 konsolebookmarkhandler.h 1.5.2.1 --- kdebase/konsole/konsole/konsolebookmarkhandler.cpp #1.9:1.9.2.1 @@ -4,4 +4,5 @@ #include <stdlib.h> +#include <qdir.h> #include <qtextstream.h> @@ -55,4 +56,18 @@ QString KonsoleBookmarkHandler::currentU { return m_konsole->baseURL().prettyURL(); +} + +QString KonsoleBookmarkHandler::currentTitle() const +{ + const KURL &u = m_konsole->baseURL(); + if (u.isLocalFile()) + { + QString path = u.path(); + QString home = QDir::homeDirPath(); + if (path.startsWith(home)) + path.replace(0, home.length(), "~"); + return path; + } + return u.prettyURL(); } --- kdebase/konsole/konsole/konsolebookmarkhandler.h #1.5:1.5.2.1 @@ -24,4 +24,5 @@ public: { emit openURL( url, title ); } virtual QString currentURL() const; + virtual QString currentTitle() const; KPopupMenu *menu() const { return m_menu; }
Subject: Re: Use ~ in bookmark name he he, I wish all my bugs and wishes could be resolved as fast as this one :-)