Bug 76573 - Unable to remove remote url top folder from Files tree list
Summary: Unable to remove remote url top folder from Files tree list
Status: RESOLVED FIXED
Alias: None
Product: quanta
Classification: Miscellaneous
Component: general (show other bugs)
Version: unspecified
Platform: unspecified Linux
: NOR normal
Target Milestone: ---
Assignee: András Manţia
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2004-03-02 16:59 UTC by Dennis Hansen
Modified: 2004-03-02 21:57 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
filestreeview-remotetopfolder.patch (788 bytes, text/x-diff)
2004-03-02 21:48 UTC, Dennis Hansen
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Dennis Hansen 2004-03-02 16:59:03 UTC
Version:           3.3 Bleeding Edge (2004-03-01) (using KDE 3.2.0, compiled sources)
Compiler:          gcc version 3.2.2 (Mandrake Linux 9.1 3.2.2-3mdk)
OS:          Linux (i686) release 2.4.21-0.27mdk

If a add a new top folder to the File Tree, and the location is remote, for example sftp://...
RMB click the new folder theres is no option to "remove from top" or any way to remove it again.

QT 3.3
Comment 1 Dennis Hansen 2004-03-02 17:15:16 UTC
Btw.
This is like
http://bugs.kde.org/show_bug.cgi?id=76498
It happens only when you add the folder with New Top Folder
and not when you right click on a folder and select Add to Top.

Comment 2 András Manţia 2004-03-02 18:00:26 UTC
Are you sure? ;-) I've tried to add a fish, ftp and sftp directory and I can 
remove them without problems. How does the "Top folders=" line look in the 
quanta_berc file? Of course, replace the username and password with some 
dummy text. ;-)

Comment 3 Dennis Hansen 2004-03-02 18:19:50 UTC
Yes and no, you are right it is not all but the ones linked to /
I think it's because quanta think they are "Top folders" in the sense 
that they are /  ones -  root folders - like the red default one.

Top folders=file:/,file:
$HOME/,ftp://user@foobar.dk/,sftp://user@foobar.dk/www/,sftp://user@foobar.dk/,file:
$HOME/bib/,sftp://user@foobar.dk/www/biblio/


No remove in RMB menu for these ones
ftp://user@foobar.dk/ 
sftp://user@foobar.dk/

Comment 4 András Manţia 2004-03-02 18:42:21 UTC
This is an important information and I'll verify later today.

Comment 5 András Manţia 2004-03-02 21:45:08 UTC
CVS commit by amantia: 

Make removal of new top folders pointing to the non-local root directory (e.g ftp://someserver/) possible [#76573].

CCMAIL: 76573-done@bugs.kde.org


  M +1 -1      ChangeLog   1.236
  M +3 -2      quanta.kdevelop   1.132
  M +2 -2      treeviews/filestreeview.cpp   1.75


--- kdewebdev/quanta/ChangeLog  #1.235:1.236
@@ -36,5 +36,5 @@
         - fix opening of documentation pages with references [#70345]
         - fix creation of project when the main directory starts with a protocol name
-        - make removal of top folders added with "New Top Folder" possible [#76498]
+        - make removal of top folders added with "New Top Folder" possible [#76498, #76573]
         - don't change the tab name if saving under a new name failed (needs KDE 3.2.2 or later)
         - various parsing fixes        

--- kdewebdev/quanta/quanta.kdevelop  #1.131:1.132
@@ -157,4 +157,5 @@
       <group pattern="*" name="Others" />
       <hidenonprojectfiles>false</hidenonprojectfiles>
+      <hidenonlocation>false</hidenonlocation>
     </groups>
     <tree>
@@ -235,8 +236,8 @@
   <kdevfilecreate>
     <filetypes>
-      <type icon="source_cpp" ext="cpp" create="template" name="C++ source" >
+      <type icon="source_cpp" ext="cpp" name="C++ source" create="template" >
         <descr>A new empty C++ file.</descr>
       </type>
-      <type icon="source_h" ext="h" create="template" name="C/C++ header" >
+      <type icon="source_h" ext="h" name="C/C++ header" create="template" >
         <descr>A new empty header file for C or C++.</descr>
       </type>

--- kdewebdev/quanta/treeviews/filestreeview.cpp  #1.74:1.75
@@ -301,6 +301,6 @@ void FilesTreeView::slotMenu(KListView* 
 
         m_config->setGroup("General Options");
-        QString text = curItem->url().path();
-        if ((text == "/" || text == QDir::homeDirPath()+"/") &&
+        KURL url = curItem->url();
+        if ((url == KURL("file:/") || url == KURL("file:" + QDir::homeDirPath()+"/")) &&
             m_config->readBoolEntry("Home-Root Folder On", true) )
           m_folderMenu ->setItemVisible(m_menuTop, false);


Comment 6 Dennis Hansen 2004-03-02 21:48:12 UTC
Attached is a patch that fixes the problem, by adding an extra check
to isLocalFile()


Created an attachment (id=4978)
filestreeview-remotetopfolder.patch
Comment 7 András Manţia 2004-03-02 21:56:04 UTC
Just fixed the bug (in another way). ;-) But thanks for the patch!

Comment 8 Dennis Hansen 2004-03-02 21:57:18 UTC
Ok nice, your fix was better Andras ;-)
Cheers