can't drag and drop a .desktop file to the docky trash.

Bug #507014 reported by inkhorn
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Docky
Confirmed
Low
Jason Smith

Bug Description

Distro: Ubuntu Karmic Koala
X Version: 2:1.6.4
Video Card: Intel Corporation Mobile 945GM/GMS, 943/940GML Express Integrated Graphics Controller (rev 03)
Gnome Version: 2.28.1

Complaint: When I try to drag a desktop shortcut (.desktop file) and drop it on the docky trash icon, the shortcut gets added to the dock rather than thrown into the trash!

Revision history for this message
Robert Dyer (psybers) wrote :

Correct. Jason coded it so that dropping a .desktop *anywhere* on the dock adds it to the dock. I suppose he didn't think that one through all the way... ;-)

Changed in docky:
status: New → Confirmed
assignee: nobody → Jason Smith (jassmith)
importance: Undecided → Low
Revision history for this message
Danielle Foré (danrabbit) wrote :

Maybe we could turn this bug into a feature and offer to uninstall an application that gets dragged to the trash?

Revision history for this message
Robert Dyer (psybers) wrote :

Good thought... but no. There is no realistic way to take a .desktop file and figure out what 'application' you should 'uninstall'. We can happily offer to delete the .desktop file though, that makes perfect sense. :-)

Revision history for this message
inkhorn (matt-dubins) wrote :

Please change delete the .desktop file when it's dropped onto the trash icon :)

Revision history for this message
isakkarlsson (isak-karlsson) wrote :

=== modified file 'Docky/Docky/Interface/DockDragTracker.cs'
--- Docky/Docky/Interface/DockDragTracker.cs 2010-01-12 04:09:56 +0000
+++ Docky/Docky/Interface/DockDragTracker.cs 2010-01-15 22:47:08 +0000
@@ -43,7 +43,6 @@

   bool drag_known;
   bool drag_data_requested;
- bool drag_is_desktop_file;
   bool repo_mode = false;
   bool drag_disabled = false;
   int marker = 0;
@@ -63,7 +62,6 @@
      drag_known = false;
      drag_data = null;
      drag_data_requested = false;
- drag_is_desktop_file = false;
     }
    }
   }
@@ -265,7 +263,6 @@
      .Where (uri => uri.StartsWith ("file://"));

     drag_data_requested = false;
- drag_is_desktop_file = drag_data.Any (d => d.EndsWith (".desktop"));
     Owner.SetHoveredAcceptsDrop ();
    }

@@ -280,7 +277,7 @@

    AbstractDockItem item = Owner.HoveredItem;

- if (!drag_is_desktop_file && item != null && item.CanAcceptDrop (drag_data))
+ if (item != null && item.CanAcceptDrop (drag_data))
     return true;

    return false;

Here is an patch to fix this "issue".

Revision history for this message
Robert Dyer (psybers) wrote :

Nice try, but wrong. You are creating a new bug by doing this.

Revision history for this message
Chris S. (cszikszoy) wrote :

@Robert

Care to elaborate? What bug is created by doing this? Why do we special case desktop files anyways? I would think DockWindow should just pass whatever data was dragged on to the provider and let them accept / process / reject it.

Revision history for this message
Robert Dyer (psybers) wrote :

Because depending on exactly where it is dropped, there may be no provider. Jason specifically special cased .desktop files so that if you drag one to the dock it ADDS it to the dock, period. That was completely intentional.

Revision history for this message
Chris S. (cszikszoy) wrote :

I see, but why handle desktop files any differently than regular files? If I take a text file or image file, and drag it onto the dock, even if I'm dropping it on top of another Item Provider it will be added to the dock. What seems to happen is that the dropped provider said "idno what to do with this file", and passed it along to the DefaultProvider (the FileApplicationItemProvider present on each dock), which then takes care of it. Surely if it works for every other type of file, it'll work for .destkop files.

I understand what you're saying, I just don't like the idea of DockWindow becoming the "dumping ground" that it already is. We already "special case" so much inside of DockWindow, and there doesn't seem to be a good, legitimate reason as to why we _must_ special case desktop files and put it in DockWindow as well.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.