Mercurial > mplayer.hg
annotate gui/dialog/menu.c @ 36738:e3d879a5f1cf
Remove DVDNAV audio reset code to avoid issues on title changes.
author | reimar |
---|---|
date | Fri, 14 Feb 2014 21:34:07 +0000 |
parents | 9274efe53180 |
children | e788bcd9d49b |
rev | line source |
---|---|
33572 | 1 /* |
2 * This file is part of MPlayer. | |
3 * | |
4 * MPlayer is free software; you can redistribute it and/or modify | |
5 * it under the terms of the GNU General Public License as published by | |
6 * the Free Software Foundation; either version 2 of the License, or | |
7 * (at your option) any later version. | |
8 * | |
9 * MPlayer is distributed in the hope that it will be useful, | |
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of | |
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
12 * GNU General Public License for more details. | |
13 * | |
14 * You should have received a copy of the GNU General Public License along | |
15 * with MPlayer; if not, write to the Free Software Foundation, Inc., | |
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. | |
17 */ | |
18 | |
19 #include <stdio.h> | |
20 #include <stdlib.h> | |
21 #include <string.h> | |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
22 #include <strings.h> |
33572 | 23 |
24 #include "config.h" | |
25 #include "help_mp.h" | |
26 #include "access_mpcontext.h" | |
27 #include "mixer.h" | |
28 #include "mpcommon.h" | |
36705 | 29 #include "mp_core.h" |
36707 | 30 #include "path.h" |
36706 | 31 #include "sub/sub.h" |
32 #include "sub/vobsub.h" | |
36707 | 33 #ifdef CONFIG_ASS |
34 #include "libass/ass_types.h" | |
35 #endif | |
33572 | 36 |
37 #include "menu.h" | |
35529 | 38 #include "dialog.h" |
35772 | 39 #include "gui/ui/actions.h" |
35525 | 40 #include "gui/app/app.h" |
41 #include "gui/app/gui.h" | |
33738 | 42 #include "gui/interface.h" |
33572 | 43 |
44 #include "stream/stream.h" | |
36273 | 45 #include "libavutil/common.h" |
46 #include "libmpcodecs/vd.h" | |
33572 | 47 #include "libmpdemux/demuxer.h" |
48 #include "libmpdemux/stheader.h" | |
49 #include "libavutil/avstring.h" | |
50 | |
35526 | 51 #include "pixmaps/about.xpm" |
52 #include "pixmaps/half.xpm" | |
53 #include "pixmaps/normal.xpm" | |
54 #include "pixmaps/double.xpm" | |
55 #include "pixmaps/full.xpm" | |
56 #include "pixmaps/exit.xpm" | |
57 #include "pixmaps/prefs.xpm" | |
58 #include "pixmaps/equalizer.xpm" | |
59 #include "pixmaps/playlist.xpm" | |
60 #include "pixmaps/skin.xpm" | |
61 #include "pixmaps/sound.xpm" | |
62 #include "pixmaps/open.xpm" | |
63 #include "pixmaps/play.xpm" | |
64 #include "pixmaps/stop.xpm" | |
65 #include "pixmaps/pause.xpm" | |
66 #include "pixmaps/prev.xpm" | |
67 #include "pixmaps/next.xpm" | |
68 #include "pixmaps/aspect.xpm" | |
69 #include "pixmaps/aspect11.xpm" | |
70 #include "pixmaps/aspect169.xpm" | |
71 #include "pixmaps/aspect235.xpm" | |
72 #include "pixmaps/aspect43.xpm" | |
73 #include "pixmaps/file2.xpm" | |
74 #include "pixmaps/url.xpm" | |
75 #include "pixmaps/sub.xpm" | |
76 #include "pixmaps/nosub.xpm" | |
77 #include "pixmaps/empty.xpm" | |
78 #include "pixmaps/loadeaf.xpm" | |
79 #include "pixmaps/title.xpm" | |
80 #include "pixmaps/subtitle.xpm" | |
34387 | 81 #ifdef CONFIG_CDDA |
35526 | 82 #include "pixmaps/cd.xpm" |
83 #include "pixmaps/playcd.xpm" | |
34387 | 84 #endif |
34077 | 85 #ifdef CONFIG_VCD |
35526 | 86 #include "pixmaps/vcd.xpm" |
87 #include "pixmaps/playvcd.xpm" | |
34077 | 88 #endif |
33572 | 89 #ifdef CONFIG_DVDREAD |
35526 | 90 #include "pixmaps/dvd.xpm" |
91 #include "pixmaps/playdvd.xpm" | |
92 #include "pixmaps/chapter.xpm" | |
93 #include "pixmaps/dolby.xpm" | |
36665 | 94 #include "pixmaps/audio.xpm" |
36666 | 95 #include "pixmaps/video.xpm" |
34422
b1f2949ca18d
Use empty1px.xpm instead of empty.xpm for check item (and similar) menus.
ib
parents:
34421
diff
changeset
|
96 #endif |
36429 | 97 #ifdef CONFIG_TV |
98 #include "pixmaps/tv.xpm" | |
99 #endif | |
35526 | 100 #include "pixmaps/empty1px.xpm" |
33572 | 101 |
36029
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
102 int gtkPopupMenu; |
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
103 int gtkPopupMenuParam; |
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
104 |
33572 | 105 static void ActivateMenuItem( int Item ) |
106 { | |
107 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); | |
108 gtkPopupMenu=Item & 0x0000ffff; | |
109 gtkPopupMenuParam=Item >> 16; | |
35773 | 110 uiEvent( Item & 0x0000ffff,Item >> 16 ); |
33572 | 111 } |
112 | |
113 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number) | |
114 { | |
115 GtkWidget * Label = NULL; | |
116 GtkWidget * Pixmap = NULL; | |
117 GtkWidget * hbox = NULL; | |
118 GtkWidget * Item = NULL; | |
119 | |
120 GdkPixmap *PixmapIcon = NULL; | |
121 GdkColor transparent; | |
122 GdkBitmap *MaskIcon = NULL; | |
123 | |
124 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
125 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
126 gdk_pixmap_unref (PixmapIcon); | |
127 | |
128 Item=gtk_check_menu_item_new(); | |
129 Label = gtk_label_new (label); | |
130 | |
131 hbox = gtk_hbox_new (FALSE, 8); | |
132 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
133 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
134 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
135 | |
136 gtk_menu_append( GTK_MENU( Menu ),Item ); | |
137 | |
138 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state); | |
139 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", | |
140 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); | |
141 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); | |
142 gtk_widget_show_all(Item); | |
143 | |
144 return Item; | |
145 } | |
146 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ) | |
147 { | |
148 GtkWidget * Label = NULL; | |
149 GtkWidget * Pixmap = NULL; | |
150 GtkWidget * hbox = NULL; | |
151 GtkWidget * Item = NULL; | |
152 GdkPixmap * PixmapIcon = NULL; | |
153 GdkColor transparent; | |
154 GdkBitmap * MaskIcon = NULL; | |
155 | |
156 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
157 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
158 gdk_pixmap_unref (PixmapIcon); | |
159 | |
160 Item=gtk_menu_item_new(); | |
161 Label = gtk_label_new (label); | |
162 | |
163 hbox = gtk_hbox_new (FALSE, 8); | |
164 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
165 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
166 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
167 | |
168 | |
169 gtk_menu_append( GTK_MENU( SubMenu ),Item ); | |
170 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", | |
171 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); | |
172 | |
173 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); | |
174 gtk_widget_show_all(Item); | |
175 return Item; | |
176 } | |
177 | |
178 | |
179 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ) | |
180 { | |
181 GtkWidget * Label = NULL; | |
182 GtkWidget * Pixmap = NULL; | |
183 GtkWidget * hbox = NULL; | |
184 GtkWidget * Item = NULL; | |
185 GtkWidget * SubItem = NULL; | |
186 GdkPixmap * PixmapIcon = NULL; | |
187 GdkColor transparent; | |
188 GdkBitmap * MaskIcon = NULL; | |
189 | |
190 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm); | |
191 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
192 gdk_pixmap_unref (PixmapIcon); | |
193 | |
194 SubItem=gtk_menu_item_new(); | |
195 Item=gtk_menu_new(); | |
196 Label = gtk_label_new (label); | |
197 | |
198 hbox = gtk_hbox_new (FALSE, 8); | |
199 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
200 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
201 gtk_container_add (GTK_CONTAINER (SubItem), hbox); | |
202 | |
203 gtk_menu_append( GTK_MENU( Menu ),SubItem ); | |
204 gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item ); | |
205 | |
206 gtk_widget_show_all( SubItem ); | |
207 return Item; | |
208 } | |
209 | |
210 GtkWidget * AddSeparator( GtkWidget * Menu ) | |
211 { | |
212 GtkWidget * Item = NULL; | |
213 | |
214 Item=gtk_menu_item_new (); | |
215 gtk_widget_show( Item ); | |
216 gtk_container_add( GTK_CONTAINER( Menu ),Item ); | |
217 gtk_widget_set_sensitive( Item,FALSE ); | |
218 | |
219 return Item; | |
220 } | |
221 | |
222 typedef struct | |
223 { | |
224 int id; | |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
225 const char * id2; |
33572 | 226 const char * name; |
227 } Languages_t; | |
228 | |
34454 | 229 #ifdef CONFIG_DVDREAD |
33572 | 230 #define lng( a,b ) ( (int)(a) * 256 + b ) |
231 static Languages_t Languages[] = | |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
232 { |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
233 { lng( 'a','a' ), "aar", "ʿAfár af" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
234 { lng( 'a','b' ), "abk", "аҧсуа бызшәа" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
235 { lng( 'a','f' ), "afr", "Afrikaans" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
236 { lng( 'a','m' ), "amh", "ኣማርኛ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
237 { lng( 'a','r' ), "ara", "العربية" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
238 { lng( 'a','s' ), "asm", "অসমীয়া" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
239 { lng( 'a','y' ), "aym", "Aymar Aru" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
240 { lng( 'a','z' ), "aze", "Azərbaycanca" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
241 { lng( 'b','a' ), "bak", "Башҡорт теле" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
242 { lng( 'b','e' ), "bel", "беларуская мова" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
243 { lng( 'b','g' ), "bul", "български език" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
244 { lng( 'b','i' ), "bis", "Bislama" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
245 { lng( 'b','n' ), "ben", "বাংলা" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
246 { lng( 'b','o' ), "bod", "བོད་སྐད" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
247 { lng( 'b','o' ), "tib", "བོད་སྐད" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
248 { lng( 'b','r' ), "bre", "Brezhoneg" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
249 { lng( 'b','s' ), "bos", "Bosanski" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
250 { lng( 'c','a' ), "cat", "Català" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
251 { lng( 'c','e' ), "che", "Нохчийн мотт" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
252 { lng( 'c','h' ), "cha", "Chamoru" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
253 { lng( 'c','o' ), "cos", "Corsu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
254 { lng( 'c','s' ), "ces", "Čeština" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
255 { lng( 'c','s' ), "cze", "Čeština" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
256 { lng( 'c','v' ), "chv", "Чӑвашла" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
257 { lng( 'c','y' ), "cym", "Cymraeg" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
258 { lng( 'c','y' ), "wel", "Cymraeg" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
259 { lng( 'd','a' ), "dan", "Dansk" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
260 { lng( 'd','e' ), "deu", "Deutsch" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
261 { lng( 'd','e' ), "ger", "Deutsch" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
262 { lng( 'd','z' ), "dzo", "ཇོང་ཁ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
263 { lng( 'e','l' ), "ell", "Ελληνικά" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
264 { lng( 'e','l' ), "gre", "Ελληνικά" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
265 { lng( 'e','n' ), "eng", "English" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
266 { lng( 'e','o' ), "epo", "Esperanto" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
267 { lng( 'e','s' ), "spa", "Español" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
268 { lng( 'e','t' ), "est", "Eesti keel" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
269 { lng( 'e','u' ), "eus", "Euskara" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
270 { lng( 'e','u' ), "baq", "Euskara" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
271 { lng( 'f','a' ), "fas", "فارسی" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
272 { lng( 'f','a' ), "per", "فارسی" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
273 { lng( 'f','i' ), "fin", "Suomi" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
274 { lng( 'f','j' ), "fij", "Vakaviti" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
275 { lng( 'f','o' ), "fao", "Føroyskt" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
276 { lng( 'f','r' ), "fra", "Français" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
277 { lng( 'f','r' ), "fre", "Français" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
278 { lng( 'f','y' ), "fry", "Frysk" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
279 { lng( 'g','a' ), "gle", "Gaeilge" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
280 { lng( 'g','d' ), "gla", "Gàidhlig" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
281 { lng( 'g','l' ), "glg", "Galego" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
282 { lng( 'g','n' ), "grn", "Avañe'ẽ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
283 { lng( 'g','u' ), "guj", "ગુજરાતી" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
284 { lng( 'h','a' ), "hau", "هَوُسَ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
285 { lng( 'h','e' ), "heb", "עִבְרִית" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
286 { lng( 'h','i' ), "hin", "हिन्दी" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
287 { lng( 'h','r' ), "hrv", "Hrvatska" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
288 { lng( 'h','u' ), "hun", "Magyar" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
289 { lng( 'h','y' ), "hye", "Հայերեն" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
290 { lng( 'h','y' ), "arm", "Հայերեն" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
291 { lng( 'h','z' ), "her", "Otjiherero" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
292 { lng( 'i','d' ), "ind", "Bahasa Indonesia" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
293 { lng( 'i','s' ), "isl", "Íslenska" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
294 { lng( 'i','s' ), "ice", "Íslenska" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
295 { lng( 'i','t' ), "ita", "Italiano" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
296 { lng( 'i','u' ), "iku", "ᐃᓄᒃᑎᑐᑦ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
297 { lng( 'j','a' ), "jpn", "日本語" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
298 { lng( 'j','v' ), "jav", "Basa Jawa" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
299 { lng( 'k','a' ), "kat", "ქართული" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
300 { lng( 'k','a' ), "geo", "ქართული" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
301 { lng( 'k','i' ), "kik", "Gĩkũyũ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
302 { lng( 'k','j' ), "kua", "Kuanyama" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
303 { lng( 'k','k' ), "kaz", "Қазақ тілі" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
304 { lng( 'k','l' ), "kal", "Kalaallisut" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
305 { lng( 'k','m' ), "khm", "ភាសាខ្មែរ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
306 { lng( 'k','n' ), "kan", "ಕನ್ನಡ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
307 { lng( 'k','o' ), "kor", "한국어" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
308 { lng( 'k','s' ), "kas", "कॉशुर" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
309 { lng( 'k','u' ), "kur", "کوردی" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
310 { lng( 'k','v' ), "kom", "коми кыв" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
311 { lng( 'k','y' ), "kir", "Кыргызча" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
312 { lng( 'l','a' ), "lat", "Lingua latina" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
313 { lng( 'l','b' ), "ltz", "Lëtzebuergesch" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
314 { lng( 'l','n' ), "lin", "Lingála" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
315 { lng( 'l','o' ), "lao", "ພາສາລາວ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
316 { lng( 'l','t' ), "lit", "Lietuvių kalba" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
317 { lng( 'l','v' ), "lav", "Latviešu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
318 { lng( 'm','g' ), "mlg", "Malagasy" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
319 { lng( 'm','h' ), "mah", "Kajin M̧ajeļ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
320 { lng( 'm','i' ), "mri", "Te Reo Māori" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
321 { lng( 'm','i' ), "mao", "Te Reo Māori" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
322 { lng( 'm','k' ), "mkd", "Македонски јазик" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
323 { lng( 'm','k' ), "mac", "Македонски јазик" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
324 { lng( 'm','l' ), "mal", "മലയാളം" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
325 { lng( 'm','n' ), "mon", "ᠮᠣᠨᠭᠭᠣᠯ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
326 { lng( 'm','r' ), "mar", "मराठी" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
327 { lng( 'm','s' ), "msa", "Bahasa Melayu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
328 { lng( 'm','s' ), "may", "Bahasa Melayu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
329 { lng( 'm','t' ), "mlt", "Malti" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
330 { lng( 'm','y' ), "mya", "မြန်မာစကား" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
331 { lng( 'm','y' ), "bur", "မြန်မာစကား" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
332 { lng( 'n','b' ), "nob", "Bokmål" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
333 { lng( 'n','d' ), "nde", "isiNdebele" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
334 { lng( 'n','e' ), "nep", "नेपाली" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
335 { lng( 'n','l' ), "nld", "Nederlands" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
336 { lng( 'n','l' ), "dut", "Nederlands" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
337 { lng( 'n','n' ), "nno", "Nynorsk" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
338 { lng( 'n','r' ), "nbl", "isiNdebele" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
339 { lng( 'n','v' ), "nav", "Diné bizaad" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
340 { lng( 'n','y' ), "nya", "Chichewa" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
341 { lng( 'o','c' ), "oci", "Occitan" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
342 { lng( 'o','m' ), "orm", "Afaan Oromoo" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
343 { lng( 'o','r' ), "ori", "ଓଡ଼ିଆ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
344 { lng( 'o','s' ), "oss", "Ирон ӕвзаг" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
345 { lng( 'p','a' ), "pan", "ਪੰਜਾਬੀ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
346 { lng( 'p','l' ), "pol", "Język polski" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
347 { lng( 'p','s' ), "pus", "پښتو" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
348 { lng( 'p','t' ), "por", "Português" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
349 { lng( 'q','u' ), "que", "Runa Simi" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
350 { lng( 'r','m' ), "roh", "Rätoromanisch" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
351 { lng( 'r','n' ), "run", "íkiRǔndi" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
352 { lng( 'r','o' ), "ron", "Română)" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
353 { lng( 'r','o' ), "rum", "Română)" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
354 { lng( 'r','u' ), "rus", "Русский" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
355 { lng( 'r','w' ), "kin", "Ikinyarwanda" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
356 { lng( 's','c' ), "srd", "Sardu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
357 { lng( 's','d' ), "snd", "سنڌي" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
358 { lng( 's','g' ), "sag", "Sängö" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
359 { lng( 's','i' ), "sin", "සිංහල" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
360 { lng( 's','k' ), "slk", "Slovenčina" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
361 { lng( 's','k' ), "slo", "Slovenčina" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
362 { lng( 's','l' ), "slv", "Slovenščina" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
363 { lng( 's','m' ), "smo", "Gagana Sāmoa" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
364 { lng( 's','n' ), "sna", "chiShona" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
365 { lng( 's','o' ), "som", "Af-ka Soomaali-ga" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
366 { lng( 's','q' ), "sqi", "Shqip" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
367 { lng( 's','q' ), "alb", "Shqip" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
368 { lng( 's','r' ), "srp", "Српски" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
369 { lng( 's','s' ), "ssw", "siSwati" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
370 { lng( 's','t' ), "sot", "seSotho" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
371 { lng( 's','u' ), "sun", "Basa Sunda" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
372 { lng( 's','v' ), "swe", "Svenska" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
373 { lng( 's','w' ), "swa", "Kiswahili" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
374 { lng( 't','a' ), "tam", "தமிழ்" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
375 { lng( 't','e' ), "tel", "తెలుగు" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
376 { lng( 't','g' ), "tgk", "тоҷикӣ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
377 { lng( 't','h' ), "tha", "ภาษาไทย" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
378 { lng( 't','i' ), "tir", "ትግርኛ" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
379 { lng( 't','k' ), "tuk", "Türkmençe" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
380 { lng( 't','l' ), "tgl", "Tagalog" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
381 { lng( 't','n' ), "tsn", "Setswana" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
382 { lng( 't','o' ), "ton", "Lea fakatonga" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
383 { lng( 't','r' ), "tur", "Türkçe" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
384 { lng( 't','s' ), "tso", "Xitsonga" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
385 { lng( 't','t' ), "tat", "татарча" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
386 { lng( 't','w' ), "twi", "Twi" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
387 { lng( 't','y' ), "tah", "Reo Tahiti" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
388 { lng( 'u','g' ), "uig", "ئۇيغۇرچە" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
389 { lng( 'u','k' ), "ukr", "Українська" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
390 { lng( 'u','r' ), "urd", "اردو" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
391 { lng( 'u','z' ), "uzb", "Oʻzbek tili" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
392 { lng( 'v','i' ), "vie", "Tiếng Việt" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
393 { lng( 'w','o' ), "wol", "Wolof" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
394 { lng( 'x','h' ), "xho", "isiXhosa" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
395 { lng( 'y','i' ), "yid", "יידיש" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
396 { lng( 'y','o' ), "yor", "Yorùbá" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
397 { lng( 'z','a' ), "zha", "壮语" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
398 { lng( 'z','h' ), "zho", "漢語" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
399 { lng( 'z','h' ), "chi", "漢語" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
400 { lng( 'z','u' ), "zul", "isiZulu" }, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
401 }; |
33572 | 402 |
403 static char * ChannelTypes[] = | |
404 { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; | |
405 static char * ChannelNumbers[] = | |
406 { "","Stereo","","","","5.1" }; | |
407 | |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
408 enum |
33572 | 409 { |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
410 GET_LANG_INT, |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
411 GET_LANG_CHR |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
412 }; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
413 |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
414 static const char * GetLanguage( void *language, int type ) |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
415 { |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
416 int l; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
417 char *p; |
33572 | 418 unsigned int i; |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
419 if ( type == GET_LANG_INT ) l = *(int *) language; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
420 else |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
421 { |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
422 p = language; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
423 |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
424 if ( p[2] == 0) |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
425 { |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
426 l = lng( p[0], p[1] ); |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
427 type = GET_LANG_INT; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
428 } |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
429 else if ( p[3] != 0) return language; |
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
430 } |
33572 | 431 for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ ) |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
432 if ( type == GET_LANG_INT ? Languages[i].id == l : strcasecmp(Languages[i].id2, p) == 0 ) return Languages[i].name; |
36701 | 433 return MSGTR_GUI_Unknown; |
33572 | 434 } |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
435 #undef lng |
34454 | 436 #endif |
33572 | 437 |
438 | |
36028 | 439 static GtkWidget * DVDSubMenu; |
33572 | 440 GtkWidget * DVDTitleMenu; |
441 GtkWidget * DVDChapterMenu; | |
442 GtkWidget * DVDAudioLanguageMenu; | |
443 GtkWidget * DVDSubtitleLanguageMenu; | |
444 GtkWidget * AspectMenu; | |
445 GtkWidget * VCDSubMenu; | |
446 GtkWidget * VCDTitleMenu; | |
34387 | 447 GtkWidget * CDSubMenu; |
448 GtkWidget * CDTitleMenu; | |
33572 | 449 |
35996 | 450 GtkWidget * CreatePopUpMenu( void ) |
33572 | 451 { |
452 GtkWidget * window1; | |
453 GtkWidget * Menu = NULL; | |
454 GtkWidget * SubMenu = NULL; | |
455 GtkWidget * MenuItem = NULL; | |
456 GtkWidget * H, * N, * D, * F; | |
33657 | 457 demuxer_t *demuxer = mpctx_get_demuxer(guiInfo.mpcontext); |
33572 | 458 mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext); |
459 int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext); | |
460 | |
461 Menu=gtk_menu_new(); | |
462 gtk_widget_realize (Menu); | |
463 window1 = gtk_widget_get_toplevel(Menu); | |
464 | |
465 | |
36694 | 466 AddMenuItem( window1, (const char*)about_xpm, Menu,MSGTR_GUI_AboutMPlayer" ", evAbout ); |
33572 | 467 AddSeparator( Menu ); |
36694 | 468 SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_GUI_Open ); |
469 AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_GUI_File"... ", evLoadPlay ); | |
34387 | 470 #ifdef CONFIG_CDDA |
36694 | 471 AddMenuItem( window1, (const char*)playcd_xpm, SubMenu,MSGTR_GUI_CD, evPlayCD ); |
472 CDSubMenu=AddSubMenu( window1, (const char*)cd_xpm, Menu,MSGTR_GUI_CD ); | |
473 AddMenuItem( window1, (const char*)playcd_xpm, CDSubMenu,MSGTR_GUI_Play,evPlayCD ); | |
34387 | 474 AddSeparator( CDSubMenu ); |
36694 | 475 CDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, CDSubMenu,MSGTR_GUI_Titles ); |
34420 | 476 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_CDDA ) ) |
34387 | 477 { |
478 char tmp[32]; int i; | |
479 for ( i=1;i <= guiInfo.Tracks;i++ ) | |
480 { | |
36694 | 481 snprintf( tmp,32,MSGTR_GUI_TitleNN,i ); |
34387 | 482 //AddMenuItem( CDTitleMenu,tmp,( i << 16 ) + ivSetCDTrack ); |
34422
b1f2949ca18d
Use empty1px.xpm instead of empty.xpm for check item (and similar) menus.
ib
parents:
34421
diff
changeset
|
483 AddMenuCheckItem(window1, (const char*)empty1px_xpm, CDTitleMenu,tmp, guiInfo.Track == i, ( i << 16 ) + ivSetCDTrack ); |
34387 | 484 } |
485 } | |
486 else | |
487 { | |
36694 | 488 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, CDTitleMenu,MSGTR_GUI__none_,evNone ); |
34387 | 489 gtk_widget_set_sensitive( MenuItem,FALSE ); |
490 } | |
491 #endif | |
33572 | 492 #ifdef CONFIG_VCD |
36694 | 493 AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_GUI_VCD, evPlayVCD ); |
494 VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_GUI_VCD ); | |
495 AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_GUI_Play,evPlayVCD ); | |
33572 | 496 AddSeparator( VCDSubMenu ); |
36694 | 497 VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_GUI_Titles ); |
34420 | 498 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_VCD ) ) |
33572 | 499 { |
500 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
501 for ( i=1;i < guiInfo.Tracks;i++ ) |
33572 | 502 { |
36694 | 503 snprintf( tmp,32,MSGTR_GUI_TitleNN,i ); |
34333 | 504 //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + ivSetVCDTrack ); |
34422
b1f2949ca18d
Use empty1px.xpm instead of empty.xpm for check item (and similar) menus.
ib
parents:
34421
diff
changeset
|
505 AddMenuCheckItem(window1, (const char*)empty1px_xpm, VCDTitleMenu,tmp, guiInfo.Track == i + 1, ( ( i + 1 ) << 16 ) + ivSetVCDTrack ); |
33572 | 506 } |
507 } | |
508 else | |
509 { | |
36694 | 510 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, VCDTitleMenu,MSGTR_GUI__none_,evNone ); |
33572 | 511 gtk_widget_set_sensitive( MenuItem,FALSE ); |
512 } | |
513 #endif | |
514 #ifdef CONFIG_DVDREAD | |
36694 | 515 AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_GUI_DVD, evPlayDVD ); |
516 DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_GUI_DVD ); | |
517 AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_GUI_Play" ", evPlayDVD ); | |
33572 | 518 // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); |
519 AddSeparator( DVDSubMenu ); | |
36694 | 520 DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_GUI_Titles ); |
34420 | 521 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 522 { |
523 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
524 for ( i=1 ; i<= guiInfo.Tracks;i++ ) |
33572 | 525 { |
36694 | 526 snprintf( tmp,32,MSGTR_GUI_TitleNN,i); |
33572 | 527 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,tmp, |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
528 guiInfo.Track == i, |
34333 | 529 (i << 16) + ivSetDVDTitle ); |
33572 | 530 } |
531 } | |
532 else | |
533 { | |
36694 | 534 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,MSGTR_GUI__none_,evNone ); |
33572 | 535 gtk_widget_set_sensitive( MenuItem,FALSE ); |
536 } | |
36694 | 537 DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_GUI_Chapters ); |
34420 | 538 if ( guiInfo.Chapters && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 539 { |
540 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
541 for ( i=1;i <= guiInfo.Chapters;i++ ) |
33572 | 542 { |
36694 | 543 snprintf( tmp,32,MSGTR_GUI_ChapterNN,i ); |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
544 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i, |
34333 | 545 ( i << 16 ) + ivSetDVDChapter ); |
33572 | 546 } |
547 } | |
548 else | |
549 { | |
36694 | 550 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,MSGTR_GUI__none_,evNone ); |
33572 | 551 gtk_widget_set_sensitive( MenuItem,FALSE ); |
552 } | |
36694 | 553 DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audio_xpm, DVDSubMenu,MSGTR_GUI_AudioTracks ); |
36700 | 554 if ( guiInfo.AudioStreams && demuxer && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 555 { |
36700 | 556 char tmp[64]; int i; |
33902 | 557 for ( i=0;i < guiInfo.AudioStreams;i++ ) |
33572 | 558 { |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
559 snprintf( tmp,64,"%s - %s %s",GetLanguage( &guiInfo.AudioStream[i].language, GET_LANG_INT ), |
33902 | 560 ChannelTypes[ guiInfo.AudioStream[i].type ], |
561 ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); | |
33572 | 562 AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, |
36700 | 563 demuxer->audio->id == guiInfo.AudioStream[i].id, |
34333 | 564 ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); |
33572 | 565 } |
566 } | |
567 else | |
568 { | |
36694 | 569 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDAudioLanguageMenu,MSGTR_GUI__none_,evNone ); |
33572 | 570 gtk_widget_set_sensitive( MenuItem,FALSE ); |
571 } | |
36694 | 572 DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)subtitle_xpm, DVDSubMenu,MSGTR_GUI_Subtitles ); |
34420 | 573 if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 574 { |
575 char tmp[64]; int i; | |
36694 | 576 AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle ); |
33902 | 577 for ( i=0;i < guiInfo.Subtitles;i++ ) |
33572 | 578 { |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
579 av_strlcpy( tmp,GetLanguage( &guiInfo.Subtitle[i].language, GET_LANG_INT ),sizeof(tmp) ); |
33572 | 580 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, |
33902 | 581 dvdsub_id == guiInfo.Subtitle[i].id, |
34333 | 582 ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle ); |
33572 | 583 } |
584 } | |
585 else | |
586 { | |
36694 | 587 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,evNone ); |
33572 | 588 gtk_widget_set_sensitive( MenuItem,FALSE ); |
589 } | |
590 #endif | |
36694 | 591 AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_GUI_URL"...", evLoadURL ); |
36429 | 592 #ifdef CONFIG_TV |
36694 | 593 AddMenuItem( window1, (const char*)tv_xpm, SubMenu,MSGTR_GUI_TV, evPlayTV ); |
36429 | 594 #endif |
36663 | 595 AddSeparator( SubMenu ); |
36694 | 596 AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_GUI_AudioTrack"...", evLoadAudioFile ); |
597 AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_GUI_Subtitle"... ", evLoadSubtitle ); | |
598 AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_GUI_DropSubtitle,evDropSubtitle ); | |
599 SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_GUI_Playback ); | |
600 AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_GUI_Play" ", evPlay ); | |
601 AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_GUI_Pause, evPause ); | |
602 AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_GUI_Stop, evStop ); | |
603 AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_GUI_Next, evNext ); | |
604 AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_GUI_Previous, evPrev ); | |
34419 | 605 // AddSeparator( SubMenu ); |
606 // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); | |
607 // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); | |
608 // AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); | |
609 // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); | |
610 // SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); | |
36694 | 611 // AddMenuItem( SubMenu,MSGTR_GUI_SizeNormal" ", evNormalSize ); |
612 // AddMenuItem( SubMenu,MSGTR_GUI_SizeDouble, evDoubleSize ); | |
613 // AddMenuItem( SubMenu,MSGTR_GUI_SizeFullscreen, evFullScreen + ( True << 16 ) ); | |
33572 | 614 |
36261
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
615 if ( guiInfo.VideoWindow ) |
33572 | 616 { |
36273 | 617 int a11 = False, a169 = False, a43 = False, a235 = False; |
36622
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
618 AddSeparator( Menu ); |
36316
139f2b064ef9
Don't subsequently calculate original_aspect from last movie_aspect.
ib
parents:
36297
diff
changeset
|
619 if (movie_aspect == -1.0f) a11 = True; |
36273 | 620 else |
621 { | |
622 a169 = (FFABS(movie_aspect - 16.0f / 9.0f) <= 0.01f); | |
623 a43 = (FFABS(movie_aspect - 4.0f / 3.0f) <= 0.01f); | |
36276 | 624 a235 = (FFABS(movie_aspect - 2.35f) <= 0.01f); |
36273 | 625 } |
626 | |
36694 | 627 AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_GUI_AspectRatio ); |
628 H=AddMenuCheckItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_GUI_Original, a11, evSetAspect + ( 1 << 16 ) ); | |
36273 | 629 N=AddMenuCheckItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9", a169, evSetAspect + ( 2 << 16 ) ); |
630 D=AddMenuCheckItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3", a43, evSetAspect + ( 3 << 16 ) ); | |
36694 | 631 F=AddMenuCheckItem( window1, (const char*)aspect235_xpm, AspectMenu,MSGTR_GUI_235To1, a235, evSetAspect + ( 4 << 16 ) ); |
36261
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
632 |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
633 if ( !guiInfo.Playing ) |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
634 { |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
635 gtk_widget_set_sensitive( H,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
636 gtk_widget_set_sensitive( N,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
637 gtk_widget_set_sensitive( D,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
638 gtk_widget_set_sensitive( F,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
639 } |
33572 | 640 } |
641 | |
36622
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
642 if ( guiInfo.VideoWindow ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
643 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
644 int b1 = False, b2 = False, b_half = False; |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
645 |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
646 if ( !guiApp.videoWindow.isFullScreen && guiInfo.Playing ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
647 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
648 if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth * 2 )&& |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
649 ( guiApp.videoWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=True; |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
650 else if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth / 2 ) && |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
651 ( guiApp.videoWindow.Height == guiInfo.VideoHeight / 2 ) ) b_half=True; |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
652 else b1=( guiApp.videoWindow.Width == guiInfo.VideoWidth && guiApp.videoWindow.Height == guiInfo.VideoHeight ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
653 } else b1=!guiApp.videoWindow.isFullScreen; |
36694 | 654 F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_GUI_SizeFullscreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) ); |
655 D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_GUI_SizeDouble,b2,evDoubleSize ); | |
656 N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_GUI_SizeNormal" ",b1,evNormalSize ); | |
657 H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_GUI_SizeHalf,b_half,evHalfSize ); | |
36622
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
658 if ( !guiInfo.Playing ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
659 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
660 gtk_widget_set_sensitive( H,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
661 gtk_widget_set_sensitive( N,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
662 gtk_widget_set_sensitive( D,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
663 gtk_widget_set_sensitive( F,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
664 } |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
665 } |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
666 |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
667 AddSeparator( Menu ); |
36694 | 668 MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_GUI_Mute,mixer->muted,evMute ); |
36622
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
669 if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
670 |
33657 | 671 if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD ) |
33572 | 672 { |
673 int i,c = 0; | |
674 | |
675 for ( i=0;i < MAX_A_STREAMS;i++ ) | |
33657 | 676 if ( demuxer->a_streams[i] ) c++; |
33572 | 677 |
678 if ( c > 1 ) | |
679 { | |
36694 | 680 SubMenu=AddSubMenu( window1, (const char*)audio_xpm, Menu,MSGTR_GUI_AudioTracks ); |
33572 | 681 for ( i=0;i < MAX_A_STREAMS;i++ ) |
33657 | 682 if ( demuxer->a_streams[i] ) |
33572 | 683 { |
33657 | 684 int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid; |
36699 | 685 int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(demuxer))); |
36704 | 686 char lng[32], tmp[64]; |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
687 if ( demuxer_audio_lang( demuxer, i, lng, sizeof(lng) ) == 0 ) snprintf( tmp,sizeof(tmp),MSGTR_GUI_TrackN" - %s",aid,GetLanguage( lng, GET_LANG_CHR ) ); |
36704 | 688 else snprintf( tmp,sizeof(tmp),MSGTR_GUI_TrackN,aid ); |
34555
da67e2df97be
Emphasize the default audio track in the selection list.
ib
parents:
34479
diff
changeset
|
689 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( aid << 16 ) + ivSetAudio ); |
33572 | 690 } |
691 } | |
692 | |
693 for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) | |
33657 | 694 if ( demuxer->v_streams[i] ) c++; |
33572 | 695 |
696 if ( c > 1 ) | |
697 { | |
36694 | 698 SubMenu=AddSubMenu( window1, (const char*)video_xpm, Menu,MSGTR_GUI_VideoTracks ); |
33572 | 699 for ( i=0;i < MAX_V_STREAMS;i++ ) |
33657 | 700 if ( demuxer->v_streams[i] ) |
33572 | 701 { |
33657 | 702 int vid = ((sh_video_t *)demuxer->v_streams[i])->vid; |
33572 | 703 char tmp[32]; |
36699 | 704 int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(demuxer))); |
36694 | 705 snprintf( tmp,32,MSGTR_GUI_TrackN,vid ); |
36683 | 706 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( vid << 16 ) + ivSetVideo ); |
33572 | 707 } |
708 } | |
709 } | |
710 | |
711 /* cheap subtitle switching for non-DVD streams */ | |
712 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD ) | |
713 { | |
36705 | 714 int pos, i, j, subs0 = guiInfo.mpcontext->sub_counts[SUB_SOURCE_SUBS], subs1 = guiInfo.mpcontext->sub_counts[SUB_SOURCE_VOBSUB]; |
36458 | 715 pos = mpctx_get_global_sub_pos(guiInfo.mpcontext); |
36694 | 716 SubMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu, MSGTR_GUI_Subtitles ); |
717 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu, MSGTR_GUI__none_, pos == -1, (-1 << 16) + ivSetSubtitle ); | |
33572 | 718 for ( i=0;i < global_sub_size;i++ ) |
719 { | |
36705 | 720 int ret = -1; |
36707 | 721 char lng[32], tmp[64], *lang = NULL; |
722 /* file */ | |
723 if ( i < subs0 ) | |
724 { | |
725 if ( guiInfo.mpcontext->set_of_subtitles[i] ) lang = guiInfo.mpcontext->set_of_subtitles[i]->filename; | |
726 #ifdef CONFIG_ASS | |
727 if ( ass_track && ass_track->name ) lang = ass_track->name; | |
728 #endif | |
729 if ( lang ) | |
730 { | |
731 av_strlcpy( lng, mp_basename(lang), sizeof(lng) ); | |
732 ret = 0; | |
733 } | |
734 } | |
36706 | 735 /* VOBsub */ |
36707 | 736 else if ( ( i >= subs0 && i < subs0 + subs1 ) && vo_vobsub ) |
36706 | 737 { |
738 lang = vobsub_get_id( vo_vobsub, vobsub_get_id_by_index( vo_vobsub, i - subs0 ) ); | |
739 | |
740 if ( lang ) | |
741 { | |
742 av_strlcpy( lng, lang, sizeof(lng) ); | |
743 ret = 0; | |
744 } | |
745 } | |
746 /* embedded (demuxer) */ | |
747 else if ( i >= subs0 + subs1 ) | |
36705 | 748 { |
749 for ( j=0;j < MAX_S_STREAMS;j++ ) | |
750 { | |
751 if ( demuxer->s_streams[j] ) ret++; | |
752 if ( ret == i - subs0 - subs1 ) | |
753 { | |
754 ret = demuxer_sub_lang( demuxer, j, lng, sizeof(lng) ); | |
755 break; | |
756 } | |
757 } | |
758 } | |
36708
9274efe53180
Improve language information on audio and subtitle streams.
ib
parents:
36707
diff
changeset
|
759 if ( ret == 0 ) snprintf( tmp, sizeof(tmp), MSGTR_GUI_TrackN" - %s", i, GetLanguage( lng, GET_LANG_CHR ) ); |
36705 | 760 else snprintf( tmp, sizeof(tmp), MSGTR_GUI_TrackN, i ); |
36458 | 761 AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,pos == i,( i << 16 ) + ivSetSubtitle ); |
33572 | 762 } |
763 } | |
764 | |
765 AddSeparator( Menu ); | |
36694 | 766 AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_GUI_Equalizer, evEqualizer ); |
767 AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_GUI_Playlist, evPlaylist ); | |
768 AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_GUI_SkinBrowser, evSkinBrowser ); | |
769 AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_GUI_Preferences, evPreferences ); | |
36620 | 770 |
771 AddSeparator( Menu ); | |
36694 | 772 AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_GUI_Quit, evExit ); |
33572 | 773 |
774 return Menu; | |
775 } |