Mercurial > mplayer.hg
comparison gui/ui/gtk/fileselect.c @ 34466:a650895d50a5
Use correct data types and common variable names in GTK callback functions.
Don't use (void) user_data.
author | ib |
---|---|
date | Fri, 13 Jan 2012 14:06:55 +0000 |
parents | dbb38c5293b0 |
children | d476fbab0a28 |
comparison
equal
deleted
inserted
replaced
34465:3c1a1038bfc7 | 34466:a650895d50a5 |
---|---|
395 for ( i=FF_ARRAY_ELEMS(fsHistory) - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; | 395 for ( i=FF_ARRAY_ELEMS(fsHistory) - 1;i;i-- ) fsHistory[i]=fsHistory[i - 1]; |
396 fsHistory[0]=gstrdup( subject ); | 396 fsHistory[0]=gstrdup( subject ); |
397 } | 397 } |
398 //----------------------------------------------- | 398 //----------------------------------------------- |
399 | 399 |
400 static void fs_fsFilterCombo_activate( GtkEditable * editable, | 400 static void fs_fsFilterCombo_activate( GtkEntry * entry, |
401 gpointer user_data ) | 401 gpointer user_data ) |
402 { | 402 { |
403 fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) ); | 403 fsFilter=gtk_entry_get_text( GTK_ENTRY( user_data ) ); |
404 CheckDir( fsFNameList ); | 404 CheckDir( fsFNameList ); |
405 } | 405 } |
442 default: return; | 442 default: return; |
443 } | 443 } |
444 CheckDir( fsFNameList ); | 444 CheckDir( fsFNameList ); |
445 } | 445 } |
446 | 446 |
447 static void fs_fsPathCombo_activate( GtkEditable * editable, | 447 static void fs_fsPathCombo_activate( GtkEntry * entry, |
448 gpointer user_data ) | 448 gpointer user_data ) |
449 { | 449 { |
450 const unsigned char * str; | 450 const unsigned char * str; |
451 gchar * dirname; | 451 gchar * dirname; |
452 | 452 |
536 { | 536 { |
537 HideFileSelect(); | 537 HideFileSelect(); |
538 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history file | 538 fs_PersistantHistory( get_current_dir_name_utf8() ); //totem, write into history file |
539 } | 539 } |
540 | 540 |
541 static void fs_fsFNameList_select_row( GtkWidget * widget, gint row, gint column, | 541 static void fs_fsFNameList_select_row( GtkCList * clist, gint row, gint column, |
542 GdkEventButton *bevent, gpointer user_data) | 542 GdkEvent * event, gpointer user_data) |
543 { | 543 { |
544 fsCurrFNameListSelected = row; | 544 fsCurrFNameListSelected = row; |
545 gtk_clist_get_text( GTK_CLIST(widget ),row,1,&fsSelectedFile ); | 545 gtk_clist_get_text( clist,row,1,&fsSelectedFile ); |
546 g_free( fsSelectedFileUtf8 ); | 546 g_free( fsSelectedFileUtf8 ); |
547 fsSelectedFileUtf8 = g_filename_from_utf8( fsSelectedFile, -1, NULL, NULL, NULL ); | 547 fsSelectedFileUtf8 = g_filename_from_utf8( fsSelectedFile, -1, NULL, NULL, NULL ); |
548 if ( fsSelectedFileUtf8 ) fsSelectedFile = fsSelectedFileUtf8; | 548 if ( fsSelectedFileUtf8 ) fsSelectedFile = fsSelectedFileUtf8; |
549 if( bevent && bevent->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); | 549 if( event && event->type == GDK_BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) ); |
550 } | 550 } |
551 | 551 |
552 static gboolean on_FileSelect_key_release_event( GtkWidget * widget, | 552 static gboolean on_FileSelect_key_release_event( GtkWidget * widget, |
553 GdkEventKey * event, | 553 GdkEvent * event, |
554 gpointer user_data ) | 554 gpointer user_data ) |
555 { | 555 { |
556 if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) | 556 if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) |
557 { | 557 { |
558 if (event->keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) ); | 558 if (event->key.keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) ); |
559 } | 559 } |
560 else | 560 else |
561 { | 561 { |
562 switch ( event->keyval ) | 562 switch ( event->key.keyval ) |
563 { | 563 { |
564 case GDK_Escape: | 564 case GDK_Escape: |
565 gtk_button_released( GTK_BUTTON( fsCancel ) ); | 565 gtk_button_released( GTK_BUTTON( fsCancel ) ); |
566 break; | 566 break; |
567 case GDK_Return: | 567 case GDK_Return: |
581 gpointer user_data ) | 581 gpointer user_data ) |
582 { | 582 { |
583 GdkEventButton *bevent; | 583 GdkEventButton *bevent; |
584 gint row, col; | 584 gint row, col; |
585 | 585 |
586 (void) user_data; | |
587 | |
588 bevent = (GdkEventButton *) event; | 586 bevent = (GdkEventButton *) event; |
589 | 587 |
590 if ( event->type == GDK_BUTTON_RELEASE && bevent->button == 2 ) | 588 if ( event->type == GDK_BUTTON_RELEASE && bevent->button == 2 ) |
591 { | 589 { |
592 if ( gtk_clist_get_selection_info( GTK_CLIST( widget ), bevent->x, bevent->y, &row, &col ) ) | 590 if ( gtk_clist_get_selection_info( GTK_CLIST( widget ), bevent->x, bevent->y, &row, &col ) ) |