Bug 123700 - In the file system browser multi selection is active
Summary: In the file system browser multi selection is active
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Ubuntu Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-16 02:42 UTC by Malix
Modified: 2007-02-28 23:35 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Malix 2006-03-16 02:42:28 UTC
Version:            (using KDE KDE 3.5.1)
Installed from:    Ubuntu Packages
OS:                Linux

In the file browser multi selection is active, but it deactivate when switch between detailed and short view is performed.
I have a double click set in kde environment.
Comment 1 Dominik Haumann 2007-02-28 21:26:19 UTC
SVN commit 638096 by dhaumann:

Patch from Massimo Fidanza <max@massimofidanza.it>
Use Extended mode instead of Multi for the file view, as it works better
when doubleclick mode is used. Make sure the mode is set after changing
view type. Thanks for the patch!
BUG: 123700


 M  +10 -3     katefileselector.cpp  
 M  +2 -0      katefileselector.h  


--- branches/KDE/3.5/kdebase/kate/app/katefileselector.cpp #638095:638096
@@ -131,7 +131,9 @@
 
   dir = new KDirOperator(KURL(), this, "operator");
   dir->setView(KFile::/* Simple */Detail);
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
+  connect ( dir, SIGNAL( viewChanged(KFileView *) ),
+                   this, SLOT( selectorViewChanged(KFileView *) ) );
   setStretchFactor(dir, 2);
 
   KActionCollection *coll = dir->actionCollection();
@@ -219,7 +221,7 @@
   dir->setViewConfig( config, name + ":view" );
   dir->readConfig(config, name + ":dir");
   dir->setView( KFile::Default );
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
   config->setGroup( name );
 
   // set up the toolbar
@@ -300,7 +302,7 @@
 void KateFileSelector::setView(KFile::FileView view)
 {
   dir->setView(view);
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
 }
 
 //END Public Methods
@@ -445,6 +447,11 @@
   acSyncDir->setEnabled( ! mainwin->activeDocumentUrl().directory().isEmpty() );
 }
 
+void ::KateFileSelector::selectorViewChanged( KFileView * newView )
+{
+  newView->setSelectionMode(KFile::Extended);
+}
+
 //END Private Slots
 
 //BEGIN Protected
--- branches/KDE/3.5/kdebase/kate/app/katefileselector.h #638095:638096
@@ -35,6 +35,7 @@
 class KateViewManager;
 class KActionCollection;
 class KActionSelector;
+class KFileView;
 
 /*
     The kate file selector presents a directory view, in which the default action is
@@ -94,6 +95,7 @@
     void setDir(KURL);
     void setDir( const QString& url ) { setDir( KURL( url ) ); };
     void kateViewChanged();
+    void selectorViewChanged( KFileView * );
 
   private slots:
     void cmbPathActivated( const KURL& u );
Comment 2 Anders Lund 2007-02-28 23:35:33 UTC
SVN commit 638136 by alund:

Patch from Massimo Fidanza <max@massimofidanza.it>
Use Extended mode instead of Multi for the file view, as it works better
when doubleclick mode is used. Make sure the mode is set after changing
view type. Thanks for the patch!
CCBUG: 123700


 M  +10 -3     katefileselector.cpp  
 M  +1 -0      katefileselector.h  


--- trunk/KDE/kdesdk/kate/plugins/filebrowser/katefileselector.cpp #638135:638136
@@ -203,7 +203,9 @@
 
   dir = new KDirOperator(KUrl(), this);
   dir->setView(KFile::/* Simple */Detail);
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
+  connect ( dir, SIGNAL( viewChanged(KFileView *) ),
+           this, SLOT( selectorViewChanged(KFileView *) ) );
   setStretchFactor(dir, 2);
   dir->setSizePolicy (QSizePolicy (QSizePolicy::MinimumExpanding, QSizePolicy::MinimumExpanding));
 
@@ -299,7 +301,7 @@
   dir->readConfig(&cgDir);
 
   dir->setView( KFile::Default );
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
 
   KConfigGroup cg (config, name );
 
@@ -387,7 +389,7 @@
 void ::KateFileSelector::setView(KFile::FileView view)
 {
   dir->setView(view);
-  dir->view()->setSelectionMode(KFile::Multi);
+  dir->view()->setSelectionMode(KFile::Extended);
 }
 
 //END Public Methods
@@ -554,6 +556,11 @@
   acSyncDir->setEnabled( ! activeDocumentUrl().directory().isEmpty() );
 }
 
+void ::KateFileSelector::selectorViewChanged( KFileView * newView )
+{
+  newView->setSelectionMode(KFile::Extended);
+}
+
 //END Private Slots
 
 //BEGIN Protected
--- trunk/KDE/kdesdk/kate/plugins/filebrowser/katefileselector.h #638135:638136
@@ -155,6 +155,7 @@
       setDir( KUrl( url ) );
     };
     void kateViewChanged();
+    void selectorViewChanged( KFileView * );
 
   private Q_SLOTS:
     void fileSelected(const KFileItem * /*file*/);