[MPlayer-cvslog] r34437 - trunk/gui/ui/gtk/playlist.c
ib
subversion at mplayerhq.hu
Sun Dec 11 18:51:25 CET 2011
Author: ib
Date: Sun Dec 11 18:51:24 2011
New Revision: 34437
Log:
Add Return key events to playlist's file lists.
This helps when operating the GUI with a remote control
(and doesn't harm if not).
Modified:
trunk/gui/ui/gtk/playlist.c
Modified: trunk/gui/ui/gtk/playlist.c
==============================================================================
--- trunk/gui/ui/gtk/playlist.c Sun Dec 11 18:12:55 2011 (r34436)
+++ trunk/gui/ui/gtk/playlist.c Sun Dec 11 18:51:24 2011 (r34437)
@@ -279,7 +279,22 @@ static gboolean plKeyReleased( GtkWidget
GdkEventKey * event,
gpointer user_data )
{
- if (event->keyval == GDK_Return) plButtonReleased( NULL, user_data );
+ if (event->keyval == GDK_Return)
+ {
+ if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) plButtonReleased( NULL, user_data );
+ else
+ {
+ switch ( (int) user_data )
+ {
+ case 0:
+ plButtonReleased( NULL, (void *) 3 );
+ break;
+ case 1:
+ plButtonReleased( NULL, (void *) 2 );
+ break;
+ }
+ }
+ }
return FALSE;
}
@@ -567,9 +582,11 @@ GtkWidget * create_PlayList( void )
gtk_signal_connect( GTK_OBJECT( CLFiles ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void *)0 );
gtk_signal_connect( GTK_OBJECT( CLFiles ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void *)0 );
gtk_signal_connect( GTK_OBJECT( CLFiles ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)0 );
+ gtk_signal_connect( GTK_OBJECT( CLFiles ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)0 );
sigSel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"select_row",GTK_SIGNAL_FUNC( plRowSelect ),(void*)1 );
sigUnsel=gtk_signal_connect( GTK_OBJECT( CLSelected ),"unselect_row",GTK_SIGNAL_FUNC( plUnRowSelect ),(void*)1 );
sigEvent=gtk_signal_connect( GTK_OBJECT( CLSelected ),"event",GTK_SIGNAL_FUNC( plEvent ),(void *)1 );
+ gtk_signal_connect( GTK_OBJECT( CLSelected ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void *)1 );
gtk_signal_connect( GTK_OBJECT( Add ),"released",GTK_SIGNAL_FUNC( plButtonReleased ),(void*)3 );
gtk_signal_connect( GTK_OBJECT( Add ),"key_release_event",GTK_SIGNAL_FUNC( plKeyReleased ),(void*)3 );
More information about the MPlayer-cvslog
mailing list