From d9c581900bd75e34e262155b3494b86501e122a9 Mon Sep 17 00:00:00 2001 From: Benjamin Otte Date: Tue, 28 Sep 2010 18:26:31 +0200 Subject: [PATCH] gail: Fix tests compilation - too many casts --- modules/other/gail/tests/ferret.c | 18 +++++++++--------- modules/other/gail/tests/testbutton.c | 2 +- modules/other/gail/tests/testimage.c | 4 ++-- modules/other/gail/tests/testlib.c | 6 +++--- modules/other/gail/tests/testtable.c | 4 ++-- 5 files changed, 17 insertions(+), 17 deletions(-) diff --git a/modules/other/gail/tests/ferret.c b/modules/other/gail/tests/ferret.c index f6f2d37112..ad8dd3e131 100644 --- a/modules/other/gail/tests/ferret.c +++ b/modules/other/gail/tests/ferret.c @@ -964,7 +964,7 @@ _print_action (AtkAction *aobject) nv->atkobj = ATK_OBJECT(aobject); nv->action_num = j; - nv->signal_id = g_signal_connect (GTK_OBJECT (nv->button), + nv->signal_id = g_signal_connect (nv->button, "clicked", G_CALLBACK (_action_cb), nv); g_free(label_str); @@ -1597,10 +1597,10 @@ _create_notebook (void) tab = nbook_tabs[VALUE]; _add_notebook_page (notebook, tab->main_box, &tab->page, "_Value"); - g_signal_connect (GTK_OBJECT (notebook), - "switch-page", - G_CALLBACK (_update_current_page), - NULL); + g_signal_connect (notebook, + "switch-page", + G_CALLBACK (_update_current_page), + NULL); } static void @@ -1667,9 +1667,9 @@ _create_window (void) window = gtk_window_new (GTK_WINDOW_TOPLEVEL); gtk_widget_set_name (window, "Ferret Window"); - g_signal_connect (GTK_OBJECT (window), "destroy", - G_CALLBACK (gtk_widget_destroyed), - &window); + g_signal_connect (window, "destroy", + G_CALLBACK (gtk_widget_destroyed), + &window); gtk_window_set_title (GTK_WINDOW (window), "GTK+ Ferret Output"); gtk_window_set_default_size (GTK_WINDOW (window), 333, 550); @@ -1724,7 +1724,7 @@ _add_menu(GtkWidget ** menu, GtkWidget ** menuitem, gchar * name, GTK_CHECK_MENU_ITEM(*menuitem), init_value); gtk_menu_shell_append (GTK_MENU_SHELL (*menu), *menuitem); gtk_widget_show(*menuitem); - g_signal_connect(GTK_OBJECT(*menuitem), "toggled", func, NULL); + g_signal_connect(*menuitem, "toggled", func, NULL); } int diff --git a/modules/other/gail/tests/testbutton.c b/modules/other/gail/tests/testbutton.c index ea6d60e3ef..81022c3005 100644 --- a/modules/other/gail/tests/testbutton.c +++ b/modules/other/gail/tests/testbutton.c @@ -65,7 +65,7 @@ _check_object (AtkObject *obj) g_assert (GTK_IS_ACCESSIBLE (atk_button)); widget = gtk_accessible_get_widget (GTK_ACCESSIBLE (atk_button)); g_assert (GTK_IS_BUTTON (widget)); - g_signal_connect (GTK_OBJECT (widget), + g_signal_connect (widget, "pressed", G_CALLBACK (button_pressed_handler), NULL); diff --git a/modules/other/gail/tests/testimage.c b/modules/other/gail/tests/testimage.c index 20b7740dc6..207f6fb3a1 100644 --- a/modules/other/gail/tests/testimage.c +++ b/modules/other/gail/tests/testimage.c @@ -53,13 +53,13 @@ static void _check_arrows (AtkObject *obj) gtk_box_pack_start(GTK_BOX (content_area), md->arrow2, TRUE,TRUE, 0); gtk_box_pack_start(GTK_BOX (content_area), md->arrow3, TRUE,TRUE, 0); gtk_box_pack_start(GTK_BOX (content_area), md->arrow4, TRUE,TRUE, 0); - g_signal_connect(GTK_OBJECT(md->dialog), "destroy", + g_signal_connect(md->dialog, "destroy", G_CALLBACK (destroy), md->dialog); md->image = GTK_IMAGE(gtk_image_new_from_file("circles.xbm")); gtk_box_pack_start(GTK_BOX (content_area), GTK_WIDGET(md->image), TRUE,TRUE, 0); md->close_button = gtk_button_new_from_stock(GTK_STOCK_CLOSE); - g_signal_connect(GTK_OBJECT(md->close_button), "clicked", + g_signal_connect(md->close_button, "clicked", G_CALLBACK (destroy), md->dialog); gtk_box_pack_start(GTK_BOX (action_area), md->close_button, TRUE,TRUE, 0); diff --git a/modules/other/gail/tests/testlib.c b/modules/other/gail/tests/testlib.c index a3a99a92c7..3e254af4ec 100644 --- a/modules/other/gail/tests/testlib.c +++ b/modules/other/gail/tests/testlib.c @@ -572,7 +572,7 @@ _create_select_tests_window (AtkObject *obj, FALSE); gtk_window_set_position (GTK_WINDOW(md[window_no]->selecttestsWindow), GTK_WIN_POS_CENTER); - g_signal_connect (GTK_OBJECT(md[window_no]->selecttestsWindow), + g_signal_connect (md[window_no]->selecttestsWindow, "destroy", G_CALLBACK (_destroy), &md[window_no]->selecttestsWindow); @@ -601,7 +601,7 @@ _create_select_tests_window (AtkObject *obj, testcb[window_no].runtest = runtest; testcb[window_no].obj = obj; testcb[window_no].win_num = window_no; - g_signal_connect (GTK_OBJECT (md[window_no]->button), + g_signal_connect (md[window_no]->button, "clicked", G_CALLBACK (_testselectioncb), (gpointer)&testcb[window_no]); @@ -674,7 +674,7 @@ add_test (gint window, gtk_widget_show (listoftests[window][testcount[window]].parameterLabel[i]); gtk_widget_show (listoftests[window][testcount[window]].parameterInput[i]); } - g_signal_connect (GTK_OBJECT (listoftests[window][testcount[window]].toggleButton), + g_signal_connect (listoftests[window][testcount[window]].toggleButton, "toggled", G_CALLBACK (_toggle_selectedcb), (gpointer)&(listoftests[window][testcount[window]])); diff --git a/modules/other/gail/tests/testtable.c b/modules/other/gail/tests/testtable.c index e2a939e454..e11b403529 100644 --- a/modules/other/gail/tests/testtable.c +++ b/modules/other/gail/tests/testtable.c @@ -760,7 +760,7 @@ void test_choice_gui(AtkObject **obj) window = gtk_window_new(GTK_WINDOW_TOPLEVEL); gtk_window_set_title(GTK_WINDOW(window), "Test to run"); - g_signal_connect(GTK_OBJECT (window), "destroy", + g_signal_connect(window, "destroy", G_CALLBACK (destroy), &window); vbox = gtk_vbox_new(TRUE, 0); @@ -818,7 +818,7 @@ void test_choice_gui(AtkObject **obj) GTK_BUTTONBOX_SPREAD); gtk_box_pack_end (GTK_BOX (hbuttonbox), GTK_WIDGET (button), TRUE, TRUE, 0); gtk_box_pack_end (GTK_BOX (vbox), hbuttonbox, TRUE, TRUE, 0); - g_signal_connect(GTK_OBJECT(button), "clicked", G_CALLBACK (choicecb), obj); + g_signal_connect(button, "clicked", G_CALLBACK (choicecb), obj); gtk_container_add(GTK_CONTAINER(window), vbox); gtk_widget_show(vbox);