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

ib subversion at mplayerhq.hu
Thu Mar 28 17:35:59 CET 2013


Author: ib
Date: Thu Mar 28 17:35:59 2013
New Revision: 36069

Log:
Rename extern GTK widget fsFileSelect FileSelector.

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

Modified: trunk/gui/dialog/dialog.c
==============================================================================
--- trunk/gui/dialog/dialog.c	Thu Mar 28 17:23:39 2013	(r36068)
+++ trunk/gui/dialog/dialog.c	Thu Mar 28 17:35:59 2013	(r36069)
@@ -326,17 +326,17 @@ void gtkShow(int type, char *param)
 
     case evLoad:
         ShowFileSelect(FILESELECT_VIDEO_AUDIO, 0);
-        gtkSetLayer(fsFileSelect);
+        gtkSetLayer(FileSelector);
         break;
 
     case evLoadSubtitle:
         ShowFileSelect(FILESELECT_SUBTITLE, 0);
-        gtkSetLayer(fsFileSelect);
+        gtkSetLayer(FileSelector);
         break;
 
     case evLoadAudioFile:
         ShowFileSelect(FILESELECT_AUDIO, 0);
-        gtkSetLayer(fsFileSelect);
+        gtkSetLayer(FileSelector);
         break;
 
     case evAbout:

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Thu Mar 28 17:23:39 2013	(r36068)
+++ trunk/gui/dialog/fileselect.c	Thu Mar 28 17:35:59 2013	(r36069)
@@ -142,7 +142,7 @@ int fsLastFontFilterSelected = -1;
 
 GtkWidget   * fsFileNamesList;
 GtkWidget   * fsFNameList;
-GtkWidget   * fsFileSelect = NULL;
+GtkWidget   * FileSelector = NULL;
 GdkColormap * fsColorMap;
 GtkWidget   * fsOk;
 GtkWidget   * fsUp;
@@ -276,10 +276,10 @@ static void fs_AddPathUtf8 (const char *
 
 static void HideFileSelect( void )
 {
- if ( !fsFileSelect ) return;
- gtk_widget_hide( fsFileSelect );
- gtk_widget_destroy( fsFileSelect );
- fsFileSelect=NULL;
+ if ( !FileSelector ) return;
+ gtk_widget_hide( FileSelector );
+ gtk_widget_destroy( FileSelector );
+ FileSelector=NULL;
  fsLastFNameListSelected = fsCurrFNameListSelected;
 }
 
@@ -514,7 +514,7 @@ static gboolean fs_fsFNameList_event( Gt
 
 static void fs_Destroy( void )
 {
- WidgetDestroy( fsFileSelect, &fsFileSelect );
+ WidgetDestroy( FileSelector, &FileSelector );
 
  g_hash_table_destroy( fsPathTable );
 
@@ -538,26 +538,26 @@ static GtkWidget * create_FileSelect( vo
  GtkStyle      * upstyle;
 
 
- fsFileSelect=gtk_window_new( GTK_WINDOW_TOPLEVEL );
- gtk_widget_set_name( fsFileSelect,"fsFileSelect" );
- gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect );
- gtk_widget_set_usize( fsFileSelect,512,300 );
- GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT );
- gtk_widget_set_events( fsFileSelect,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
- gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect );
- gtk_window_set_position( GTK_WINDOW( fsFileSelect ),GTK_WIN_POS_CENTER );
- gtk_window_set_policy( GTK_WINDOW( fsFileSelect ),TRUE,TRUE,TRUE );
- gtk_window_set_wmclass( GTK_WINDOW( fsFileSelect ),"FileSelect","MPlayer" );
+ FileSelector=gtk_window_new( GTK_WINDOW_TOPLEVEL );
+ gtk_widget_set_name( FileSelector,"FileSelector" );
+ gtk_object_set_data( GTK_OBJECT( FileSelector ),"FileSelector",FileSelector );
+ gtk_widget_set_usize( FileSelector,512,300 );
+ GTK_WIDGET_SET_FLAGS( FileSelector,GTK_CAN_DEFAULT );
+ gtk_widget_set_events( FileSelector,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
+ gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_FileSelect );
+ gtk_window_set_position( GTK_WINDOW( FileSelector ),GTK_WIN_POS_CENTER );
+ gtk_window_set_policy( GTK_WINDOW( FileSelector ),TRUE,TRUE,TRUE );
+ gtk_window_set_wmclass( GTK_WINDOW( FileSelector ),"FileSelect","MPlayer" );
  fsColorMap=gdk_colormap_get_system();
 
- gtk_widget_realize( fsFileSelect );
- gtkAddIcon( fsFileSelect );
+ gtk_widget_realize( FileSelector );
+ gtkAddIcon( FileSelector );
 
- style=gtk_widget_get_style( fsFileSelect );
- dpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm );
- fpixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm );
+ style=gtk_widget_get_style( FileSelector );
+ dpixmap=gdk_pixmap_colormap_create_from_xpm_d( FileSelector->window,fsColorMap,&dmask,&style->bg[GTK_STATE_NORMAL],(gchar **)dir_xpm );
+ fpixmap=gdk_pixmap_colormap_create_from_xpm_d( FileSelector->window,fsColorMap,&fmask,&style->bg[GTK_STATE_NORMAL],(gchar **)file_xpm );
 
