[pygtk] yet another gtk.Notebook question

John Finlay finlay at moeraki.com
Mon May 7 08:28:46 WST 2007


N. Volbers wrote:
> After having solved my first problem, I now have another one:
>
> When I retrieve a drag-drop event, I would like to know, which notebook
> tab was dropped. In the C API, the example looks like this:
>
>  static void
>  on_drop_zone_drag_data_received (GtkWidget        *widget,
>                                   GdkDragContext   *context,
>                                   gint              x,
>                                   gint              y,
>                                   GtkSelectionData *selection_data,
>                                   guint             info,
>                                   guint             time,
>                                   gpointer          user_data)
>  {
>    GtkWidget *notebook;
>    GtkWidget **child;
>
>    notebook = gtk_drag_get_source_widget (context);
>    child = (void*) selection_data->data;
>
>    process_widget (*child);
>    gtk_container_remove (GTK_CONTAINER (notebook), *child);
>  }
>
>
> However, the pygtk equivalent only accepts the arguments context, x, y,
> time.
>
> How can I get the child widget as shown above?
>
>   
Connect to the "drag-data-received" signal.


More information about the pygtk mailing list