diff options
author | FichteFoll <fichtefoll2@googlemail.com> | 2019-09-10 00:00:37 +0200 |
---|---|---|
committer | Michael Homer <mwh@ecs.vuw.ac.nz> | 2019-11-02 12:58:18 +1300 |
commit | fd1b27c3954f5cb915f6a70bdaf27eac3548445a (patch) | |
tree | cc13531e2a3895bac8d03cf7f704062dc632ec04 /dragon.c | |
parent | uri_collection needs to hold one more item than max (diff) | |
download | dragon-fd1b27c3954f5cb915f6a70bdaf27eac3548445a.tar.gz dragon-fd1b27c3954f5cb915f6a70bdaf27eac3548445a.tar.bz2 dragon-fd1b27c3954f5cb915f6a70bdaf27eac3548445a.zip |
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".
Diffstat (limited to 'dragon.c')
-rw-r--r-- | dragon.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -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); |