[MPlayer-cvslog] r36193 - trunk/gui/dialog/fileselect.c

ib subversion at mplayerhq.hu
Tue Apr 30 14:03:33 CEST 2013


Author: ib
Date: Tue Apr 30 14:03:33 2013
New Revision: 36193

Log:
Set focus to fsFNameList after a combo box selection.

Do so by connecting a key_release_event signal to the combo boxes.

This helps when operating the GUI with a remote control
(and doesn't harm if not).

Modified:
   trunk/gui/dialog/fileselect.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Tue Apr 30 13:57:18 2013	(r36192)
+++ trunk/gui/dialog/fileselect.c	Tue Apr 30 14:03:33 2013	(r36193)
@@ -546,6 +546,8 @@ static gboolean on_FileSelect_key_releas
             gtk_button_released(GTK_BUTTON(fsOk));
         else if (GTK_IS_BUTTON(widget))
             gtk_button_released(GTK_BUTTON(widget));
+        else if (GTK_IS_ENTRY(widget))
+            gtk_widget_grab_focus(fsFNameList);
 
         break;
 
@@ -675,7 +677,9 @@ static GtkWidget *CreateFileSelect(void)
     gtk_signal_connect(GTK_OBJECT(fsFNameListWindow), "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), "key_release_event", GTK_SIGNAL_FUNC(on_FileSelect_key_release_event), NULL);
     gtk_signal_connect(GTK_OBJECT(fsPathCombo), "changed", GTK_SIGNAL_FUNC(fs_fsPathCombo_changed), fsPathCombo);
+    gtk_signal_connect(GTK_OBJECT(fsPathCombo), "key_release_event", GTK_SIGNAL_FUNC(on_FileSelect_key_release_event), NULL);
     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);


More information about the MPlayer-cvslog mailing list