mirror of
https://gitlab.gnome.org/GNOME/gtk.git
synced 2024-11-10 02:40:11 +00:00
use gtk_text_layout_invalidate_cache instead of cut-and-paste
2002-04-30 Havoc Pennington <hp@redhat.com> * gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use gtk_text_layout_invalidate_cache instead of cut-and-paste (gtk_text_layout_real_invalidate): always invalidate cache, even if the line has no stored line data. #78573 * gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to gtk_text_view_ensure_layout, #77388 (gtk_text_view_get_iter_at_location): ditto (gtk_text_view_get_line_yrange): ditto (gtk_text_view_get_line_at_y): ditto
This commit is contained in:
parent
fbd163525e
commit
eccf6735c9
13
ChangeLog
13
ChangeLog
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -29,6 +29,19 @@ Tue Apr 30 14:15:14 2002 Owen Taylor <otaylor@redhat.com>
|
||||
* gdk/x11/gdkimage-x11.c : rationalized multihead code
|
||||
in _gdk_x11_copy_to_image. fixes #80256 and ungrab problems.
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextlayout.c (gtk_text_layout_real_free_line_data): use
|
||||
gtk_text_layout_invalidate_cache instead of cut-and-paste
|
||||
(gtk_text_layout_real_invalidate): always invalidate cache, even
|
||||
if the line has no stored line data. #78573
|
||||
|
||||
* gtk/gtktextview.c (gtk_text_view_get_iter_location): add call to
|
||||
gtk_text_view_ensure_layout, #77388
|
||||
(gtk_text_view_get_iter_at_location): ditto
|
||||
(gtk_text_view_get_line_yrange): ditto
|
||||
(gtk_text_view_get_line_at_y): ditto
|
||||
|
||||
2002-04-30 Havoc Pennington <hp@redhat.com>
|
||||
|
||||
* gtk/gtktextbtree.c (gtk_text_btree_remove_tag_info): assign
|
||||
|
@ -719,11 +719,10 @@ gtk_text_layout_real_invalidate (GtkTextLayout *layout,
|
||||
{
|
||||
GtkTextLineData *line_data = _gtk_text_line_get_data (line, layout);
|
||||
|
||||
gtk_text_layout_invalidate_cache (layout, line);
|
||||
|
||||
if (line_data)
|
||||
{
|
||||
gtk_text_layout_invalidate_cache (layout, line);
|
||||
_gtk_text_line_invalidate_wrap (line, line_data);
|
||||
}
|
||||
_gtk_text_line_invalidate_wrap (line, line_data);
|
||||
|
||||
if (line == last_line)
|
||||
break;
|
||||
@ -739,12 +738,7 @@ gtk_text_layout_real_free_line_data (GtkTextLayout *layout,
|
||||
GtkTextLine *line,
|
||||
GtkTextLineData *line_data)
|
||||
{
|
||||
if (layout->one_display_cache && line == layout->one_display_cache->line)
|
||||
{
|
||||
GtkTextLineDisplay *tmp_display = layout->one_display_cache;
|
||||
layout->one_display_cache = NULL;
|
||||
gtk_text_layout_free_line_display (layout, tmp_display);
|
||||
}
|
||||
gtk_text_layout_invalidate_cache (layout, line);
|
||||
|
||||
g_free (line_data);
|
||||
}
|
||||
|
@ -1196,8 +1196,9 @@ gtk_text_view_get_iter_at_location (GtkTextView *text_view,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
|
||||
g_return_if_fail (iter != NULL);
|
||||
g_return_if_fail (text_view->layout != NULL);
|
||||
|
||||
gtk_text_view_ensure_layout (text_view);
|
||||
|
||||
gtk_text_layout_get_iter_at_pixel (text_view->layout,
|
||||
iter,
|
||||
x,
|
||||
@ -1224,6 +1225,8 @@ gtk_text_view_get_iter_location (GtkTextView *text_view,
|
||||
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
|
||||
g_return_if_fail (gtk_text_iter_get_buffer (iter) == get_buffer (text_view));
|
||||
|
||||
gtk_text_view_ensure_layout (text_view);
|
||||
|
||||
gtk_text_layout_get_iter_location (text_view->layout, iter, location);
|
||||
}
|
||||
|
||||
@ -1248,6 +1251,8 @@ gtk_text_view_get_line_yrange (GtkTextView *text_view,
|
||||
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
|
||||
g_return_if_fail (gtk_text_iter_get_buffer (iter) == get_buffer (text_view));
|
||||
|
||||
gtk_text_view_ensure_layout (text_view);
|
||||
|
||||
gtk_text_layout_get_line_yrange (text_view->layout,
|
||||
iter,
|
||||
y,
|
||||
@ -1275,6 +1280,8 @@ gtk_text_view_get_line_at_y (GtkTextView *text_view,
|
||||
{
|
||||
g_return_if_fail (GTK_IS_TEXT_VIEW (text_view));
|
||||
|
||||
gtk_text_view_ensure_layout (text_view);
|
||||
|
||||
gtk_text_layout_get_line_at_y (text_view->layout,
|
||||
target_iter,
|
||||
y,
|
||||
|
Loading…
Reference in New Issue
Block a user