[gtk+] file chooser button: Make dnd work as expected
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] file chooser button: Make dnd work as expected
- Date: Fri, 30 Jan 2015 02:29:33 +0000 (UTC)
commit 0367f785efe42954b3b889c8bd9decdb1b72a930
Author: Matthias Clasen <mclasen redhat com>
Date: Wed Jan 28 22:36:47 2015 -0500
file chooser button: Make dnd work as expected
Update the button contents when accepting a drop.
https://bugzilla.gnome.org/show_bug.cgi?id=743451
gtk/gtkfilechooserbutton.c | 6 ++----
1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gtk/gtkfilechooserbutton.c b/gtk/gtkfilechooserbutton.c
index 455d217..810e542 100644
--- a/gtk/gtkfilechooserbutton.c
+++ b/gtk/gtkfilechooserbutton.c
@@ -1126,8 +1126,7 @@ dnd_select_folder_get_info_cb (GCancellable *cancellable,
data->selected =
(((data->action == GTK_FILE_CHOOSER_ACTION_SELECT_FOLDER && is_folder) ||
(data->action == GTK_FILE_CHOOSER_ACTION_OPEN && !is_folder)) &&
- gtk_file_chooser_select_file (GTK_FILE_CHOOSER (data->button->priv->dialog),
- data->file, NULL));
+ gtk_file_chooser_select_file (GTK_FILE_CHOOSER (data->button), data->file, NULL));
}
else
data->selected = FALSE;
@@ -1217,8 +1216,7 @@ gtk_file_chooser_button_drag_data_received (GtkWidget *widget,
case TEXT_PLAIN:
text = (char*) gtk_selection_data_get_text (data);
file = g_file_new_for_uri (text);
- gtk_file_chooser_select_file (GTK_FILE_CHOOSER (priv->dialog), file,
- NULL);
+ gtk_file_chooser_select_file (GTK_FILE_CHOOSER (priv->dialog), file, NULL);
g_object_unref (file);
g_free (text);
g_signal_emit (button, file_chooser_button_signals[FILE_SET], 0);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]