From 0d01ea4381db7a19905e6fe1da1e23e9386bceeb Mon Sep 17 00:00:00 2001 From: oscfdezdz <42654671+oscfdezdz@users.noreply.github.com> Date: Wed, 24 Jul 2024 16:52:41 +0200 Subject: [PATCH] general: Move log messages from g_print to g_info --- src/editor/editor.c | 8 ++++---- src/format/import-html.c | 6 +++--- src/ui/display.c | 6 +++--- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/src/editor/editor.c b/src/editor/editor.c index 1a9d3d8..a3e4063 100644 --- a/src/editor/editor.c +++ b/src/editor/editor.c @@ -679,7 +679,7 @@ _erase_content (TextFragment *item, } else { - g_print ("Cannot delete a non-opaque inline element"); + g_info ("Cannot delete a non-opaque inline element"); } } @@ -1319,7 +1319,7 @@ text_editor_split_at_mark (TextEditor *self, // TODO: Make supported if (!TEXT_IS_RUN (start)) { - g_print ("Unsupported!\n"); + g_info ("Unsupported!\n"); } else { @@ -1451,7 +1451,7 @@ text_editor_insert_text_at_mark (TextEditor *self, } else { - g_print ("Not supported: Inserting into non-text run\n"); + g_info ("Not supported: Inserting into non-text run\n"); return; } } @@ -1546,7 +1546,7 @@ text_editor_insert_fragment_at_mark (TextEditor *self, } else { - g_print ("Cannot split opaque inline element!\n"); + g_info ("Cannot split opaque inline element!\n"); return; } diff --git a/src/format/import-html.c b/src/format/import-html.c index 3087713..b542d12 100644 --- a/src/format/import-html.c +++ b/src/format/import-html.c @@ -79,7 +79,7 @@ build_text_frame_recursive (xmlNode *nodes, else { // Catch-all for not-yet implemented elements - g_print ("Ignored element %s\n", cur_node->name); + g_info ("Ignored element %s\n", cur_node->name); } } else if (cur_node->type == XML_TEXT_NODE) @@ -134,7 +134,7 @@ format_parse_html (const gchar *html) xmlNode *root; TextFrame *frame; - g_print ("%s\n", html); + g_info ("%s\n", html); doc = htmlParseDoc ((const guchar *)html, "utf-8"); @@ -156,7 +156,7 @@ format_parse_html (const gchar *html) frame = text_frame_new (); - g_print ("Root Node discovered: %s\n", root->name); + g_info ("Root Node discovered: %s\n", root->name); build_text_frame (root, frame); diff --git a/src/ui/display.c b/src/ui/display.c index 0b1738f..5010803 100644 --- a/src/ui/display.c +++ b/src/ui/display.c @@ -224,7 +224,7 @@ text_display_set_property (GObject *object, static void _rebuild_layout_tree (TextDisplay *self, int width) { - g_print ("Rebuilding layout tree\n"); + g_info ("Rebuilding layout tree\n"); if (self->layout_tree) text_node_clear (&self->layout_tree); @@ -912,7 +912,7 @@ commit (GtkIMContext *context, gtk_widget_queue_allocate (GTK_WIDGET (self)); gtk_widget_queue_draw (GTK_WIDGET (self)); - g_print ("commit: %s\n", str); + g_info ("commit: %s\n", str); } static gboolean @@ -1103,7 +1103,7 @@ key_pressed (GtkEventControllerKey *controller, clipboard = gdk_display_get_clipboard (display); text = text_editor_dump_plain_text (self->editor); - g_print ("Saving to clipboard:\nSTART\n%s\nEND\n", text); + g_info ("Saving to clipboard:\nSTART\n%s\nEND\n", text); // "Save" to clipboard for now gdk_clipboard_set_text (clipboard, text);