[MPlayer-cvslog] r34554 - in trunk/gui/ui/gtk: about.c equalizer.c fileselect.c playlist.c preferences.c skinbrowser.c
ib
subversion at mplayerhq.hu
Fri Jan 13 15:06:56 CET 2012
Author: ib
Date: Fri Jan 13 15:06:55 2012
New Revision: 34554
Log:
Use correct data types and common variable names in GTK callback functions.
Don't use (void) user_data.
Modified:
trunk/gui/ui/gtk/about.c
trunk/gui/ui/gtk/equalizer.c
trunk/gui/ui/gtk/fileselect.c
trunk/gui/ui/gtk/playlist.c
trunk/gui/ui/gtk/preferences.c
trunk/gui/ui/gtk/skinbrowser.c
Modified: trunk/gui/ui/gtk/about.c
==============================================================================
--- trunk/gui/ui/gtk/about.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/about.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -35,7 +35,7 @@ void ShowAboutBox( void )
gtk_widget_show( About );
}
-static void abWidgetDestroy( GtkWidget * widget, GtkWidget ** widget_pointer )
+static void abWidgetDestroy( GtkButton * button, gpointer user_data )
{ WidgetDestroy( NULL,&About ); }
GtkWidget * create_About( void )
Modified: trunk/gui/ui/gtk/equalizer.c
==============================================================================
--- trunk/gui/ui/gtk/equalizer.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/equalizer.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -249,8 +249,11 @@ static void eqButtonReleased( GtkButton
}
}
-static void eqFocus( GtkWindow * window,GtkWidget * widget,gpointer user_data )
-{ eqSetBands( Channel ); }
+static gboolean eqFocus( GtkWidget * widget,GdkEvent * event,gpointer user_data )
+{
+ eqSetBands( Channel );
+ return FALSE;
+}
static void eqSelectChannelsListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
{
@@ -265,8 +268,8 @@ static void eqSelectChannelsListRow( Gtk
}
}
-static void eqNotebook( GtkNotebook * notebook, GtkNotebookPage * page,
- gint page_num, gpointer user_data )
+static void eqNotebook( GtkNotebook * notebook, gpointer page,
+ guint page_num, gpointer user_data )
{
if ( page_num ) gtk_widget_hide( Config );
else gtk_widget_show( Config );
Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/fileselect.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -397,7 +397,7 @@ static void fs_PersistantHistory( char *
}
//-----------------------------------------------
-static void fs_fsFilterCombo_activate( GtkEditable * editable,
+static void fs_fsFilterCombo_activate( GtkEntry * entry,
gpointer user_data )
{
fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) );
@@ -444,7 +444,7 @@ static void fs_fsFilterCombo_changed( Gt
CheckDir( fsFNameList );
}
-static void fs_fsPathCombo_activate( GtkEditable * editable,
+static void fs_fsPathCombo_activate( GtkEntry * entry,
gpointer user_data )
{
const unsigned char * str;
@@ -538,28 +538,28 @@ static void fs_Cancel_released( GtkButto
fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history file
}
-static void fs_fsFNameList_select_row( GtkWidget * widget, gint row, gint column,
- GdkEventButton *bevent, gpointer user_data)
+static void fs_fsFNameList_select_row( GtkCList * clist, gint row, gint column,
+ GdkEvent * event, gpointer user_data)
{
fsCurrFNameListSelected = row;
- gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile );
+ gtk_clist_get_text( clist,row,1,&fsSelectedFile );
g_free( fsSelectedFileUtf8 );
fsSelectedFileUtf8 = g_filename_from_utf8( fsSelectedFile, -1, NULL, NULL, NULL );
if ( fsSelectedFileUtf8 ) fsSelectedFile = fsSelectedFileUtf8;
- if( bevent && bevent->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
+ if( event && event->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
}
static gboolean on_FileSelect_key_release_event( GtkWidget * widget,
- GdkEventKey * event,
+ GdkEvent * event,
gpointer user_data )
{
if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON )
{
- if (event->keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) );
+ if (event->key.keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) );
}
else
{
- switch ( event->keyval )
+ switch ( event->key.keyval )
{
case GDK_Escape:
gtk_button_released( GTK_BUTTON( fsCancel ) );
@@ -583,8 +583,6 @@ static gboolean fs_fsFNameList_event( Gt
GdkEventButton *bevent;
gint row, col;
- (void) user_data;
-
bevent = (GdkEventButton *) event;
if ( event->type == GDK_BUTTON_RELEASE && bevent->button == 2 )
Modified: trunk/gui/ui/gtk/playlist.c
==============================================================================
--- trunk/gui/ui/gtk/playlist.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/playlist.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -305,8 +305,6 @@ static gboolean plEvent ( GtkWidget * wi
GdkEventButton *bevent;
gint row, col;
- (void) user_data;
-
bevent = (GdkEventButton *) event;
if ( event->type == GDK_BUTTON_RELEASE && bevent->button == 2 )
@@ -439,14 +437,14 @@ static void scan_dir( char * path )
}
}
-static void plCTRow(GtkWidget * widget, gint row, gint column, GdkEventButton * bevent, gpointer data)
+static void plCTRow(GtkCList * clist, gint row, gint column, GdkEvent * event, gpointer user_data)
{
DirNodeType * DirNode;
GtkCTreeNode * node;
- node=gtk_ctree_node_nth( GTK_CTREE( widget ),row );
- DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( widget ),node );
+ node=gtk_ctree_node_nth( GTK_CTREE( clist ),row );
+ DirNode=gtk_ctree_node_get_row_data( GTK_CTREE( clist ),node );
current_path=DirNode->path;
- gtk_ctree_expand( GTK_CTREE( widget ),node );
+ gtk_ctree_expand( GTK_CTREE( clist ),node );
scan_dir( DirNode->path );
free( CLFileSelected );
CLFileSelected=calloc( 1,NrOfEntrys * sizeof( int ) );
Modified: trunk/gui/ui/gtk/preferences.c
==============================================================================
--- trunk/gui/ui/gtk/preferences.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/preferences.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -189,11 +189,11 @@ static int old_video_driver = 0;
void ShowAudioConfig( void );
void HideAudioConfig( void );
-static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
+static gboolean prHScaler( GtkWidget * widget,GdkEvent * event,gpointer user_data );
static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
-static void prEntry( GtkContainer * container,gpointer user_data );
+static void prEntry( GtkEditable * editable,gpointer user_data );
#endif
void ShowPreferences( void )
@@ -489,7 +489,7 @@ static void HidePreferences( void )
}
#if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
-static void prEntry( GtkContainer * container,gpointer user_data )
+static void prEntry( GtkEditable * editable,gpointer user_data )
{
const char * comment;
int i;
@@ -661,7 +661,7 @@ static void prButton( GtkButton * button
}
}
-static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data )
+static gboolean prHScaler( GtkWidget * widget,GdkEvent * event,gpointer user_data )
{
switch ( (int)user_data )
{
Modified: trunk/gui/ui/gtk/skinbrowser.c
==============================================================================
--- trunk/gui/ui/gtk/skinbrowser.c Thu Jan 12 19:21:56 2012 (r34553)
+++ trunk/gui/ui/gtk/skinbrowser.c Fri Jan 13 15:06:55 2012 (r34554)
@@ -90,7 +90,7 @@ int gtkFillSkinList( gchar * mdir )
return 1;
}
-static void prButton( GtkObject * object,gpointer user_data )
+static void prButton( GtkButton * button,gpointer user_data )
{
if ( sbSelectedSkin )
{
@@ -109,7 +109,7 @@ static void prButton( GtkObject * object
HideSkinBrowser();
}
-static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
+static void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
{
gtk_clist_get_text( clist,row,0,&sbSelectedSkin );
if ( strcmp( prev,sbSelectedSkin ) )
@@ -118,8 +118,8 @@ static void on_SkinList_select_row( GtkC
uiChangeSkin( sbSelectedSkin );
gtkActive( SkinBrowser );
}
- if( !bevent ) return;
- if( bevent->type == GDK_2BUTTON_PRESS )
+ if( !event ) return;
+ if( event->type == GDK_2BUTTON_PRESS )
{
free( skinName );
skinName=strdup( sbSelectedSkin );
More information about the MPlayer-cvslog
mailing list