switch to g_signal_connect

This commit is contained in:
ehouse 2005-05-29 20:17:09 +00:00
parent df8bfef99d
commit 655ae045c4
5 changed files with 21 additions and 21 deletions

View file

@ -52,8 +52,8 @@ gtkask( GtkAppGlobals* globals, gchar *message, gint numButtons,
button = gtk_button_new_with_label( *butList );
results[i] = 0;
gtk_signal_connect( GTK_OBJECT( button ), "clicked",
GTK_SIGNAL_FUNC(button_event), &results[i] );
g_signal_connect( GTK_OBJECT( button ), "clicked",
G_CALLBACK(button_event), &results[i] );
gtk_container_add( GTK_CONTAINER( GTK_DIALOG(dialog)->action_area),
button );

View file

@ -23,7 +23,7 @@
#include "gtkask.h"
static void
button_event( GtkWidget* widget, void* closure )
button_event( GtkWidget* widget, gpointer closure )
{
XP_Bool* whichSet = (XP_Bool*)closure;
*whichSet = 1;
@ -33,7 +33,7 @@ button_event( GtkWidget* widget, void* closure )
#ifdef FEATURE_TRAY_EDIT
static void
abort_button_event( GtkWidget* widget, void* closure )
abort_button_event( GtkWidget* widget, gpointer closure )
{
gtk_main_quit();
} /* abort_button_event */
@ -67,8 +67,8 @@ gtkletterask( XP_Bool forBlank, XP_UCHAR* name,
button = gtk_button_new_with_label( texts[i] );
gtk_box_pack_start( GTK_BOX(hbox), button, FALSE, TRUE, 0 );
gtk_signal_connect( GTK_OBJECT(button), "clicked", button_event,
&results[i] );
g_signal_connect( GTK_OBJECT(button), "clicked",
G_CALLBACK(button_event), &results[i] );
gtk_widget_show( button );
if ( i+1 == nTiles || (i % BUTTONS_PER_ROW == 0) ) {
@ -80,8 +80,8 @@ gtkletterask( XP_Bool forBlank, XP_UCHAR* name,
#ifdef FEATURE_TRAY_EDIT
button = gtk_button_new_with_label( "Just pick em!" );
hbox = gtk_hbox_new( FALSE, 0 );
gtk_signal_connect( GTK_OBJECT(button), "clicked", abort_button_event,
NULL );
g_signal_connect( GTK_OBJECT(button), "clicked",
G_CALLBACK(abort_button_event), NULL );
gtk_box_pack_start( GTK_BOX(hbox), button, FALSE, TRUE, 0 );
gtk_widget_show( button );
gtk_widget_show( hbox );

View file

@ -182,22 +182,22 @@ handle_revert( GtkWidget* widget, void* closure )
} /* handle_revert */
GtkWidget*
make_menu_item( gchar* name, GtkSignalFunc func, gpointer data )
make_menu_item( gchar* name, GCallback func, gpointer data )
{
GtkWidget* item;
item = gtk_menu_item_new_with_label( name );
gtk_signal_connect( GTK_OBJECT(item), "activate", func, data );
g_signal_connect( GTK_OBJECT(item), "activate", func, data );
gtk_widget_show( item );
return item;
} /* make_menu_item */
static GtkWidget*
makeButton( char* text, GtkSignalFunc func, gpointer data )
makeButton( char* text, GCallback func, gpointer data )
{
GtkWidget* button = gtk_button_new_with_label( text );
gtk_signal_connect( GTK_OBJECT(button), "clicked", func, data );
g_signal_connect( GTK_OBJECT(button), "clicked", func, data );
gtk_widget_show( button );
return button;

View file

@ -57,9 +57,9 @@ askNTiles( GtkAppGlobals* globals, XP_U16 max, XP_U16 deflt )
button = gtk_button_new_with_label( buf );
gtk_box_pack_start( GTK_BOX(hbox), button, FALSE, TRUE, 0 );
gtk_signal_connect( GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(button_event),
&results[i] );
g_signal_connect( GTK_OBJECT(button), "clicked",
G_CALLBACK(button_event),
&results[i] );
gtk_widget_show( button );
}
gtk_widget_show( hbox );
@ -70,9 +70,9 @@ askNTiles( GtkAppGlobals* globals, XP_U16 max, XP_U16 deflt )
button = gtk_button_new_with_label( defbuf );
gtk_box_pack_start( GTK_BOX(GTK_DIALOG(dialog)->vbox), button, FALSE,
TRUE, 0 );
gtk_signal_connect( GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(button_event),
&results[deflt-1] );
g_signal_connect( GTK_OBJECT(button), "clicked",
G_CALLBACK(button_event),
&results[deflt-1] );
gtk_widget_show( button );
gtk_widget_show_all( dialog );

View file

@ -66,9 +66,9 @@ gtkpasswdask( const char* name, char* outbuf, XP_U16* buflen )
for ( i = 0; i < 2; ++i ) {
GtkWidget* button = gtk_button_new_with_label( labels[i] );
gtk_signal_connect( GTK_OBJECT(button), "clicked",
GTK_SIGNAL_FUNC(button_event),
boolps[i] );
g_signal_connect( GTK_OBJECT(button), "clicked",
G_CALLBACK(button_event),
boolps[i] );
gtk_box_pack_start( GTK_BOX(hbox), button, FALSE, TRUE, 0 );
gtk_widget_show( button );
}