mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 19:00:08 +00:00
wayland: Use g_message for logging
g_printerr is not the best for this.
This commit is contained in:
parent
1d2606dc94
commit
845ae20954
@ -77,7 +77,7 @@ gdk_wayland_clipboard_data_source_target (void *data,
|
||||
struct wl_data_source *source,
|
||||
const char *mime_type)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: Huh? data_source.target() events?\n", data));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_message ("%p: Huh? data_source.target() events?", data));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -89,7 +89,7 @@ gdk_wayland_clipboard_write_done (GObject *clipboard,
|
||||
|
||||
if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error))
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), CLIPBOARD, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), CLIPBOARD, g_message ("%p: failed to write stream: %s", clipboard, error->message));
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
@ -103,7 +103,7 @@ gdk_wayland_clipboard_data_source_send (void *data,
|
||||
GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data);
|
||||
GOutputStream *stream;
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source send request for %s on fd %d\n",
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_message ("%p: data source send request for %s on fd %d",
|
||||
source, mime_type, fd));
|
||||
|
||||
mime_type = gdk_intern_mime_type (mime_type);
|
||||
@ -125,7 +125,7 @@ gdk_wayland_clipboard_data_source_cancelled (void *data,
|
||||
{
|
||||
GdkWaylandClipboard *cb = GDK_WAYLAND_CLIPBOARD (data);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source cancelled\n", data));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_message ("%p: data source cancelled", data));
|
||||
|
||||
if (cb->source == source)
|
||||
{
|
||||
@ -139,7 +139,7 @@ gdk_wayland_clipboard_data_source_dnd_drop_performed (void *dat
|
||||
struct wl_data_source *source)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
|
||||
CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_drop_performed() events?\n", data));
|
||||
CLIPBOARD, g_message ("%p: Huh? data_source.dnd_drop_performed() events?", data));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -147,7 +147,7 @@ gdk_wayland_clipboard_data_source_dnd_finished (void *data,
|
||||
struct wl_data_source *source)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
|
||||
CLIPBOARD, g_printerr ("%p: Huh? data_source.dnd_finished() events?\n", data));
|
||||
CLIPBOARD, g_message ("%p: Huh? data_source.dnd_finished() events?", data));
|
||||
}
|
||||
|
||||
static void
|
||||
@ -156,7 +156,7 @@ gdk_wayland_clipboard_data_source_action (void *data,
|
||||
uint32_t action)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)),
|
||||
CLIPBOARD, g_printerr ("%p: Huh? data_source.action() events?\n", data));
|
||||
CLIPBOARD, g_message ("%p: Huh? data_source.action() events?", data));
|
||||
}
|
||||
|
||||
static const struct wl_data_source_listener data_source_listener = {
|
||||
@ -222,7 +222,7 @@ gdk_wayland_clipboard_read_async (GdkClipboard *clipboard,
|
||||
g_task_set_source_tag (task, gdk_wayland_clipboard_read_async);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
|
||||
g_printerr ("%p: read for %s\n", cb, s);
|
||||
g_message ("%p: read for %s", cb, s);
|
||||
g_free (s); );
|
||||
mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats);
|
||||
if (mime_type == NULL)
|
||||
@ -305,7 +305,7 @@ gdk_wayland_clipboard_claim_remote (GdkWaylandClipboard *cb,
|
||||
|
||||
if (cb->source)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_message ("%p: Ignoring clipboard offer for self", cb));
|
||||
gdk_content_formats_unref (formats);
|
||||
return;
|
||||
}
|
||||
@ -313,7 +313,7 @@ gdk_wayland_clipboard_claim_remote (GdkWaylandClipboard *cb,
|
||||
gdk_wayland_clipboard_discard_offer (cb);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
|
||||
g_printerr ("%p: remote clipboard claim for %s\n", cb, s);
|
||||
g_message ("%p: remote clipboard claim for %s", cb, s);
|
||||
g_free (s); );
|
||||
cb->offer_formats = formats;
|
||||
cb->offer = offer;
|
||||
|
@ -336,7 +336,7 @@ gdk_wayland_drag_context_read_async (GdkDragContext *context,
|
||||
g_task_set_source_tag (task, gdk_wayland_drag_context_read_async);
|
||||
|
||||
GDK_DISPLAY_NOTE (display, DND, char *s = gdk_content_formats_to_string (formats);
|
||||
g_printerr ("%p: read for %s\n", context, s);
|
||||
g_message ("%p: read for %s", context, s);
|
||||
g_free (s); );
|
||||
dnd_formats = gdk_wayland_selection_get_targets (display);
|
||||
mime_type = gdk_content_formats_match_mime_type (formats, dnd_formats);
|
||||
|
@ -625,7 +625,7 @@ _gdk_wayland_keymap_update_from_fd (GdkKeymap *keymap,
|
||||
return;
|
||||
}
|
||||
|
||||
GDK_DISPLAY_NOTE (keymap->display, INPUT, g_print ("keymap:\n%s\n", map_str));
|
||||
GDK_DISPLAY_NOTE (keymap->display, INPUT, g_message ("keymap:\n%s", map_str));
|
||||
|
||||
xkb_keymap = xkb_keymap_new_from_string (context, map_str, format, 0);
|
||||
munmap (map_str, size);
|
||||
|
@ -99,7 +99,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
|
||||
|
||||
if (cb->source)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_printerr ("%p: Ignoring clipboard offer for self\n", cb));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, g_message ("%p: Ignoring clipboard offer for self", cb));
|
||||
gdk_content_formats_unref (formats);
|
||||
return;
|
||||
}
|
||||
@ -107,7 +107,7 @@ gdk_wayland_primary_claim_remote (GdkWaylandPrimary *cb,
|
||||
gdk_wayland_primary_discard_offer (cb);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
|
||||
g_printerr ("%p: remote clipboard claim for %s\n", cb, s);
|
||||
g_message ("%p: remote clipboard claim for %s", cb, s);
|
||||
g_free (s); );
|
||||
cb->offer_formats = formats;
|
||||
cb->offer = offer;
|
||||
@ -125,7 +125,7 @@ primary_offer_offer (void *data,
|
||||
|
||||
if (cb->pending != offer)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: offer for unknown selection %p of %s\n",
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_message ("%p: offer for unknown selection %p of %s",
|
||||
cb, offer, type));
|
||||
return;
|
||||
}
|
||||
@ -144,7 +144,7 @@ primary_selection_data_offer (void *data,
|
||||
{
|
||||
GdkWaylandPrimary *cb = data;
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: new primary offer %p\n",
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_message ("%p: new primary offer %p",
|
||||
cb, offer));
|
||||
|
||||
gdk_wayland_primary_discard_pending (cb);
|
||||
@ -173,7 +173,7 @@ primary_selection_selection (void *data,
|
||||
|
||||
if (cb->pending != offer)
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_printerr ("%p: ignoring unknown data offer %p\n",
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (cb)), SELECTION, g_message ("%p: ignoring unknown data offer %p",
|
||||
cb, offer));
|
||||
return;
|
||||
}
|
||||
@ -199,7 +199,7 @@ gdk_wayland_primary_write_done (GObject *clipboard,
|
||||
|
||||
if (!gdk_clipboard_write_finish (GDK_CLIPBOARD (clipboard), result, &error))
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), SELECTION, g_printerr ("%p: failed to write stream: %s\n", clipboard, error->message));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (clipboard)), SELECTION, g_message ("%p: failed to write stream: %s", clipboard, error->message));
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
@ -213,7 +213,7 @@ gdk_wayland_primary_data_source_send (void *data,
|
||||
GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data);
|
||||
GOutputStream *stream;
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), SELECTION, g_printerr ("%p: data source send request for %s on fd %d\n",
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), SELECTION, g_message ("%p: data source send request for %s on fd %d",
|
||||
source, mime_type, fd));
|
||||
|
||||
mime_type = gdk_intern_mime_type (mime_type);
|
||||
@ -235,7 +235,7 @@ gdk_wayland_primary_data_source_cancelled (void *
|
||||
{
|
||||
GdkWaylandPrimary *cb = GDK_WAYLAND_PRIMARY (data);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_printerr ("%p: data source cancelled\n", data));
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (GDK_CLIPBOARD (data)), CLIPBOARD, g_message ("%p: data source cancelled", data));
|
||||
|
||||
if (cb->source == source)
|
||||
{
|
||||
@ -303,7 +303,7 @@ gdk_wayland_primary_read_async (GdkClipboard *clipboard,
|
||||
g_task_set_source_tag (task, gdk_wayland_primary_read_async);
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_clipboard_get_display (clipboard), CLIPBOARD, char *s = gdk_content_formats_to_string (formats);
|
||||
g_printerr ("%p: read for %s\n", cb, s);
|
||||
g_message ("%p: read for %s", cb, s);
|
||||
g_free (s); );
|
||||
mime_type = gdk_content_formats_match_mime_type (formats, cb->offer_formats);
|
||||
if (mime_type == NULL)
|
||||
|
@ -311,7 +311,7 @@ gdk_wayland_drag_context_write_done (GObject *context,
|
||||
|
||||
if (!gdk_drag_context_write_finish (GDK_DRAG_CONTEXT (context), result, &error))
|
||||
{
|
||||
GDK_DISPLAY_NOTE (gdk_drag_context_get_display (GDK_DRAG_CONTEXT (context)), DND, g_printerr ("%p: failed to write stream: %s\n", context, error->message));
|
||||
GDK_DISPLAY_NOTE (gdk_drag_context_get_display (GDK_DRAG_CONTEXT (context)), DND, g_message ("%p: failed to write stream: %s", context, error->message));
|
||||
g_error_free (error);
|
||||
}
|
||||
}
|
||||
@ -329,7 +329,7 @@ data_source_send (void *data,
|
||||
if (!context)
|
||||
return;
|
||||
|
||||
GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND, g_printerr ("%p: data source send request for %s on fd %d\n",
|
||||
GDK_DISPLAY_NOTE (gdk_drag_context_get_display (context), DND, g_message ("%p: data source send request for %s on fd %d\n",
|
||||
source, mime_type, fd));
|
||||
|
||||
//mime_type = gdk_intern_mime_type (mime_type);
|
||||
|
Loading…
Reference in New Issue
Block a user