[MPlayer-cvslog] r38321 - in trunk/gui/dialog: fileselect.c playlist.c

ib subversion at mplayerhq.hu
Tue Oct 5 12:58:25 EEST 2021


Author: ib
Date: Tue Oct  5 12:58:25 2021
New Revision: 38321

Log:
Remove pointless "key-release-event" button signals.

The return key on buttons is already handled by GTK itself.

Modified:
   trunk/gui/dialog/fileselect.c
   trunk/gui/dialog/playlist.c

Modified: trunk/gui/dialog/fileselect.c
==============================================================================
--- trunk/gui/dialog/fileselect.c	Tue Oct  5 12:55:31 2021	(r38320)
+++ trunk/gui/dialog/fileselect.c	Tue Oct  5 12:58:25 2021	(r38321)
@@ -705,8 +705,6 @@ static gboolean fs_key_release_event(Gtk
 
         if (GTK_IS_SCROLLED_WINDOW(widget))
             gtk_button_clicked(GTK_BUTTON(fsOk));
-        else if (GTK_IS_BUTTON(widget))
-            gtk_button_clicked(GTK_BUTTON(widget));
         else if (GTK_IS_ENTRY(widget))
             gtk_widget_grab_focus(fsFNameList);
 
@@ -840,11 +838,8 @@ static GtkWidget *CreateFileSelect(void)
     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(fs_key_release_event), NULL);
     gtk_signal_connect(GTK_OBJECT(fsUp), "clicked", GTK_SIGNAL_FUNC(fs_Up_released), fsFNameList);
-    gtk_signal_connect(GTK_OBJECT(fsUp), "key-release-event", GTK_SIGNAL_FUNC(fs_key_release_event), NULL);
     gtk_signal_connect(GTK_OBJECT(fsOk), "clicked", GTK_SIGNAL_FUNC(fs_Ok_released), fsCombo4);
-    gtk_signal_connect(GTK_OBJECT(fsOk), "key-release-event", GTK_SIGNAL_FUNC(fs_key_release_event), NULL);
     gtk_signal_connect(GTK_OBJECT(fsCancel), "clicked", GTK_SIGNAL_FUNC(fs_Cancel_released), NULL);
-    gtk_signal_connect(GTK_OBJECT(fsCancel), "key-release-event", GTK_SIGNAL_FUNC(fs_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);
 

Modified: trunk/gui/dialog/playlist.c
==============================================================================
--- trunk/gui/dialog/playlist.c	Tue Oct  5 12:55:31 2021	(r38320)
+++ trunk/gui/dialog/playlist.c	Tue Oct  5 12:58:25 2021	(r38321)
@@ -264,8 +264,7 @@ static gboolean plKeyReleased( GtkWidget
 {
  if (event->keyval == GDK_Return)
   {
-   if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_BUTTON ) plButtonReleased( NULL, user_data );
-   else
+   if ( GTK_WIDGET_TYPE( widget ) == GTK_TYPE_CLIST )
     {
      switch ( GPOINTER_TO_INT( user_data) )
       {
@@ -577,13 +576,9 @@ static GtkWidget * CreatePlaylist( void
   gtk_signal_connect( GTK_OBJECT( CLSelected ),"key-release-event",GTK_SIGNAL_FUNC( plKeyReleased ),GINT_TO_POINTER(1) );
 
   gtk_signal_connect( GTK_OBJECT( Add ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),GINT_TO_POINTER(3) );
-  gtk_signal_connect( GTK_OBJECT( Add ),"key-release-event",GTK_SIGNAL_FUNC( plKeyReleased ),GINT_TO_POINTER(3) );
   gtk_signal_connect( GTK_OBJECT( Remove ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),GINT_TO_POINTER(2) );
-  gtk_signal_connect( GTK_OBJECT( Remove ),"key-release-event",GTK_SIGNAL_FUNC( plKeyReleased ),GINT_TO_POINTER(2) );
   gtk_signal_connect( GTK_OBJECT( Ok ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),GINT_TO_POINTER(1) );
-  gtk_signal_connect( GTK_OBJECT( Ok ),"key-release-event",GTK_SIGNAL_FUNC( plKeyReleased ),GINT_TO_POINTER(1) );
   gtk_signal_connect( GTK_OBJECT( Cancel ),"clicked",GTK_SIGNAL_FUNC( plButtonReleased ),GINT_TO_POINTER(0) );
-  gtk_signal_connect( GTK_OBJECT( Cancel ),"key-release-event",GTK_SIGNAL_FUNC( plKeyReleased ),GINT_TO_POINTER(0) );
 
   gtk_window_add_accel_group( GTK_WINDOW( Playlist ),accel_group );
 


More information about the MPlayer-cvslog mailing list