[Konsole-devel] [Bug 55335] Use ~ in bookmark name

Waldo Bastian bastian at kde.org
Fri Feb 28 10:14:41 UTC 2003


------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
     
http://bugs.kde.org/show_bug.cgi?id=55335     
bastian at kde.org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED



------- Additional Comments From bastian at kde.org  2003-02-28 11:14 -------
Subject: KDE_3_1_BRANCH: kdebase/konsole/konsole

CVS commit by waba: 

Strip file: and replace homedir with ~ in bookmark title.
CCMAIL: 55335-done at 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; }



More information about the konsole-devel mailing list