Re: TreeModelFilter + drag and drop
- From: asterix <asterix lagaule org>
- To: Kristian Rietveld <kris imendio com>
- Cc: gtk-list gnome org
- Subject: Re: TreeModelFilter + drag and drop
- Date: Wed, 21 Nov 2007 15:06:15 +0100
On Wed, Nov 21, 2007 at 11:33:34AM +0100, Kristian Rietveld wrote:
> On Tue, Nov 20, 2007 at 11:06:41AM +0100, Yann Leboulanger wrote:
> > I just had a look at gtktreemodelfilter.c in gtk+-2.10.14, and I don't
> > see what has to be done. gtk_tree_model_filter_row_draggable,
> > gtk_tree_model_filter_drag_data_get,
> > gtk_tree_model_filter_drag_data_delete functions have code, and there is
> > no more function in tree gtktreemodelsort.c about TreeDragSource interface.
> > What did I miss?
>
> Woops, my bad; I was under the impression that the GtkTreeModelSort did
> implement the GtkTreeDragDest interface, but it doesn't. The
> GtkTreeModelFilter in maemo-gtk does have an implementation of the
> GtkTreeDragDest interface, you can look here for an example
> implementation of that interface:
>
> https://stage.maemo.org/svn/maemo/projects/haf/trunk/gtk+/gtk/gtktreemodelfilter.c
>
Ok, I see now. Unfortunatly that doesn't seem an option for me. I use
python bindings, and I can't create a sub-class of TreeModelFilter. The
only way to create a TreeModelfilter in PyGTK is to call a
model.filter_new().
Anyway thanks for your replies, I'll go with drag_drop signal, get
selection_data with gtk.Widget.drag_get_data, get the position with
gtk.TreeView.get_dest_row_at_pos, call context.finish() and stop the
propagation of the event.
does that sound a reasonable way to do that?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]