Mercurial > mplayer.hg
comparison Gui/mplayer/widgets.c @ 6903:c2d4100c964e
- fix mixer handling
- some change in menu
- fix evLoadPlay bug
- etc
author | pontscho |
---|---|
date | Sun, 04 Aug 2002 19:23:58 +0000 |
parents | 138a7ff52a26 |
children | 163f78ece9c2 |
comparison
equal
deleted
inserted
replaced
6902:3ccdfd580f0d | 6903:c2d4100c964e |
---|---|
36 GtkWidget * ErrorPixmap; | 36 GtkWidget * ErrorPixmap; |
37 | 37 |
38 int gtkPopupMenu = 0; | 38 int gtkPopupMenu = 0; |
39 int gtkPopupMenuParam = 0; | 39 int gtkPopupMenuParam = 0; |
40 int gtkInited = 0; | 40 int gtkInited = 0; |
41 int gtkVisible = 0; | |
42 | 41 |
43 #include "gtk/sb.h" | 42 #include "gtk/sb.h" |
44 #include "gtk/pl.h" | 43 #include "gtk/pl.h" |
45 #include "gtk/fs.h" | 44 #include "gtk/fs.h" |
46 #include "gtk/mb.h" | 45 #include "gtk/mb.h" |
115 } | 114 } |
116 | 115 |
117 void gtkEventHandling( void ) | 116 void gtkEventHandling( void ) |
118 { | 117 { |
119 int i; | 118 int i; |
120 if ( gtkVisible > 0 ) | 119 for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 ); |
121 for( i=0;i < 25;i++ ) gtk_main_iteration_do( 0 ); | |
122 } | 120 } |
123 | 121 |
124 // --- funcs | 122 // --- funcs |
125 | 123 |
126 void gtkMessageBox( int type,gchar * str ) | 124 void gtkMessageBox( int type,gchar * str ) |
183 gtk_widget_show( SkinBrowser ); | 181 gtk_widget_show( SkinBrowser ); |
184 gtkSetLayer( SkinBrowser ); | 182 gtkSetLayer( SkinBrowser ); |
185 } | 183 } |
186 else | 184 else |
187 { | 185 { |
188 gtk_widget_destroy( SkinBrowser ); gtkDecVisible(); | 186 gtk_widget_destroy( SkinBrowser ); |
189 gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." ); | 187 gtkMessageBox( GTK_MB_ERROR,"Skin dirs not found ... Please install skins." ); |
190 } | 188 } |
191 break; | 189 break; |
192 case evPreferences: | 190 case evPreferences: |
193 ShowPreferences(); | 191 ShowPreferences(); |
217 gtkSetLayer( AboutBox ); | 215 gtkSetLayer( AboutBox ); |
218 break; | 216 break; |
219 case evShowPopUpMenu: | 217 case evShowPopUpMenu: |
220 gtkPopupMenu=evNone; | 218 gtkPopupMenu=evNone; |
221 gtkPopupMenuParam=0; | 219 gtkPopupMenuParam=0; |
222 if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); gtkDecVisible(); } | 220 if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); } |
223 PopUpMenu=create_PopUpMenu(); | 221 PopUpMenu=create_PopUpMenu(); |
224 gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 ); | 222 gtk_menu_popup( GTK_MENU( PopUpMenu ),NULL,NULL,NULL,NULL,0,0 ); |
225 gtkIncVisible(); | |
226 break; | 223 break; |
227 case evHidePopUpMenu: | 224 case evHidePopUpMenu: |
228 if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); /*gtkVisible--;*/ PopUpMenu=NULL; } | 225 if ( PopUpMenu ) { gtk_widget_hide_on_delete( PopUpMenu ); PopUpMenu=NULL; } |
229 break; | 226 break; |
230 case evPlayNetwork: | 227 case evPlayNetwork: |
231 ShowURLDialogBox(); | 228 ShowURLDialogBox(); |
232 gtkSetLayer( URL ); | 229 gtkSetLayer( URL ); |
233 break; | 230 break; |
234 } | 231 } |
235 } | 232 } |
236 | |
237 void gtkIncVisible( void ) { gtkVisible++; } | |
238 void gtkDecVisible( void ) { if ( gtkVisible > 0 ) gtkVisible--; } | |
239 |