On Thu, 2005-02-10 at 20:11 +0100, Christian Neumair wrote:
> Am Donnerstag, den 10.02.2005, 18:40 +0000 schrieb John Spray:
> > On Thu, 2005-02-10 at 18:09 +0100, Maurizio Colucci wrote:
> > > > b Use menu in statusbar on the left as drag handle
> > >
> > > not discoverable.
> > I think that this is arguably as discoverable as dragging any file in
> > the window: when not expanded the bottom-left menu is just a folder icon
> > with the name next to it. I say this because I attempted to 'discover'
> > precisely this feature when it wasn't there: I tried dragging that menu
> > and was disappointed when it didn't do anything.
>
> After applying this patch, you should be able to drag any focused
> folder's spatial window through it's location button located on the
> bottom left of the window. It will allow you to move, copy or link the
> dragged folder to any other folder, including the trash.
+static void
+location_button_drag_begin_callback (GtkWidget *widget,
+ GdkDragContext *context,
+ NautilusSpatialWindow *window)
+{
+ gtk_drag_set_icon_pixbuf (context, gtk_window_get_icon (GTK_WINDOW
(window)), -2, -2);
+}
+
Don't use the window icon like that, use the real icon for the file at
the right size gotten from NautilusIconFactor.
+static void
+location_button_drag_data_get_callback (GtkWidget *widget,
...
Don't hardcode the format of the gnome icon list like this, instead use
nautilus_drag_data_get. The data you hardcode is wrong too, the icon is
not 1x1 pixels.
+ g_signal_connect (window->details->location_button,
+ "drag-begin",
+ G_CALLBACK (location_button_drag_begin_callback),
+ window);
+ g_signal_connect (window->details->location_button,
+ "drag-data-get",
+ G_CALLBACK (location_button_drag_data_get_callback),
+ window);
We normally use the drag_begin and drag_data_get form of signal names in
Nautilus.
--
nautilus-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/nautilus-list