Mercurial > mplayer.hg
annotate Gui/mplayer/gtk/menu.c @ 19918:1de67089c19a
Fix FT_Stroker use in libass. The previous variant ended up with 0-width
outline in some cases.
author | eugeni |
---|---|
date | Thu, 21 Sep 2006 22:36:47 +0000 (2006-09-21) |
parents | 70a5e89ea4cd |
children | a7e5b99ac083 |
rev | line source |
---|---|
2901 | 1 |
2 #include <stdio.h> | |
3 #include <stdlib.h> | |
3054 | 4 #include <string.h> |
5 | |
17144 | 6 #include "../../config.h" |
7 #include "../../help_mp.h" | |
8 #include "../../mplayer.h" | |
9 #include "../../mixer.h" | |
2901 | 10 |
17144 | 11 #include "../app.h" |
3054 | 12 |
2901 | 13 #include "menu.h" |
14 #include "../widgets.h" | |
17144 | 15 #include "app.h" |
2901 | 16 |
19271
64d82a45a05d
introduce new 'stream' directory for all stream layer related components and split them from libmpdemux
ben
parents:
19110
diff
changeset
|
17 #include "../../stream/stream.h" |
17144 | 18 #include "../../libmpdemux/demuxer.h" |
19540 | 19 #include "../../libmpdemux/stheader.h" |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
20 |
13852 | 21 #include "../pixmaps/ab.xpm" |
14589 | 22 #include "../pixmaps/half.xpm" |
13852 | 23 #include "../pixmaps/normal.xpm" |
24 #include "../pixmaps/double.xpm" | |
25 #include "../pixmaps/fs.xpm" | |
26 #include "../pixmaps/exit.xpm" | |
27 #include "../pixmaps/prefs.xpm" | |
28 #include "../pixmaps/eq.xpm" | |
29 #include "../pixmaps/pl.xpm" | |
30 #include "../pixmaps/skin.xpm" | |
31 #include "../pixmaps/sound.xpm" | |
32 #include "../pixmaps/open.xpm" | |
33 #include "../pixmaps/play.xpm" | |
34 #include "../pixmaps/stop2.xpm" | |
35 #include "../pixmaps/pause.xpm" | |
36 #include "../pixmaps/prev.xpm" | |
37 #include "../pixmaps/next.xpm" | |
38 #include "../pixmaps/aspect.xpm" | |
39 #include "../pixmaps/a11.xpm" | |
40 #include "../pixmaps/a169.xpm" | |
41 #include "../pixmaps/a235.xpm" | |
42 #include "../pixmaps/a43.xpm" | |
43 #include "../pixmaps/file2.xpm" | |
44 #include "../pixmaps/url.xpm" | |
45 #include "../pixmaps/sub.xpm" | |
46 #include "../pixmaps/delsub.xpm" | |
47 #include "../pixmaps/empty.xpm" | |
13948 | 48 #include "../pixmaps/loadeaf.xpm" |
49 #include "../pixmaps/title.xpm" | |
50 #ifdef USE_DVDREAD | |
51 #include "../pixmaps/dvd.xpm" | |
52 #include "../pixmaps/playdvd.xpm" | |
53 #include "../pixmaps/chapter.xpm" | |
54 #include "../pixmaps/dolby.xpm" | |
13852 | 55 #include "../pixmaps/tongue.xpm" |
56 #include "../pixmaps/tonguebla.xpm" | |
13948 | 57 #include "../pixmaps/empty1px.xpm" |
58 #endif | |
59 #ifdef HAVE_VCD | |
60 #include "../pixmaps/vcd.xpm" | |
61 #include "../pixmaps/playvcd.xpm" | |
62 #endif | |
13852 | 63 |
12691
0230544f52a1
Fix GUI compilation, patch by Reimar Döffinger and Alexander Strasser.
diego
parents:
11760
diff
changeset
|
64 extern mixer_t mixer; // mixer from mplayer.c |
0230544f52a1
Fix GUI compilation, patch by Reimar Döffinger and Alexander Strasser.
diego
parents:
11760
diff
changeset
|
65 |
2901 | 66 void ActivateMenuItem( int Item ) |
67 { | |
3618 | 68 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
69 gtkPopupMenu=Item & 0x0000ffff; |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
70 gtkPopupMenuParam=Item >> 16; |
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
71 mplEventHandling( Item & 0x0000ffff,Item >> 16 ); |
2901 | 72 } |
73 | |
19081
273bdef43012
Mark several string parameters that are not modified in the function as const.
diego
parents:
18118
diff
changeset
|
74 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number) |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
75 { |
13852 | 76 GtkWidget * Label = NULL; |
77 GtkWidget * Pixmap = NULL; | |
78 GtkWidget * hbox = NULL; | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
79 GtkWidget * Item = NULL; |
13852 | 80 |
81 GdkPixmap *PixmapIcon = NULL; | |
82 GdkColor transparent; | |
83 GdkBitmap *MaskIcon = NULL; | |
84 | |
85 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
86 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
87 gdk_pixmap_unref (PixmapIcon); | |
88 | |
89 Item=gtk_check_menu_item_new(); | |
90 Label = gtk_label_new (label); | |
91 | |
92 hbox = gtk_hbox_new (FALSE, 8); | |
93 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
94 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
95 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
96 | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
97 gtk_menu_append( GTK_MENU( Menu ),Item ); |
13852 | 98 |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
99 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state); |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
100 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
101 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); |
13852 | 102 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); |
103 gtk_widget_show_all(Item); | |
104 | |
105 return Item; | |
106 } | |
19081
273bdef43012
Mark several string parameters that are not modified in the function as const.
diego
parents:
18118
diff
changeset
|
107 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ) |
13852 | 108 { |
109 GtkWidget * Label = NULL; | |
110 GtkWidget * Pixmap = NULL; | |
111 GtkWidget * hbox = NULL; | |
112 GtkWidget * Item = NULL; | |
113 GdkPixmap * PixmapIcon = NULL; | |
114 GdkColor transparent; | |
115 GdkBitmap * MaskIcon = NULL; | |
116 | |
117 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
118 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
119 gdk_pixmap_unref (PixmapIcon); | |
120 | |
121 Item=gtk_menu_item_new(); | |
122 Label = gtk_label_new (label); | |
123 | |
124 hbox = gtk_hbox_new (FALSE, 8); | |
125 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
126 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
127 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
128 | |
129 | |
130 gtk_menu_append( GTK_MENU( SubMenu ),Item ); | |
131 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", | |
132 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); | |
133 | |
134 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); | |
135 gtk_widget_show_all(Item); | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
136 return Item; |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
137 } |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
138 |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
139 |
19081
273bdef43012
Mark several string parameters that are not modified in the function as const.
diego
parents:
18118
diff
changeset
|
140 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ) |
2901 | 141 { |
13852 | 142 GtkWidget * Label = NULL; |
143 GtkWidget * Pixmap = NULL; | |
144 GtkWidget * hbox = NULL; | |
2901 | 145 GtkWidget * Item = NULL; |
146 GtkWidget * SubItem = NULL; | |
13852 | 147 GdkPixmap * PixmapIcon = NULL; |
148 GdkColor transparent; | |
149 GdkBitmap * MaskIcon = NULL; | |
2901 | 150 |
13852 | 151 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm); |
152 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
153 gdk_pixmap_unref (PixmapIcon); | |
154 | |
155 SubItem=gtk_menu_item_new(); | |
156 Item=gtk_menu_new(); | |
157 Label = gtk_label_new (label); | |
158 | |
159 hbox = gtk_hbox_new (FALSE, 8); | |
160 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
161 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
162 gtk_container_add (GTK_CONTAINER (SubItem), hbox); | |
163 | |
2901 | 164 gtk_menu_append( GTK_MENU( Menu ),SubItem ); |
165 gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item ); | |
13852 | 166 |
167 gtk_widget_show_all( SubItem ); | |
2901 | 168 return Item; |
169 } | |
170 | |
171 GtkWidget * AddSeparator( GtkWidget * Menu ) | |
172 { | |
173 GtkWidget * Item = NULL; | |
174 | |
175 Item=gtk_menu_item_new (); | |
176 gtk_widget_show( Item ); | |
177 gtk_container_add( GTK_CONTAINER( Menu ),Item ); | |
178 gtk_widget_set_sensitive( Item,FALSE ); | |
179 | |
180 return Item; | |
181 } | |
182 | |
3054 | 183 typedef struct |
184 { | |
185 int id; | |
19110
08888397444e
marks several strings inside structs as const when they hold just
reynaldo
parents:
19081
diff
changeset
|
186 const char * name; |
3054 | 187 } Languages_t; |
188 | |
189 #define lng( a,b ) ( (int)(a) * 256 + b ) | |
6651 | 190 static Languages_t Languages[] = |
3054 | 191 { |
192 { lng( 'a','b' ), "Abkhazian" }, | |
193 { lng( 'a','a' ), "Afar" }, | |
194 { lng( 'a','f' ), "Afrikaans" }, | |
195 { lng( 's','q' ), "Albanian" }, | |
196 { lng( 'a','m' ), "Amharic" }, | |
197 { lng( 'a','r' ), "Arabic" }, | |
198 { lng( 'h','y' ), "Armenian" }, | |
199 { lng( 'a','s' ), "Assamese" }, | |
200 { lng( 'a','e' ), "Avestan" }, | |
201 { lng( 'a','y' ), "Aymara" }, | |
202 { lng( 'a','z' ), "Azerbaijani" }, | |
203 { lng( 'b','a' ), "Bashkir" }, | |
204 { lng( 'e','u' ), "Basque" }, | |
205 { lng( 'b','e' ), "Belarusian" }, | |
206 { lng( 'b','n' ), "Bengali" }, | |
207 { lng( 'b','h' ), "Bihari" }, | |
208 { lng( 'b','i' ), "Bislama" }, | |
209 { lng( 'b','s' ), "Bosnian" }, | |
210 { lng( 'b','r' ), "Breton" }, | |
211 { lng( 'b','g' ), "Bulgarian" }, | |
212 { lng( 'm','y' ), "Burmese" }, | |
213 { lng( 'c','a' ), "Catalan" }, | |
214 { lng( 'c','h' ), "Chamorro" }, | |
215 { lng( 'c','e' ), "Chechen" }, | |
216 { lng( 'n','y' ), "Chichewa;Nyanja" }, | |
217 { lng( 'z','h' ), "Chinese" }, | |
218 { lng( 'c','u' ), "ChurchSlavic" }, | |
219 { lng( 'c','v' ), "Chuvash" }, | |
220 { lng( 'k','w' ), "Cornish" }, | |
221 { lng( 'c','o' ), "Corsican" }, | |
222 { lng( 'h','r' ), "Croatian" }, | |
223 { lng( 'c','s' ), "Czech" }, | |
224 { lng( 'd','a' ), "Danish" }, | |
225 { lng( 'n','l' ), "Dutch" }, | |
226 { lng( 'd','z' ), "Dzongkha" }, | |
227 { lng( 'e','n' ), "English" }, | |
228 { lng( 'e','o' ), "Esperanto" }, | |
229 { lng( 'e','t' ), "Estonian" }, | |
230 { lng( 'f','o' ), "Faroese" }, | |
231 { lng( 'f','j' ), "Fijian" }, | |
232 { lng( 'f','i' ), "Finnish" }, | |
233 { lng( 'f','r' ), "French" }, | |
234 { lng( 'f','y' ), "Frisian" }, | |
235 { lng( 'g','d' ), "Gaelic(Scots" }, | |
236 { lng( 'g','l' ), "Gallegan" }, | |
237 { lng( 'k','a' ), "Georgian" }, | |
238 { lng( 'd','e' ), "German" }, | |
239 { lng( 'e','l' ), "Greek" }, | |
240 { lng( 'g','n' ), "Guarani" }, | |
241 { lng( 'g','u' ), "Gujarati" }, | |
242 { lng( 'h','a' ), "Hausa" }, | |
243 { lng( 'h','e' ), "Hebrew" }, | |
244 { lng( 'i','w' ), "Hebrew" }, | |
245 { lng( 'h','z' ), "Herero" }, | |
246 { lng( 'h','i' ), "Hindi" }, | |
247 { lng( 'h','o' ), "HiriMotu" }, | |
248 { lng( 'h','u' ), "Hungarian" }, | |
249 { lng( 'i','s' ), "Icelandic" }, | |
250 { lng( 'i','d' ), "Indonesian" }, | |
251 { lng( 'i','n' ), "Indonesian" }, | |
252 { lng( 'i','a' ), "Interlingua" }, | |
253 { lng( 'i','e' ), "Interlingue" }, | |
254 { lng( 'i','u' ), "Inuktitut" }, | |
255 { lng( 'i','k' ), "Inupiaq" }, | |
256 { lng( 'g','a' ), "Irish" }, | |
257 { lng( 'i','t' ), "Italian" }, | |
258 { lng( 'j','a' ), "Japanese" }, | |
259 { lng( 'j','v' ), "Javanese" }, | |
260 { lng( 'j','w' ), "Javanese" }, | |
261 { lng( 'k','l' ), "Kalaallisut" }, | |
262 { lng( 'k','n' ), "Kannada" }, | |
263 { lng( 'k','s' ), "Kashmiri" }, | |
264 { lng( 'k','k' ), "Kazakh" }, | |
265 { lng( 'k','m' ), "Khmer" }, | |
266 { lng( 'k','i' ), "Kikuyu" }, | |
267 { lng( 'r','w' ), "Kinyarwanda" }, | |
268 { lng( 'k','y' ), "Kirghiz" }, | |
269 { lng( 'k','v' ), "Komi" }, | |
270 { lng( 'k','o' ), "Korean" }, | |
271 { lng( 'k','j' ), "Kuanyama" }, | |
272 { lng( 'k','u' ), "Kurdish" }, | |
273 { lng( 'l','o' ), "Lao" }, | |
274 { lng( 'l','a' ), "Latin" }, | |
275 { lng( 'l','v' ), "Latvian" }, | |
276 { lng( 'l','b' ), "Letzeburgesch" }, | |
277 { lng( 'l','n' ), "Lingala" }, | |
278 { lng( 'l','t' ), "Lithuanian" }, | |
279 { lng( 'm','k' ), "Macedonian" }, | |
280 { lng( 'm','g' ), "Malagasy" }, | |
281 { lng( 'm','s' ), "Malay" }, | |
282 { lng( 'm','l' ), "Malayalam" }, | |
283 { lng( 'm','t' ), "Maltese" }, | |
284 { lng( 'g','v' ), "Manx" }, | |
285 { lng( 'm','i' ), "Maori" }, | |
286 { lng( 'm','r' ), "Marathi" }, | |
287 { lng( 'm','h' ), "Marshall" }, | |
288 { lng( 'm','o' ), "Moldavian" }, | |
289 { lng( 'm','n' ), "Mongolian" }, | |
290 { lng( 'n','a' ), "Nauru" }, | |
291 { lng( 'n','v' ), "Navajo" }, | |
292 { lng( 'n','d' ), "North Ndebele" }, | |
293 { lng( 'n','r' ), "South Ndebele" }, | |
294 { lng( 'n','g' ), "Ndonga" }, | |
295 { lng( 'n','e' ), "Nepali" }, | |
296 { lng( 's','e' ), "NorthernSami" }, | |
297 { lng( 'n','o' ), "Norwegian" }, | |
298 { lng( 'n','b' ), "NorwegianBokm�l" }, | |
299 { lng( 'n','n' ), "NorwegianNynorsk" }, | |
300 { lng( 'n','y' ), "Nyanja;Chichewa" }, | |
301 { lng( 'o','c' ), "Occitan(post1500;Proven�al" }, | |
302 { lng( 'o','r' ), "Oriya" }, | |
303 { lng( 'o','m' ), "Oromo" }, | |
304 { lng( 'o','s' ), "Ossetian;Ossetic" }, | |
305 { lng( 'p','i' ), "Pali" }, | |
306 { lng( 'p','a' ), "Panjabi" }, | |
307 { lng( 'f','a' ), "Persian" }, | |
308 { lng( 'p','l' ), "Polish" }, | |
309 { lng( 'p','t' ), "Portuguese" }, | |
310 { lng( 'o','c' ), "Proven�al;Occitan(post1500" }, | |
311 { lng( 'p','s' ), "Pushto" }, | |
312 { lng( 'q','u' ), "Quechua" }, | |
313 { lng( 'r','m' ), "Raeto-Romance" }, | |
314 { lng( 'r','o' ), "Romanian" }, | |
315 { lng( 'r','n' ), "Rundi" }, | |
316 { lng( 'r','u' ), "Russian" }, | |
317 { lng( 's','m' ), "Samoan" }, | |
318 { lng( 's','g' ), "Sango" }, | |
319 { lng( 's','a' ), "Sanskrit" }, | |
320 { lng( 's','c' ), "Sardinian" }, | |
321 { lng( 's','r' ), "Serbian" }, | |
322 { lng( 's','n' ), "Shona" }, | |
323 { lng( 's','d' ), "Sindhi" }, | |
324 { lng( 's','i' ), "Sinhalese" }, | |
325 { lng( 's','k' ), "Slovak" }, | |
326 { lng( 's','l' ), "Slovenian" }, | |
327 { lng( 's','o' ), "Somali" }, | |
328 { lng( 's','t' ), "Sotho" }, | |
329 { lng( 'e','s' ), "Spanish" }, | |
330 { lng( 's','u' ), "Sundanese" }, | |
331 { lng( 's','w' ), "Swahili" }, | |
332 { lng( 's','s' ), "Swati" }, | |
333 { lng( 's','v' ), "Swedish" }, | |
334 { lng( 't','l' ), "Tagalog" }, | |
335 { lng( 't','y' ), "Tahitian" }, | |
336 { lng( 't','g' ), "Tajik" }, | |
337 { lng( 't','a' ), "Tamil" }, | |
338 { lng( 't','t' ), "Tatar" }, | |
339 { lng( 't','e' ), "Telugu" }, | |
340 { lng( 't','h' ), "Thai" }, | |
341 { lng( 'b','o' ), "Tibetan" }, | |
342 { lng( 't','i' ), "Tigrinya" }, | |
343 { lng( 't','o' ), "Tonga" }, | |
344 { lng( 't','s' ), "Tsonga" }, | |
345 { lng( 't','n' ), "Tswana" }, | |
346 { lng( 't','r' ), "Turkish" }, | |
347 { lng( 't','k' ), "Turkmen" }, | |
348 { lng( 't','w' ), "Twi" }, | |
349 { lng( 'u','g' ), "Uighur" }, | |
350 { lng( 'u','k' ), "Ukrainian" }, | |
351 { lng( 'u','r' ), "Urdu" }, | |
352 { lng( 'u','z' ), "Uzbek" }, | |
353 { lng( 'v','i' ), "Vietnamese" }, | |
354 { lng( 'v','o' ), "Volap�k" }, | |
355 { lng( 'c','y' ), "Welsh" }, | |
356 { lng( 'w','o' ), "Wolof" }, | |
357 { lng( 'x','h' ), "Xhosa" }, | |
358 { lng( 'y','i' ), "Yiddish" }, | |
359 { lng( 'j','i' ), "Yiddish" }, | |
360 { lng( 'y','o' ), "Yoruba" }, | |
361 { lng( 'z','a' ), "Zhuang" }, | |
362 { lng( 'z','u' ), "Zulu" }, | |
363 }; | |
364 #undef lng | |
365 | |
13948 | 366 #ifdef USE_DVDREAD |
6651 | 367 static char * ChannelTypes[] = |
368 { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; | |
369 static char * ChannelNumbers[] = | |
370 { "","Stereo","","","","5.1" }; | |
13948 | 371 #endif |
6651 | 372 |
19110
08888397444e
marks several strings inside structs as const when they hold just
reynaldo
parents:
19081
diff
changeset
|
373 const char * GetLanguage( int language ) |
3054 | 374 { |
6651 | 375 unsigned int i; |
3054 | 376 for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ ) |
377 if ( Languages[i].id == language ) return Languages[i].name; | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
378 return NULL; |
3054 | 379 } |
380 | |
18118
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
381 extern int global_sub_size; |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
382 |
2901 | 383 GtkWidget * DVDSubMenu; |
2980 | 384 GtkWidget * DVDTitleMenu; |
3054 | 385 GtkWidget * DVDChapterMenu; |
2940 | 386 GtkWidget * DVDAudioLanguageMenu; |
387 GtkWidget * DVDSubtitleLanguageMenu; | |
7541 | 388 GtkWidget * AspectMenu; |
6280 | 389 GtkWidget * VCDSubMenu; |
390 GtkWidget * VCDTitleMenu; | |
391 | |
2901 | 392 GtkWidget * create_PopUpMenu( void ) |
393 { | |
13852 | 394 GtkWidget * window1; |
2901 | 395 GtkWidget * Menu = NULL; |
396 GtkWidget * SubMenu = NULL; | |
3590 | 397 GtkWidget * MenuItem = NULL; |
14589 | 398 GtkWidget * H, * N, * D, * F; |
2901 | 399 |
400 Menu=gtk_menu_new(); | |
13852 | 401 gtk_widget_realize (Menu); |
402 window1 = gtk_widget_get_toplevel(Menu); | |
2901 | 403 |
13852 | 404 AddMenuItem( window1, (const char*)ab_xpm, Menu,MSGTR_MENU_AboutMPlayer" ", evAbout ); |
2901 | 405 AddSeparator( Menu ); |
13852 | 406 SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_MENU_Open ); |
407 AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_MENU_PlayFile" ", evLoadPlay ); | |
6280 | 408 #ifdef HAVE_VCD |
13852 | 409 AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD ); |
6280 | 410 #endif |
3054 | 411 #ifdef USE_DVDREAD |
13852 | 412 AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD ); |
3054 | 413 #endif |
13852 | 414 AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL ); |
415 AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle ); | |
416 AddMenuItem( window1, (const char*)delsub_xpm, SubMenu,MSGTR_MENU_DropSubtitle,evDropSubtitle ); | |
417 AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_MENU_LoadExternAudioFile, evLoadAudioFile ); | |
418 SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_MENU_Playing ); | |
419 AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_MENU_Play" ", evPlay ); | |
420 AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_MENU_Pause, evPause ); | |
421 AddMenuItem( window1, (const char*)stop2_xpm, SubMenu,MSGTR_MENU_Stop, evStop ); | |
422 AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_MENU_NextStream, evNext ); | |
423 AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_MENU_PrevStream, evPrev ); | |
3054 | 424 // AddSeparator( SubMenu ); |
425 // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); | |
426 // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); | |
427 // AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); | |
428 // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); | |
6903 | 429 // SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); |
430 // AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize ); | |
431 // AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize ); | |
432 // AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen ); | |
6280 | 433 #ifdef HAVE_VCD |
13852 | 434 VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_MENU_VCD ); |
435 AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD ); | |
6280 | 436 AddSeparator( VCDSubMenu ); |
13852 | 437 VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles ); |
6280 | 438 if ( guiIntfStruct.VCDTracks ) |
439 { | |
440 char tmp[32]; int i; | |
441 for ( i=0;i < guiIntfStruct.VCDTracks;i++ ) | |
442 { | |
7583 | 443 snprintf( tmp,32,MSGTR_MENU_Title,i+1 ); |
13852 | 444 //AddMenuItem( VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack ); |
445 AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( (i+1) << 16 ) + evSetVCDTrack ); | |
6280 | 446 } |
447 } | |
448 else | |
449 { | |
13852 | 450 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, VCDTitleMenu,MSGTR_MENU_None,evNone ); |
6280 | 451 gtk_widget_set_sensitive( MenuItem,FALSE ); |
452 } | |
453 #endif | |
3054 | 454 #ifdef USE_DVDREAD |
13852 | 455 DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD ); |
456 AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD ); | |
6794 | 457 // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); |
2901 | 458 AddSeparator( DVDSubMenu ); |
13852 | 459 DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_MENU_Titles ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
460 if ( guiIntfStruct.DVD.titles ) |
3054 | 461 { |
462 char tmp[32]; int i; | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
463 for ( i=1 ; i<= guiIntfStruct.DVD.titles;i++ ) |
3054 | 464 { |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
465 snprintf( tmp,32,MSGTR_MENU_Title,i); |
13852 | 466 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp, |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
467 guiIntfStruct.DVD.current_title == i, |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
468 (i << 16) + evSetDVDTitle ); |
3054 | 469 } |
470 } | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
471 else |
3590 | 472 { |
13852 | 473 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDTitleMenu,MSGTR_MENU_None,evNone ); |
3590 | 474 gtk_widget_set_sensitive( MenuItem,FALSE ); |
475 } | |
13852 | 476 DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_MENU_Chapters ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
477 if ( guiIntfStruct.DVD.chapters ) |
3054 | 478 { |
479 char tmp[32]; int i; | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
480 for ( i=1;i <= guiIntfStruct.DVD.chapters;i++ ) |
3054 | 481 { |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
482 snprintf( tmp,32,MSGTR_MENU_Chapter,i ); |
13852 | 483 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiIntfStruct.DVD.current_chapter == i, |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
484 ( i << 16 ) + evSetDVDChapter ); |
3054 | 485 } |
486 } | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
487 else |
3590 | 488 { |
13852 | 489 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDChapterMenu,MSGTR_MENU_None,evNone ); |
3590 | 490 gtk_widget_set_sensitive( MenuItem,FALSE ); |
491 } | |
13852 | 492 DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)tongue_xpm, DVDSubMenu,MSGTR_MENU_AudioLanguages ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
493 if ( guiIntfStruct.DVD.nr_of_audio_channels ) |
3054 | 494 { |
9038 | 495 char tmp[64]; int i, id = guiIntfStruct.demuxer ? ((demuxer_t *)guiIntfStruct.demuxer)->audio->id : audio_id; |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
496 for ( i=0;i < guiIntfStruct.DVD.nr_of_audio_channels;i++ ) |
3054 | 497 { |
6651 | 498 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiIntfStruct.DVD.audio_streams[i].language ), |
499 ChannelTypes[ guiIntfStruct.DVD.audio_streams[i].type ], | |
500 ChannelNumbers[ guiIntfStruct.DVD.audio_streams[i].channels ] ); | |
9038 | 501 // if ( id == -1 ) id=audio_id; //guiIntfStruct.DVD.audio_streams[i].id; |
13852 | 502 AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, |
8423 | 503 id == guiIntfStruct.DVD.audio_streams[i].id, |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
504 ( guiIntfStruct.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio ); |
3054 | 505 } |
506 } | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
507 else |
3590 | 508 { |
13852 | 509 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDAudioLanguageMenu,MSGTR_MENU_None,evNone ); |
3590 | 510 gtk_widget_set_sensitive( MenuItem,FALSE ); |
511 } | |
13852 | 512 DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)tonguebla_xpm, DVDSubMenu,MSGTR_MENU_SubtitleLanguages ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
513 if ( guiIntfStruct.DVD.nr_of_subtitles ) |
3054 | 514 { |
515 char tmp[64]; int i; | |
13852 | 516 AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle ); |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
517 for ( i=0;i < guiIntfStruct.DVD.nr_of_subtitles;i++ ) |
3054 | 518 { |
7583 | 519 snprintf( tmp,64,"%s",GetLanguage( guiIntfStruct.DVD.subtitles[i].language ) ); |
13852 | 520 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
521 dvdsub_id == guiIntfStruct.DVD.subtitles[i].id, |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
522 ( guiIntfStruct.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle ); |
3054 | 523 } |
524 } | |
4818
3473ca9ef158
new gui interface, and gtk moved into mplayer process. fork ... bleh :)
pontscho
parents:
3618
diff
changeset
|
525 else |
3590 | 526 { |
13852 | 527 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone ); |
3590 | 528 gtk_widget_set_sensitive( MenuItem,FALSE ); |
529 } | |
3054 | 530 #endif |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
531 |
8378 | 532 // if ( guiIntfStruct.Playing ) |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
533 { |
13852 | 534 AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_MENU_AspectRatio ); |
535 AddMenuItem( window1, (const char*)a11_xpm, AspectMenu,MSGTR_MENU_Original,( 1 << 16 ) + evSetAspect ); | |
536 AddMenuItem( window1, (const char*)a169_xpm, AspectMenu,"16:9",( 2 << 16 ) + evSetAspect ); | |
537 AddMenuItem( window1, (const char*)a43_xpm, AspectMenu,"4:3",( 3 << 16 ) + evSetAspect ); | |
538 AddMenuItem( window1, (const char*)a235_xpm, AspectMenu,"2.35",( 4 << 16 ) + evSetAspect ); | |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
539 } |
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
540 |
8423 | 541 if ( guiIntfStruct.Playing && guiIntfStruct.demuxer && guiIntfStruct.StreamType != STREAMTYPE_DVD ) |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
542 { |
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
543 int i,c = 0; |
8378 | 544 |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
545 for ( i=0;i < MAX_A_STREAMS;i++ ) |
8378 | 546 if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) c++; |
547 | |
548 if ( c > 1 ) | |
549 { | |
13852 | 550 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack ); |
8378 | 551 for ( i=0;i < MAX_A_STREAMS;i++ ) |
552 if ( ((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i] ) | |
553 { | |
19540 | 554 int aid = ((sh_audio_t *)((demuxer_t *)guiIntfStruct.demuxer)->a_streams[i])->aid; |
8378 | 555 char tmp[32]; |
19540 | 556 snprintf( tmp,32,MSGTR_MENU_Track,aid ); |
557 AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio ); | |
8378 | 558 } |
559 } | |
560 | |
561 for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) | |
562 if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) c++; | |
563 | |
564 if ( c > 1 ) | |
565 { | |
13852 | 566 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack ); |
8378 | 567 for ( i=0;i < MAX_V_STREAMS;i++ ) |
568 if ( ((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i] ) | |
569 { | |
19540 | 570 int vid = ((sh_video_t *)((demuxer_t *)guiIntfStruct.demuxer)->v_streams[i])->vid; |
8378 | 571 char tmp[32]; |
19540 | 572 snprintf( tmp,32,MSGTR_MENU_Track,vid ); |
573 AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo ); | |
8378 | 574 } |
575 } | |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
576 } |
18118
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
577 |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
578 /* cheap subtitle switching for non-DVD streams */ |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
579 if ( global_sub_size && guiIntfStruct.StreamType != STREAMTYPE_DVD ) |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
580 { |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
581 int i; |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
582 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles ); |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
583 AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle ); |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
584 for ( i=0;i < global_sub_size;i++ ) |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
585 { |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
586 char tmp[32]; |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
587 snprintf( tmp, 32, MSGTR_MENU_Track, i ); |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
588 AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle ); |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
589 } |
f9a939c204ad
Adds "cheap" subtitle switching for non-DVD playouts (for ex. OGG or MKV).
gpoirier
parents:
17197
diff
changeset
|
590 } |
7541 | 591 |
2901 | 592 AddSeparator( Menu ); |
13852 | 593 MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer.muted,evMute ); |
8299 | 594 if ( !guiIntfStruct.AudioType ) gtk_widget_set_sensitive( MenuItem,FALSE ); |
13852 | 595 AddMenuItem( window1, (const char*)pl_xpm, Menu,MSGTR_MENU_PlayList, evPlayList ); |
596 AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser ); | |
597 AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences ); | |
598 AddMenuItem( window1, (const char*)eq_xpm, Menu,MSGTR_Equalizer, evEqualizer ); | |
8278
1cbee32a0627
if no have subwindow ... some menupoint is disabled:)
pontscho
parents:
8043
diff
changeset
|
599 |
1cbee32a0627
if no have subwindow ... some menupoint is disabled:)
pontscho
parents:
8043
diff
changeset
|
600 if ( guiIntfStruct.NoWindow == False ) |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
601 { |
14589 | 602 int b1 = 0, b2 = 0, b_half = 0; |
8312
ef8c992672f4
- audio track handling in menu (idea from Rüdiger Kuhlmann)
pontscho
parents:
8299
diff
changeset
|
603 AddSeparator( Menu ); |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
604 if ( !appMPlayer.subWindow.isFullScreen && guiIntfStruct.Playing ) |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
605 { |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
606 if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth * 2 )&& |
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
607 ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight * 2 ) ) b2=1; |
14589 | 608 else if ( ( appMPlayer.subWindow.Width == guiIntfStruct.MovieWidth / 2 ) && |
609 ( appMPlayer.subWindow.Height == guiIntfStruct.MovieHeight / 2 ) ) b_half=1; | |
610 else b1=1; | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
611 } else b1=!appMPlayer.subWindow.isFullScreen; |
14589 | 612 H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize ); |
13852 | 613 N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize ); |
614 D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize ); | |
615 F=AddMenuCheckItem( window1, (const char*)fs_xpm, Menu,MSGTR_MENU_FullScreen,appMPlayer.subWindow.isFullScreen,evFullScreen ); | |
9202 | 616 if ( !gtkShowVideoWindow && !guiIntfStruct.Playing ) |
617 { | |
14589 | 618 gtk_widget_set_sensitive( H,FALSE ); |
9202 | 619 gtk_widget_set_sensitive( N,FALSE ); |
620 gtk_widget_set_sensitive( D,FALSE ); | |
621 gtk_widget_set_sensitive( F,FALSE ); | |
7821
1efdf16883a0
add and extended Gregory Kovriga's <gkovriga@techunix.technion.ac.il> patch
pontscho
parents:
7583
diff
changeset
|
622 } |
17197 | 623 } |
8278
1cbee32a0627
if no have subwindow ... some menupoint is disabled:)
pontscho
parents:
8043
diff
changeset
|
624 |
6903 | 625 AddSeparator( Menu ); |
13852 | 626 AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_MENU_Exit, evExit ); |
2901 | 627 |
628 return Menu; | |
629 } |