[prev in list] [next in list] [prev in thread] [next in thread] 

List:       konq-bugs
Subject:    [Bug 85925] Option to use folder name - not complete adress - as
From:       Waldo Bastian <bastian () kde ! org>
Date:       2004-07-31 16:16:39
Message-ID: 20040731161639.5951.qmail () ktown ! kde ! org
[Download RAW message or body]

------- 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=85925      
bastian kde org changed:

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



------- Additional Comments From bastian kde org  2004-07-31 18:16 -------
CVS commit by waba: 

Use folder name instead of complete URL as window title for local URLs
(BR85925)
Based on patch by David Sansome
CCMAIL: 85925-done bugs kde org


  M +13 -2     konq_mainwindow.cc   1.1341


--- kdebase/konqueror/konq_mainwindow.cc  #1.1340:1.1341
 @ -4052,7 +4052,18  @ void KonqMainWindow::setCaption( const Q
   {
     kdDebug(1202) << "KonqMainWindow::setCaption(" << caption << ")" << endl;
+    
+    QString adjustedCaption = caption;
+    // For local URLs we prefer to use only the directory name
+    if (m_currentView->url().isLocalFile())
+    {
+       // Is the caption a URL?  If so, is it local?  If so, only display the filename!
+       KURL url(caption);
+       if (url.isValid() && url.isLocalFile())
+          adjustedCaption = url.fileName();
+    }
+    
     // Keep an unmodified copy of the caption (before kapp->makeStdCaption is applied)
-    m_currentView->setCaption( caption );
-    KParts::MainWindow::setCaption( caption );
+    m_currentView->setCaption( adjustedCaption );
+    KParts::MainWindow::setCaption( adjustedCaption );
   }
 }
_______________________________________________
Konq-bugs mailing list
Konq-bugs@mail.kde.org
https://mail.kde.org/mailman/listinfo/konq-bugs
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic