diff options
author | Matthias Clasen <mclasen@redhat.com> | 2014-01-06 20:35:01 -0500 |
---|---|---|
committer | Matthias Clasen <mclasen@redhat.com> | 2014-01-06 20:35:29 -0500 |
commit | ae4d82dc0c8c536715a8bcf8a9cd19d446abab19 (patch) | |
tree | 884dc7b7b39842abcdfa4d0dd286a1d890fca466 /tests/testsplitheaders.c | |
parent | 9538bc6221ad7a0f4b81c0b2df90b85a78a2b809 (diff) | |
download | gtk+-ae4d82dc0c8c536715a8bcf8a9cd19d446abab19.tar.gz |
Avoid compiler warnings
Diffstat (limited to 'tests/testsplitheaders.c')
-rw-r--r-- | tests/testsplitheaders.c | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/tests/testsplitheaders.c b/tests/testsplitheaders.c index 6be3ca9257..38ec298c7e 100644 --- a/tests/testsplitheaders.c +++ b/tests/testsplitheaders.c @@ -1,19 +1,18 @@ #include <gtk/gtk.h> static void -split_decorations (GObject *obj, - GParamSpec *pspec, - gpointer data) +split_decorations (GtkSettings *settings, + GParamSpec *pspec, + GtkBuilder *builder) { - GtkBuilder *builder = data; GtkWidget *sheader, *mheader; gchar *layout, *p1, *p2; gchar **p; - sheader = gtk_builder_get_object (builder, "sidebar-header"); - mheader = gtk_builder_get_object (builder, "main-header"); + sheader = (GtkWidget *)gtk_builder_get_object (builder, "sidebar-header"); + mheader = (GtkWidget *)gtk_builder_get_object (builder, "main-header"); - g_object_get (obj, "gtk-decoration-layout", &layout, NULL); + g_object_get (settings, "gtk-decoration-layout", &layout, NULL); p = g_strsplit (layout, ":", -1); @@ -43,23 +42,23 @@ main (int argc, char *argv[]) builder = gtk_builder_new_from_file ("testsplitheaders.ui"); - win = gtk_builder_get_object (builder, "window"); + win = (GtkWidget *)gtk_builder_get_object (builder, "window"); settings = gtk_widget_get_settings (win); g_signal_connect (settings, "notify::gtk-decoration-layout", G_CALLBACK (split_decorations), builder); split_decorations (settings, NULL, builder); - entry = gtk_builder_get_object (builder, "layout-entry"); + entry = (GtkWidget *)gtk_builder_get_object (builder, "layout-entry"); g_object_bind_property (settings, "gtk-decoration-layout", entry, "text", G_BINDING_BIDIRECTIONAL|G_BINDING_SYNC_CREATE); - check = gtk_builder_get_object (builder, "decorations"); - header = gtk_builder_get_object (builder, "sidebar-header"); + check = (GtkWidget *)gtk_builder_get_object (builder, "decorations"); + header = (GtkWidget *)gtk_builder_get_object (builder, "sidebar-header"); g_object_bind_property (check, "active", header, "show-close-button", G_BINDING_DEFAULT); - header = gtk_builder_get_object (builder, "main-header"); + header = (GtkWidget *)gtk_builder_get_object (builder, "main-header"); g_object_bind_property (check, "active", header, "show-close-button", G_BINDING_DEFAULT); |