summaryrefslogtreecommitdiff
path: root/gtk/gtktextlayout.c
diff options
context:
space:
mode:
authorPaolo Borelli <pborelli@katamail.com>2007-11-17 10:18:13 +0000
committerPaolo Borelli <pborelli@src.gnome.org>2007-11-17 10:18:13 +0000
commit540569dadb6e686bf1329a2821fa08c282f16675 (patch)
tree265d7abbb5f57275638b3fd92147738ba2f6f5dc /gtk/gtktextlayout.c
parentabad58b003b933603ebaac98ff28748b4877f33d (diff)
downloadgtk+-540569dadb6e686bf1329a2821fa08c282f16675.tar.gz
Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164.
2007-11-17 Paolo Borelli <pborelli@katamail.com> * gtk/gtktextbuffer.c: * gtk/gtktextlayout.c: * gtk/gtktextview.c: Use gtk_text_buffer_get_insert instead of get_mark. Fixes Bug 497164. svn path=/trunk/; revision=18997
Diffstat (limited to 'gtk/gtktextlayout.c')
-rw-r--r--gtk/gtktextlayout.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/gtk/gtktextlayout.c b/gtk/gtktextlayout.c
index f09a04d9a8..3fab37d269 100644
--- a/gtk/gtktextlayout.c
+++ b/gtk/gtktextlayout.c
@@ -519,7 +519,7 @@ gtk_text_layout_set_cursor_visible (GtkTextLayout *layout,
/* Now queue a redraw on the paragraph containing the cursor
*/
gtk_text_buffer_get_iter_at_mark (layout->buffer, &iter,
- gtk_text_buffer_get_mark (layout->buffer, "insert"));
+ gtk_text_buffer_get_insert (layout->buffer));
gtk_text_layout_get_line_yrange (layout, &iter, &y, &height);
gtk_text_layout_emit_changed (layout, y, height, height);
@@ -859,8 +859,8 @@ gtk_text_layout_update_cursor_line(GtkTextLayout *layout)
GtkTextIter iter;
gtk_text_buffer_get_iter_at_mark (layout->buffer, &iter,
- gtk_text_buffer_get_mark (layout->buffer, "insert"));
-
+ gtk_text_buffer_get_insert (layout->buffer));
+
priv->cursor_line = _gtk_text_iter_get_text_line (&iter);
}
@@ -954,8 +954,6 @@ gtk_text_layout_real_free_line_data (GtkTextLayout *layout,
g_free (line_data);
}
-
-
/**
* gtk_text_layout_is_valid:
* @layout: a #GtkTextLayout
@@ -1432,7 +1430,6 @@ gtk_text_attr_appearance_compare (const PangoAttribute *attr1,
appearance1->underline == appearance2->underline &&
appearance1->strikethrough == appearance2->strikethrough &&
appearance1->draw_bg == appearance2->draw_bg);
-
}
/**
@@ -1474,7 +1471,6 @@ gtk_text_attr_appearance_new (const GtkTextAppearance *appearance)
return (PangoAttribute *)result;
}
-
static void
add_generic_attrs (GtkTextLayout *layout,
GtkTextAppearance *appearance,
@@ -2721,8 +2717,7 @@ gtk_text_layout_get_cursor_locations (GtkTextLayout *layout,
line, layout);
gtk_text_buffer_get_iter_at_mark (layout->buffer, &insert_iter,
- gtk_text_buffer_get_mark (layout->buffer,
- "insert"));
+ gtk_text_buffer_get_insert (layout->buffer));
if (gtk_text_iter_equal (iter, &insert_iter))
index += layout->preedit_cursor - layout->preedit_len;