[gimp] Add some temp debug output
- From: Michael Natterer <mitch src gnome org>
- To: svn-commits-list gnome org
- Subject: [gimp] Add some temp debug output
- Date: Tue, 23 Jun 2009 08:00:47 -0400 (EDT)
commit 25963fb1e174da6920cf81941a7b69840eca7ec4
Author: Michael Natterer <mitch gimp org>
Date: Tue Jun 23 14:00:23 2009 +0200
Add some temp debug output
app/tools/gimptexttool.c | 46 ++++++++++++++++++++++++++++++----------------
1 files changed, 30 insertions(+), 16 deletions(-)
---
diff --git a/app/tools/gimptexttool.c b/app/tools/gimptexttool.c
index 917dcc5..a84a4dc 100644
--- a/app/tools/gimptexttool.c
+++ b/app/tools/gimptexttool.c
@@ -382,23 +382,30 @@ gimp_text_tool_init (GimpTextTool *text_tool)
#ifdef TEXT_TOOL_HACK
/* we need this crap because we need some object to call
- * gtk_binding_set_activate() activate with. It takes a GtkObject
- * instead of a GObject. So instead of adding the needed binding
- * signals to GimpTextTool, we abuse a GtkTextView, which has all
- * the needed signals anyway, and connect to its signals. Puke!
+ * gtk_binding_set_activate() with. It takes a GtkObject instead of
+ * a GObject. So instead of adding the needed binding signals to
+ * GimpTextTool, we abuse a GtkTextView, which has all the needed
+ * signals anyway, and connect to its signals. Puke!
*/
- text_tool->proxy_text_view = gtk_text_view_new ();
- g_object_ref_sink (text_tool->proxy_text_view);
-
- g_signal_connect_swapped (text_tool->proxy_text_view, "move-cursor",
- G_CALLBACK (gimp_text_tool_move_cursor),
- text_tool);
- g_signal_connect_swapped (text_tool->proxy_text_view, "delete-from-cursor",
- G_CALLBACK (gimp_text_tool_delete_from_cursor),
- text_tool);
- g_signal_connect_swapped (text_tool->proxy_text_view, "backspace",
- G_CALLBACK (gimp_text_tool_backspace),
- text_tool);
+ {
+ GtkTextBuffer *dummy = gtk_text_buffer_new (NULL);
+
+ text_tool->proxy_text_view = gtk_text_view_new_with_buffer (dummy);
+ g_object_unref (dummy);
+
+ g_object_ref_sink (text_tool->proxy_text_view);
+ gtk_widget_ensure_style (text_tool->proxy_text_view);
+
+ g_signal_connect_swapped (text_tool->proxy_text_view, "move-cursor",
+ G_CALLBACK (gimp_text_tool_move_cursor),
+ text_tool);
+ g_signal_connect_swapped (text_tool->proxy_text_view, "delete-from-cursor",
+ G_CALLBACK (gimp_text_tool_delete_from_cursor),
+ text_tool);
+ g_signal_connect_swapped (text_tool->proxy_text_view, "backspace",
+ G_CALLBACK (gimp_text_tool_backspace),
+ text_tool);
+ }
#endif
}
@@ -1439,6 +1446,13 @@ gimp_text_tool_move_cursor (GimpTextTool *text_tool,
GtkTextIter *sel_start;
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");
+
cursor_mark = gtk_text_buffer_get_insert (text_tool->text_buffer);
selection_mark = gtk_text_buffer_get_selection_bound (text_tool->text_buffer);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]