[Commits] [SCM] claws branch, gtk3, updated. 3.16.0-895-g736a091e0

paul at claws-mail.org paul at claws-mail.org
Fri Dec 13 18:47:12 CET 2019


The branch, gtk3 has been updated
       via  736a091e06495593ecf285cf800f8e3936e4f837 (commit)
      from  329df2e81e1dc26b6b72ef86bb34455aedabfaeb (commit)

Summary of changes:
 src/gtk/logwindow.c | 2 +-
 src/textview.c      | 4 ++--
 src/undo.c          | 8 ++++----
 3 files changed, 7 insertions(+), 7 deletions(-)


- Log -----------------------------------------------------------------
commit 736a091e06495593ecf285cf800f8e3936e4f837
Author: paul <paul at claws-mail.org>
Date:   Fri Dec 13 17:47:07 2019 +0000

    replace deprecated gtk_text_view_get_vadjustment()

diff --git a/src/gtk/logwindow.c b/src/gtk/logwindow.c
index c493954a1..f9cba2043 100644
--- a/src/gtk/logwindow.c
+++ b/src/gtk/logwindow.c
@@ -331,7 +331,7 @@ static gboolean log_window_append(gpointer source, gpointer data)
 	       log_window_clip (logwindow, logwindow->clip_length);
 
 	if (!logwindow->hidden) {
-		GtkAdjustment *vadj = gtk_text_view_get_vadjustment(text);
+		GtkAdjustment *vadj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(text));
 		gfloat upper = gtk_adjustment_get_upper(vadj) -
 		    gtk_adjustment_get_page_size(vadj);
 		gfloat value = gtk_adjustment_get_value(vadj);
diff --git a/src/textview.c b/src/textview.c
index d5a578266..cf851edca 100644
--- a/src/textview.c
+++ b/src/textview.c
@@ -2292,7 +2292,7 @@ gboolean textview_search_string_backward(TextView *textview, const gchar *str,
 void textview_scroll_one_line(TextView *textview, gboolean up)
 {
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
-	GtkAdjustment *vadj = gtk_text_view_get_vadjustment(text);
+	GtkAdjustment *vadj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(text));
 
 	gtkutils_scroll_one_line(GTK_WIDGET(text), vadj, up);
 }
@@ -2300,7 +2300,7 @@ void textview_scroll_one_line(TextView *textview, gboolean up)
 gboolean textview_scroll_page(TextView *textview, gboolean up)
 {
 	GtkTextView *text = GTK_TEXT_VIEW(textview->text);
-	GtkAdjustment *vadj = gtk_text_view_get_vadjustment(text);
+	GtkAdjustment *vadj = gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(text));
 
 	return gtkutils_scroll_page(GTK_WIDGET(text), vadj, up);
 }
diff --git a/src/undo.c b/src/undo.c
index 92c1f442a..291b5ab1e 100644
--- a/src/undo.c
+++ b/src/undo.c
@@ -320,8 +320,8 @@ static void undo_add(const gchar *text,
 
 	undo_check_size(undostruct);
 
-	vadj = GTK_ADJUSTMENT(gtk_text_view_get_vadjustment(
-				GTK_TEXT_VIEW(undostruct->textview)));
+	vadj = GTK_ADJUSTMENT(gtk_scrollable_get_vadjustment(
+				GTK_SCROLLABLE(undostruct->textview)));
 	undoinfo = undo_object_new(g_strdup(text), start_pos, end_pos, action,
 				   gtk_adjustment_get_value(vadj));
 
@@ -376,7 +376,7 @@ void undo_undo(UndoMain *undostruct)
 
 	/* Move the view (scrollbars) to the correct position */
 	gtk_adjustment_set_value
-		(GTK_ADJUSTMENT(gtk_text_view_get_vadjustment(textview)),
+		(GTK_ADJUSTMENT(gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(textview))),
 		 undoinfo->window_position);
 	
 	switch (undoinfo->action) {
@@ -471,7 +471,7 @@ void undo_redo(UndoMain *undostruct)
 	gtk_text_buffer_place_cursor(buffer, &iter);
 
 	/* Move the view to the right position. */
-	gtk_adjustment_set_value(gtk_text_view_get_vadjustment(textview), 
+	gtk_adjustment_set_value(gtk_scrollable_get_vadjustment(GTK_SCROLLABLE(textview)), 
 				 redoinfo->window_position);
 
 	switch (redoinfo->action) {

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list