Making path completion case insensitive

Diaa Sami diaasami at gmail.com
Sun Dec 7 19:25:37 GMT 2008


You can find the patch inline below, it makes path completion case insensitive for konqueror and the directiory and file selection common dialogs.

-- patch start
Index: kdebase/apps/konqueror/src/konqmainwindow.cpp
===================================================================
--- kdebase/apps/konqueror/src/konqmainwindow.cpp	(revision 863411)
+++ kdebase/apps/konqueror/src/konqmainwindow.cpp	(working copy)
@@ -2975,6 +2975,7 @@ void KonqMainWindow::initCombo()
 
   m_pURLCompletion = new KUrlCompletion();
   m_pURLCompletion->setCompletionMode( s_pCompletion->completionMode() );
+  m_pURLCompletion->setIgnoreCase(true);
 
   // This only turns completion off. ~ is still there in the result
   // We do want completion of user names, right?
Index: kdelibs/kfile/kdirselectdialog.cpp
===================================================================
--- kdelibs/kfile/kdirselectdialog.cpp	(revision 863411)
+++ kdelibs/kfile/kdirselectdialog.cpp	(working copy)
@@ -255,6 +255,7 @@ KDirSelectDialog::KDirSelectDialog(const KUrl &sta
     d->m_urlCombo->setPixmapProvider( new KUrlPixmapProvider() );
     KUrlCompletion *comp = new KUrlCompletion();
     comp->setMode( KUrlCompletion::DirCompletion );
+    comp->setIgnoreCase(true);
     d->m_urlCombo->setCompletionObject( comp, true );
     d->m_urlCombo->setAutoDeleteCompletionObject( true );
     d->m_urlCombo->setDuplicatesEnabled( false );
Index: kdelibs/kio/kfile/kfiledialog.cpp
===================================================================
--- kdelibs/kio/kfile/kfiledialog.cpp	(revision 863411)
+++ kdelibs/kio/kfile/kfiledialog.cpp	(working copy)
@@ -39,6 +39,8 @@
 #include <kpluginfactory.h>
 #include <kdebug.h>
 #include <kwindowsystem.h>
+#include <kcompletion.h>
+#include <kurlcombobox.h>
 #include "kabstractfilewidget.h"
 #include "kabstractfilemodule.h"
 #include "krecentdirs.h"
@@ -254,6 +256,11 @@ KFileDialog::KFileDialog( const KUrl& startDir, co
 
     if (customWidget)
      d->w->setCustomWidget(customWidget);
+
+    if (!d->native) {
+        KCompletion *const comp = d->w->locationEdit()->completionObject();
+        comp->setIgnoreCase(true);
+    }
 }
 
 

-- patch end

Thanks

-- 
Diaa Sami

On Sun, 7 Dec 2008 19:15:31 +0100, "Peter Penz" <peter.penz at gmx.at> wrote:
> On Sunday, 7. December 2008 18:41:59 Diaa M. Sami wrote:
> > Hello,
> >
> > Did anyone review the patch?
> >
> > There's still some work that needs to be done to enable case-insensitive
> > path completion all over KDE.
> 
> Could you please repost the patch here? I checked the mail archive and
> could 
> not download your patch at http://rafb.net/p/XTUKla43.html (mail: 
> http://lists.kde.org/?l=kfm-devel&m=122234232707838&w=2).
> 
> I've submitted a patch some weeks ago for the URL navigator (= used by
> Dolphin 
> and the file dialog) in KDE 4.2, so that it is case-insensitive.
> 
> Thanks!
> Peter
> 
> 
> 




More information about the kfm-devel mailing list