[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk about.c,1.3,1.4 fs.c,1.10,1.11 mb.c,1.4,1.5 opts.c,1.2,1.3 pl.c,1.2,1.3 sb.c,1.5,1.6

Zoltan Ponekker pontscho at mplayerhq.hu
Sat May 11 18:38:01 CEST 2002


Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var/tmp.root/cvs-serv14376/Gui/mplayer/gtk

Modified Files:
	about.c fs.c mb.c opts.c pl.c sb.c 
Log Message:
fix gtk dialog box destroy bug

Index: about.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/about.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- about.c	23 Feb 2002 15:12:54 -0000	1.3
+++ about.c	11 May 2002 16:37:58 -0000	1.4
@@ -8,9 +8,7 @@
 #include "about.h"
 
 void ab_Ok_released( GtkButton * button,gpointer user_data )
-{
- gtk_widget_hide( AboutBox );
-}
+{ gtk_widget_destroy( AboutBox ); }
 
 GtkWidget * create_About( void )
 {

Index: fs.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.c,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -r1.10 -r1.11
--- fs.c	22 Apr 2002 15:39:45 -0000	1.10
+++ fs.c	11 May 2002 16:37:58 -0000	1.11
@@ -181,10 +181,24 @@
  gtk_widget_show( list );
 }
 
+static int FirstInit = 1;
+
 void ShowFileSelect( int type )
 {
  int i;
- gtk_widget_hide( FileSelect );
+ FileSelect=create_FileSelect();
+ 
+ if ( FirstInit )
+  {
+   fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() );
+   if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) );
+   fsTopList_items=g_list_append( fsTopList_items,"/home" );
+   fsTopList_items=g_list_append( fsTopList_items,"/mnt" );
+   fsTopList_items=g_list_append( fsTopList_items,"/" );
+   FirstInit=0;
+  }
+ gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
+  
  fsType=type;
  switch ( type )
   {
@@ -221,9 +235,7 @@
 }
 
 void HideFileSelect( void )
-{
- gtk_widget_hide( fsFileSelect );
-}
+{ gtk_widget_destroy( fsFileSelect ); }
 
 void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
 { HideFileSelect(); }
@@ -369,11 +381,7 @@
    if ( !strcmp( item->data,fsSelectedDirectory ) ) i=0;
    item=item->next;
   }
- if ( i )
-  {
-   fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() );
-   gtk_combo_set_popdown_strings( GTK_COMBO( user_data ),fsTopList_items );
-  }
+ if ( i ) fsTopList_items=g_list_prepend( fsTopList_items,(gchar *)get_current_dir_name() );
  if (  mplMainAutoPlay ) mplEventHandling( evPlay,0 );
 }
 
@@ -446,8 +454,7 @@
  FSFrame=gtk_frame_new( NULL );
  gtk_widget_set_name( FSFrame,"FSFrame" );
  gtk_widget_ref( FSFrame );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"FSFrame",FSFrame,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"FSFrame",FSFrame,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( FSFrame );
  gtk_container_add( GTK_CONTAINER( fsFileSelect ),FSFrame );
  gtk_container_set_border_width( GTK_CONTAINER( FSFrame ),1 );
