summaryrefslogtreecommitdiff
path: root/gtk/gtktextbuffer.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/gtktextbuffer.c
parentabad58b003b933603ebaac98ff28748b4877f33d (diff)
downloadgdk-pixbuf-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/gtktextbuffer.c')
-rw-r--r--gtk/gtktextbuffer.c34
1 files changed, 9 insertions, 25 deletions
diff --git a/gtk/gtktextbuffer.c b/gtk/gtktextbuffer.c
index 12f34de12..ed34f9bf3 100644
--- a/gtk/gtktextbuffer.c
+++ b/gtk/gtktextbuffer.c
@@ -918,8 +918,7 @@ gtk_text_buffer_insert_at_cursor (GtkTextBuffer *buffer,
g_return_if_fail (text != NULL);
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
- gtk_text_buffer_get_mark (buffer,
- "insert"));
+ gtk_text_buffer_get_insert (buffer));
gtk_text_buffer_insert (buffer, &iter, text, len);
}
@@ -993,8 +992,7 @@ gtk_text_buffer_insert_interactive_at_cursor (GtkTextBuffer *buffer,
g_return_val_if_fail (text != NULL, FALSE);
gtk_text_buffer_get_iter_at_mark (buffer, &iter,
- gtk_text_buffer_get_mark (buffer,
- "insert"));
+ gtk_text_buffer_get_insert (buffer));
return gtk_text_buffer_insert_interactive (buffer, &iter, text, len,
default_editable);
@@ -1416,7 +1414,6 @@ gtk_text_buffer_insert_range_interactive (GtkTextBuffer *buffer,
g_return_val_if_fail (gtk_text_iter_get_buffer (start)->tag_table ==
buffer->tag_table, FALSE);
-
if (gtk_text_iter_can_insert (iter, default_editable))
{
gtk_text_buffer_real_insert_range (buffer, iter, start, end, TRUE);
@@ -1744,9 +1741,7 @@ gtk_text_buffer_delete_interactive (GtkTextBuffer *buffer,
g_assert (!current_state && new_state);
- gtk_text_buffer_move_mark (buffer, start_mark,
- &iter);
-
+ gtk_text_buffer_move_mark (buffer, start_mark, &iter);
current_state = TRUE;
}
@@ -1755,7 +1750,6 @@ gtk_text_buffer_delete_interactive (GtkTextBuffer *buffer,
break;
}
-
gtk_text_buffer_delete_mark (buffer, start_mark);
gtk_text_buffer_delete_mark (buffer, end_mark);
@@ -1931,7 +1925,6 @@ gtk_text_buffer_insert_child_anchor (GtkTextBuffer *buffer,
iter, anchor);
}
-
/**
* gtk_text_buffer_create_child_anchor:
* @buffer: a #GtkTextBuffer
@@ -2221,7 +2214,6 @@ gtk_text_buffer_get_mark (GtkTextBuffer *buffer,
return mark;
}
-
/**
* gtk_text_buffer_move_mark_by_name:
* @buffer: a #GtkTextBuffer
@@ -2368,7 +2360,6 @@ gtk_text_buffer_place_cursor (GtkTextBuffer *buffer,
gtk_text_buffer_select_range (buffer, where, where);
}
-
/**
* gtk_text_buffer_select_range:
* @buffer: a #GtkTextBuffer
@@ -2400,11 +2391,9 @@ gtk_text_buffer_select_range (GtkTextBuffer *buffer,
_gtk_text_btree_select_range (get_btree (buffer), &real_ins, &real_bound);
gtk_text_buffer_mark_set (buffer, &real_ins,
- gtk_text_buffer_get_mark (buffer,
- "insert"));
+ gtk_text_buffer_get_insert (buffer));
gtk_text_buffer_mark_set (buffer, &real_bound,
- gtk_text_buffer_get_mark (buffer,
- "selection_bound"));
+ gtk_text_buffer_get_selection_bound (buffer));
}
/*
@@ -2551,7 +2540,6 @@ gtk_text_buffer_emit_tag (GtkTextBuffer *buffer,
tag, &start_tmp, &end_tmp);
}
-
/**
* gtk_text_buffer_apply_tag:
* @buffer: a #GtkTextBuffer
@@ -2609,7 +2597,6 @@ gtk_text_buffer_remove_tag (GtkTextBuffer *buffer,
gtk_text_buffer_emit_tag (buffer, tag, FALSE, start, end);
}
-
/**
* gtk_text_buffer_apply_tag_by_name:
* @buffer: a #GtkTextBuffer
@@ -3091,13 +3078,13 @@ clipboard_clear_selection_cb (GtkClipboard *clipboard,
GtkTextBuffer *buffer = GTK_TEXT_BUFFER (data);
gtk_text_buffer_get_iter_at_mark (buffer, &insert,
- gtk_text_buffer_get_mark (buffer, "insert"));
+ gtk_text_buffer_get_insert (buffer));
gtk_text_buffer_get_iter_at_mark (buffer, &selection_bound,
- gtk_text_buffer_get_mark (buffer, "selection_bound"));
+ gtk_text_buffer_get_selection_bound (buffer));
if (!gtk_text_iter_equal (&insert, &selection_bound))
gtk_text_buffer_move_mark (buffer,
- gtk_text_buffer_get_mark (buffer, "selection_bound"),
+ gtk_text_buffer_get_selection_bound (buffer),
&insert);
}
@@ -3263,8 +3250,7 @@ get_paste_point (GtkTextBuffer *buffer,
else
{
gtk_text_buffer_get_iter_at_mark (buffer, &insert_point,
- gtk_text_buffer_get_mark (buffer,
- "insert"));
+ gtk_text_buffer_get_insert (buffer));
}
*iter = insert_point;
@@ -3998,7 +3984,6 @@ gtk_text_buffer_copy_clipboard (GtkTextBuffer *buffer,
gtk_text_buffer_end_user_action (buffer);
}
-
/**
* gtk_text_buffer_get_selection_bounds:
* @buffer: a #GtkTextBuffer a #GtkTextBuffer
@@ -4216,7 +4201,6 @@ struct _CacheEntry
PangoLogAttr *attrs;
};
-
struct _GtkTextLogAttrCache
{
gint chars_changed_stamp;