Commit 5c9b660c authored by Michael Natterer's avatar Michael Natterer 😴

app: turn text editing debug spew into proper GIMP_LOG() output

parent 5794041c
......@@ -49,6 +49,7 @@ gimp_log_init (void)
{ "scale", GIMP_LOG_SCALE },
{ "wm", GIMP_LOG_WM },
{ "floating-selection", GIMP_LOG_FLOATING_SELECTION },
{ "text-editing", GIMP_LOG_TEXT_EDITING },
{ "shm", GIMP_LOG_SHM }
};
......
......@@ -33,7 +33,8 @@ typedef enum
GIMP_LOG_SCALE = 1 << 9,
GIMP_LOG_WM = 1 << 10,
GIMP_LOG_FLOATING_SELECTION = 1 << 11,
GIMP_LOG_SHM = 1 << 12
GIMP_LOG_SHM = 1 << 12,
GIMP_LOG_TEXT_EDITING = 1 << 13
} GimpLogFlags;
......@@ -87,6 +88,7 @@ void gimp_logv (const gchar *function,
#define WM GIMP_LOG_WM
#define FLOATING_SELECTION GIMP_LOG_FLOATING_SELECTION
#define SHM GIMP_LOG_SHM
#define TEXT_EDITING GIMP_LOG_TEXT_EDITING
#if 0 /* last resort */
# define GIMP_LOG /* nothing => no varargs, no log */
......
......@@ -45,6 +45,7 @@
#include "gimptexttool.h"
#include "gimptexttool-editor.h"
#include "gimp-log.h"
#include "gimp-intl.h"
......@@ -185,7 +186,8 @@ gimp_text_tool_editor_key_press (GimpTextTool *text_tool,
if (gtk_bindings_activate_event (GTK_OBJECT (text_tool->proxy_text_view),
kevent))
{
g_printerr ("binding handled event!\n");
GIMP_LOG (TEXT_EDITING, "binding handled event");
return TRUE;
}
......@@ -338,12 +340,11 @@ gimp_text_tool_move_cursor (GimpTextTool *text_tool,
gboolean cancel_selection = FALSE;
gint x_pos = -1;
g_printerr ("%s: %s count = %d, select = %s\n",
G_STRFUNC,
g_enum_get_value (g_type_class_ref (GTK_TYPE_MOVEMENT_STEP),
step)->value_name,
count,
extend_selection ? "TRUE" : "FALSE");
GIMP_LOG (TEXT_EDITING, "%s count = %d, select = %s",
g_enum_get_value (g_type_class_ref (GTK_TYPE_MOVEMENT_STEP),
step)->value_name,
count,
extend_selection ? "TRUE" : "FALSE");
gtk_text_buffer_get_iter_at_mark (buffer, &cursor,
gtk_text_buffer_get_insert (buffer));
......@@ -580,11 +581,10 @@ gimp_text_tool_delete_from_cursor (GimpTextTool *text_tool,
GtkTextIter cursor;
GtkTextIter end;
g_printerr ("%s: %s count = %d\n",
G_STRFUNC,
g_enum_get_value (g_type_class_ref (GTK_TYPE_DELETE_TYPE),
type)->value_name,
count);
GIMP_LOG (TEXT_EDITING, "%s count = %d",
g_enum_get_value (g_type_class_ref (GTK_TYPE_DELETE_TYPE),
type)->value_name,
count);
gtk_text_buffer_get_iter_at_mark (buffer, &cursor,
gtk_text_buffer_get_insert (buffer));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment