This forum has been archived. All content is frozen. Please use KDE Discuss instead.

Tab titles in KRDC

Tags: None
(comma "," separated)
gone_bush
Registered Member
Posts
6
Karma
0
OS

Tab titles in KRDC

Sun Feb 07, 2010 10:00 pm
Using the URL for the title of the tab in KRDC is a little annoying. What I would like to see is either
  • the name from the bookmark entry, if appropriate, or
  • just the first element of the URL (after the '@' character).

I don't have the time to implement (1) but the following path achieves (2).


Code: Select all
diff -up kdenetwork-4.3.4/krdc/mainwindow.cpp ~/mainwindow.cpp
--- kdenetwork-4.3.4/krdc/mainwindow.cpp        2009-11-28 00:03:39.000000000 +1100
+++ /home/kmg/mainwindow.cpp    2010-02-08 08:13:19.000000000 +1100
@@ -396,7 +396,11 @@ void MainWindow::newConnection(const KUr

     QScrollArea *scrollArea = createScrollArea(m_tabWidget, view);

-    const int newIndex = m_tabWidget->addTab(scrollArea, KIcon("krdc"), url.prettyUrl(KUrl::RemoveTrailingSlash));
+       QString originalTitle = url.prettyUrl( KUrl::RemoveTrailingSlash );
+       int at = originalTitle.indexOf( '@' ) + 1;
+       QString newTitle = originalTitle.mid( at, originalTitle.indexOf( '.', at ) - at );
+
+    const int newIndex = m_tabWidget->addTab(scrollArea, KIcon("krdc"), newTitle );
     m_tabWidget->setCurrentIndex(newIndex);
     tabChanged(newIndex); // force to update m_currentRemoteView (tabChanged is not emitted when start page has been disabled)
User avatar
JanGerrit
Moderator
Posts
647
Karma
3
OS

Re: Tab titles in KRDC

Mon Feb 15, 2010 6:25 pm
You can use http://bugs.kde.org to search if someone has reported this already. If not you can open a new bug report there. In any case you can attach your patch to the report so the developers will see it more probably.


Image
gone_bush
Registered Member
Posts
6
Karma
0
OS

Re: Tab titles in KRDC

Mon Feb 15, 2010 8:12 pm
Bug 227072 raised


Bookmarks



Who is online

Registered users: bartoloni, Bing [Bot], Evergrowing, Google [Bot], ourcraft