summaryrefslogtreecommitdiff
path: root/tests/testexpand.c
diff options
context:
space:
mode:
authorBenjamin Otte <otte@redhat.com>2014-10-12 05:27:27 +0200
committerBenjamin Otte <otte@redhat.com>2014-10-12 05:27:27 +0200
commit75ed941ef19292e77706765aa6f8630f0d460825 (patch)
tree55eed97304ac7d38a8c2e5ab77eb89e10bc9b720 /tests/testexpand.c
parentc96945b3909f64c24aac6192fc3b27e4ee10d06b (diff)
downloadgtk+-75ed941ef19292e77706765aa6f8630f0d460825.tar.gz
tests: Update testexpand example for deprecations
Diffstat (limited to 'tests/testexpand.c')
-rw-r--r--tests/testexpand.c20
1 files changed, 4 insertions, 16 deletions
diff --git a/tests/testexpand.c b/tests/testexpand.c
index 61cb429df9..3832070735 100644
--- a/tests/testexpand.c
+++ b/tests/testexpand.c
@@ -45,7 +45,6 @@ create_box_window (void)
GtkWidget *box1, *box2, *box3;
GtkWidget *toggle;
GtkWidget *colorbox;
- GdkRGBA red, blue;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Boxes");
@@ -81,11 +80,7 @@ create_box_window (void)
gtk_label_new ("VBox 3 Bottom"),
FALSE, FALSE, 0);
- gdk_rgba_parse (&red, "red");
- gdk_rgba_parse (&blue, "blue");
-
- colorbox = gtk_event_box_new ();
- gtk_widget_override_background_color (colorbox, 0, &red);
+ colorbox = gtk_frame_new (NULL);
toggle = gtk_toggle_button_new_with_label ("H Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
@@ -97,8 +92,7 @@ create_box_window (void)
gtk_box_pack_start (GTK_BOX (box3), colorbox, FALSE, TRUE, 0);
- colorbox = gtk_event_box_new ();
- gtk_widget_override_background_color (colorbox, 0, &blue);
+ colorbox = gtk_frame_new (NULL);
toggle = gtk_toggle_button_new_with_label ("V Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
@@ -120,7 +114,6 @@ create_grid_window (void)
GtkWidget *grid;
GtkWidget *toggle;
GtkWidget *colorbox;
- GdkRGBA red, blue;
window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
gtk_window_set_title (GTK_WINDOW (window), "Grid");
@@ -132,11 +125,7 @@ create_grid_window (void)
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Left"), 0, 1, 1, 2);
gtk_grid_attach (GTK_GRID (grid), gtk_label_new ("Right"), 2, 1, 1, 2);
- gdk_rgba_parse (&red, "red");
- gdk_rgba_parse (&blue, "blue");
-
- colorbox = gtk_event_box_new ();
- gtk_widget_override_background_color (colorbox, GTK_STATE_NORMAL, &red);
+ colorbox = gtk_frame_new (NULL);
toggle = gtk_toggle_button_new_with_label ("H Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);
@@ -148,8 +137,7 @@ create_grid_window (void)
gtk_grid_attach (GTK_GRID (grid), colorbox, 1, 1, 1, 1);
- colorbox = gtk_event_box_new ();
- gtk_widget_override_background_color (colorbox, 0, &blue);
+ colorbox = gtk_frame_new (NULL);
toggle = gtk_toggle_button_new_with_label ("V Expand");
gtk_widget_set_halign (toggle, GTK_ALIGN_CENTER);