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

List:       kfm-devel
Subject:    Re: Making path completion case insensitive
From:       "Diaa Sami" <diaasami () gmail ! com>
Date:       2009-01-17 23:31:31
Message-ID: 1232235091.6960.1295341715 () webmail ! messagingengine ! com
[Download RAW message or body]

Thanks for the pointer David.

I've got one more patch for KFM.
This patch does two things, it enables case-insensitivity for the the path \
combobox(at the top of the file dialog) and it moves the code that enables \
case-insensitivity for the location edit(near the bottom) bottom to \
kdelibs/kfile/kfilewidget.cpp, the last change was made for consistency(and it should \
make all components using kfilewidget case-insensitive).

The changes had to be moved to kdelibs/kfile/kfilewidget.cpp because pathCombo wasn't \
accessible in kfiledialog.

You can find the patch below:

Index: kdelibs/kfile/kfilewidget.cpp
===================================================================
--- kdelibs/kfile/kfilewidget.cpp	(revision 911086)
+++ kdelibs/kfile/kfilewidget.cpp	(working copy)
@@ -497,6 +497,7 @@
     d->toolbar->setMovable(false);
 
     KUrlCompletion *pathCompletionObj = new KUrlCompletion( \
KUrlCompletion::DirCompletion ); +    pathCompletionObj->setIgnoreCase(true);
     pathCombo->setCompletionObject( pathCompletionObj );
     pathCombo->setAutoDeleteCompletionObject( true );
 
@@ -522,6 +523,7 @@
     d->locationLabel->setBuddy(d->locationEdit);
 
     KUrlCompletion *fileCompletionObj = new KUrlCompletion( \
KUrlCompletion::FileCompletion ); +    fileCompletionObj->setIgnoreCase(true);
     d->locationEdit->setCompletionObject( fileCompletionObj );
     d->locationEdit->setAutoDeleteCompletionObject( true );
     connect( fileCompletionObj, SIGNAL( match( const QString& ) ),
Index: kdelibs/kio/kfile/kfiledialog.cpp
===================================================================
--- kdelibs/kio/kfile/kfiledialog.cpp	(revision 911086)
+++ kdelibs/kio/kfile/kfiledialog.cpp	(working copy)
@@ -282,11 +282,6 @@
 
     if (customWidget)
      d->w->setCustomWidget(QString(), customWidget);
-
-    if (!d->native) {
-     KCompletion* comp = d->w->locationEdit()->completionObject();
-     comp->setIgnoreCase(true);
-    }
 }


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

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