Use gnt_*_get_text accessors. release-2.x.y

Tue, 23 Apr 2019 18:18:46 -0400

author
Elliott Sales de Andrade <qulogic@pidgin.im>
date
Tue, 23 Apr 2019 18:18:46 -0400
branch
release-2.x.y
changeset 39647
50ac98a0ecb1
parent 39646
5323594ddc26
child 39648
7be1ba1a81a8

Use gnt_*_get_text accessors.

finch/gntconv.c file | annotate | diff | comparison | revisions
finch/gntdebug.c file | annotate | diff | comparison | revisions
finch/plugins/lastlog.c file | annotate | diff | comparison | revisions
--- a/finch/gntconv.c	Tue Apr 23 18:16:29 2019 -0400
+++ b/finch/gntconv.c	Tue Apr 23 18:18:46 2019 -0400
@@ -705,7 +705,7 @@
 static void
 completion_cb(GntEntry *entry, const char *start, const char *end)
 {
-	if (start == entry->start && *start != '/')
+	if (start == gnt_entry_get_text(entry) && *start != '/')
 		gnt_widget_key_pressed(GNT_WIDGET(entry), ": ");
 }
 
--- a/finch/gntdebug.c	Tue Apr 23 18:16:29 2019 -0400
+++ b/finch/gntdebug.c	Tue Apr 23 18:18:46 2019 -0400
@@ -278,7 +278,7 @@
 	}
 
 	fprintf(fp, "Finch Debug Log : %s\n", purple_date_format_full(NULL));
-	fprintf(fp, "%s", tv->string->str);
+	fprintf(fp, "%s", gnt_text_view_get_text(tv));
 	fclose(fp);
 	gnt_widget_destroy(GNT_WIDGET(fs));
 }
--- a/finch/plugins/lastlog.c	Tue Apr 23 18:16:29 2019 -0400
+++ b/finch/plugins/lastlog.c	Tue Apr 23 18:18:46 2019 -0400
@@ -61,7 +61,8 @@
 lastlog_cb(PurpleConversation *conv, const char *cmd, char **args, char **error, gpointer null)
 {
 	FinchConv *ggconv = conv->ui_data;
-	char **strings = g_strsplit(GNT_TEXT_VIEW(ggconv->tv)->string->str, "\n", 0);
+	char **strings = g_strsplit(gnt_text_view_get_text(GNT_TEXT_VIEW(ggconv->tv)),
+	                            "\n", 0);
 	GntWidget *win, *tv;
 	int i, j;
 

mercurial