Fixed a small error.
2006-07-28 Lillian Angel <[EMAIL PROTECTED]>
* native/jni/gtk-peer/GtkDragSourceContextPeer.c:
(Java_gnu_java_awt_dnd_peer_gtk_GtkDragSourceContextPeer_create):
Fixed to use gref not ptr.
On Fri, 2006-07-28 at 12:43 -0400, Lillian Angel wrote:
> Added code to connect the signals to the target widget.
>
> 2006-07-28 Lillian Angel <[EMAIL PROTECTED]>
>
> * native/jni/gtk-peer/GtkDragSourceContextPeer.c:
> Added new static helper function.
> (Java_gnu_java_awt_dnd_peer_gtk_GtkDragSourceContextPeer
> _connectSignals):
> Moved code to connect signals to the helper function.
> (Java_gnu_java_awt_dnd_peer_gtk_GtkDragSourceContextPeer_create):
> Removed ptr field and changed to use global gref.
> (connect_signals_for_widget): Implemented new helper.
> (setTarget): Added call to connect_signals_for_widget.
>
>
> On Fri, 2006-07-28 at 11:53 -0400, Lillian Angel wrote:
> > I have implemented more functions/classes for DnD. It is still a work in
> > progress and the native code is very much under construction, so please
> > don't mind the mess.
> >
> > Now, we are able to drag from a source widget and drag to a target. The
> > target is now recognized. We cannot drop the widget onto the target just
> > yet.
> >
> > 2006-07-28 Lillian Angel <[EMAIL PROTECTED]>
> >
> > * native/jni/gtk-peer/GtkDragSourceContextPeer.c:
> > Added more static functions to handle widget signals.
> > (create): Initialized the javaObj field.
> > (connectSignals): Added code to connect all signals to
> > the appropriate functions and initialized all java
> > function fields.
> > (drag_begin_cb): New callback, not implemented.
> > (drag_motion_cb): Likewise.
> > (drag_data_get_cb): Likewise.
> > (drag_data_delete_cb): Likewise.
> > (drag_drop_cb): Likewise.
> > (drag_end_cb): Likewise.
> > (drag_data_received_cb): Likewise.
> > (setTarget): New function.
> > (nativeStartDrag): Added code to set the destination and source
> > widgets.
> > * java/awt/dnd/DragSource.java
> > (startDrag): Removed FIXME.
> > * java/awt/dnd/DragGestureRecognizer.java
> > (fireDragGestureRecognized): Reset recognizer when events are
> > fired.
> > * java/awt/Component.java
> > (setDropTarget): Added code to create the DropTargetContextPeer.
> > * include/GtkDragSourceContextPeer.h: Regenerated.
> > * gnu/java/awt/dnd/peer/gtk/GtkDropTargetPeer.java: Removed
> > file.
> > * gnu/java/awt/dnd/peer/gtk/GtkDropTargetContextPeer.java
> > (GtkDropTargetContextPeer): Implemented.
> > * gnu/java/awt/dnd/peer/gtk/GtkDragSourceContextPeer.java
> > (GtkDragSourceContextPeer): Added code to set the target.
> >
Index: native/jni/gtk-peer/GtkDragSourceContextPeer.c
===================================================================
RCS file: /cvsroot/classpath/classpath/native/jni/gtk-peer/GtkDragSourceContextPeer.c,v
retrieving revision 1.3
diff -u -r1.3 GtkDragSourceContextPeer.c
--- native/jni/gtk-peer/GtkDragSourceContextPeer.c 28 Jul 2006 16:43:11 -0000 1.3
+++ native/jni/gtk-peer/GtkDragSourceContextPeer.c 28 Jul 2006 16:46:51 -0000
@@ -104,7 +104,7 @@
NSA_SET_GLOBAL_REF (env, comp);
gref = NSA_GET_PTR (env, comp);
- widget = get_widget (GTK_WIDGET (ptr));
+ widget = get_widget (GTK_WIDGET (gref));
gdk_threads_leave ();
}