Bug 231018 - Drag and Drop to Application Icon in Panel does not open correct file
Summary: Drag and Drop to Application Icon in Panel does not open correct file
Status: RESOLVED FIXED
Alias: None
Product: plasma4
Classification: Plasma
Component: widget-misc (show other bugs)
Version: unspecified
Platform: Ubuntu Unspecified
: NOR normal
Target Milestone: ---
Assignee: Plasma Bugs List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-03-16 20:36 UTC by Jerome Lau
Modified: 2010-05-19 11:50 UTC (History)
2 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 Jerome Lau 2010-03-16 20:36:05 UTC
Version:            (using KDE 4.4.0)
Installed from:    Ubuntu Packages

Dragging and dropping a file to an Application Icon in the Panel should theoretically opens the file with the Application it was dropped to.  However, with KDE 4.4 this was not exactly the case.  The problem is that after adding an Application to the Panel, the command that executes the Application goes something like "app %U" or "app %F".  The command is correct, as in any UNIX console, the command would execute the application with the respected Job Control ID (either %U or %F).  However, if dropping a file (for example a text file) onto a previously created Application shortcut in panel (for example, kate), the command that executes kate in the KDE panel is "kate %U".  What happens after you drag a text file onto an application (kate) is that kate does open, but opens the text file as well as a blank text file with filename %U.  Obviously KDE is interpreting the %U in the command as a file argument rather than a Job Control ID (in this case %U, don't know if I got the terminology right with Job ID).  So with an application that can take multiple file as input argument, this will just open %U and the respected file, but with an application that only take 1 file as input argument, usually the first argument is %U, and when taken as a file argument, the application goes haywire (i.e., file not recognised etc.)

To reproduce this file (in Kubuntu 9.10 at least):
1. Get Kate
2. Go to Kate's entry in Kicker, right click on Kate, click on Create Application in Panel.
3. Create a text file anywhere you like.
4. Try dragging the text file to the Kate icon in the Panel (which should open the text file with Kate).
5. Kate should open with described problem, (i.e., opening with %U and the text file.)

Workaround:
A workaround is to change the command of the Application in the panel to just execute a command without and job identifiers.  This has two problems:
1. All applications added to the panel must have their commands edited manually, this is a hassle.
2. This seems broken, adding an Application into the Panel should have functionalities working right away.  (Point of note: GNOME does this correctly, even with the Job Identifiers)
Comment 1 Beat Wolf 2010-05-19 11:50:28 UTC
fixed in trunk