Commit 48afbb90 authored by Matthias Clasen's avatar Matthias Clasen Committed by Matthias Clasen

Add uri targets before text targets, to make file dnd work better.

2004-11-08  Matthias Clasen  <mclasen@redhat.com>

	* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_init): Add
	uri targets before text targets, to make file dnd work
	better.  (#157651, Christian Persch)
parent 2d016f21
2004-11-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_init): Add
uri targets before text targets, to make file dnd work
better. (#157651, Christian Persch)
* gtk/gtktreedatalist.c: Support columns whose declared type is
an interface better, by treating them like G_TYPE_OBJECT if
the interface types requires G_TYPE_OBJECT.
......
2004-11-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_init): Add
uri targets before text targets, to make file dnd work
better. (#157651, Christian Persch)
* gtk/gtktreedatalist.c: Support columns whose declared type is
an interface better, by treating them like G_TYPE_OBJECT if
the interface types requires G_TYPE_OBJECT.
......
2004-11-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_init): Add
uri targets before text targets, to make file dnd work
better. (#157651, Christian Persch)
* gtk/gtktreedatalist.c: Support columns whose declared type is
an interface better, by treating them like G_TYPE_OBJECT if
the interface types requires G_TYPE_OBJECT.
......
2004-11-08 Matthias Clasen <mclasen@redhat.com>
* gtk/gtkfilechooserbutton.c (gtk_file_chooser_button_init): Add
uri targets before text targets, to make file dnd work
better. (#157651, Christian Persch)
* gtk/gtktreedatalist.c: Support columns whose declared type is
an interface better, by treating them like G_TYPE_OBJECT if
the interface types requires G_TYPE_OBJECT.
......
......@@ -308,6 +308,7 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
{
GtkFileChooserButtonPrivate *priv;
GtkWidget *box, *image, *sep;
GtkTargetList *target_list;
gtk_box_set_spacing (GTK_BOX (button), ENTRY_BUTTON_SPACING);
......@@ -377,9 +378,11 @@ gtk_file_chooser_button_init (GtkFileChooserButton *button)
(GTK_DEST_DEFAULT_ALL),
NULL, 0,
GDK_ACTION_COPY);
gtk_drag_dest_add_text_targets (GTK_WIDGET (button));
gtk_target_list_add_uri_targets (gtk_drag_dest_get_target_list (GTK_WIDGET (button)),
TEXT_URI_LIST);
target_list = gtk_target_list_new (NULL, 0);
gtk_target_list_add_uri_targets (target_list, TEXT_URI_LIST);
gtk_target_list_add_text_targets (target_list, TEXT_PLAIN);
gtk_drag_dest_set_target_list (GTK_WIDGET (button), target_list);
gtk_target_list_unref (target_list);
}
......@@ -677,7 +680,7 @@ gtk_file_chooser_button_drag_data_received (GtkWidget *widget,
gboolean selected;
uris = gtk_selection_data_get_uris (data);
if (uris == NULL)
break;
......@@ -1671,14 +1674,16 @@ update_idler (gpointer user_data)
{
GtkFileChooserButtonPrivate *priv;
gboolean retval;
gint start, end;
GDK_THREADS_ENTER ();
priv = GTK_FILE_CHOOSER_BUTTON_GET_PRIVATE (user_data);
if (!gtk_editable_get_selection_bounds (GTK_EDITABLE (priv->entry),
NULL, NULL))
&start, &end))
{
g_print ("updating dialog\n");
g_signal_handler_block (priv->dialog,
priv->dialog_selection_changed_id);
update_dialog (user_data);
......@@ -1690,7 +1695,10 @@ update_idler (gpointer user_data)
retval = FALSE;
}
else
retval = TRUE;
{
g_print ("start %d end %d\n", start, end);
retval = TRUE;
}
GDK_THREADS_LEAVE ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment