[Mplayer-cvslog] CVS: main/Gui/mplayer/gtk about.c,1.4,1.5 about.h,1.5,1.6 fs.c,1.12,1.13 fs.h,1.11,1.12 mb.c,1.5,1.6 mb.h,1.6,1.7 sb.c,1.6,1.7 sb.h,1.8,1.9
Zoltan Ponekker
pontscho at mplayerhq.hu
Mon May 20 15:56:18 CEST 2002
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer menu.h,1.11,1.12 play.c,1.61,1.62 sw.h,1.30,1.31 widgets.c,1.22,1.23 widgets.h,1.12,1.13
- Next message: [Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.41,1.42 ws.h,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/mplayer/main/Gui/mplayer/gtk
In directory mail:/var/tmp.root/cvs-serv8171/Gui/mplayer/gtk
Modified Files:
about.c about.h fs.c fs.h mb.c mb.h sb.c sb.h
Log Message:
fix some gtk bug...
Index: about.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/about.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- about.c 11 May 2002 16:37:58 -0000 1.4
+++ about.c 20 May 2002 13:56:16 -0000 1.5
@@ -7,8 +7,24 @@
#include "../widgets.h"
#include "about.h"
+int gtkVAboutBox = 0;
+GtkWidget * AboutBox;
+
+void ShowAboutBox( void )
+{
+ if ( gtkVAboutBox ) gtkActive( AboutBox );
+ else AboutBox=create_About();
+ gtk_widget_show( AboutBox );
+}
+
+void ab_AboutBox_show( GtkButton * button,gpointer user_data )
+{ gtkVAboutBox=(int)user_data; }
+
void ab_Ok_released( GtkButton * button,gpointer user_data )
-{ gtk_widget_destroy( AboutBox ); }
+{
+ gtkVAboutBox=(int)user_data;
+ gtk_widget_destroy( AboutBox );
+}
GtkWidget * create_About( void )
{
@@ -32,7 +48,7 @@
GtkAccelGroup * accel_group;
- accel_group=gtk_accel_group_new( );
+ accel_group=gtk_accel_group_new();
About=gtk_window_new( GTK_WINDOW_TOPLEVEL );
gtk_widget_set_name( About,MSGTR_About );
@@ -45,7 +61,7 @@
frame1=gtk_frame_new( NULL );
gtk_widget_set_name( frame1,"frame1" );
gtk_widget_ref( frame1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"frame1",frame1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( frame1 );
gtk_container_add( GTK_CONTAINER( About ),frame1 );
gtk_frame_set_shadow_type( GTK_FRAME( frame1 ),GTK_SHADOW_IN );
@@ -53,7 +69,7 @@
frame2=gtk_frame_new( NULL );
gtk_widget_set_name( frame2,"frame2" );
gtk_widget_ref( frame2 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"frame2",frame2,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"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 );
@@ -61,7 +77,7 @@
frame3=gtk_frame_new( NULL );
gtk_widget_set_name( frame3,"frame3" );
gtk_widget_ref( frame3 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"frame3",frame3,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"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 );
@@ -69,7 +85,7 @@
frame4=gtk_frame_new( NULL );
gtk_widget_set_name( frame4,"frame4" );
gtk_widget_ref( frame4 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"frame4",frame4,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"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 );
@@ -77,7 +93,7 @@
vbox1=gtk_vbox_new( FALSE,0 );
gtk_widget_set_name( vbox1,"vbox1" );
gtk_widget_ref( vbox1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"vbox1",vbox1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( vbox1 );
gtk_container_add( GTK_CONTAINER( frame4 ),vbox1 );
@@ -87,7 +103,7 @@
gtk_widget_set_name( pixmap1,"pixmap1" );
gtk_widget_ref( pixmap1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"pixmap1",pixmap1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( pixmap1 );
gtk_box_pack_start( GTK_BOX( vbox1 ),pixmap1,FALSE,FALSE,0 );
gtk_widget_set_usize( pixmap1,-2,174 );
@@ -95,7 +111,7 @@
hseparator2=gtk_hseparator_new( );
gtk_widget_set_name( hseparator2,"hseparator2" );
gtk_widget_ref( hseparator2 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator2",hseparator2,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( hseparator2 );
gtk_box_pack_start( GTK_BOX( vbox1 ),hseparator2,FALSE,FALSE,0 );
gtk_widget_set_usize( hseparator2,-2,7 );
@@ -103,7 +119,7 @@
scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
gtk_widget_ref( scrolledwindow1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( scrolledwindow1 );
gtk_box_pack_start( GTK_BOX( vbox1 ),scrolledwindow1,TRUE,TRUE,0 );
gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow1 ),GTK_POLICY_AUTOMATIC,GTK_POLICY_AUTOMATIC );
@@ -111,69 +127,83 @@
AboutText=gtk_text_new( NULL,NULL );
gtk_widget_set_name( AboutText,"AboutText" );
gtk_widget_ref( AboutText );
- gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"AboutText",AboutText,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( AboutText );
gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),AboutText );
gtk_text_insert( GTK_TEXT( AboutText ),NULL,NULL,NULL,
- "\nMPlayer code:\n" \
- " fileformat detection,demuxers - A'rpi\n" \
- " DVD support - ( alpha version was: LGB ) now: ?\n" \
- " network streaming - Bertrand BAUDET\n" \
- " A-V sync code - A'rpi\n" \
- " subtitles file parser/reader - Lez( most of them )\n" \
- " config files & commandline parser - Szabi\n" \
- " fastmemcpy - Nick Kurshev\n" \
- " LIRC support - Acki\n" \
- " SUB/OSD renderer - Adam Tla/lka\n" \
- " Gui - Pontscho\n\nlibvo drivers:\n" \
- " vo_aa.c - Folke Ashberg\n" \
- " vo_dga.c - Acki\n" \
- " vo_fbdev.c - Szabi\n" \
- " vo_ggi.c - al3x\n" \
- " vo_gl.c - A'rpi\n" \
- " vo_md5.c - A'rpi\n" \
- " vo_mga.c - A'rpi\n" \
- " vo_null.c - A'rpi\n" \
- " vo_odivx.c - A'rpi\n" \
- " vo_pgm.c - A'rpi\n" \
- " vo_png.c - Atmos\n" \
- " vo_sdl.c - Atmos\n" \
- " vo_svga.c - se7en\n" \
- " vo_x11.c - Pontscho\n"\
- " vo_xmga.c - Pontscho\n"\
- " vo_xv.c - Pontscho\n" \
- " vo_aa.c - Folke Ashberg\n\n" \
- "libao2 drivers:\n" \
- " ao_alsa5.c - al3x\n" \
- " ao_alsa9.c - al3x( BUGGY,use oss )\n" \
- " ao_null.c - A'rpi\n" \
- " ao_oss.c - A'rpi\n" \
- " ao_pcm.c - Atmos\n" \
- " ao_sdl.c - Atmos\n" \
- " ao_sun.c - Jürgen Keil\n\n" \
- "Homepage:\n" \
- " Design: Chass\n" \
- " Contents: Gabucino\n" \
- " LGB\n\n" \
- "English documentation:\n" \
- " tech-*.txt: A'rpi\n" \
- " all the others: Gabucino\n\n" \
- "Documentation translations:\n" \
- " Hungarian - Gabucino\n" \
- " Spanish - TeLeNiEkO\n" \
- " Russian - Nick Kurshev\n" \
- " Polish - Dariush Pietrzak\n" \
- " German - Atmosfear\n\n" \
- "Platforms/ports:\n" \
- " DEBIAN packaging - Dariush Pietrzak\n" \
- " FreeBSD support - Vladimir Kushnir\n" \
- " Solaris 8 support - Jürgen Keil\n",1535 );
+ "\n" \
+ " MPlayer core team:\n" \
+ "\n" \
+ " * Arpad Gereoffy (A'rpi/ESP-team)\n" \
+ " * Zoltan Ponekker (Pontscho/Fresh!mindworkz)\n" \
+ " * Gabor Berczi (Gabucino)\n" \
+ " * Alex Beregszaszi (al3x)\n" \
+ " * Gabor Lenart (LGB)\n" \
+ " * Felix Bunemann (Atmos)\n" \
+ " * Alban Bedel (Albeu)\n" \
+ " * pl\n" \
+ " * Michael Niedermayer\n" \
+ "\n" \
+ " Additional codes:\n" \
+ "\n" \
+ " * Szabolcs Berecz (Szabi)\n" \
+ " * Laszlo Megyer (Lez, Laaz)\n" \
+ " * Gyula Laszlo (Chass, Tegla)\n" \
+ " * Zoltan Mark Vician (Se7en)\n" \
+ " * Andreas Ackermann (Acki)\n" \
+ " * TeLeNiEkO\n" \
+ " * Michael Graffam\n" \
+ " * Jens Hoffmann\n" \
+ " * German Gomez Garcia\n" \
+ " * Dariusz Pietrzak (Eyck)\n" \
+ " * Marcus Comstedt\n" \
+ " * Jurgen Keil\n" \
+ " * Vladimir Kushnir\n" \
+ " * Bertrand BAUDET\n" \
+ " * Derek J Witt\n" \
+ " * Artur Zaprzala\n" \
+ " * lanzz at lanzz.org\n" \
+ " * Adam Tla/lka\n" \
+ " * Folke Ashberg\n" \
+ " * Kamil Toman\n" \
+ " * Ivan Kalvatchev\n" \
+ " * Sven Goethel\n" \
+ " * joy_ping\n" \
+ " * Eric Anholt\n" \
+ " * Jiri Svoboda\n" \
+ " * Oliver Schoenbrunner\n" \
+ " * Jeroen Dobbelaere\n" \
+ " * David Holm\n" \
+ " * Panagiotis Issaris\n" \
+ " * Mike Melanson\n" \
+ " * Tobias Diedrich\n" \
+ " * Kilian A. Foth\n" \
+ " * Tim Ferguson\n" \
+ " * Sam Lin\n" \
+ " * Johannes Feigl\n" \
+ " * Kim Minh Kaplan\n" \
+ " * Brian Kuschak\n" \
+ " * Stephen Davies\n" \
+ " * Rik Snel\n" \
+ " * Anders Johansson\n" \
+ " * Roberto Togni\n" \
+ " * Wojtek Kaniewski\n" \
+ " * Fredrik Kuivinen\n" \
+ "\n" \
+ " Main testers:\n" \
+ "\n" \
+ " * Tibor Balazs (Tibcu)\n" \
+ " * Peter Sasi (SaPe)\n" \
+ " * Christoph H. Lampert\n" \
+ " * Attila Kinali\n" \
+ " * Dirk Vornheder\n" \
+ " * Bohdan Horst (Nexus)\n" \
+ "\n",1481 );
- hseparator1=gtk_hseparator_new( );
+ hseparator1=gtk_hseparator_new();
gtk_widget_set_name( hseparator1,"hseparator1" );
gtk_widget_ref( hseparator1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"hseparator1",hseparator1,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"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,10 );
@@ -181,8 +211,7 @@
hbuttonbox1=gtk_hbutton_box_new( );
gtk_widget_set_name( hbuttonbox1,"hbuttonbox1" );
gtk_widget_ref( hbuttonbox1 );
- gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_set_usize( hbuttonbox1,-2,25 );
gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 );
gtk_widget_show( hbuttonbox1 );
@@ -191,12 +220,14 @@
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( About ),MSGTR_Ok,Ok,( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( About ),MSGTR_Ok,Ok,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( Ok );
gtk_container_add( GTK_CONTAINER( hbuttonbox1 ),Ok );
- gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
- gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( About ),"destroy",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
+ gtk_signal_connect( GTK_OBJECT( About ),"show",GTK_SIGNAL_FUNC( ab_AboutBox_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( About ),"hide",GTK_SIGNAL_FUNC( ab_AboutBox_show ),0 );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( ab_Ok_released ),0 );
gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
gtk_widget_add_accelerator( Ok,"released",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
Index: about.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/about.h,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- about.h 14 Nov 2001 16:05:33 -0000 1.5
+++ about.h 20 May 2002 13:56:16 -0000 1.6
@@ -4,6 +4,9 @@
#include <gtk/gtk.h>
+extern GtkWidget * AboutBox;
+
extern GtkWidget * create_About( void );
+extern void ShowAboutBox( void );
#endif
Index: fs.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.c,v
retrieving revision 1.12
retrieving revision 1.13
diff -u -r1.12 -r1.13
--- fs.c 14 May 2002 11:40:59 -0000 1.12
+++ fs.c 20 May 2002 13:56:16 -0000 1.13
@@ -38,6 +38,8 @@
int fsMessage = -1;
int fsType = 0;
+int gtkVFileSelect = 0;
+
#define fsNumberOfVideoFilterNames 9
char * fsVideoFilterNames[fsNumberOfVideoFilterNames+1][2] =
{ { "MPEG files (*.mpg,*.mpeg)", "*.mpg,*.mpeg" },
@@ -186,7 +188,9 @@
void ShowFileSelect( int type )
{
int i;
- FileSelect=create_FileSelect();
+
+ if ( gtkVFileSelect ) gtkActive( fsFileSelect );
+ else fsFileSelect=create_FileSelect();
if ( FirstInit )
{
@@ -231,11 +235,15 @@
gtk_entry_set_text( GTK_ENTRY( fsFilterCombo ),fsOtherFilterNames[fsNumberOfOtherFilterNames][0] );
break;
}
- gtk_widget_show( FileSelect );
+ gtk_widget_show( fsFileSelect );
}
void HideFileSelect( void )
-{ gtk_widget_destroy( fsFileSelect ); }
+{
+ gtk_widget_hide( fsFileSelect );
+ gtk_widget_destroy( fsFileSelect );
+ gtkVFileSelect=0;
+}
void fs_fsFileSelect_destroy( GtkObject * object,gpointer user_data )
{ HideFileSelect(); }
@@ -336,8 +344,6 @@
return;
}
- HideFileSelect();
-
switch( fsPressed )
{
case 1:
@@ -346,7 +352,7 @@
case 2:
str=gtk_entry_get_text( GTK_ENTRY( fsPathCombo ) );
fsSelectedFile=str;
- if ( !fsFileExist( fsSelectedFile ) ) return;
+ if ( !fsFileExist( fsSelectedFile ) ) { HideFileSelect(); return; }
fsSelectedDirectory=fsSelectedFile;
size=strlen( fsSelectedDirectory );
for ( j=0;j<size;j++ )
@@ -375,6 +381,9 @@
guiSetDF( guiIntfStruct.Othername,fsSelectedDirectory,fsSelectedFile );
break;
}
+
+ HideFileSelect();
+
item=fsTopList_items;
while( item )
{
@@ -413,6 +422,9 @@
return FALSE;
}
+void fs_FileSelect_show( GtkWidget * widget,gpointer user_data )
+{ gtkVFileSelect=(int)user_data; }
+
GtkWidget * create_FileSelect( void )
{
GtkWidget * FSFrame;
@@ -639,6 +651,10 @@
gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"destroy",GTK_SIGNAL_FUNC( fs_fsFileSelect_destroy ),NULL );
gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"key_release_event",GTK_SIGNAL_FUNC( on_FileSelect_key_release_event ),NULL );
+
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"show",GTK_SIGNAL_FUNC( fs_FileSelect_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( fsFileSelect ),"hide",GTK_SIGNAL_FUNC( fs_FileSelect_show ),0 );
+
gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsFilterCombo_changed ),fsFilterCombo );
gtk_signal_connect( GTK_OBJECT( fsFilterCombo ),"activate",GTK_SIGNAL_FUNC( fs_fsFilterCombo_activate ),fsFilterCombo );
gtk_signal_connect( GTK_OBJECT( fsPathCombo ),"changed",GTK_SIGNAL_FUNC( fs_fsPathCombo_changed ),fsPathCombo );
Index: fs.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/fs.h,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -r1.11 -r1.12
--- fs.h 15 Dec 2001 15:36:07 -0000 1.11
+++ fs.h 20 May 2002 13:56:16 -0000 1.12
@@ -7,6 +7,8 @@
#define fsSubtitleSelector 1
#define fsOtherSelector 2
+extern GtkWidget * fsFileSelect;
+
extern void HideFileSelect( void );
extern void ShowFileSelect( int type );
Index: mb.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/mb.c,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- mb.c 11 May 2002 16:37:58 -0000 1.5
+++ mb.c 20 May 2002 13:56:16 -0000 1.6
@@ -10,9 +10,22 @@
#include "mb.h"
GtkWidget * gtkMessageBoxText;
+GtkWidget * MessageBox;
-static void on_MessageBox_Ok_released( GtkButton * button,gpointer user_data )
-{ gtk_widget_destroy( MessageBox ); }
+int gtkVMessageBox = 0;
+
+void ShowMessageBox( char * msg )
+{
+ if ( gtkVMessageBox ) gtkActive( MessageBox );
+ else MessageBox=create_MessageBox( 0 );
+ if ( strlen( msg ) < 20 ) gtk_widget_set_usize( MessageBox,196,-1 );
+}
+
+static void on_Ok_released( GtkButton * button,gpointer user_data )
+{ gtkVMessageBox=0; gtk_widget_destroy( MessageBox ); }
+
+static void on_MessageBox_show( GtkButton * button,gpointer user_data )
+{ gtkVMessageBox=(int)user_data; }
GtkWidget * create_MessageBox( int type )
{
@@ -45,7 +58,7 @@
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_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 );
@@ -54,7 +67,7 @@
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_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 );
@@ -62,7 +75,7 @@
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_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 );
@@ -70,7 +83,7 @@
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_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 );
@@ -78,22 +91,22 @@
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_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_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 ** )warning_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )warning_xpm );
WarningPixmap=gtk_pixmap_new( pixmapwid,mask );
- pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system( ),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
+ pixmapwid=gdk_pixmap_colormap_create_from_xpm_d( MessageBox->window,gdk_colormap_get_system(),&mask,&pixmapstyle->bg[GTK_STATE_NORMAL],(gchar ** )error_xpm );
ErrorPixmap=gtk_pixmap_new( pixmapwid,mask );
gtk_widget_set_name( WarningPixmap,"pixmap1" );
@@ -113,24 +126,24 @@
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_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 );
+ gtk_label_set_line_wrap( GTK_LABEL( gtkMessageBoxText ),FALSE );
- hseparator1=gtk_hseparator_new( );
+ 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_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( );
+ 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_object_set_data_full( GTK_OBJECT( MessageBox ),"hbuttonbox1",hbuttonbox1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( hbuttonbox1 );
gtk_widget_set_usize( hbuttonbox1,-2,25 );
gtk_button_box_set_child_size( GTK_BUTTON_BOX( hbuttonbox1 ),75,0 );
@@ -139,14 +152,16 @@
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_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_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_Ok_released ),NULL );
- gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_MessageBox_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"destroy_event",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"show",GTK_SIGNAL_FUNC( on_MessageBox_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( MessageBox ),"hide",GTK_SIGNAL_FUNC( on_MessageBox_show ),0 );
+ gtk_signal_connect( GTK_OBJECT( Ok ),"released",GTK_SIGNAL_FUNC( on_Ok_released ),NULL );
gtk_window_add_accel_group( GTK_WINDOW( MessageBox ),accel_group );
Index: mb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/mb.h,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- mb.h 14 Nov 2001 16:05:33 -0000 1.6
+++ mb.h 20 May 2002 13:56:16 -0000 1.7
@@ -5,7 +5,9 @@
#include <gtk/gtk.h>
extern GtkWidget * gtkMessageBoxText;
+extern GtkWidget * MessageBox;
extern GtkWidget * create_MessageBox( int type );
+extern void ShowMessageBox( char * msg );
#endif
Index: sb.c
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.c,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -r1.6 -r1.7
--- sb.c 11 May 2002 16:37:58 -0000 1.6
+++ sb.c 20 May 2002 13:56:16 -0000 1.7
@@ -22,6 +22,21 @@
char * gtkOldSkin;
static char * prev;
+int gtkVSkinBrowser = 0;
+GtkWidget * SkinBrowser;
+
+void ShowSkinBrowser( void )
+{
+ if ( gtkVSkinBrowser ) gtkActive( SkinBrowser );
+ else SkinBrowser=create_SkinBrowser();
+}
+
+void HideSkinBrowser( void )
+{
+ gtkVSkinBrowser=0;
+ gtk_widget_destroy( SkinBrowser );
+}
+
int gtkFillSkinList( gchar * mdir )
{
gchar * str[2];
@@ -62,12 +77,15 @@
}
void on_SkinBrowser_destroy( GtkObject * object,gpointer user_data )
-{ gtk_widget_destroy( SkinBrowser ); }
+{ HideSkinBrowser(); }
+
+void on_SkinBrowser_show( GtkObject * object,gpointer user_data )
+{ gtkVSkinBrowser=(int)user_data; }
void on_SkinBrowser_Cancel( GtkObject * object,gpointer user_data )
{
if ( strcmp( sbSelectedSkin,gtkOldSkin ) ) ChangeSkin( gtkOldSkin );
- gtk_widget_destroy( SkinBrowser );
+ HideSkinBrowser();
}
void on_SkinBrowser_Ok( GtkObject * object,gpointer user_data )
@@ -75,7 +93,7 @@
ChangeSkin( sbSelectedSkin );
if ( skinName ) free( skinName );
skinName=strdup( sbSelectedSkin );
- gtk_widget_destroy( SkinBrowser );
+ HideSkinBrowser();
}
void on_SkinList_select_row( GtkCList * clist,gint row,gint column,GdkEvent * bevent,gpointer user_data )
@@ -91,7 +109,7 @@
{
if ( skinName ) free( skinName );
skinName=strdup( sbSelectedSkin );
- gtk_widget_destroy( SkinBrowser );
+ HideSkinBrowser();
}
}
@@ -130,8 +148,7 @@
frame5=gtk_frame_new( NULL );
gtk_widget_set_name( frame5,"frame5" );
gtk_widget_ref( frame5 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame5",frame5,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( frame5 );
gtk_container_add( GTK_CONTAINER( SkinBrowser ),frame5 );
gtk_frame_set_shadow_type( GTK_FRAME( frame5 ),GTK_SHADOW_IN );
@@ -139,8 +156,7 @@
frame6=gtk_frame_new( NULL );
gtk_widget_set_name( frame6,"frame6" );
gtk_widget_ref( frame6 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame6",frame6,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame6",frame6,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( frame6 );
gtk_container_add( GTK_CONTAINER( frame5 ),frame6 );
gtk_frame_set_shadow_type( GTK_FRAME( frame6 ),GTK_SHADOW_NONE );
@@ -148,8 +164,7 @@
frame7=gtk_frame_new( NULL );
gtk_widget_set_name( frame7,"frame7" );
gtk_widget_ref( frame7 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame7",frame7,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( frame7 );
gtk_container_add( GTK_CONTAINER( frame6 ),frame7 );
gtk_frame_set_shadow_type( GTK_FRAME( frame7 ),GTK_SHADOW_ETCHED_OUT );
@@ -157,8 +172,7 @@
frame8=gtk_frame_new( NULL );
gtk_widget_set_name( frame8,"frame8" );
gtk_widget_ref( frame8 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"frame8",frame8,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( frame8 );
gtk_container_add( GTK_CONTAINER( frame7 ),frame8 );
gtk_frame_set_shadow_type( GTK_FRAME( frame8 ),GTK_SHADOW_NONE );
@@ -166,16 +180,14 @@
vbox5=gtk_vbox_new( FALSE,0 );
gtk_widget_set_name( vbox5,"vbox5" );
gtk_widget_ref( vbox5 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"vbox5",vbox5,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( vbox5 );
gtk_container_add( GTK_CONTAINER( frame8 ),vbox5 );
label=gtk_label_new( MSGTR_SKIN_LABEL );
gtk_widget_set_name( label,"label" );
gtk_widget_ref( label );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"label",label,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( label );
gtk_box_pack_start( GTK_BOX( vbox5 ),label,FALSE,FALSE,0 );
gtk_label_set_justify( GTK_LABEL( label ),GTK_JUSTIFY_RIGHT );
@@ -184,8 +196,7 @@
hseparator4=gtk_hseparator_new();
gtk_widget_set_name( hseparator4,"hseparator4" );
gtk_widget_ref( hseparator4 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"hseparator4",hseparator4,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( hseparator4 );
gtk_box_pack_start( GTK_BOX( vbox5 ),hseparator4,FALSE,TRUE,0 );
gtk_widget_set_usize( hseparator4,-2,5 );
@@ -193,8 +204,7 @@
scrolledwindow1=gtk_scrolled_window_new( NULL,NULL );
gtk_widget_set_name( scrolledwindow1,"scrolledwindow1" );
gtk_widget_ref( scrolledwindow1 );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"scrolledwindow1",scrolledwindow1,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( scrolledwindow1 );
gtk_box_pack_start( GTK_BOX( vbox5 ),scrolledwindow1,TRUE,TRUE,0 );
gtk_container_set_border_width( GTK_CONTAINER( scrolledwindow1 ),2 );
@@ -203,8 +213,7 @@
SkinList=gtk_clist_new( 1 );
gtk_widget_set_name( SkinList,"SkinList" );
gtk_widget_ref( SkinList );
- gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,
- ( GtkDestroyNotify ) gtk_widget_unref );
+ gtk_object_set_data_full( GTK_OBJECT( SkinBrowser ),"SkinList",SkinList,(GtkDestroyNotify)gtk_widget_unref );
gtk_widget_show( SkinList );
gtk_container_add( GTK_CONTAINER( scrolledwindow1 ),SkinList );
gtk_clist_set_column_width( GTK_CLIST( SkinList ),0,80 );
@@ -256,7 +265,10 @@
gtk_widget_set_usize( Cancel,-2,22 );
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 ),"destroy",GTK_SIGNAL_FUNC( on_SkinBrowser_destroy ),0 );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"show",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),1 );
+ gtk_signal_connect( GTK_OBJECT( SkinBrowser ),"hide",GTK_SIGNAL_FUNC( on_SkinBrowser_show ),0 );
+
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_Ok ),NULL );
gtk_signal_connect( GTK_OBJECT( Cancel ),"released",GTK_SIGNAL_FUNC( on_SkinBrowser_Cancel ),NULL );
Index: sb.h
===================================================================
RCS file: /cvsroot/mplayer/main/Gui/mplayer/gtk/sb.h,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -r1.8 -r1.9
--- sb.h 14 Nov 2001 16:05:33 -0000 1.8
+++ sb.h 20 May 2002 13:56:16 -0000 1.9
@@ -7,8 +7,9 @@
extern char * sbSelectedSkin;
extern char * sbMPlayerDirInHome;
extern char * sbMPlayerPrefixDir;
+extern GtkWidget * SkinBrowser;
-extern void HideSkinBrowser( void );
+extern void ShowSkinBrowser( void );
extern int gtkFillSkinList( gchar * mdir );
extern GtkWidget * create_SkinBrowser( void );
- Previous message: [Mplayer-cvslog] CVS: main/Gui/mplayer menu.h,1.11,1.12 play.c,1.61,1.62 sw.h,1.30,1.31 widgets.c,1.22,1.23 widgets.h,1.12,1.13
- Next message: [Mplayer-cvslog] CVS: main/Gui/wm ws.c,1.41,1.42 ws.h,1.15,1.16
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the MPlayer-cvslog
mailing list