diff options
author | Sven Neumann <sven@gimp.org> | 2002-02-19 19:47:16 +0000 |
---|---|---|
committer | Sven Neumann <neo@src.gnome.org> | 2002-02-19 19:47:16 +0000 |
commit | 6dea3cae13ddf8a5e882fe8296678bb7be2a94d8 (patch) | |
tree | a40a07c80c406c91894e38064e6ec1ea559ef178 /examples/tictactoe | |
parent | 601302c7a308664c09bc5ee2e23621b34747a252 (diff) | |
download | gdk-pixbuf-6dea3cae13ddf8a5e882fe8296678bb7be2a94d8.tar.gz |
finish conversion to g_signal_* functions by using G_OBJECT and G_CALLBACK
2002-02-19 Sven Neumann <sven@gimp.org>
* examples/*/*.c: finish conversion to g_signal_* functions by
using G_OBJECT and G_CALLBACK and other assorted changes.
Diffstat (limited to 'examples/tictactoe')
-rw-r--r-- | examples/tictactoe/.cvsignore | 1 | ||||
-rw-r--r-- | examples/tictactoe/tictactoe.c | 12 | ||||
-rw-r--r-- | examples/tictactoe/ttt_test.c | 8 |
3 files changed, 12 insertions, 9 deletions
diff --git a/examples/tictactoe/.cvsignore b/examples/tictactoe/.cvsignore index 953951f6e..e6e3c0265 100644 --- a/examples/tictactoe/.cvsignore +++ b/examples/tictactoe/.cvsignore @@ -1 +1,2 @@ tictactoe +ttt_test diff --git a/examples/tictactoe/tictactoe.c b/examples/tictactoe/tictactoe.c index a97d319da..33ba849ed 100644 --- a/examples/tictactoe/tictactoe.c +++ b/examples/tictactoe/tictactoe.c @@ -95,8 +95,8 @@ tictactoe_init (Tictactoe *ttt) ttt->buttons[i][j] = gtk_toggle_button_new (); gtk_table_attach_defaults (GTK_TABLE (table), ttt->buttons[i][j], i, i+1, j, j+1); - g_signal_connect (GTK_OBJECT (ttt->buttons[i][j]), "toggled", - GTK_SIGNAL_FUNC (tictactoe_toggle), ttt); + g_signal_connect (G_OBJECT (ttt->buttons[i][j]), "toggled", + G_CALLBACK (tictactoe_toggle), ttt); gtk_widget_set_size_request (ttt->buttons[i][j], 20, 20); gtk_widget_show (ttt->buttons[i][j]); } @@ -116,10 +116,12 @@ tictactoe_clear (Tictactoe *ttt) for (i = 0; i < 3; i++) for (j = 0; j < 3; j++) { - g_signal_handlers_block_by_func (GTK_OBJECT (ttt->buttons[i][j]), NULL, ttt); + g_signal_handlers_block_by_func (G_OBJECT (ttt->buttons[i][j]), + NULL, ttt); gtk_toggle_button_set_active (GTK_TOGGLE_BUTTON (ttt->buttons[i][j]), FALSE); - g_signal_handlers_unblock_by_func (GTK_OBJECT (ttt->buttons[i][j]), NULL, ttt); + g_signal_handlers_unblock_by_func (G_OBJECT (ttt->buttons[i][j]), + NULL, ttt); } } @@ -152,7 +154,7 @@ tictactoe_toggle (GtkWidget *widget, Tictactoe *ttt) if (success && found) { - g_signal_emit (GTK_OBJECT (ttt), + g_signal_emit (G_OBJECT (ttt), tictactoe_signals[TICTACTOE_SIGNAL], 0); break; } diff --git a/examples/tictactoe/ttt_test.c b/examples/tictactoe/ttt_test.c index 78a7d396f..6065593e6 100644 --- a/examples/tictactoe/ttt_test.c +++ b/examples/tictactoe/ttt_test.c @@ -22,8 +22,8 @@ int main( int argc, gtk_window_set_title (GTK_WINDOW (window), "Aspect Frame"); - g_signal_connect (GTK_OBJECT (window), "destroy", - GTK_SIGNAL_FUNC (exit), NULL); + g_signal_connect (G_OBJECT (window), "destroy", + G_CALLBACK (exit), NULL); gtk_container_set_border_width (GTK_CONTAINER (window), 10); @@ -32,8 +32,8 @@ int main( int argc, gtk_container_add (GTK_CONTAINER (window), ttt); gtk_widget_show (ttt); - g_signal_connect (GTK_OBJECT (ttt), "tictactoe", - GTK_SIGNAL_FUNC (win), NULL); + g_signal_connect (G_OBJECT (ttt), "tictactoe", + G_CALLBACK (win), NULL); gtk_widget_show (window); |