@@ -456,8 +463,7 @@
  frame2=gtk_frame_new( NULL );
  gtk_widget_set_name( frame2,"frame2" );
  gtk_widget_ref( frame2 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame2",frame2,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame2",frame2,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame2 );
  gtk_container_add( GTK_CONTAINER( FSFrame ),frame2 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
@@ -465,8 +471,7 @@
  frame3=gtk_frame_new( NULL );
  gtk_widget_set_name( frame3,"frame3" );
  gtk_widget_ref( frame3 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame3",frame3,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame3",frame3,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame3 );
  gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
  gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
@@ -474,8 +479,7 @@
  frame4=gtk_frame_new( NULL );
  gtk_widget_set_name( frame4,"frame4" );
  gtk_widget_ref( frame4 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame4",frame4,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"frame4",frame4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( frame4 );
  gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
  gtk_container_set_border_width( GTK_CONTAINER( frame4 ),1 );
@@ -484,47 +488,36 @@
  vbox4=gtk_vbox_new( FALSE,0 );
  gtk_widget_set_name( vbox4,"vbox4" );
  gtk_widget_ref( vbox4 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vbox4",vbox4,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vbox4",vbox4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( vbox4 );
  gtk_container_add( GTK_CONTAINER( frame4 ),vbox4 );
 
  hbox4=gtk_hbox_new( FALSE,0 );
  gtk_widget_set_name( hbox4,"hbox4" );
  gtk_widget_ref( hbox4 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox4",hbox4,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox4",hbox4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hbox4 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hbox4,FALSE,FALSE,0 );
 
  fsCombo4=gtk_combo_new();
  gtk_widget_set_name( fsCombo4,"fsCombo4" );
  gtk_widget_ref( fsCombo4 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsCombo4",fsCombo4,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsCombo4",fsCombo4,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( fsCombo4 );
  gtk_box_pack_start( GTK_BOX( hbox4 ),fsCombo4,TRUE,TRUE,0 );
  gtk_widget_set_usize( fsCombo4,-2,20 );
 
- fsTopList_items=g_list_append( fsTopList_items,(gchar *)get_current_dir_name() );
- if ( getenv( "HOME" ) ) fsTopList_items=g_list_append( fsTopList_items,getenv( "HOME" ) );
- fsTopList_items=g_list_append( fsTopList_items,"/home" );
- fsTopList_items=g_list_append( fsTopList_items,"/mnt" );
- fsTopList_items=g_list_append( fsTopList_items,"/" );
- gtk_combo_set_popdown_strings( GTK_COMBO( fsCombo4 ),fsTopList_items );
-
  fsPathCombo=GTK_COMBO( fsCombo4 )->entry;
  gtk_widget_set_name( fsPathCombo,"fsPathCombo" );
  gtk_widget_ref( fsPathCombo );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsPathCombo",fsPathCombo,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsPathCombo",fsPathCombo,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( fsPathCombo );
  gtk_widget_set_usize( fsPathCombo,-2,20 );
 
  vseparator1=gtk_vseparator_new();
  gtk_widget_set_name( vseparator1,"vseparator1" );
  gtk_widget_ref( vseparator1 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vseparator1",vseparator1,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"vseparator1",vseparator1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( vseparator1 );
  gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 );
  gtk_widget_set_usize( vseparator1,7,20 );
@@ -543,8 +536,7 @@
  hseparator1=gtk_hseparator_new();
  gtk_widget_set_name( hseparator1,"hseparator1" );
  gtk_widget_ref( hseparator1 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator1",hseparator1,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator1",hseparator1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hseparator1 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator1,FALSE,TRUE,0 );
  gtk_widget_set_usize( hseparator1,-2,8 );
@@ -552,16 +544,14 @@
  hbox6=gtk_hbox_new( FALSE,0 );
  gtk_widget_set_name( hbox6,"hbox6" );
  gtk_widget_ref( hbox6 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox6",hbox6,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbox6",hbox6,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hbox6 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hbox6,TRUE,TRUE,0 );
 
  fsFNameListWindow=gtk_scrolled_window_new( NULL,NULL );
  gtk_widget_set_name( fsFNameListWindow,"fsFNameListWindow" );
  gtk_widget_ref( fsFNameListWindow );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameListWindow",fsFNameListWindow,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameListWindow",fsFNameListWindow,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( fsFNameListWindow );
  gtk_box_pack_start( GTK_BOX( hbox6 ),fsFNameListWindow,TRUE,TRUE,0 );
  gtk_widget_set_usize( fsFNameListWindow,-2,145 );
@@ -570,8 +560,7 @@
  fsFNameList=gtk_clist_new( 2 );
  gtk_widget_set_name( fsFNameList,"fsFNameList" );
  gtk_widget_ref( fsFNameList );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameList",fsFNameList,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFNameList",fsFNameList,(GtkDestroyNotify)gtk_widget_unref );
  gtk_container_add( GTK_CONTAINER( fsFNameListWindow ),fsFNameList );
  gtk_clist_set_column_width( GTK_CLIST( fsFNameList ),0,80 );
  gtk_clist_set_selection_mode( GTK_CLIST( fsFNameList ),GTK_SELECTION_BROWSE );
@@ -582,16 +571,14 @@
  label1=gtk_label_new( "label1" );
  gtk_widget_set_name( label1,"label1" );
  gtk_widget_ref( label1 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"label1",label1,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"label1",label1,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( label1 );
  gtk_clist_set_column_widget( GTK_CLIST( fsFNameList ),0,label1 );
 
  hseparator2=gtk_hseparator_new();
  gtk_widget_set_name( hseparator2,"hseparator2" );
  gtk_widget_ref( hseparator2 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator2",hseparator2,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator2",hseparator2,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hseparator2 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator2,FALSE,TRUE,0 );
  gtk_widget_set_usize( hseparator2,-2,9 );
@@ -599,8 +586,7 @@
  List=gtk_combo_new();
  gtk_widget_set_name( List,"List" );
  gtk_widget_ref( List );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"List",List,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( List );
  gtk_box_pack_start( GTK_BOX( vbox4 ),List,FALSE,FALSE,0 );
  gtk_widget_set_usize( List,-2,20 );
@@ -613,8 +599,7 @@
  fsFilterCombo=GTK_COMBO( List )->entry;
  gtk_widget_set_name( fsFilterCombo,"fsFilterCombo" );
  gtk_widget_ref( fsFilterCombo );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFilterCombo",fsFilterCombo,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"fsFilterCombo",fsFilterCombo,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( fsFilterCombo );
  gtk_entry_set_editable (GTK_ENTRY( fsFilterCombo ),FALSE );
  gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsVideoFilterNames[fsNumberOfVideoFilterNames - 1][0] );
@@ -622,8 +607,7 @@
  hseparator3=gtk_hseparator_new();
  gtk_widget_set_name( hseparator3,"hseparator3" );
  gtk_widget_ref( hseparator3 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator3",hseparator3,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hseparator3",hseparator3,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hseparator3 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hseparator3,FALSE,TRUE,0 );
  gtk_widget_set_usize( hseparator3,-2,7 );
@@ -631,8 +615,7 @@
  hbuttonbox3=gtk_hbutton_box_new();
  gtk_widget_set_name( hbuttonbox3,"hbuttonbox3" );
  gtk_widget_ref( hbuttonbox3 );
- gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbuttonbox3",hbuttonbox3,
-                          ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( fsFileSelect ),"hbuttonbox3",hbuttonbox3,(GtkDestroyNotify)gtk_widget_unref );
  gtk_widget_show( hbuttonbox3 );
  gtk_box_pack_start( GTK_BOX( vbox4 ),hbuttonbox3,FALSE,TRUE,0 );
  gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox3 ),GTK_BUTTONBOX_END );
@@ -654,37 +637,16 @@
  gtk_container_add( GTK_CONTAINER( hbuttonbox3 ),fsCancel );
  gtk_widget_show( fsCancel );
 
- gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",
-                     GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),
-                     NULL );
- gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",
-                     GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),
-                     NULL );
- gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",
-                     GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),
-                     fsFilterCombo );
- gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",
-                     GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),
-                     fsFilterCombo );
- gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",
-                     GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),
-                     fsPathCombo );
- gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"activate",
-                     GTK_SIGNAL_FUNC( fs_fsPathCombo_activate ),
-                     fsPathCombo );
- gtk_signal_connect( GTK_OBJECT( fsUp ),"released",
-                     GTK_SIGNAL_FUNC( fs_Up_released ),
-                     fsFNameList );
- gtk_signal_connect( GTK_OBJECT( fsOk ),"released",
-                     GTK_SIGNAL_FUNC( fs_Ok_released ),
-                     fsCombo4 );
- gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",
-                     GTK_SIGNAL_FUNC( fs_Cancel_released ),
-                     NULL );
-
- gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",
-                    ( GtkSignalFunc ) fs_fsFNameList_select_row,
-                     NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo );
+ gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),fsFilterCombo );
+ gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo );
+ gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsPathCombo_activate ),fsPathCombo );
+ gtk_signal_connect( GTK_OBJECT( fsUp ),"released",GTK_SIGNAL_FUNC( fs_Up_released ),fsFNameList );
+ gtk_signal_connect( GTK_OBJECT( fsOk ),"released",GTK_SIGNAL_FUNC( fs_Ok_released ),fsCombo4 );
+ gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",GTK_SIGNAL_FUNC( fs_Cancel_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",(GtkSignalFunc)fs_fsFNameList_select_row,NULL );
 
  gtk_widget_grab_focus( fsFNameList );
 

Index: mb.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/mb.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- mb.c	23 Feb 2002 15:12:54 -0000	1.4
+++ mb.c	11 May 2002 16:37:58 -0000	1.5
@@ -11,22 +11,8 @@
 
 GtkWidget * gtkMessageBoxText;
 
