[gtk/text: 23/24] a11y text test: Use a GtkText instead
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk/text: 23/24] a11y text test: Use a GtkText instead
- Date: Mon, 18 Feb 2019 05:05:40 +0000 (UTC)
commit 296a8bf60b2cf1144efc258d999a8be40f26acd7
Author: Matthias Clasen <mclasen redhat com>
Date: Sun Feb 17 15:52:33 2019 -0500
a11y text test: Use a GtkText instead
testsuite/a11y/text.c | 18 +++++++++---------
1 file changed, 9 insertions(+), 9 deletions(-)
---
diff --git a/testsuite/a11y/text.c b/testsuite/a11y/text.c
index 04db8f1ffd..7a2a31fd08 100644
--- a/testsuite/a11y/text.c
+++ b/testsuite/a11y/text.c
@@ -27,8 +27,8 @@ set_text (GtkWidget *widget,
{
if (GTK_IS_LABEL (widget))
gtk_label_set_text (GTK_LABEL (widget), text);
- else if (GTK_IS_ENTRY (widget))
- gtk_entry_set_text (GTK_ENTRY (widget), text);
+ else if (GTK_IS_EDITABLE (widget))
+ gtk_editable_set_text (GTK_EDITABLE (widget), text);
else if (GTK_IS_TEXT_VIEW (widget))
gtk_text_buffer_set_text (gtk_text_view_get_buffer (GTK_TEXT_VIEW (widget)), text, -1);
else
@@ -47,12 +47,12 @@ append_text (GtkWidget *widget,
gtk_label_set_text (GTK_LABEL (widget), tmp);
g_free (tmp);
}
- else if (GTK_IS_ENTRY (widget))
+ else if (GTK_IS_EDITABLE (widget))
{
gchar *tmp;
- tmp = g_strconcat (gtk_entry_get_text (GTK_ENTRY (widget)), text, NULL);
- gtk_entry_set_text (GTK_ENTRY (widget), tmp);
+ tmp = g_strconcat (gtk_editable_get_text (GTK_EDITABLE (widget)), text, NULL);
+ gtk_editable_set_text (GTK_EDITABLE (widget), tmp);
g_free (tmp);
}
else if (GTK_IS_TEXT_VIEW (widget))
@@ -134,7 +134,7 @@ test_text_changed (GtkWidget *widget)
SignalData insert_data;
gboolean cant_append = FALSE;
- if (GTK_IS_LABEL (widget) || GTK_IS_ENTRY (widget))
+ if (GTK_IS_LABEL (widget) || GTK_IS_TEXT (widget))
cant_append = TRUE;
atk_text = ATK_TEXT (gtk_widget_get_accessible (widget));
@@ -874,9 +874,9 @@ test_words (GtkWidget *widget)
for (i = 0; expected[i].offset != -1; i++)
{
- if (GTK_IS_ENTRY (widget))
+ if (GTK_IS_TEXT (widget))
{
- /* GtkEntry sets single-paragraph mode on its pango layout */
+ /* GtkText sets single-paragraph mode on its pango layout */
if (expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_START ||
expected[i].boundary == ATK_TEXT_BOUNDARY_LINE_END)
continue;
@@ -1094,7 +1094,7 @@ main (int argc, char *argv[])
g_test_add_func ("/text/bold/GtkLabel", test_bold_label);
add_text_tests (gtk_label_new (""));
- add_text_tests (gtk_entry_new ());
+ add_text_tests (gtk_text_new ());
add_text_tests (gtk_text_view_new ());
return g_test_run ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]