[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk fs.h,1.4,1.5 sb.h,1.5,1.6
Zoltan Ponekker
pontscho at mplayer.dev.hu
Wed Sep 12 20:53:59 CEST 2001
Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mplayer:/var/tmp.root/cvs-serv15641/Gui/mplayer/gtk
Modified Files:
fs.h sb.h
Log Message:
fix tab bug
Index: fs.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.h,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fs.h 12 Sep 2001 15:08:53 -0000 1.4
+++ fs.h 12 Sep 2001 18:53:42 -0000 1.5
@@ -40,9 +40,6 @@
GList * fsList_items = NULL;
GList * fsTopList_items = NULL;
-GtkWidget * fsItemList[6];
-int fsItemListCounter = 0;
-
void CheckDir( GtkWidget * list,unsigned char * directory )
{
struct stat fs;
@@ -286,49 +283,18 @@
if( bevent->type == GDK_2BUTTON_PRESS ) gtk_button_released( GTK_BUTTON( fsOk ) );
}
-int fsShift = False;
-
gboolean on_FileSelect_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
switch ( event->keyval )
{
case GDK_Escape:
- if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsCancel ) );
+ gtk_button_released( GTK_BUTTON( fsCancel ) );
break;
case GDK_Return:
- if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsOk ) );
+ gtk_button_released( GTK_BUTTON( fsOk ) );
break;
case GDK_BackSpace:
- if ( !fsShift ) gtk_button_released( GTK_BUTTON( fsUp ) );
- break;
- case GDK_Tab:
- if ( fsShift )
- {
- fsItemListCounter--;
- if ( fsItemListCounter < 0 ) fsItemListCounter=5;
- }
- else
- {
- fsItemListCounter++;
- if ( fsItemListCounter > 5 ) fsItemListCounter=0;
- }
- gtk_widget_grab_focus( fsItemList[fsItemListCounter] );
- break;
- case GDK_Shift_L:
- case GDK_Shift_R:
- fsShift=False;
- break;
- }
- return FALSE;
-}
-
-gboolean on_FileSelect_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
-{
- switch ( event->keyval )
- {
- case GDK_Shift_L:
- case GDK_Shift_R:
- fsShift=True;
+ gtk_button_released( GTK_BUTTON( fsUp ) );
break;
}
return FALSE;
@@ -375,7 +341,6 @@
gtk_widget_set_name( fsFileSelect,"fsFileSelect" );
gtk_object_set_data( GTK_OBJECT( fsFileSelect ),"fsFileSelect",fsFileSelect );
gtk_widget_set_usize( fsFileSelect,416,256 );
- GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_FOCUS );
GTK_WIDGET_SET_FLAGS( fsFileSelect,GTK_CAN_DEFAULT );
gtk_widget_set_events( fsFileSelect,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
gtk_window_set_title( GTK_WINDOW( fsFileSelect ),MSGTR_FileSelect );
@@ -618,9 +583,6 @@
gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",
GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),
NULL );
- gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_press_event",
- GTK_SIGNAL_FUNC( on_FileSelect_key_press_event ),
- NULL );
gtk_signal_connect( GTK_OBJECT( combo_entry1 ),"changed",
GTK_SIGNAL_FUNC( fs_combo_entry1_changed ),
combo_entry1 );
@@ -648,13 +610,6 @@
NULL );
gtk_widget_grab_focus( fsFNameList );
-
- fsItemList[0]=fsFNameList;
- fsItemList[1]=combo_entry1;
- fsItemList[2]=fsOk;
- fsItemList[3]=fsCancel;
- fsItemList[4]=fsUp;
- fsItemList[5]=fsComboEntry2;
return fsFileSelect;
}
Index: sb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- sb.h 12 Sep 2001 15:47:18 -0000 1.5
+++ sb.h 12 Sep 2001 18:53:42 -0000 1.6
@@ -16,9 +16,6 @@
char * sbMPlayerDirInHome=NULL;
char * sbMPlayerPrefixDir=NULL;
-GtkWidget * sbItemsList[3];
-int sbItemsListCounter = 0;
-
void HideSkinBrowser( void )
{
gtk_widget_hide( SkinBrowser );
@@ -86,42 +83,12 @@
if( bevent->type == GDK_2BUTTON_PRESS ) HideSkinBrowser();
}
-int sbShift = False;
-
gboolean on_SkinBrowser_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
{
switch ( event->keyval )
{
- case GDK_Escape:
- if ( !sbShift ) on_SkinBrowser_Cancel( NULL,0 );
- break;
- case GDK_Return:
- if ( !sbShift ) HideSkinBrowser();
- break;
- case GDK_Tab:
- if ( sbShift )
- { if ( (--sbItemsListCounter) < 0 ) sbItemsListCounter=2; }
- else
- { if ( (++sbItemsListCounter) > 2 ) sbItemsListCounter=0; }
- gtk_widget_grab_focus( sbItemsList[sbItemsListCounter] );
- break;
- case GDK_Shift_L:
- case GDK_Shift_R:
- sbShift=False;
- break;
- }
-// if ( ( event->keyval == GDK_Escape )|| ( event->keyval == GDK_Return ) ) HideSkinBrowser();
- return FALSE;
-}
-
-gboolean on_SkinBrowser_key_press_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
-{
- switch ( event->keyval )
- {
- case GDK_Shift_L:
- case GDK_Shift_R:
- sbShift=True;
- break;
+ case GDK_Escape: on_SkinBrowser_Cancel( NULL,0 ); break;
+ case GDK_Return: HideSkinBrowser(); break;
}
return FALSE;
}
@@ -147,7 +114,7 @@
gtk_object_set_data( GTK_OBJECT( SkinBrowser ),MSGTR_SkinBrowser,SkinBrowser );
gtk_widget_set_usize( SkinBrowser,256,320 );
gtk_container_set_border_width( GTK_CONTAINER( SkinBrowser ),1 );
- GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_FOCUS );
+// GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_FOCUS );
GTK_WIDGET_SET_FLAGS( SkinBrowser,GTK_CAN_DEFAULT );
gtk_widget_set_events( SkinBrowser,GDK_EXPOSURE_MASK | GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_FOCUS_CHANGE_MASK | GDK_STRUCTURE_MASK | GDK_PROPERTY_CHANGE_MASK | GDK_VISIBILITY_NOTIFY_MASK );
gtk_window_set_title( GTK_WINDOW( SkinBrowser ),MSGTR_SkinBrowser );
@@ -293,9 +260,6 @@
gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_release_event",
GTK_SIGNAL_FUNC( on_SkinBrowser_key_release_event ),
NULL );
- gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_press_event",
- GTK_SIGNAL_FUNC( on_SkinBrowser_key_press_event ),
- NULL );
gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",
GTK_SIGNAL_FUNC( on_SkinList_select_row ),
NULL );
@@ -312,10 +276,6 @@
{ strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
gtk_widget_grab_focus( SkinList );
-
- sbItemsList[0]=SkinList;
- sbItemsList[1]=sbOk;
- sbItemsList[2]=Cancel;
return SkinBrowser;
}
More information about the MPlayer-cvslog
mailing list