[balsa/wip/gtk4] revert renaming of buffer_to_surface_coords()
- From: Peter Bloomfield <peterb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [balsa/wip/gtk4] revert renaming of buffer_to_surface_coords()
- Date: Sun, 6 Oct 2019 13:12:03 +0000 (UTC)
commit 4d2125c7f35a1c9abad0e15c8038c98e2cafff76
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date: Sun Oct 6 09:08:51 2019 -0400
revert renaming of buffer_to_surface_coords()
```
textview: revert renaming of buffer_to_surface_coords()
The renaming of this function doesn't make much since because the window
is the GtkTextWindowType, not GdkWindow specifically. So we can keep the
old name which is closer to the proper meaning and less code for consumers
to change when porting to 4.x.
```
See gtk commit 8373cc6c471f478dbf48fad7f5532e27f286c150
src/balsa-message.c | 12 ++++++------
src/balsa-mime-widget-text.c | 12 ++++++------
2 files changed, 12 insertions(+), 12 deletions(-)
---
diff --git a/src/balsa-message.c b/src/balsa-message.c
index 5fed6067c..1381e7c4c 100644
--- a/src/balsa-message.c
+++ b/src/balsa-message.c
@@ -376,12 +376,12 @@ bm_find_scroll_to_selection(BalsaMessage * bm,
&end_location);
end_location.width = 0;
gdk_rectangle_union(&begin_location, &end_location, &begin_location);
- gtk_text_view_buffer_to_surface_coords(text_view,
- GTK_TEXT_WINDOW_WIDGET,
- begin_location.x,
- begin_location.y,
- &begin_location.x,
- &begin_location.y);
+ gtk_text_view_buffer_to_window_coords(text_view,
+ GTK_TEXT_WINDOW_WIDGET,
+ begin_location.x,
+ begin_location.y,
+ &begin_location.x,
+ &begin_location.y);
bm_find_scroll_to_rectangle(bm, GTK_WIDGET(text_view), &begin_location);
}
diff --git a/src/balsa-mime-widget-text.c b/src/balsa-mime-widget-text.c
index a23525369..2c0f8404f 100644
--- a/src/balsa-mime-widget-text.c
+++ b/src/balsa-mime-widget-text.c
@@ -1032,13 +1032,13 @@ draw_cite_bar_real(gpointer data, gpointer user_data)
/* get the locations */
gtk_text_view_get_iter_location(view, &bar->start_iter, &location);
- gtk_text_view_buffer_to_surface_coords(view, GTK_TEXT_WINDOW_TEXT,
- location.x, location.y,
- &x_pos, &y_pos);
+ gtk_text_view_buffer_to_window_coords(view, GTK_TEXT_WINDOW_TEXT,
+ location.x, location.y,
+ &x_pos, &y_pos);
gtk_text_view_get_iter_location(view, &bar->end_iter, &location);
- gtk_text_view_buffer_to_surface_coords(view, GTK_TEXT_WINDOW_TEXT,
- location.x, location.y,
- &x_pos, &height);
+ gtk_text_view_buffer_to_window_coords(view, GTK_TEXT_WINDOW_TEXT,
+ location.x, location.y,
+ &x_pos, &height);
height -= y_pos;
/* add a new widget if necessary */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]