[Xfce4-commits] [apps/xfce4-dict] 35/43: Fix drag and drop internal data access
noreply at xfce.org
noreply at xfce.org
Tue Nov 1 00:31:48 CET 2016
This is an automated email from the git hooks/post-receive script.
andre pushed a commit to branch master
in repository apps/xfce4-dict.
commit 7448b145f782a0a916755b7d980d72bc6c2d5ebd
Author: Andre Miranda <andre42m at gmail.com>
Date: Mon Aug 22 22:26:00 2016 -0300
Fix drag and drop internal data access
---
lib/common.c | 22 ++++------------------
1 file changed, 4 insertions(+), 18 deletions(-)
diff --git a/lib/common.c b/lib/common.c
index 8a52578..31bc45d 100644
--- a/lib/common.c
+++ b/lib/common.c
@@ -518,27 +518,13 @@ void dict_free_data(DictData *dd)
}
-void dict_drag_data_received(GtkWidget *widget, GdkDragContext *drag_context, gint x, gint y,
+void dict_drag_data_received(GtkWidget *widget, GdkDragContext *context, gint x, gint y,
GtkSelectionData *data, guint info, guint ltime, DictData *dd)
{
- if ((data != NULL) && (data->length >= 0) && (data->format == 8))
+ if ((data != NULL) && (gtk_selection_data_get_length(data) >= 0) && (gtk_selection_data_get_format(data) == 8))
{
-/*
- GtkWidget *source = gtk_drag_get_source_widget(drag_context);
-
- if (widget == dd->main_entry &&
- source != NULL &&
- gtk_widget_get_toplevel(source) == dd->window)
- {
- gtk_entry_set_text(GTK_ENTRY(dd->main_entry), "");
- }
- else
-*/ {
- dict_search_word(dd, (const gchar*) data->data);
- }
-
- drag_context->action = GDK_ACTION_COPY;
- gtk_drag_finish(drag_context, TRUE, FALSE, ltime);
+ dict_search_word(dd, (const gchar*) gtk_selection_data_get_data (data));
+ gtk_drag_finish(context, TRUE, FALSE, ltime);
}
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Xfce4-commits
mailing list