[Spice-devel] [spice-gtk v1 6/7] gtk-session: better debug GdkAtoms that are parsed

Victor Toso victortoso at redhat.com
Wed Feb 22 13:11:11 UTC 2017


From: Victor Toso <me at victortoso.com>

By including what is discarded or not.
To improve coherence, using prefix 'saving' and 'discarding' to both
debug messages:

 > saving:'image/bmp'
 > discarding:'application/x-openoffice-bitmap;windows_formatname="Bitmap"'
 > saving:'image/png'
 > discarding:'application/x-openoffice-wmf;windows_formatname="Image WMF"'

Signed-off-by: Victor Toso <victortoso at redhat.com>
---
 src/spice-gtk-session.c | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/spice-gtk-session.c b/src/spice-gtk-session.c
index 8682229..cd546d3 100644
--- a/src/spice-gtk-session.c
+++ b/src/spice-gtk-session.c
@@ -645,7 +645,7 @@ static void clipboard_get_targets(GtkClipboard *clipboard,
                 }
                 if (types[t] == 0) {
                     /* add type to empty slot */
-                    SPICE_DEBUG("'%s'", name);
+                    SPICE_DEBUG("saving:'%s'", name);
                     types[t] = atom2agent[m].vdagent;
                     num_types++;
                     break;
@@ -653,6 +653,10 @@ static void clipboard_get_targets(GtkClipboard *clipboard,
             }
             break;
         }
+
+        if (m == SPICE_N_ELEMENTS(atom2agent))
+            SPICE_DEBUG("discarding:'%s'", name);
+
         g_free(name);
     }
 
-- 
2.9.3



More information about the Spice-devel mailing list