-void on_MessageBox_destroy( GtkObject * object,gpointer user_data  )
-{
-/*
- switch( (int)user_data )
-  {
-   case GTK_MB_ERROR: gtk_widget_hide( ErrorMessageBox  ); break;
-   case GTK_MB_WARNING: gtk_widget_hide( WarningMessageBox  ); break;
-  }
-*/
- gtk_widget_hide( MessageBox  );
-}
-
-void on_Ok_released( GtkButton * button,gpointer user_data  )
-{
- gtk_widget_hide( MessageBox  );
-}
+static void on_MessageBox_Ok_released( GtkButton * button,gpointer user_data  )
+{ gtk_widget_destroy( MessageBox ); }
 
 GtkWidget * create_MessageBox( int type )
 {
@@ -45,140 +31,124 @@
  GtkPixmap * pixmapwid;
  GdkBitmap * mask;
 
- accel_group = gtk_accel_group_new ();
+ accel_group=gtk_accel_group_new();
 
- MessageBox = gtk_window_new (GTK_WINDOW_TOPLEVEL);
- gtk_widget_set_name (MessageBox, "MessageBox");
- gtk_object_set_data (GTK_OBJECT (MessageBox), "MessageBox", MessageBox);
- gtk_widget_set_events (MessageBox, GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_VISIBILITY_NOTIFY_MASK);
- gtk_window_set_title (GTK_WINDOW (MessageBox), "MPlayer ...");
- gtk_window_set_position (GTK_WINDOW (MessageBox), GTK_WIN_POS_CENTER);
- gtk_window_set_modal (GTK_WINDOW (MessageBox), TRUE);
- gtk_window_set_policy (GTK_WINDOW (MessageBox), TRUE, TRUE, FALSE);
-
- frame1 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame1, "frame1");
- gtk_widget_ref (frame1);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame1", frame1,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame1);
- gtk_container_add (GTK_CONTAINER (MessageBox), frame1);
- gtk_container_set_border_width (GTK_CONTAINER (frame1), 1);
- gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
-
- frame2 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame2, "frame2");
- gtk_widget_ref (frame2);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame2", frame2,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame2);
- gtk_container_add (GTK_CONTAINER (frame1), frame2);
- gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE);
-
- frame3 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame3, "frame3");
- gtk_widget_ref (frame3);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame3", frame3,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame3);
- gtk_container_add (GTK_CONTAINER (frame2), frame3);
- gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_ETCHED_OUT);
-
- frame4 = gtk_frame_new (NULL);
- gtk_widget_set_name (frame4, "frame4");
- gtk_widget_ref (frame4);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame4", frame4,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (frame4);
- gtk_container_add (GTK_CONTAINER (frame3), frame4);
- gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
-
- vbox1 = gtk_vbox_new (FALSE, 0);
- gtk_widget_set_name (vbox1, "vbox1");
- gtk_widget_ref (vbox1);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "vbox1", vbox1,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (vbox1);
- gtk_container_add (GTK_CONTAINER (frame4), vbox1);
-
- hbox1 = gtk_hbox_new (FALSE, 0);
- gtk_widget_set_name (hbox1, "hbox1");
- gtk_widget_ref (hbox1);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hbox1", hbox1,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbox1);
- gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
+ MessageBox=gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ gtk_widget_set_name( MessageBox,"MessageBox" );
+ gtk_object_set_data( GTK_OBJECT( MessageBox ),"MessageBox",MessageBox );
+ gtk_widget_set_events( MessageBox,GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
+ gtk_window_set_title( GTK_WINDOW( MessageBox ),"MPlayer ..." );
+ gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER );
+ gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE );
+ gtk_window_set_policy( GTK_WINDOW( MessageBox ),TRUE,TRUE,FALSE );
+
+ frame1=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame1,"frame1" );
+ gtk_widget_ref( frame1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame1 );
+ gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
+ gtk_container_set_border_width( GTK_CONTAINER( frame1 ),1 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
+
+ frame2=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame2,"frame2" );
+ gtk_widget_ref( frame2 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame2 );
+ gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
+
+ frame3=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame3,"frame3" );
+ gtk_widget_ref( frame3 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame3 );
+ gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame3 ),GTK_SHADOW_ETCHED_OUT );
+
+ frame4=gtk_frame_new( NULL );
+ gtk_widget_set_name( frame4,"frame4" );
+ gtk_widget_ref( frame4 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( frame4 );
+ gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
+ gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
+
+ vbox1=gtk_vbox_new( FALSE,0 );
+ gtk_widget_set_name( vbox1,"vbox1" );
+ gtk_widget_ref( vbox1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( vbox1 );
+ gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
+
+ hbox1=gtk_hbox_new( FALSE,0 );
+ gtk_widget_set_name( hbox1,"hbox1" );
+ gtk_widget_ref( hbox1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbox1",hbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbox1 );
+ gtk_box_pack_start( GTK_BOX( vbox1 ),hbox1,TRUE,TRUE,0 );
 
  pixmapstyle=gtk_widget_get_style( MessageBox );
 
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system( ),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm );
  WarningPixmap=gtk_pixmap_new( pixmapwid,mask );
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system( ),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
  ErrorPixmap=gtk_pixmap_new( pixmapwid,mask );
 
- gtk_widget_set_name (WarningPixmap, "pixmap1");
- gtk_widget_ref (WarningPixmap);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "pixmap1", WarningPixmap,(GtkDestroyNotify)gtk_widget_unref);
- gtk_widget_hide (WarningPixmap);
- gtk_box_pack_start (GTK_BOX (hbox1), WarningPixmap, FALSE, FALSE, 0);
- gtk_widget_set_usize (WarningPixmap, 55, -2);
-
- gtk_widget_set_name (ErrorPixmap, "pixmap1");
- gtk_widget_ref (ErrorPixmap);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "pixmap1", ErrorPixmap,(GtkDestroyNotify)gtk_widget_unref);
- gtk_widget_hide (ErrorPixmap);
- gtk_box_pack_start (GTK_BOX (hbox1), ErrorPixmap, FALSE, FALSE, 0);
- gtk_widget_set_usize (ErrorPixmap, 55, -2);
-
- gtkMessageBoxText = gtk_label_new ( "Text jol. Ha ezt megerted, akkor neked nagyon jo a magyar tudasod, te.");
- gtk_widget_set_name (gtkMessageBoxText, "gtkMessageBoxText");
- gtk_widget_ref (gtkMessageBoxText);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "gtkMessageBoxText", gtkMessageBoxText,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (gtkMessageBoxText);
- gtk_box_pack_start (GTK_BOX (hbox1), gtkMessageBoxText, TRUE, TRUE, 0);
- gtk_label_set_justify (GTK_LABEL (gtkMessageBoxText), GTK_JUSTIFY_FILL);
- gtk_label_set_line_wrap (GTK_LABEL (gtkMessageBoxText), TRUE);
-
- hseparator1 = gtk_hseparator_new ();
- gtk_widget_set_name (hseparator1, "hseparator1");
- gtk_widget_ref (hseparator1);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hseparator1", hseparator1,
-                            (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hseparator1);
- gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0);
- gtk_widget_set_usize (hseparator1, -2, 9);
-
- hbuttonbox1 = gtk_hbutton_box_new ();
- gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
- gtk_widget_ref (hbuttonbox1);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hbuttonbox1", hbuttonbox1,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (hbuttonbox1);
+ gtk_widget_set_name( WarningPixmap,"pixmap1" );
+ gtk_widget_ref( WarningPixmap );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"pixmap1",WarningPixmap,(GtkDestroyNotify )gtk_widget_unref );
+ gtk_widget_hide( WarningPixmap );
+ gtk_box_pack_start( GTK_BOX( hbox1 ),WarningPixmap,FALSE,FALSE,0 );
+ gtk_widget_set_usize( WarningPixmap,55,-2 );
+
+ gtk_widget_set_name( ErrorPixmap,"pixmap1" );
+ gtk_widget_ref( ErrorPixmap );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"pixmap1",ErrorPixmap,(GtkDestroyNotify )gtk_widget_unref );
+ gtk_widget_hide( ErrorPixmap );
+ gtk_box_pack_start( GTK_BOX( hbox1 ),ErrorPixmap,FALSE,FALSE,0 );
+ gtk_widget_set_usize( ErrorPixmap,55,-2 );
+
+ gtkMessageBoxText=gtk_label_new( "Text jol. Ha ezt megerted,akkor neked nagyon jo a magyar tudasod,te." );
+ gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
+ gtk_widget_ref( gtkMessageBoxText );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( gtkMessageBoxText );
+ gtk_box_pack_start( GTK_BOX( hbox1 ),gtkMessageBoxText,TRUE,TRUE,0 );
+ gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
+ gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );
+
+ hseparator1=gtk_hseparator_new( );
+ gtk_widget_set_name( hseparator1,"hseparator1" );
+ gtk_widget_ref( hseparator1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hseparator1 );
+ gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator1,FALSE,FALSE,0 );
+ gtk_widget_set_usize( hseparator1,-2,9 );
+
+ hbuttonbox1=gtk_hbutton_box_new( );
+ gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
+ gtk_widget_ref( hbuttonbox1 );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( hbuttonbox1 );
  gtk_widget_set_usize( hbuttonbox1,-2,25 );
  gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 );
- gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 0);
+ gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
+
+ Ok=gtk_button_new_with_label( MSGTR_Ok );
+ gtk_widget_set_name( Ok,MSGTR_Ok );
+ gtk_widget_ref( Ok );
+ gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok,(GtkDestroyNotify ) gtk_widget_unref );
+ gtk_widget_show( Ok );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
+ gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
+ gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
 
- Ok = gtk_button_new_with_label (MSGTR_Ok);
- gtk_widget_set_name (Ok, MSGTR_Ok);
- gtk_widget_ref (Ok);
- gtk_object_set_data_full (GTK_OBJECT (MessageBox),MSGTR_Ok, Ok,
-                           (GtkDestroyNotify) gtk_widget_unref);
- gtk_widget_show (Ok);
- gtk_container_add (GTK_CONTAINER (hbuttonbox1), Ok);
- gtk_widget_add_accelerator (Ok, "released", accel_group,
-                             GDK_Return, 0,
-                             GTK_ACCEL_VISIBLE);
- gtk_widget_add_accelerator (Ok, "released", accel_group,
-                             GDK_Escape, 0,
-                             GTK_ACCEL_VISIBLE);
-
- gtk_signal_connect (GTK_OBJECT (MessageBox), "destroy_event",
-                     GTK_SIGNAL_FUNC (on_MessageBox_destroy),
-                     NULL);
- gtk_signal_connect (GTK_OBJECT (Ok), "released",GTK_SIGNAL_FUNC (on_Ok_released),NULL);
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy_event",GTK_SIGNAL_FUNC( on_MessageBox_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_MessageBox_Ok_released ),NULL );
 
