Re: Dual Drop on to GtkTreeView



On Wed, 2003-06-25 at 18:11, Todd Kulesza wrote:
static const GtkTargetEntry target_table [] =
{
      { "STRING",        0, TARGET_STRING },
      { "text/plain",    0, TARGET_STRING },
      { "text/uri-list", 0, TARGET_URL },
      { "GTK_TREE_MODEL_ROW", GTK_TARGET_SAME_WIDGET, 0 }
};


      view = gtk_tree_view_new_with_model (GTK_TREE_MODEL (store));

      gtk_tree_view_enable_model_drag_source (GTK_TREE_VIEW (view),
                                      GDK_BUTTON1_MASK,
                                      target_table,
                                      G_N_ELEMENTS (target_table),
                                      DK_ACTION_MOVE|GDK_ACTION_COPY);
      gtk_tree_view_enable_model_drag_dest (GTK_TREE_VIEW (view),
                                    target_table,
                                    G_N_ELEMENTS (target_table),
                                    GDK_ACTION_MOVE|GDK_ACTION_COPY);
      g_signal_connect (G_OBJECT (view), "drag_data_received",
                      G_CALLBACK (drag_audio_rcv_cb), store);

yes this looks pretty ok so far from what i wanted to tell you now could
you gimme a peek in the drag_audio_rcv_cb ? i also have a bit
understanding problem with:

"This almost works--if I manually add an item to the view, I can drag
other items over it and then add them to the view. However, you can't
drag the first item into the view, and you can't drag any item into the
empty space at the bottom of the list."

can you describe a bit more in detail ?




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