From a9eb813054356483d38f7a5463037127ee5e26eb Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Thu, 12 Dec 2013 21:18:11 -0500 Subject: [PATCH] testtitlebar: Fix initial values Make sure that the controls show the initial values fo the headerbar properties, not the other way around. --- tests/testtitlebar.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/tests/testtitlebar.c b/tests/testtitlebar.c index 40cb2c5c54..420540b6a8 100644 --- a/tests/testtitlebar.c +++ b/tests/testtitlebar.c @@ -71,8 +71,8 @@ activate (GApplication *gapp) label = gtk_label_new ("Title"); gtk_widget_set_halign (label, GTK_ALIGN_END); entry = gtk_entry_new (); - g_object_bind_property (entry, "text", - header, "title", + g_object_bind_property (header, "title", + entry, "text", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); gtk_grid_attach (GTK_GRID (grid), label, 0, 0, 1, 1); gtk_grid_attach (GTK_GRID (grid), entry, 1, 0, 1, 1); @@ -80,8 +80,8 @@ activate (GApplication *gapp) label = gtk_label_new ("Subtitle"); gtk_widget_set_halign (label, GTK_ALIGN_END); entry = gtk_entry_new (); - g_object_bind_property (entry, "text", - header, "subtitle", + g_object_bind_property (header, "subtitle", + entry, "text", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); gtk_grid_attach (GTK_GRID (grid), label, 0, 1, 1, 1); gtk_grid_attach (GTK_GRID (grid), entry, 1, 1, 1, 1); @@ -102,8 +102,8 @@ activate (GApplication *gapp) label = gtk_label_new ("Close Button"); gtk_widget_set_halign (label, GTK_ALIGN_END); check = gtk_check_button_new (); - g_object_bind_property (check, "active", - header, "show-close-button", + g_object_bind_property (header, "show-close-button", + check, "active", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); gtk_grid_attach (GTK_GRID (grid), label, 2, 0, 1, 1); gtk_grid_attach (GTK_GRID (grid), check, 3, 0, 1, 1); @@ -111,8 +111,8 @@ activate (GApplication *gapp) label = gtk_label_new ("Has Subtitle"); gtk_widget_set_halign (label, GTK_ALIGN_END); check = gtk_check_button_new (); - g_object_bind_property (check, "active", - header, "has-subtitle", + g_object_bind_property (header, "has-subtitle", + check, "active", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); gtk_grid_attach (GTK_GRID (grid), label, 2, 1, 1, 1); gtk_grid_attach (GTK_GRID (grid), check, 3, 1, 1, 1); @@ -120,8 +120,8 @@ activate (GApplication *gapp) label = gtk_label_new ("Shell Shows Menu"); gtk_widget_set_halign (label, GTK_ALIGN_END); check = gtk_check_button_new (); - g_object_bind_property (check, "active", - gtk_settings_get_default (), "gtk-shell-shows-app-menu", + g_object_bind_property (gtk_settings_get_default (), "gtk-shell-shows-app-menu", + check, "active", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); gtk_grid_attach (GTK_GRID (grid), label, 2, 2, 1, 1); gtk_grid_attach (GTK_GRID (grid), check, 3, 2, 1, 1);