57 lines
2.0 KiB
Diff
57 lines
2.0 KiB
Diff
--- gtk/gtktextview.c
|
|
+++ gtk/gtktextview.c
|
|
@@ -5827,26 +5827,6 @@
|
|
"allocate_child",
|
|
G_CALLBACK (gtk_text_view_child_allocated),
|
|
text_view);
|
|
-
|
|
- if (get_buffer (text_view))
|
|
- gtk_text_layout_set_buffer (text_view->layout, get_buffer (text_view));
|
|
-
|
|
- if ((GTK_WIDGET_HAS_FOCUS (text_view) && text_view->cursor_visible))
|
|
- gtk_text_view_pend_cursor_blink (text_view);
|
|
- else
|
|
- gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
|
|
-
|
|
- ltr_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
- pango_context_set_base_dir (ltr_context, PANGO_DIRECTION_LTR);
|
|
- rtl_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
- pango_context_set_base_dir (rtl_context, PANGO_DIRECTION_RTL);
|
|
-
|
|
- gtk_text_layout_set_contexts (text_view->layout, ltr_context, rtl_context);
|
|
-
|
|
- g_object_unref (ltr_context);
|
|
- g_object_unref (rtl_context);
|
|
-
|
|
- gtk_text_view_check_keymap_direction (text_view);
|
|
|
|
style = gtk_text_attributes_new ();
|
|
|
|
@@ -5870,6 +5850,26 @@
|
|
|
|
gtk_text_attributes_unref (style);
|
|
|
|
+ if (get_buffer (text_view))
|
|
+ gtk_text_layout_set_buffer (text_view->layout, get_buffer (text_view));
|
|
+
|
|
+ if ((GTK_WIDGET_HAS_FOCUS (text_view) && text_view->cursor_visible))
|
|
+ gtk_text_view_pend_cursor_blink (text_view);
|
|
+ else
|
|
+ gtk_text_layout_set_cursor_visible (text_view->layout, FALSE);
|
|
+
|
|
+ ltr_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
+ pango_context_set_base_dir (ltr_context, PANGO_DIRECTION_LTR);
|
|
+ rtl_context = gtk_widget_create_pango_context (GTK_WIDGET (text_view));
|
|
+ pango_context_set_base_dir (rtl_context, PANGO_DIRECTION_RTL);
|
|
+
|
|
+ gtk_text_layout_set_contexts (text_view->layout, ltr_context, rtl_context);
|
|
+
|
|
+ g_object_unref (ltr_context);
|
|
+ g_object_unref (rtl_context);
|
|
+
|
|
+ gtk_text_view_check_keymap_direction (text_view);
|
|
+
|
|
/* Set layout for all anchored children */
|
|
|
|
tmp_list = text_view->children;
|