From fd1b27c3954f5cb915f6a70bdaf27eac3548445a Mon Sep 17 00:00:00 2001 From: FichteFoll Date: Tue, 10 Sep 2019 00:00:37 +0200 Subject: Fix debug printing of URIs in drag_all mode Printing all the URIs sent is not really informative, so just say "we sent them all". --- dragon.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'dragon.c') diff --git a/dragon.c b/dragon.c index debe087..3378ff1 100644 --- a/dragon.c +++ b/dragon.c @@ -84,23 +84,27 @@ void drag_data_get(GtkWidget *widget, gpointer user_data) { struct draggable_thing *dd = (struct draggable_thing *)user_data; if (info == TARGET_TYPE_URI) { - if (verbose) - fprintf(stderr, "Writing as URI: %s\n", dd->uri); char** uris; - if(drag_all){ + if (drag_all) { uri_collection[uri_count] = NULL; uris = uri_collection; } else { char* a[] = {dd->uri, NULL}; uris = a; } + if (verbose) { + if (drag_all) + fputs("Sending all as URI\n", stderr); + else + fprintf(stderr, "Sending as URI: %s\n", dd->uri); + } gtk_selection_data_set_uris(data, uris); g_signal_stop_emission_by_name(widget, "drag-data-get"); } else if (info == TARGET_TYPE_TEXT) { if (verbose) - fprintf(stderr, "Writing as TEXT: %s\n", dd->text); + fprintf(stderr, "Sending as TEXT: %s\n", dd->text); gtk_selection_data_set_text(data, dd->text, -1); } else { fprintf(stderr, "Error: bad target type %i\n", info); -- cgit