summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorTimm Bäder <mail@baedert.org>2018-03-17 11:20:49 +0100
committerTimm Bäder <mail@baedert.org>2018-03-17 12:09:30 +0100
commit004d0f2fc1299a1222834e89b25b9b2eebb6ef12 (patch)
tree353dead88674223a83d1d83fed0d7e5258e01558 /tests
parentfb763cd4caeb4eb22ee37e902b55d6f5df971437 (diff)
downloadgtk+-004d0f2fc1299a1222834e89b25b9b2eebb6ef12.tar.gz
testgtk: GtkSpinButton is not a GtkEntry anymore
Diffstat (limited to 'tests')
-rw-r--r--tests/testgtk.c23
1 files changed, 12 insertions, 11 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c
index 65d9b2cabf..bc952a0e72 100644
--- a/tests/testgtk.c
+++ b/tests/testgtk.c
@@ -3306,8 +3306,8 @@ spin_button_time_output_func (GtkSpinButton *spin_button)
hours = gtk_adjustment_get_value (adjustment) / 60.0;
minutes = (fabs(floor (hours) - hours) < 1e-5) ? 0.0 : 30;
sprintf (buf, "%02.0f:%02.0f", floor (hours), minutes);
- if (strcmp (buf, gtk_entry_get_text (GTK_ENTRY (spin_button))))
- gtk_entry_set_text (GTK_ENTRY (spin_button), buf);
+ if (strcmp (buf, gtk_spin_button_get_text (spin_button)))
+ gtk_spin_button_set_text (spin_button, buf);
return TRUE;
}
@@ -3325,7 +3325,7 @@ spin_button_month_input_func (GtkSpinButton *spin_button,
for (i = 1; i <= 12; i++)
{
tmp1 = g_ascii_strup (month[i - 1], -1);
- tmp2 = g_ascii_strup (gtk_entry_get_text (GTK_ENTRY (spin_button)), -1);
+ tmp2 = g_ascii_strup (gtk_spin_button_get_text (spin_button), -1);
if (strstr (tmp1, tmp2) == tmp1)
found = TRUE;
g_free (tmp1);
@@ -3357,8 +3357,8 @@ spin_button_month_output_func (GtkSpinButton *spin_button)
for (i = 1; i <= 12; i++)
if (fabs (value - (double)i) < 1e-5)
{
- if (strcmp (month[i-1], gtk_entry_get_text (GTK_ENTRY (spin_button))))
- gtk_entry_set_text (GTK_ENTRY (spin_button), month[i-1]);
+ if (strcmp (month[i-1], gtk_spin_button_get_text (spin_button)))
+ gtk_spin_button_set_text (spin_button, month[i-1]);
}
return TRUE;
}
@@ -3371,7 +3371,7 @@ spin_button_hex_input_func (GtkSpinButton *spin_button,
gchar *err;
gdouble res;
- buf = gtk_entry_get_text (GTK_ENTRY (spin_button));
+ buf = gtk_spin_button_get_text (GTK_SPIN_BUTTON (spin_button));
res = strtol(buf, &err, 16);
*new_val = res;
if (*err)
@@ -3393,8 +3393,9 @@ spin_button_hex_output_func (GtkSpinButton *spin_button)
sprintf (buf, "0x00");
else
sprintf (buf, "0x%.2X", val);
- if (strcmp (buf, gtk_entry_get_text (GTK_ENTRY (spin_button))))
- gtk_entry_set_text (GTK_ENTRY (spin_button), buf);
+ if (strcmp (buf, gtk_spin_button_get_text (spin_button)))
+ gtk_spin_button_set_text (spin_button, buf);
+
return TRUE;
}
@@ -3456,7 +3457,7 @@ create_spins (GtkWidget *widget)
G_CALLBACK (spin_button_time_output_func),
NULL);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
- gtk_entry_set_width_chars (GTK_ENTRY (spinner), 5);
+ gtk_spin_button_set_width_chars (GTK_SPIN_BUTTON (spinner), 5);
gtk_box_pack_start (GTK_BOX (vbox2), spinner);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -3481,7 +3482,7 @@ create_spins (GtkWidget *widget)
G_CALLBACK (spin_button_month_output_func),
NULL);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
- gtk_entry_set_width_chars (GTK_ENTRY (spinner), 9);
+ gtk_spin_button_set_width_chars (GTK_SPIN_BUTTON (spinner), 9);
gtk_box_pack_start (GTK_BOX (vbox2), spinner);
vbox2 = gtk_box_new (GTK_ORIENTATION_VERTICAL, 0);
@@ -3504,7 +3505,7 @@ create_spins (GtkWidget *widget)
G_CALLBACK (spin_button_hex_output_func),
NULL);
gtk_spin_button_set_wrap (GTK_SPIN_BUTTON (spinner), TRUE);
- gtk_entry_set_width_chars (GTK_ENTRY (spinner), 4);
+ gtk_spin_button_set_width_chars (GTK_SPIN_BUTTON (spinner), 4);
gtk_box_pack_start (GTK_BOX (vbox2), spinner);
frame = gtk_frame_new ("Accelerated");