Commit c5298c88 authored by Jiri (George) Lebl's avatar Jiri (George) Lebl Committed by George Lebl

dnd code in, but it doesn't work, needs a bit of work I guess:)

Fri Mar 27 01:48:57 1998  George Lebl  <jirka@5z.com>

        * panel-widget.c: dnd code in, but it doesn't work, needs
          a bit of work I guess:)
parent 8062eadc
Fri Mar 27 01:48:57 1998 George Lebl <jirka@5z.com>
* panel-widget.c: dnd code in, but it doesn't work, needs
a bit of work I guess:)
Wed Mar 25 23:32:47 1998 George Lebl <jirka@5z.com>
* panel-widget.c: implemented drop support (no drag yet:)
......
Fri Mar 27 01:48:57 1998 George Lebl <jirka@5z.com>
* panel-widget.c: dnd code in, but it doesn't work, needs
a bit of work I guess:)
Wed Mar 25 23:32:47 1998 George Lebl <jirka@5z.com>
* panel-widget.c: implemented drop support (no drag yet:)
......
......@@ -9,6 +9,7 @@ static void panel_widget_init (PanelWidget *panel_widget);
static GdkCursor *fleur_cursor;
static char *applet_drop_types[]={"internal/pointer"};
static char *applet_drag_types[]={"internal/pointer"};
#define APPLET_EVENT_MASK (GDK_BUTTON_PRESS_MASK | \
GDK_BUTTON_RELEASE_MASK | \
......@@ -1508,6 +1509,18 @@ bind_top_applet_events(PanelWidget *panel, GtkWidget *widget)
bind_applet_events, 0);
}
static gint
panel_widget_dnd_drag_request(GtkWidget *widget, GdkEvent *event, gpointer data)
{
gtk_widget_dnd_data_set (widget, event, &widget, sizeof(widget));
puts("test");
return TRUE;
}
gint
panel_widget_add (PanelWidget *panel, GtkWidget *applet, gint pos)
......@@ -1565,6 +1578,14 @@ panel_widget_add (PanelWidget *panel, GtkWidget *applet, gint pos)
bind_top_applet_events(panel,applet);
/*set up drag'n'drop (the drag)*/
gtk_signal_connect (GTK_OBJECT (panel),
"drag_request_event",
GTK_SIGNAL_FUNC(panel_widget_dnd_drag_request),
NULL);
gtk_widget_dnd_drag_set (GTK_WIDGET(panel), TRUE,
applet_drag_types, 1);
return i;
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment