[MPlayer-cvslog] r34432 - trunk/gui/ui/gtk/fileselect.c
ib
subversion at mplayerhq.hu
Sun Dec 11 16:52:32 CET 2011
Author: ib
Date: Sun Dec 11 16:52:32 2011
New Revision: 34432
Log:
Add Return key events to file selector buttons.
This helps when operating the GUI with a remote control
(and doesn't harm if not).
Modified:
trunk/gui/ui/gtk/fileselect.c
Modified: trunk/gui/ui/gtk/fileselect.c
==============================================================================
--- trunk/gui/ui/gtk/fileselect.c Sun Dec 11 16:41:37 2011 (r34431)
+++ trunk/gui/ui/gtk/fileselect.c Sun Dec 11 16:52:32 2011 (r34432)
@@ -543,6 +543,12 @@ static gboolean on_FileSelect_key_releas
GdkEventKey * event,
gpointer user_data )
{
+ if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON )
+ {
+ if (event->keyval == GDK_Return) gtk_button_released( GTK_BUTTON( widget ) );
+ }
+ else
+ {
switch ( event->keyval )
{
case GDK_Escape:
@@ -555,6 +561,7 @@ static gboolean on_FileSelect_key_releas
gtk_button_released( GTK_BUTTON( fsUp ) );
break;
}
+ }
return FALSE;
}
@@ -711,8 +718,11 @@ GtkWidget * create_FileSelect( void )
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( fsUp ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
gtk_signal_connect( GTK_OBJECT( fsOk ),"released",GTK_SIGNAL_FUNC( fs_Ok_released ),fsCombo4 );
+ gtk_signal_connect( GTK_OBJECT( fsOk ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
gtk_signal_connect( GTK_OBJECT( fsCancel ),"released",GTK_SIGNAL_FUNC( fs_Cancel_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( fsCancel ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
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 );
More information about the MPlayer-cvslog
mailing list