[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk mb.h,1.3,1.4 sb.h,1.6,1.7
Zoltan Ponekker
pontscho at mplayer.dev.hu
Mon Sep 17 23:16:02 CEST 2001
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer/pixmaps error.xpm,NONE,1.1 stop.xpm,NONE,1.1 warning.xpm,NONE,1.1 question.xpm,NONE,1.1
- Next message: [Mplayer-cvslog] CVS: main/Gui/mplayer menu.h,1.3,1.4 play.c,1.30,1.31 psignal.c,1.13,1.14 widgets.c,1.8,1.9 widgets.h,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mplayer:/var/tmp.root/cvs-serv18362/Gui/mplayer/gtk
Modified Files:
mb.h sb.h
Log Message:
add new features. and fix skin error loop.
Index: mb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/mb.h,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- mb.h 12 Sep 2001 15:47:18 -0000 1.3
+++ mb.h 17 Sep 2001 21:16:00 -0000 1.4
@@ -4,155 +4,163 @@
GtkWidget * gtkMessageBoxText;
-void on_MessageBox_destroy( GtkObject * object,gpointer user_data )
+void on_MessageBox_destroy( GtkObject * object,gpointer user_data )
{
- gtk_widget_hide( MessageBox );
+ gtk_widget_hide( MessageBox );
gtkVisibleMessageBox=0;
}
-void on_Ok_released( GtkButton * button,gpointer user_data )
+void on_Ok_released( GtkButton * button,gpointer user_data )
{
- gtk_widget_hide( MessageBox );
+ gtk_widget_hide( MessageBox );
gtkVisibleMessageBox=0;
- gtkSendMessage( evMessageBox );
+ gtkSendMessage( evMessageBox );
}
-GtkWidget * create_MessageBox( void )
+GtkWidget * create_MessageBox( int type )
{
- GtkWidget *MessageBox;
- GtkWidget *frame1;
- GtkWidget *frame2;
- GtkWidget *frame3;
- GtkWidget *frame4;
- GtkWidget *vbox1;
- GtkWidget *vbox2;
- GtkWidget *hseparator1;
- GtkWidget *hbuttonbox1;
- GtkWidget *Ok;
- GtkAccelGroup *accel_group;
-
- accel_group=gtk_accel_group_new();
-
- MessageBox=gtk_window_new( GTK_WINDOW_DIALOG );
- gtk_widget_set_name( MessageBox,MSGTR_MessageBox );
- gtk_object_set_data( GTK_OBJECT( MessageBox ),MSGTR_MessageBox,MessageBox );
- gtk_widget_set_usize( MessageBox,420,128 );
- GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_FOCUS );
- GTK_WIDGET_SET_FLAGS( MessageBox,GTK_CAN_DEFAULT );
- gtk_widget_set_events( MessageBox,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 );
- gtk_window_set_title( GTK_WINDOW( MessageBox ),MSGTR_MessageBox );
- gtk_window_set_position( GTK_WINDOW( MessageBox ),GTK_WIN_POS_CENTER );
- gtk_window_set_modal( GTK_WINDOW( MessageBox ),TRUE );
- gtk_window_set_policy( GTK_WINDOW( MessageBox ),FALSE,FALSE,FALSE );
- gtk_window_set_wmclass( GTK_WINDOW( MessageBox ),MSGTR_MessageBox,MSGTR_MessageBox );
-
- frame1=gtk_frame_new( NULL );
- gtk_widget_set_name( frame1,"frame1" );
- gtk_widget_ref( frame1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame1",frame1,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( frame1 );
- gtk_container_add( GTK_CONTAINER( MessageBox ),frame1 );
- gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
-
- frame2=gtk_frame_new( NULL );
- gtk_widget_set_name( frame2,"frame2" );
- gtk_widget_ref( frame2 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame2",frame2,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( frame2 );
- gtk_container_add( GTK_CONTAINER( frame1 ),frame2 );
- gtk_frame_set_shadow_type( GTK_FRAME( frame2 ),GTK_SHADOW_NONE );
-
- frame3=gtk_frame_new( NULL );
- gtk_widget_set_name( frame3,"frame3" );
- gtk_widget_ref( frame3 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame3",frame3,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( frame3 );
- gtk_container_add( GTK_CONTAINER( frame2 ),frame3 );
-
- frame4=gtk_frame_new( NULL );
- gtk_widget_set_name( frame4,"frame4" );
- gtk_widget_ref( frame4 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"frame4",frame4,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( frame4 );
- gtk_container_add( GTK_CONTAINER( frame3 ),frame4 );
- gtk_frame_set_shadow_type( GTK_FRAME( frame4 ),GTK_SHADOW_NONE );
-
- vbox1=gtk_vbox_new( FALSE,0 );
- gtk_widget_set_name( vbox1,"vbox1" );
- gtk_widget_ref( vbox1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox1",vbox1,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( vbox1 );
- gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
-
- vbox2=gtk_vbox_new( FALSE,0 );
- gtk_widget_set_name( vbox2,"vbox2" );
- gtk_widget_ref( vbox2 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"vbox2",vbox2,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( vbox2 );
- gtk_box_pack_start( GTK_BOX( vbox1 ),vbox2,TRUE,FALSE,0 );
-
- gtkMessageBoxText=gtk_label_new( "Ez." );
- gtk_widget_set_name( gtkMessageBoxText,"gtkMessageBoxText" );
- gtk_widget_ref( gtkMessageBoxText );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"gtkMessageBoxText",gtkMessageBoxText,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( gtkMessageBoxText );
- gtk_box_pack_start( GTK_BOX( vbox2 ),gtkMessageBoxText,FALSE,FALSE,0 );
-// gtk_widget_set_usize( gtkMessageBoxText,-2,77 );
- gtk_widget_set_usize( gtkMessageBoxText,384,77 );
- gtk_label_set_justify( GTK_LABEL( gtkMessageBoxText ),GTK_JUSTIFY_FILL );
- gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),TRUE );
-
- hseparator1=gtk_hseparator_new();
- gtk_widget_set_name( hseparator1,"hseparator1" );
- gtk_widget_ref( hseparator1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hseparator1",hseparator1,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( hseparator1 );
- gtk_box_pack_start( GTK_BOX( vbox2 ),hseparator1,TRUE,TRUE,0 );
-
- hbuttonbox1=gtk_hbutton_box_new();
- gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
- gtk_widget_ref( hbuttonbox1 );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( hbuttonbox1 );
- gtk_box_pack_start( GTK_BOX( vbox1 ),hbuttonbox1,FALSE,FALSE,0 );
- GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_FOCUS );
- GTK_WIDGET_SET_FLAGS( hbuttonbox1,GTK_CAN_DEFAULT );
- gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),0 );
- gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),60,0 );
- gtk_button_box_set_child_ipadding( GTK_BUTTON_BOX( hbuttonbox1 ),10,0 );
-
- Ok=gtk_button_new_with_label( MSGTR_Ok );
- gtk_widget_set_name( Ok,MSGTR_Ok );
- gtk_widget_ref( Ok );
- gtk_object_set_data_full( GTK_OBJECT( MessageBox ),MSGTR_Ok,Ok,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( Ok );
- gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
- gtk_widget_set_usize( Ok,100,-2 );
- GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
- gtk_widget_add_accelerator( Ok,"released",accel_group,
- GDK_Return,0,
- GTK_ACCEL_VISIBLE );
-
- gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy",
- GTK_SIGNAL_FUNC( on_MessageBox_destroy ),
- NULL );
- gtk_signal_connect( GTK_OBJECT( Ok ),"released",
- GTK_SIGNAL_FUNC( on_Ok_released ),
- NULL );
+ GtkWidget * MessageBox;
+ GtkWidget * frame1;
+ GtkWidget * frame2;
+ GtkWidget * frame3;
+ GtkWidget * frame4;
+ GtkWidget * vbox1;
+ GtkWidget * hbox1;
+ GtkWidget * pixmap1;
+ GtkWidget * hseparator1;
+ GtkWidget * hbuttonbox1;
+ GtkWidget * Ok;
+ GtkAccelGroup * accel_group;
+ GtkStyle * pixmapstyle;
+ GtkPixmap * pixmapwid;
+ GdkBitmap * mask;
+
+ accel_group = gtk_accel_group_new ();
+
+ MessageBox = gtk_window_new (GTK_WINDOW_TOPLEVEL);
+ gtk_widget_set_name (MessageBox, "MessageBox");
+ gtk_object_set_data (GTK_OBJECT (MessageBox), "MessageBox", MessageBox);
+ gtk_widget_set_events (MessageBox, GDK_EXPOSURE_MASK | GDK_KEY_PRESS_MASK | GDK_KEY_RELEASE_MASK | GDK_VISIBILITY_NOTIFY_MASK);
+ gtk_window_set_title (GTK_WINDOW (MessageBox), "MPlayer ...");
+ gtk_window_set_position (GTK_WINDOW (MessageBox), GTK_WIN_POS_CENTER);
+ gtk_window_set_modal (GTK_WINDOW (MessageBox), TRUE);
+ gtk_window_set_policy (GTK_WINDOW (MessageBox), TRUE, TRUE, FALSE);
+
+ frame1 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame1, "frame1");
+ gtk_widget_ref (frame1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame1", frame1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame1);
+ gtk_container_add (GTK_CONTAINER (MessageBox), frame1);
+ gtk_container_set_border_width (GTK_CONTAINER (frame1), 1);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame1), GTK_SHADOW_IN);
+
+ frame2 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame2, "frame2");
+ gtk_widget_ref (frame2);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame2", frame2,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame2);
+ gtk_container_add (GTK_CONTAINER (frame1), frame2);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame2), GTK_SHADOW_NONE);
+
+ frame3 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame3, "frame3");
+ gtk_widget_ref (frame3);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame3", frame3,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame3);
+ gtk_container_add (GTK_CONTAINER (frame2), frame3);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame3), GTK_SHADOW_ETCHED_OUT);
+
+ frame4 = gtk_frame_new (NULL);
+ gtk_widget_set_name (frame4, "frame4");
+ gtk_widget_ref (frame4);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "frame4", frame4,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (frame4);
+ gtk_container_add (GTK_CONTAINER (frame3), frame4);
+ gtk_frame_set_shadow_type (GTK_FRAME (frame4), GTK_SHADOW_NONE);
+
+ vbox1 = gtk_vbox_new (FALSE, 0);
+ gtk_widget_set_name (vbox1, "vbox1");
+ gtk_widget_ref (vbox1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "vbox1", vbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (vbox1);
+ gtk_container_add (GTK_CONTAINER (frame4), vbox1);
+
+ hbox1 = gtk_hbox_new (FALSE, 0);
+ gtk_widget_set_name (hbox1, "hbox1");
+ gtk_widget_ref (hbox1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hbox1", hbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbox1, TRUE, TRUE, 0);
+
+ pixmapstyle=gtk_widget_get_style( MessageBox );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
+ pixmap1=gtk_pixmap_new( pixmapwid,mask );
+
+ gtk_widget_set_name (pixmap1, "pixmap1");
+ gtk_widget_ref (pixmap1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "pixmap1", pixmap1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (pixmap1);
+ gtk_box_pack_start (GTK_BOX (hbox1), pixmap1, FALSE, FALSE, 0);
+ gtk_widget_set_usize (pixmap1, 55, -2);
+
+ gtkMessageBoxText = gtk_label_new ( "Text jol. Ha ezt megerted, akkor neked nagyon jo a magyar tudasod, te.");
+ gtk_widget_set_name (gtkMessageBoxText, "gtkMessageBoxText");
+ gtk_widget_ref (gtkMessageBoxText);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "gtkMessageBoxText", gtkMessageBoxText,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (gtkMessageBoxText);
+ gtk_box_pack_start (GTK_BOX (hbox1), gtkMessageBoxText, TRUE, TRUE, 0);
+ gtk_label_set_justify (GTK_LABEL (gtkMessageBoxText), GTK_JUSTIFY_FILL);
+ gtk_label_set_line_wrap (GTK_LABEL (gtkMessageBoxText), TRUE);
+
+ hseparator1 = gtk_hseparator_new ();
+ gtk_widget_set_name (hseparator1, "hseparator1");
+ gtk_widget_ref (hseparator1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hseparator1", hseparator1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hseparator1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hseparator1, FALSE, FALSE, 0);
+ gtk_widget_set_usize (hseparator1, -2, 9);
+
+ hbuttonbox1 = gtk_hbutton_box_new ();
+ gtk_widget_set_name (hbuttonbox1, "hbuttonbox1");
+ gtk_widget_ref (hbuttonbox1);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox), "hbuttonbox1", hbuttonbox1,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (hbuttonbox1);
+ gtk_box_pack_start (GTK_BOX (vbox1), hbuttonbox1, FALSE, FALSE, 0);
+
+ Ok = gtk_button_new_with_label (MSGTR_Ok);
+ gtk_widget_set_name (Ok, MSGTR_Ok);
+ gtk_widget_ref (Ok);
+ gtk_object_set_data_full (GTK_OBJECT (MessageBox),MSGTR_Ok, Ok,
+ (GtkDestroyNotify) gtk_widget_unref);
+ gtk_widget_show (Ok);
+ gtk_container_add (GTK_CONTAINER (hbuttonbox1), Ok);
+ GTK_WIDGET_SET_FLAGS (Ok, GTK_CAN_DEFAULT);
+ gtk_widget_add_accelerator (Ok, "released", accel_group,
+ GDK_Return, 0,
+ GTK_ACCEL_VISIBLE);
+ gtk_widget_add_accelerator (Ok, "released", accel_group,
+ GDK_Escape, 0,
+ GTK_ACCEL_VISIBLE);
+
+ gtk_signal_connect (GTK_OBJECT (MessageBox), "destroy_event",
+ GTK_SIGNAL_FUNC (on_MessageBox_destroy),
+ NULL);
+ gtk_signal_connect (GTK_OBJECT (Ok), "released",GTK_SIGNAL_FUNC (on_Ok_released),NULL);
- gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
+ gtk_window_add_accel_group (GTK_WINDOW (MessageBox), accel_group);
- return MessageBox;
+ return MessageBox;
}
#endif
Index: sb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sb.h 12 Sep 2001 18:53:42 -0000 1.6
+++ sb.h 17 Sep 2001 21:16:00 -0000 1.7
@@ -11,7 +11,6 @@
#include "../app.h"
GtkWidget * SkinList;
-GtkWidget * sbOk;
char * sbSelectedSkin=NULL;
char * sbMPlayerDirInHome=NULL;
char * sbMPlayerPrefixDir=NULL;
@@ -38,7 +37,7 @@
strcpy( gtkOldSkin,gtkShMem->sb.name );
if ( ( str[0]=(char *)calloc( 1,7 ) ) == NULL )
{
- gtkMessageBox( MSGTR_SKINBROWSER_NotEnoughMemory );
+ gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory );
return 0;
}
str[1]="";
@@ -55,7 +54,7 @@
{
tmp=strrchr( gg.gl_pathv[i],'/' ); tmp++;
if ( !strcmp( tmp,"default" ) ) continue;
- if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( MSGTR_SKINBROWSER_NotEnoughMemory ); return 0; }
+ if ( ( str[0]=(char *)malloc( strlen( tmp ) + 1 ) ) == NULL ) { gtkMessageBox( GTK_MB_FATAL,MSGTR_SKINBROWSER_NotEnoughMemory ); return 0; }
strcpy( str[0],tmp );
if ( gtkFindCList( SkinList,str[0] ) == -1 ) gtk_clist_append( GTK_CLIST( SkinList ),str );
free( str[0] );
@@ -83,16 +82,6 @@
if( bevent->type == GDK_2BUTTON_PRESS ) HideSkinBrowser();
}
-gboolean on_SkinBrowser_key_release_event( GtkWidget * widget,GdkEventKey * event,gpointer user_data )
-{
- switch ( event->keyval )
- {
- case GDK_Escape: on_SkinBrowser_Cancel( NULL,0 ); break;
- case GDK_Return: HideSkinBrowser(); break;
- }
- return FALSE;
-}
-
GtkWidget * create_SkinBrowser( void )
{
GtkWidget * SkinBrowser;
@@ -108,6 +97,10 @@
GtkWidget * hseparator5;
GtkWidget * hbuttonbox4;
GtkWidget * Cancel;
+ GtkWidget * Ok;
+ GtkAccelGroup * accel_group;
+
+ accel_group = gtk_accel_group_new ();
SkinBrowser=gtk_window_new( GTK_WINDOW_DIALOG );
gtk_widget_set_name( SkinBrowser,MSGTR_SkinBrowser );
@@ -209,16 +202,14 @@
label2=gtk_label_new( "label2" );
gtk_widget_set_name( label2,"label2" );
gtk_widget_ref( label2 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label2",label2,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label2",label2,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( label2 );
gtk_clist_set_column_widget( GTK_CLIST( SkinList ),0,label2 );
hseparator5=gtk_hseparator_new();
gtk_widget_set_name( hseparator5,"hseparator5" );
gtk_widget_ref( hseparator5 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator5",hseparator5,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator5",hseparator5,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( hseparator5 );
gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator5,FALSE,TRUE,0 );
gtk_widget_set_usize( hseparator5,-2,9 );
@@ -226,55 +217,44 @@
hbuttonbox4=gtk_hbutton_box_new();
gtk_widget_set_name( hbuttonbox4,"hbuttonbox4" );
gtk_widget_ref( hbuttonbox4 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hbuttonbox4",hbuttonbox4,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hbuttonbox4",hbuttonbox4,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( hbuttonbox4 );
gtk_box_pack_start( GTK_BOX( vbox5 ),hbuttonbox4,FALSE,TRUE,0 );
gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox4 ),GTK_BUTTONBOX_END );
gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox4 ),0 );
gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox4 ),80,0 );
- sbOk=gtk_button_new_with_label( MSGTR_Ok );
- gtk_widget_set_name( sbOk,MSGTR_Ok );
- gtk_widget_ref( sbOk );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Ok,sbOk,
- ( GtkDestroyNotify ) gtk_widget_unref );
- gtk_widget_show( sbOk );
- gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),sbOk );
- gtk_widget_set_usize( sbOk,-2,33 );
- GTK_WIDGET_SET_FLAGS( sbOk,GTK_CAN_DEFAULT );
+ Ok=gtk_button_new_with_label( MSGTR_Ok );
+ gtk_widget_set_name( Ok,MSGTR_Ok );
+ gtk_widget_ref( Ok );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref );
+ gtk_widget_show( Ok );
+ gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Ok );
+ gtk_widget_set_usize( Ok,-2,33 );
+ GTK_WIDGET_SET_FLAGS( Ok,GTK_CAN_DEFAULT );
+ gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
Cancel=gtk_button_new_with_label( MSGTR_Cancel );
gtk_widget_set_name( Cancel,MSGTR_Cancel );
gtk_widget_ref( Cancel );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Cancel,Cancel,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),MSGTR_Cancel,Cancel,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( Cancel );
gtk_container_add( GTK_CONTAINER( hbuttonbox4 ),Cancel );
gtk_widget_set_usize( Cancel,-2,33 );
GTK_WIDGET_SET_FLAGS( Cancel,GTK_CAN_DEFAULT );
+ gtk_widget_add_accelerator( Cancel,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
- gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",
- GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
- NULL );
- gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"key_release_event",
- GTK_SIGNAL_FUNC( on_SkinBrowser_key_release_event ),
- NULL );
- gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",
- GTK_SIGNAL_FUNC( on_SkinList_select_row ),
- NULL );
- gtk_signal_connect( GTK_OBJECT( sbOk ),"released",
- GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),
- NULL );
- gtk_signal_connect( GTK_OBJECT( Cancel ),"released",
- GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),
- NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL );
+ gtk_signal_connect( GTK_OBJECT( SkinList ),"select_row",GTK_SIGNAL_FUNC( on_SkinList_select_row ),NULL );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),NULL );
+ gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),NULL );
if ( ( sbMPlayerDirInHome=(char *)calloc( 1,strlen( skinDirInHome ) + 4 ) ) != NULL )
{ strcpy( sbMPlayerDirInHome,skinDirInHome ); strcat( sbMPlayerDirInHome,"/*" ); }
if ( ( sbMPlayerPrefixDir=(char *)calloc( 1,strlen( skinMPlayerDir ) + 4 ) ) != NULL )
{ strcpy( sbMPlayerPrefixDir,skinMPlayerDir ); strcat( sbMPlayerPrefixDir,"/*" ); }
+ gtk_window_add_accel_group( GTK_WINDOW( SkinBrowser ),accel_group );
gtk_widget_grab_focus( SkinList );
return SkinBrowser;
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer/pixmaps error.xpm,NONE,1.1 stop.xpm,NONE,1.1 warning.xpm,NONE,1.1 question.xpm,NONE,1.1
- Next message: [Mplayer-cvslog] CVS: main/Gui/mplayer menu.h,1.3,1.4 play.c,1.30,1.31 psignal.c,1.13,1.14 widgets.c,1.8,1.9 widgets.h,1.4,1.5
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list