Bug 148391 - drag and drop of folders opens folder as file
Summary: drag and drop of folders opens folder as file
Status: RESOLVED FIXED
Alias: None
Product: kate
Classification: Applications
Component: general (show other bugs)
Version: unspecified
Platform: Gentoo Packages Linux
: NOR normal
Target Milestone: ---
Assignee: KWrite Developers
URL:
Keywords:
: 169159 323924 (view as bug list)
Depends on:
Blocks:
 
Reported: 2007-07-31 11:56 UTC by Christian Weiske
Modified: 2013-08-26 08:02 UTC (History)
4 users (show)

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 Christian Weiske 2007-07-31 11:56:47 UTC
Version:            (using KDE KDE 3.5.5)
Installed from:    Gentoo Packages
OS:                Linux

When dragging and dropping a folder from konqueror onto kate file list sidebar, the folder is opened as a file (that is obviously empty).
It should not be opened but cause the file list to chdir to that folder.
Comment 1 Thomas Friedrichsmeier 2007-12-11 17:11:03 UTC
Can reproduce in KDE 3.5.8 and KDE 4.

Actually, I think there are several issues about this at once (if you can't deal with them in one go, tell me to split them into separate reports).

1) Bad error message: Kate should indicate that the URL can't be opened because it's a folder, not due to missing permissions. It's smart enough to do that from the commandline.

2) Kate needs to be smarter about where and how to drops. Right now, it seems to attempt to open a file, whereever the url is dropped. However,
a) This does not make sense at all in most tool views.
b) The behavior in the filesystem browser should probably be different (original report).
c) In the text area, the filename should be inserted (note how it even shows a drop marker, which seems to indicate that the dragged object will be inserted *inside* the current document).
d) When dealing with this, note the related wishes bug #148389 and bug #148390 .
Comment 2 Ivo Anjo 2008-03-23 23:36:04 UTC
I can confirm this still, and I think kate should either open all the files inside the folder or just display the file open dialog browsing the dropped folder.

I don't agree with c) on comment #1: I drag files inside kate all the time, I would hate it if instead of opening them, kate started just writing their urls.
Comment 3 Anders Lund 2008-03-24 08:59:55 UTC
The drop event is received by the editor component, which can not open all the 
files on its own. But it could sure open a file dialog.

To be able to let the user open more files, the host application would need a 
signal, and that would require an interface in KTextEditor to provide taht I 
believe.
Comment 4 Dominik Haumann 2010-11-23 00:10:23 UTC
*** Bug 169159 has been marked as a duplicate of this bug. ***
Comment 5 Thomas Fjellstrom 2010-11-27 00:32:22 UTC
I've committed a somewhat dumb implementation. You'll need to be careful what folders you drop on kate. It'll happily open up / and all files below it.

If there are any huge problems with the current behavior, please open up a new bug :)
Comment 6 Dominik Haumann 2013-08-26 08:02:14 UTC
*** Bug 323924 has been marked as a duplicate of this bug. ***