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

List:       kde-commits
Subject:    kdebase/konqueror/listview
From:       Stephan Binner <binner () kde ! org>
Date:       2004-12-25 22:06:44
Message-ID: 20041225220644.7B4E41B94D () office ! kde ! org
[Download RAW message or body]

CVS commit by binner: 

Enhanced rename: Don't highlight the file extension
Patch by Paul Sprakes <kdecvs@sprakes.co.uk>
CCFEATURE: 58749


  M +10 -0     konq_listview.cc   1.221


--- kdebase/konqueror/listview/konq_listview.cc  #1.220:1.221
@@ -33,4 +33,5 @@
 #include <kstdaction.h>
 #include <kprotocolinfo.h>
+#include <klineedit.h>
 
 #include <qapplication.h>
@@ -159,4 +160,13 @@ void ListViewBrowserExtension::rename()
   Q_ASSERT ( item );
   m_listView->listViewWidget()->rename( item, 0 );
+
+  // Enhanced rename: Don't highlight the file extension.
+  KLineEdit* le = m_listView->listViewWidget()->renameLineEdit();
+  if ( le ) {
+     QString txt = le->text();
+     int firstDot = txt.find('.');
+     if( firstDot > 0 )
+        le->setSelection(0, firstDot);
+  }
 }
 


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

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