- gtk_window_add_accel_group (GTK_WINDOW (MessageBox), accel_group);
+ gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
 
  return MessageBox;
 }

Index: opts.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/opts.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- opts.c	23 Feb 2002 15:12:54 -0000	1.2
+++ opts.c	11 May 2002 16:37:58 -0000	1.3
@@ -31,9 +31,7 @@
 int opShift = 0;
 
 void HideOptions( void )
-{
- gtk_widget_hide( Options );
-}
+{ gtk_widget_destroy( Options ); }
 
 gboolean on_window2_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
 {

Index: pl.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/pl.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- pl.c	23 Feb 2002 15:12:54 -0000	1.2
+++ pl.c	11 May 2002 16:37:58 -0000	1.3
@@ -8,7 +8,7 @@
 
 void HidePlayList( void )
 {
- gtk_widget_hide( PlayList );
+ gtk_widget_destroy( PlayList );
 }
 
 void pl_PlayList_destroy( GtkObject * object,gpointer user_data )

Index: sb.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sb.c	18 Apr 2002 21:24:41 -0000	1.5
+++ sb.c	11 May 2002 16:37:58 -0000	1.6
@@ -62,12 +62,12 @@
 }
 
 void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
-{ gtk_widget_hide( SkinBrowser ); }
+{ gtk_widget_destroy( SkinBrowser ); }
 
 void on_SkinBrowser_Cancel( GtkObject * object,gpointer user_data )
 {
  if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
- gtk_widget_hide( SkinBrowser );
+ gtk_widget_destroy( SkinBrowser );
 }
 
 void on_SkinBrowser_Ok( GtkObject * object,gpointer user_data )
@@ -75,7 +75,7 @@
  ChangeSkin( sbSelectedSkin );
  if ( skinName ) free( skinName );
  skinName=strdup( sbSelectedSkin );
- gtk_widget_hide( SkinBrowser );
+ gtk_widget_destroy( SkinBrowser );
 }
 
 void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
@@ -91,7 +91,7 @@
   {
    if ( skinName ) free( skinName );
    skinName=strdup( sbSelectedSkin );
-   gtk_widget_hide( SkinBrowser );
+   gtk_widget_destroy( SkinBrowser );
   }
 }
 




More information about the MPlayer-cvslog mailing list