[gtk+] tests: Update testexpand example for deprecations
- From: Benjamin Otte <otte src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] tests: Update testexpand example for deprecations
- Date: Sun, 12 Oct 2014 03:55:08 +0000 (UTC)
commit 75ed941ef19292e77706765aa6f8630f0d460825
Author: Benjamin Otte <otte redhat com>
Date: Sun Oct 12 05:27:27 2014 +0200
tests: Update testexpand example for deprecations
tests/testexpand.c | 20 ++++----------------
1 files changed, 4 insertions(+), 16 deletions(-)
---
diff --git a/tests/testexpand.c b/tests/testexpand.c
index 61cb429..3832070 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]