[MPlayer-cvslog] r38504 - in trunk/gui/dialog: fileselect.c preferences.c

ib subversion at mplayerhq.hu
Thu May 2 22:37:46 EEST 2024


Author: ib
Date: Thu May  2 22:37:45 2024
New Revision: 38504

Log:
Create all GtkCombo widgets with gtkAddCombo().

This helper function exists for this very purpose.

Modified:
   trunk/gui/dialog/fileselect.c
   trunk/gui/dialog/preferences.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Wed May  1 16:20:23 2024	(r38503)
+++ trunk/gui/dialog/fileselect.c	Thu May  2 22:37:45 2024	(r38504)
@@ -777,9 +777,7 @@ static GtkWidget *CreateFileSelect(void)
     vbox4 = gtkAddVBox(gtkAddDialogFrame(FileSelector), 0);
     hbox4 = gtkAddHBox(vbox4, 1);
 
-    fsCombo4 = gtk_combo_new();
-    gtk_widget_show(fsCombo4);
-    gtk_box_pack_start(GTK_BOX(hbox4), fsCombo4, TRUE, TRUE, 0);
+    fsCombo4 = gtkAddCombo(hbox4);
 
     fsPathCombo = GTK_COMBO(fsCombo4)->entry;
     gtk_widget_show(fsPathCombo);
@@ -818,10 +816,9 @@ static GtkWidget *CreateFileSelect(void)
 
     gtkAddHSeparator(vbox4);
 
-    List = gtk_combo_new();
+    List = gtkAddCombo(NULL);
     g_object_ref(List);
     g_object_set_data_full(G_OBJECT(FileSelector), "List", List, (GDestroyNotify)g_object_unref);
-    gtk_widget_show(List);
     gtk_box_pack_start(GTK_BOX(vbox4), List, FALSE, FALSE, 0);
 
     fsFilterCombo = GTK_COMBO(List)->entry;

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Wed May  1 16:20:23 2024	(r38503)
+++ trunk/gui/dialog/preferences.c	Thu May  2 22:37:45 2024	(r38504)
@@ -841,9 +841,7 @@ static GtkWidget * CreatePreferences( vo
 
 #ifdef CONFIG_ICONV
   gtk_misc_set_alignment( GTK_MISC( label ),0,0 );
-  CBSubEncoding=gtk_combo_new();
-  gtk_widget_show( CBSubEncoding );
-  gtk_box_pack_start( GTK_BOX( vbox10 ),CBSubEncoding,TRUE,FALSE,0 );
+  CBSubEncoding=gtkAddCombo(vbox10);
   CBSubEncoding_items=g_list_append( CBSubEncoding_items,_(MSGTR_GUI__Default_) );
   {
    int i, listed=(sub_cp == NULL);
@@ -940,8 +938,7 @@ static GtkWidget * CreatePreferences( vo
   label=gtkAddLabelColon( _(MSGTR_GUI_Encoding),NULL );
     gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
 
-  CBFontEncoding=gtk_combo_new();
-  gtk_widget_show( CBFontEncoding );
+  CBFontEncoding=gtkAddCombo(NULL);
   gtk_table_attach( GTK_TABLE( table1 ),CBFontEncoding,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
   {
    int i, append, listed=(subtitle_font_encoding == NULL);
@@ -1030,9 +1027,7 @@ static GtkWidget * CreatePreferences( vo
 
   gtkAddLabelColon( _(MSGTR_GUI_CodecFamilyVideo),hbox5 );
 
-  CBVFM=gtk_combo_new();
-  gtk_widget_show( CBVFM );
-  gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 );
+  CBVFM=gtkAddCombo(hbox5);
 
   EVFM=GTK_COMBO( CBVFM )->entry;
   gtk_entry_set_editable( GTK_ENTRY( EVFM ),FALSE );
@@ -1042,9 +1037,7 @@ static GtkWidget * CreatePreferences( vo
 
   gtkAddLabelColon( _(MSGTR_GUI_CodecFamilyAudio),hbox5 );
 
-  CBAFM=gtk_combo_new();
-  gtk_widget_show( CBAFM );
-  gtk_box_pack_start( GTK_BOX( hbox5 ),CBAFM,TRUE,TRUE,0 );
+  CBAFM=gtkAddCombo(hbox5);
 
   EAFM=GTK_COMBO( CBAFM )->entry;
   gtk_entry_set_editable( GTK_ENTRY( EAFM ),FALSE );


More information about the MPlayer-cvslog mailing list