[gnome-builder/wip/gtk4-port: 1118/1774] libide/sourceview: make jump helper usable with TextView
- From: Christian Hergert <chergert src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-builder/wip/gtk4-port: 1118/1774] libide/sourceview: make jump helper usable with TextView
- Date: Mon, 11 Jul 2022 22:31:35 +0000 (UTC)
commit 2e2e322a2ca7a0bf7f3bd284beae87edc3a308dc
Author: Christian Hergert <chergert redhat com>
Date: Mon May 23 13:35:15 2022 -0700
libide/sourceview: make jump helper usable with TextView
src/libide/sourceview/ide-source-view.c | 5 ++---
src/libide/sourceview/ide-source-view.h | 2 +-
2 files changed, 3 insertions(+), 4 deletions(-)
---
diff --git a/src/libide/sourceview/ide-source-view.c b/src/libide/sourceview/ide-source-view.c
index 015190fef..a34e28bed 100644
--- a/src/libide/sourceview/ide-source-view.c
+++ b/src/libide/sourceview/ide-source-view.c
@@ -356,7 +356,7 @@ ide_source_view_scroll_to_insert_in_idle_cb (gpointer user_data)
mark = gtk_text_buffer_get_insert (buffer);
gtk_text_buffer_get_iter_at_mark (buffer, &iter, mark);
- ide_source_view_jump_to_iter (self, &iter, .25, TRUE, 1.0, 0.5);
+ ide_source_view_jump_to_iter (GTK_TEXT_VIEW (self), &iter, .25, TRUE, 1.0, 0.5);
IDE_RETURN (G_SOURCE_REMOVE);
}
@@ -977,14 +977,13 @@ ide_source_view_remove_menu (IdeSourceView *self,
* when animations would cause additional distractions.
*/
void
-ide_source_view_jump_to_iter (IdeSourceView *self,
+ide_source_view_jump_to_iter (GtkTextView *text_view,
const GtkTextIter *iter,
double within_margin,
gboolean use_align,
double xalign,
double yalign)
{
- GtkTextView *text_view = (GtkTextView *)self;
GtkAdjustment *hadj;
GtkAdjustment *vadj;
GdkRectangle rect;
diff --git a/src/libide/sourceview/ide-source-view.h b/src/libide/sourceview/ide-source-view.h
index e243614d4..28c6f50db 100644
--- a/src/libide/sourceview/ide-source-view.h
+++ b/src/libide/sourceview/ide-source-view.h
@@ -67,7 +67,7 @@ IDE_AVAILABLE_IN_ALL
void ide_source_view_remove_menu (IdeSourceView *self,
GMenuModel *menu_model);
IDE_AVAILABLE_IN_ALL
-void ide_source_view_jump_to_iter (IdeSourceView *self,
+void ide_source_view_jump_to_iter (GtkTextView *text_view,
const GtkTextIter *iter,
double within_margin,
gboolean use_align,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]