Re: gtk_drag_dest_set & GtkTargetList*



On 27 Mar 2001 10:08:57 -0500, Owen Taylor wrote:
>
> monkeyiq dingoblue net au writes:
>
> > Hi,
> > I noticed that there is this function, but there seems no version
> > that takes the
> > (new?) TargetList style.
> >
> > void gtk_drag_dest_set (GtkWidget *widget,
> > GtkDestDefaults flags,
> > const GtkTargetEntry *targets,
> > gint n_targets,
> > GdkDragAction actions);
> >
> > I can make a version quite easily, but it calls a static function in
> > gtk, and so the new
> > gtk_drag_dest_set_targetlist() would need to be in gtk+ also for this to
> > work.
> >
> > Are there any plans for such a function or am I doing something wrong?
>
> Well, it wasn't originally there because the targets supplied ares just a
> convenience, and you can do all the handling yourself in your
> "drag_motion", "drag_drop" handlers if you omit GTK_DEST_DEFAULT_MOTION,
> GTK_DEST_DEFAULT_DROP from flags.
>
> OTOH, GTK+-2.0 does add:
>
> GtkTargetList* gtk_drag_dest_get_target_list (GtkWidget *widget);
> void gtk_drag_dest_set_target_list (GtkWidget *widget,
>                                                GtkTargetList  *target_list);
After looking through gtkdnd.c for both 1.2.8 and 1.3.2 I see the comment

/* There probably should be functions for setting the targets
* as a GtkTargetList
*/

And in both gtk_drag_begin() is the only function to support this new style. The above called mentioned
by owen must be in gtk+ cvs || >1.3.2

Would it be acceptable to create a patch for 1.2.9 that adds these functions? If so, when is the planned
release of gtk+-1.2.10 so that I can assume these functions are available to people who haven't patched
their gtk+ just to build my app?










[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]