- vbox4=AddVBox( AddDialogFrame( fsFileSelect ),0 );
+ vbox4=AddVBox( AddDialogFrame( FileSelector ),0 );
  hbox4=AddHBox( vbox4,1 );
 
  fsCombo4=gtk_combo_new();
@@ -577,8 +577,8 @@ static GtkWidget * create_FileSelect( vo
  gtk_box_pack_start( GTK_BOX( hbox4 ),vseparator1,FALSE,TRUE,0 );
  gtk_widget_set_usize( vseparator1,7,20 );
 
- upstyle=gtk_widget_get_style( fsFileSelect );
- uppixmap=gdk_pixmap_colormap_create_from_xpm_d( fsFileSelect->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm );
+ upstyle=gtk_widget_get_style( FileSelector );
+ uppixmap=gdk_pixmap_colormap_create_from_xpm_d( FileSelector->window,fsColorMap,&upmask,&upstyle->bg[GTK_STATE_NORMAL],(gchar **)up_xpm );
  uppixmapwid=gtk_pixmap_new( uppixmap,upmask );
  gtk_widget_show( uppixmapwid );
 
@@ -613,7 +613,7 @@ static GtkWidget * create_FileSelect( vo
  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( FileSelector ),"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 );
@@ -633,8 +633,8 @@ static GtkWidget * create_FileSelect( vo
  fsOk=AddButton( MSGTR_Ok,hbuttonbox3 );
  fsCancel=AddButton( MSGTR_Cancel,hbuttonbox3 );
 
- gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( fs_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( FileSelector ),"destroy",GTK_SIGNAL_FUNC( fs_Destroy ), NULL );
+ gtk_signal_connect( GTK_OBJECT( FileSelector ),"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 );
@@ -649,7 +649,7 @@ static GtkWidget * create_FileSelect( vo
  gtk_signal_connect( GTK_OBJECT( fsFNameList ),"select_row",(GtkSignalFunc)fs_fsFNameList_select_row,NULL );
  gtk_signal_connect( GTK_OBJECT( fsFNameList ),"event", (GtkSignalFunc)fs_fsFNameList_event,NULL );
 
- return fsFileSelect;
+ return FileSelector;
 }
 
 void ShowFileSelect( int type,int modal )
@@ -659,14 +659,14 @@ void ShowFileSelect( int type,int modal 
  const gchar *fname;
  struct stat f;
 
- if ( fsFileSelect ) gtkActive( fsFileSelect );
-  else fsFileSelect=create_FileSelect();
+ if ( FileSelector ) gtkActive( FileSelector );
+  else FileSelector=create_FileSelect();
 
  fsType=type;
  switch ( type )
   {
    case FILESELECT_VIDEO_AUDIO:
-        gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect );
+        gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_FileSelect );
         fsList_items=NULL;
         for( i=0;fsVideoFilterNames[i][0];i++ )
           fsList_items=g_list_append( fsList_items,fsVideoFilterNames[i][0] );
@@ -677,7 +677,7 @@ void ShowFileSelect( int type,int modal 
 	//tmp=guiInfo.Filename;
         break;
    case FILESELECT_SUBTITLE:
-        gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_SubtitleSelect );
+        gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_SubtitleSelect );
         fsList_items=NULL;
         for( i=0;fsSubtitleFilterNames[i][0];i++ )
           fsList_items=g_list_append( fsList_items,fsSubtitleFilterNames[i][0] );
@@ -688,7 +688,7 @@ void ShowFileSelect( int type,int modal 
 	tmp=guiInfo.SubtitleFilename;
         break;
 /*   case fsOtherSelector:
-        gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_OtherSelect );
+        gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_OtherSelect );
         fsList_items=NULL;
         for( i=0;fsOtherFilterNames[i][0];i++ )
           fsList_items=g_list_append( fsList_items,fsOtherFilterNames[i][0] );
@@ -698,7 +698,7 @@ void ShowFileSelect( int type,int modal 
 	tmp=guiInfo.Othername;
         break;*/
    case FILESELECT_AUDIO:
-	gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_AudioFileSelect );
+	gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_AudioFileSelect );
 	fsList_items=NULL;
 	for( i=0;fsAudioFileNames[i][0];i++ )
 	  fsList_items=g_list_append( fsList_items,fsAudioFileNames[i][0] );
@@ -709,7 +709,7 @@ void ShowFileSelect( int type,int modal 
 	tmp=guiInfo.AudioFilename;
 	break;
    case FILESELECT_FONT:
-        gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FontSelect );
+        gtk_window_set_title( GTK_WINDOW( FileSelector ),MSGTR_FontSelect );
 	fsList_items=NULL;
 	for( i=0;fsFontFileNames[i][0];i++ )
 	  fsList_items=g_list_append( fsList_items,fsFontFileNames[i][0] );
@@ -769,7 +769,7 @@ void ShowFileSelect( int type,int modal 
  gtk_clist_select_row( GTK_CLIST( fsFNameList ),fsLastFNameListSelected,1 );
  fsLastFNameListSelected = 0;
 
- gtk_window_set_modal( GTK_WINDOW( fsFileSelect ),modal );
+ gtk_window_set_modal( GTK_WINDOW( FileSelector ),modal );
 
- gtk_widget_show( fsFileSelect );
+ gtk_widget_show( FileSelector );
 }

Modified: trunk/gui/dialog/fileselect.h
==============================================================================
--- trunk/gui/dialog/fileselect.h	Thu Mar 28 17:23:39 2013	(r36068)
+++ trunk/gui/dialog/fileselect.h	Thu Mar 28 17:35:59 2013	(r36069)
@@ -29,7 +29,7 @@ enum {
     FILESELECT_FONT
 };
 
-extern GtkWidget *fsFileSelect;
+extern GtkWidget *FileSelector;
 
 void ShowFileSelect(int type, int modal);
 

Modified: trunk/gui/dialog/preferences.c
==============================================================================
--- trunk/gui/dialog/preferences.c	Thu Mar 28 17:23:39 2013	(r36068)
+++ trunk/gui/dialog/preferences.c	Thu Mar 28 17:35:59 2013	(r36069)
@@ -658,7 +658,7 @@ static void prButton( GtkButton * button
 #endif
    case bLFont:
         ShowFileSelect( FILESELECT_FONT,FALSE );
-	gtkSetLayer( fsFileSelect );
+	gtkSetLayer( FileSelector );
 	break;
   }
 }


More information about the MPlayer-cvslog mailing list