diff options
author | Matthias Clasen <mclasen@redhat.com> | 2018-07-30 17:59:16 -0400 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2018-07-30 18:12:14 -0400 |
commit | 47928b9e14e070e2a344ebe3892b2538d3caf98b (patch) | |
tree | 5c239937b9bb17477aed2b6c783c10d6489c6ef1 | |
parent | 01f17836ac9095c6118675739ed043fa204ba488 (diff) | |
download | gtk+-47928b9e14e070e2a344ebe3892b2538d3caf98b.tar.gz |
color picker: Better debug spew
This will help in debugging issues.
-rw-r--r-- | gtk/gtkcolorpicker.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/gtk/gtkcolorpicker.c b/gtk/gtkcolorpicker.c index b3ac5dce78..d57ffe016e 100644 --- a/gtk/gtkcolorpicker.c +++ b/gtk/gtkcolorpicker.c @@ -51,9 +51,18 @@ gtk_color_picker_pick_finish (GtkColorPicker *picker, GtkColorPicker * gtk_color_picker_new (void) { + GtkColorPicker *picker; + if (gtk_should_use_portal ()) - return gtk_color_picker_portal_new (); + picker = gtk_color_picker_portal_new (); + else + picker = gtk_color_picker_shell_new (); + + if (picker) + g_debug ("Using %s for picking colors", g_type_name_from_instance (picker)); else - return gtk_color_picker_shell_new (); + g_debug ("No suitable GtkColorPicker implementation\n"); + + return picker; } |