Branch: refs/heads/master Author: Colomban Wendling ban@herbesfolles.org Committer: Colomban Wendling ban@herbesfolles.org Date: Thu, 13 Sep 2012 14:34:18 Commit: 8b181f7c79673350803891d4d6bd70a7af62eb29 https://github.com/geany/geany/commit/8b181f7c79673350803891d4d6bd70a7af62eb...
Log Message: ----------- Don't access GtkSelectionData fields directly
Modified Paths: -------------- src/notebook.c src/toolbar.c src/vte.c
Modified: src/notebook.c 5 files changed, 3 insertions(+), 2 deletions(-) =================================================================== @@ -776,15 +776,16 @@ void notebook_remove_page(gint page_num) guint event_time, gpointer user_data) { gboolean success = FALSE; + gint length = gtk_selection_data_get_length(data);
- if (data->length > 0 && data->format == 8) + if (length > 0 && gtk_selection_data_get_format(data) == 8) { if (drag_context->action == GDK_ACTION_ASK) { drag_context->action = GDK_ACTION_COPY; }
- document_open_file_list((const gchar *)data->data, data->length); + document_open_file_list((const gchar *)gtk_selection_data_get_data(data), length);
success = TRUE; }
Modified: src/toolbar.c 4 files changed, 2 insertions(+), 2 deletions(-) =================================================================== @@ -809,12 +809,12 @@ static void tb_editor_drag_data_rcvd_cb(GtkWidget *widget, GdkDragContext *conte GtkTreeView *tree = GTK_TREE_VIEW(widget); gboolean del = FALSE;
- if (data->length >= 0 && data->format == 8) + if (gtk_selection_data_get_length(data) >= 0 && gtk_selection_data_get_format(data) == 8) { gboolean is_sep; gchar *text = NULL;
- text = (gchar*) data->data; + text = (gchar*) gtk_selection_data_get_data(data); is_sep = utils_str_equal(text, TB_EDITOR_SEPARATOR); /* If the source of the action is equal to the target, we do just re-order and so need * to delete the separator to get it moved, not just copied. */
Modified: src/vte.c 5 files changed, 3 insertions(+), 2 deletions(-) =================================================================== @@ -684,9 +684,10 @@ static void vte_drag_data_received(GtkWidget *widget, GdkDragContext *drag_conte { if (info == TARGET_TEXT_PLAIN) { - if (data->format == 8 && data->length > 0) + if (gtk_selection_data_get_format(data) == 8 && gtk_selection_data_get_length(data) > 0) vf->vte_terminal_feed_child(VTE_TERMINAL(widget), - (const gchar*) data->data, data->length); + (const gchar*) gtk_selection_data_get_data(data), + gtk_selection_data_get_length(data)); } else {
@@ Diff output truncated at 100000 characters. @@
-------------- This E-Mail was brought to you by github_commit_mail.py (Source: TBD).