Summary: | Use ~ in bookmark name | ||
---|---|---|---|
Product: | [Applications] konsole | Reporter: | Philippe Fremy <phil> |
Component: | general | Assignee: | Konsole Developer <konsole-devel> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | 1.2 | ||
Target Milestone: | --- | ||
Platform: | Gentoo Packages | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: |
Description
Philippe Fremy
2003-02-28 10:32:54 UTC
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 :-) |