[MPlayer-cvslog] r38484 - in trunk/gui/dialog: about.c menu.c

ib subversion at mplayerhq.hu
Mon Apr 29 16:28:33 EEST 2024


Author: ib
Date: Mon Apr 29 16:28:33 2024
New Revision: 38484

Log:
Replace gtk_signal_connect_object().

Replace it with g_signal_connect() or g_signal_connect_swapped(),
whichever is appropriate.

gtk_signal_connect_object() was deprecated even before GTK+ 2.0.

Also, replace GTK_OBJECT with G_OBJECT and GTK_SIGNAL_FUNC with
G_CALLBACK.

Modified:
   trunk/gui/dialog/about.c
   trunk/gui/dialog/menu.c

Modified: trunk/gui/dialog/about.c
==============================================================================
--- trunk/gui/dialog/about.c	Mon Apr 29 16:27:05 2024	(r38483)
+++ trunk/gui/dialog/about.c	Mon Apr 29 16:28:33 2024	(r38484)
@@ -335,7 +335,7 @@ static GtkWidget * CreateAbout( void )
   Ok=gtkAddButton( _(MSGTR_GUI_Ok),gtkAddHButtonBox( vbox ) );
 
   g_signal_connect( G_OBJECT( About ),"destroy",G_CALLBACK( gtk_widget_destroyed ),&About );
-  gtk_signal_connect_object( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( abWidgetDestroy ),NULL );
+  g_signal_connect( G_OBJECT( Ok ),"clicked",G_CALLBACK( abWidgetDestroy ),NULL );
 
   gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
   gtk_widget_add_accelerator( Ok,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );

Modified: trunk/gui/dialog/menu.c
==============================================================================
--- trunk/gui/dialog/menu.c	Mon Apr 29 16:27:05 2024	(r38483)
+++ trunk/gui/dialog/menu.c	Mon Apr 29 16:28:33 2024	(r38484)
@@ -88,8 +88,8 @@ static GtkWidget * AddMenuCheckItem( Gtk
  gtk_menu_append( GTK_MENU( Menu ),Item );
 
  gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state);
- gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
-   GTK_SIGNAL_FUNC(ActivateMenuItem), GINT_TO_POINTER(message) );
+ g_signal_connect_swapped( G_OBJECT(Item),"activate",
+   G_CALLBACK(ActivateMenuItem), GINT_TO_POINTER(message) );
  gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
  gtk_widget_show_all(Item);
 
@@ -122,8 +122,8 @@ static GtkWidget * AddMenuItem( GtkWidge
 
 
  gtk_menu_append( GTK_MENU( Menu ), Item );
- gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
-   GTK_SIGNAL_FUNC(ActivateMenuItem), GINT_TO_POINTER(message) );
+ g_signal_connect_swapped( G_OBJECT(Item),"activate",
+   G_CALLBACK(ActivateMenuItem), GINT_TO_POINTER(message) );
 
  gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
  gtk_widget_show_all(Item);


More information about the MPlayer-cvslog mailing list