Mercurial > mplayer.hg
annotate gui/dialog/menu.c @ 36702:fb14d0cfc36d
Use native names of languages instead of English ones.
(This is a compromise between localization and the effort to translate
every language name into every language we are supporting.)
It should easily allow anyone who understands a certain language to find
the corresponding menu entry.
Additionally, remove languages (almost) ceased to be a living language,
remove collective language codes and arrange all language codes
alphabetically.
author | ib |
---|---|
date | Fri, 07 Feb 2014 18:17:05 +0000 |
parents | eb1a6a0b268f |
children | 712751eb3ad6 |
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> | |
22 | |
23 #include "config.h" | |
24 #include "help_mp.h" | |
25 #include "access_mpcontext.h" | |
26 #include "mixer.h" | |
27 #include "mpcommon.h" | |
28 | |
29 #include "menu.h" | |
35529 | 30 #include "dialog.h" |
35772 | 31 #include "gui/ui/actions.h" |
35525 | 32 #include "gui/app/app.h" |
33 #include "gui/app/gui.h" | |
33738 | 34 #include "gui/interface.h" |
33572 | 35 |
36 #include "stream/stream.h" | |
36273 | 37 #include "libavutil/common.h" |
38 #include "libmpcodecs/vd.h" | |
33572 | 39 #include "libmpdemux/demuxer.h" |
40 #include "libmpdemux/stheader.h" | |
41 #include "libavutil/avstring.h" | |
42 | |
35526 | 43 #include "pixmaps/about.xpm" |
44 #include "pixmaps/half.xpm" | |
45 #include "pixmaps/normal.xpm" | |
46 #include "pixmaps/double.xpm" | |
47 #include "pixmaps/full.xpm" | |
48 #include "pixmaps/exit.xpm" | |
49 #include "pixmaps/prefs.xpm" | |
50 #include "pixmaps/equalizer.xpm" | |
51 #include "pixmaps/playlist.xpm" | |
52 #include "pixmaps/skin.xpm" | |
53 #include "pixmaps/sound.xpm" | |
54 #include "pixmaps/open.xpm" | |
55 #include "pixmaps/play.xpm" | |
56 #include "pixmaps/stop.xpm" | |
57 #include "pixmaps/pause.xpm" | |
58 #include "pixmaps/prev.xpm" | |
59 #include "pixmaps/next.xpm" | |
60 #include "pixmaps/aspect.xpm" | |
61 #include "pixmaps/aspect11.xpm" | |
62 #include "pixmaps/aspect169.xpm" | |
63 #include "pixmaps/aspect235.xpm" | |
64 #include "pixmaps/aspect43.xpm" | |
65 #include "pixmaps/file2.xpm" | |
66 #include "pixmaps/url.xpm" | |
67 #include "pixmaps/sub.xpm" | |
68 #include "pixmaps/nosub.xpm" | |
69 #include "pixmaps/empty.xpm" | |
70 #include "pixmaps/loadeaf.xpm" | |
71 #include "pixmaps/title.xpm" | |
72 #include "pixmaps/subtitle.xpm" | |
34387 | 73 #ifdef CONFIG_CDDA |
35526 | 74 #include "pixmaps/cd.xpm" |
75 #include "pixmaps/playcd.xpm" | |
34387 | 76 #endif |
34077 | 77 #ifdef CONFIG_VCD |
35526 | 78 #include "pixmaps/vcd.xpm" |
79 #include "pixmaps/playvcd.xpm" | |
34077 | 80 #endif |
33572 | 81 #ifdef CONFIG_DVDREAD |
35526 | 82 #include "pixmaps/dvd.xpm" |
83 #include "pixmaps/playdvd.xpm" | |
84 #include "pixmaps/chapter.xpm" | |
85 #include "pixmaps/dolby.xpm" | |
36665 | 86 #include "pixmaps/audio.xpm" |
36666 | 87 #include "pixmaps/video.xpm" |
34422
b1f2949ca18d
Use empty1px.xpm instead of empty.xpm for check item (and similar) menus.
ib
parents:
34421
diff
changeset
|
88 #endif |
36429 | 89 #ifdef CONFIG_TV |
90 #include "pixmaps/tv.xpm" | |
91 #endif | |
35526 | 92 #include "pixmaps/empty1px.xpm" |
33572 | 93 |
36029
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
94 int gtkPopupMenu; |
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
95 int gtkPopupMenuParam; |
49be954ad61a
Move variable declarations and definitions where they belong.
ib
parents:
36028
diff
changeset
|
96 |
33572 | 97 static void ActivateMenuItem( int Item ) |
98 { | |
99 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 ); | |
100 gtkPopupMenu=Item & 0x0000ffff; | |
101 gtkPopupMenuParam=Item >> 16; | |
35773 | 102 uiEvent( Item & 0x0000ffff,Item >> 16 ); |
33572 | 103 } |
104 | |
105 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number) | |
106 { | |
107 GtkWidget * Label = NULL; | |
108 GtkWidget * Pixmap = NULL; | |
109 GtkWidget * hbox = NULL; | |
110 GtkWidget * Item = NULL; | |
111 | |
112 GdkPixmap *PixmapIcon = NULL; | |
113 GdkColor transparent; | |
114 GdkBitmap *MaskIcon = NULL; | |
115 | |
116 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
117 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
118 gdk_pixmap_unref (PixmapIcon); | |
119 | |
120 Item=gtk_check_menu_item_new(); | |
121 Label = gtk_label_new (label); | |
122 | |
123 hbox = gtk_hbox_new (FALSE, 8); | |
124 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
125 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
126 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
127 | |
128 gtk_menu_append( GTK_MENU( Menu ),Item ); | |
129 | |
130 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state); | |
131 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", | |
132 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); | |
133 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); | |
134 gtk_widget_show_all(Item); | |
135 | |
136 return Item; | |
137 } | |
138 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number ) | |
139 { | |
140 GtkWidget * Label = NULL; | |
141 GtkWidget * Pixmap = NULL; | |
142 GtkWidget * hbox = NULL; | |
143 GtkWidget * Item = NULL; | |
144 GdkPixmap * PixmapIcon = NULL; | |
145 GdkColor transparent; | |
146 GdkBitmap * MaskIcon = NULL; | |
147 | |
148 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm ); | |
149 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
150 gdk_pixmap_unref (PixmapIcon); | |
151 | |
152 Item=gtk_menu_item_new(); | |
153 Label = gtk_label_new (label); | |
154 | |
155 hbox = gtk_hbox_new (FALSE, 8); | |
156 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
157 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
158 gtk_container_add (GTK_CONTAINER (Item), hbox); | |
159 | |
160 | |
161 gtk_menu_append( GTK_MENU( SubMenu ),Item ); | |
162 gtk_signal_connect_object( GTK_OBJECT(Item),"activate", | |
163 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number ); | |
164 | |
165 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item)); | |
166 gtk_widget_show_all(Item); | |
167 return Item; | |
168 } | |
169 | |
170 | |
171 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label ) | |
172 { | |
173 GtkWidget * Label = NULL; | |
174 GtkWidget * Pixmap = NULL; | |
175 GtkWidget * hbox = NULL; | |
176 GtkWidget * Item = NULL; | |
177 GtkWidget * SubItem = NULL; | |
178 GdkPixmap * PixmapIcon = NULL; | |
179 GdkColor transparent; | |
180 GdkBitmap * MaskIcon = NULL; | |
181 | |
182 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm); | |
183 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon); | |
184 gdk_pixmap_unref (PixmapIcon); | |
185 | |
186 SubItem=gtk_menu_item_new(); | |
187 Item=gtk_menu_new(); | |
188 Label = gtk_label_new (label); | |
189 | |
190 hbox = gtk_hbox_new (FALSE, 8); | |
191 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0); | |
192 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0); | |
193 gtk_container_add (GTK_CONTAINER (SubItem), hbox); | |
194 | |
195 gtk_menu_append( GTK_MENU( Menu ),SubItem ); | |
196 gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item ); | |
197 | |
198 gtk_widget_show_all( SubItem ); | |
199 return Item; | |
200 } | |
201 | |
202 GtkWidget * AddSeparator( GtkWidget * Menu ) | |
203 { | |
204 GtkWidget * Item = NULL; | |
205 | |
206 Item=gtk_menu_item_new (); | |
207 gtk_widget_show( Item ); | |
208 gtk_container_add( GTK_CONTAINER( Menu ),Item ); | |
209 gtk_widget_set_sensitive( Item,FALSE ); | |
210 | |
211 return Item; | |
212 } | |
213 | |
214 typedef struct | |
215 { | |
216 int id; | |
217 const char * name; | |
218 } Languages_t; | |
219 | |
34454 | 220 #ifdef CONFIG_DVDREAD |
33572 | 221 #define lng( a,b ) ( (int)(a) * 256 + b ) |
222 static Languages_t Languages[] = | |
223 { | |
36702
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
224 { lng( 'a','a' ), "ʿAfár af" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
225 { lng( 'a','b' ), "аҧсуа бызшәа" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
226 { lng( 'a','f' ), "Afrikaans" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
227 { lng( 'a','m' ), "ኣማርኛ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
228 { lng( 'a','r' ), "العربية" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
229 { lng( 'a','s' ), "অসমীয়া" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
230 { lng( 'a','y' ), "Aymar Aru" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
231 { lng( 'a','z' ), "Azərbaycanca" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
232 { lng( 'b','a' ), "Башҡорт теле" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
233 { lng( 'b','e' ), "беларуская мова" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
234 { lng( 'b','g' ), "български език" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
235 { lng( 'b','i' ), "Bislama" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
236 { lng( 'b','n' ), "বাংলা" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
237 { lng( 'b','o' ), "བོད་སྐད" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
238 { lng( 'b','r' ), "Brezhoneg" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
239 { lng( 'b','s' ), "Bosanski" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
240 { lng( 'c','a' ), "Català" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
241 { lng( 'c','e' ), "Нохчийн мотт" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
242 { lng( 'c','h' ), "Chamoru" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
243 { lng( 'c','o' ), "Corsu" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
244 { lng( 'c','s' ), "Čeština" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
245 { lng( 'c','v' ), "Чӑвашла" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
246 { lng( 'c','y' ), "Cymraeg" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
247 { lng( 'd','a' ), "Dansk" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
248 { lng( 'd','e' ), "Deutsch" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
249 { lng( 'd','z' ), "ཇོང་ཁ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
250 { lng( 'e','l' ), "Ελληνικά" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
251 { lng( 'e','n' ), "English" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
252 { lng( 'e','o' ), "Esperanto" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
253 { lng( 'e','s' ), "Español" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
254 { lng( 'e','t' ), "Eesti keel" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
255 { lng( 'e','u' ), "Euskara" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
256 { lng( 'f','a' ), "فارسی" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
257 { lng( 'f','i' ), "Suomi" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
258 { lng( 'f','j' ), "Vakaviti" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
259 { lng( 'f','o' ), "Føroyskt" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
260 { lng( 'f','r' ), "Français" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
261 { lng( 'f','y' ), "Frysk" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
262 { lng( 'g','a' ), "Gaeilge" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
263 { lng( 'g','d' ), "Gàidhlig" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
264 { lng( 'g','l' ), "Galego" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
265 { lng( 'g','n' ), "Avañe'ẽ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
266 { lng( 'g','u' ), "ગુજરાતી" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
267 { lng( 'h','a' ), "هَوُسَ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
268 { lng( 'h','e' ), "עִבְרִית" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
269 { lng( 'h','i' ), "हिन्दी" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
270 { lng( 'h','r' ), "Hrvatska" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
271 { lng( 'h','u' ), "Magyar" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
272 { lng( 'h','y' ), "Հայերեն" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
273 { lng( 'h','z' ), "Otjiherero" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
274 { lng( 'i','d' ), "Bahasa Indonesia" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
275 { lng( 'i','s' ), "Íslenska" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
276 { lng( 'i','t' ), "Italiano" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
277 { lng( 'i','u' ), "ᐃᓄᒃᑎᑐᑦ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
278 { lng( 'j','a' ), "日本語" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
279 { lng( 'j','i' ), "יידיש" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
280 { lng( 'j','v' ), "Basa Jawa" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
281 { lng( 'k','a' ), "ქართული" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
282 { lng( 'k','i' ), "Gĩkũyũ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
283 { lng( 'k','j' ), "Kuanyama" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
284 { lng( 'k','k' ), "Қазақ тілі" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
285 { lng( 'k','l' ), "Kalaallisut" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
286 { lng( 'k','m' ), "ភាសាខ្មែរ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
287 { lng( 'k','n' ), "ಕನ್ನಡ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
288 { lng( 'k','o' ), "한국어" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
289 { lng( 'k','s' ), "कॉशुर" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
290 { lng( 'k','u' ), "کوردی" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
291 { lng( 'k','v' ), "коми кыв" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
292 { lng( 'k','y' ), "Кыргызча" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
293 { lng( 'l','a' ), "Lingua latina" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
294 { lng( 'l','b' ), "Lëtzebuergesch" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
295 { lng( 'l','n' ), "Lingála" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
296 { lng( 'l','o' ), "ພາສາລາວ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
297 { lng( 'l','t' ), "Lietuvių kalba" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
298 { lng( 'l','v' ), "Latviešu" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
299 { lng( 'm','g' ), "Malagasy" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
300 { lng( 'm','h' ), "Kajin M̧ajeļ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
301 { lng( 'm','i' ), "Te Reo Māori" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
302 { lng( 'm','k' ), "Македонски јазик" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
303 { lng( 'm','l' ), "മലയാളം" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
304 { lng( 'm','n' ), "ᠮᠣᠨᠭᠭᠣᠯ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
305 { lng( 'm','r' ), "मराठी" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
306 { lng( 'm','s' ), "Bahasa Melayu" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
307 { lng( 'm','t' ), "Malti" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
308 { lng( 'm','y' ), "မြန်မာစကား" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
309 { lng( 'n','b' ), "Bokmål" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
310 { lng( 'n','d' ), "isiNdebele" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
311 { lng( 'n','e' ), "नेपाली" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
312 { lng( 'n','l' ), "Nederlands" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
313 { lng( 'n','n' ), "Nynorsk" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
314 { lng( 'n','r' ), "isiNdebele" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
315 { lng( 'n','v' ), "Diné bizaad" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
316 { lng( 'n','y' ), "Chichewa" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
317 { lng( 'o','c' ), "Occitan" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
318 { lng( 'o','m' ), "Afaan Oromoo" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
319 { lng( 'o','r' ), "ଓଡ଼ିଆ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
320 { lng( 'o','s' ), "Ирон ӕвзаг" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
321 { lng( 'p','a' ), "ਪੰਜਾਬੀ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
322 { lng( 'p','l' ), "Język polski" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
323 { lng( 'p','s' ), "پښتو" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
324 { lng( 'p','t' ), "Português" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
325 { lng( 'q','u' ), "Runa Simi" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
326 { lng( 'r','m' ), "Rätoromanisch" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
327 { lng( 'r','n' ), "íkiRǔndi" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
328 { lng( 'r','o' ), "Română)" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
329 { lng( 'r','u' ), "Русский" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
330 { lng( 'r','w' ), "Ikinyarwanda" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
331 { lng( 's','c' ), "Sardu" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
332 { lng( 's','d' ), "سنڌي" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
333 { lng( 's','g' ), "Sängö" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
334 { lng( 's','i' ), "සිංහල" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
335 { lng( 's','k' ), "Slovenčina" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
336 { lng( 's','l' ), "Slovenščina" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
337 { lng( 's','m' ), "Gagana Sāmoa" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
338 { lng( 's','n' ), "chiShona" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
339 { lng( 's','o' ), "Af-ka Soomaali-ga" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
340 { lng( 's','q' ), "Shqip" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
341 { lng( 's','r' ), "Српски" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
342 { lng( 's','s' ), "siSwati" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
343 { lng( 's','t' ), "seSotho" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
344 { lng( 's','u' ), "Basa Sunda" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
345 { lng( 's','v' ), "Svenska" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
346 { lng( 's','w' ), "Kiswahili" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
347 { lng( 't','a' ), "தமிழ்" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
348 { lng( 't','e' ), "తెలుగు" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
349 { lng( 't','g' ), "тоҷикӣ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
350 { lng( 't','h' ), "ภาษาไทย" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
351 { lng( 't','i' ), "ትግርኛ" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
352 { lng( 't','k' ), "Türkmençe" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
353 { lng( 't','l' ), "Tagalog" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
354 { lng( 't','n' ), "Setswana" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
355 { lng( 't','o' ), "Lea fakatonga" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
356 { lng( 't','r' ), "Türkçe" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
357 { lng( 't','s' ), "Xitsonga" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
358 { lng( 't','t' ), "татарча" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
359 { lng( 't','w' ), "Twi" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
360 { lng( 't','y' ), "Reo Tahiti" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
361 { lng( 'u','g' ), "ئۇيغۇرچە" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
362 { lng( 'u','k' ), "Українська" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
363 { lng( 'u','r' ), "اردو" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
364 { lng( 'u','z' ), "Oʻzbek tili" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
365 { lng( 'v','i' ), "Tiếng Việt" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
366 { lng( 'w','o' ), "Wolof" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
367 { lng( 'x','h' ), "isiXhosa" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
368 { lng( 'y','i' ), "ייִדיש" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
369 { lng( 'y','o' ), "Yorùbá" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
370 { lng( 'z','a' ), "壮语" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
371 { lng( 'z','h' ), "漢語" }, |
fb14d0cfc36d
Use native names of languages instead of English ones.
ib
parents:
36701
diff
changeset
|
372 { lng( 'z','u' ), "isiZulu" }, |
33572 | 373 }; |
374 #undef lng | |
375 | |
376 static char * ChannelTypes[] = | |
377 { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" }; | |
378 static char * ChannelNumbers[] = | |
379 { "","Stereo","","","","5.1" }; | |
380 | |
381 static const char * GetLanguage( int language ) | |
382 { | |
383 unsigned int i; | |
384 for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ ) | |
385 if ( Languages[i].id == language ) return Languages[i].name; | |
36701 | 386 return MSGTR_GUI_Unknown; |
33572 | 387 } |
34454 | 388 #endif |
33572 | 389 |
390 | |
36028 | 391 static GtkWidget * DVDSubMenu; |
33572 | 392 GtkWidget * DVDTitleMenu; |
393 GtkWidget * DVDChapterMenu; | |
394 GtkWidget * DVDAudioLanguageMenu; | |
395 GtkWidget * DVDSubtitleLanguageMenu; | |
396 GtkWidget * AspectMenu; | |
397 GtkWidget * VCDSubMenu; | |
398 GtkWidget * VCDTitleMenu; | |
34387 | 399 GtkWidget * CDSubMenu; |
400 GtkWidget * CDTitleMenu; | |
33572 | 401 |
35996 | 402 GtkWidget * CreatePopUpMenu( void ) |
33572 | 403 { |
404 GtkWidget * window1; | |
405 GtkWidget * Menu = NULL; | |
406 GtkWidget * SubMenu = NULL; | |
407 GtkWidget * MenuItem = NULL; | |
408 GtkWidget * H, * N, * D, * F; | |
33657 | 409 demuxer_t *demuxer = mpctx_get_demuxer(guiInfo.mpcontext); |
33572 | 410 mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext); |
411 int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext); | |
412 | |
413 Menu=gtk_menu_new(); | |
414 gtk_widget_realize (Menu); | |
415 window1 = gtk_widget_get_toplevel(Menu); | |
416 | |
417 | |
36694 | 418 AddMenuItem( window1, (const char*)about_xpm, Menu,MSGTR_GUI_AboutMPlayer" ", evAbout ); |
33572 | 419 AddSeparator( Menu ); |
36694 | 420 SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_GUI_Open ); |
421 AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_GUI_File"... ", evLoadPlay ); | |
34387 | 422 #ifdef CONFIG_CDDA |
36694 | 423 AddMenuItem( window1, (const char*)playcd_xpm, SubMenu,MSGTR_GUI_CD, evPlayCD ); |
424 CDSubMenu=AddSubMenu( window1, (const char*)cd_xpm, Menu,MSGTR_GUI_CD ); | |
425 AddMenuItem( window1, (const char*)playcd_xpm, CDSubMenu,MSGTR_GUI_Play,evPlayCD ); | |
34387 | 426 AddSeparator( CDSubMenu ); |
36694 | 427 CDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, CDSubMenu,MSGTR_GUI_Titles ); |
34420 | 428 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_CDDA ) ) |
34387 | 429 { |
430 char tmp[32]; int i; | |
431 for ( i=1;i <= guiInfo.Tracks;i++ ) | |
432 { | |
36694 | 433 snprintf( tmp,32,MSGTR_GUI_TitleNN,i ); |
34387 | 434 //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
|
435 AddMenuCheckItem(window1, (const char*)empty1px_xpm, CDTitleMenu,tmp, guiInfo.Track == i, ( i << 16 ) + ivSetCDTrack ); |
34387 | 436 } |
437 } | |
438 else | |
439 { | |
36694 | 440 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, CDTitleMenu,MSGTR_GUI__none_,evNone ); |
34387 | 441 gtk_widget_set_sensitive( MenuItem,FALSE ); |
442 } | |
443 #endif | |
33572 | 444 #ifdef CONFIG_VCD |
36694 | 445 AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_GUI_VCD, evPlayVCD ); |
446 VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_GUI_VCD ); | |
447 AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_GUI_Play,evPlayVCD ); | |
33572 | 448 AddSeparator( VCDSubMenu ); |
36694 | 449 VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_GUI_Titles ); |
34420 | 450 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_VCD ) ) |
33572 | 451 { |
452 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
453 for ( i=1;i < guiInfo.Tracks;i++ ) |
33572 | 454 { |
36694 | 455 snprintf( tmp,32,MSGTR_GUI_TitleNN,i ); |
34333 | 456 //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
|
457 AddMenuCheckItem(window1, (const char*)empty1px_xpm, VCDTitleMenu,tmp, guiInfo.Track == i + 1, ( ( i + 1 ) << 16 ) + ivSetVCDTrack ); |
33572 | 458 } |
459 } | |
460 else | |
461 { | |
36694 | 462 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, VCDTitleMenu,MSGTR_GUI__none_,evNone ); |
33572 | 463 gtk_widget_set_sensitive( MenuItem,FALSE ); |
464 } | |
465 #endif | |
466 #ifdef CONFIG_DVDREAD | |
36694 | 467 AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_GUI_DVD, evPlayDVD ); |
468 DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_GUI_DVD ); | |
469 AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_GUI_Play" ", evPlayDVD ); | |
33572 | 470 // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone ); |
471 AddSeparator( DVDSubMenu ); | |
36694 | 472 DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_GUI_Titles ); |
34420 | 473 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 474 { |
475 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
476 for ( i=1 ; i<= guiInfo.Tracks;i++ ) |
33572 | 477 { |
36694 | 478 snprintf( tmp,32,MSGTR_GUI_TitleNN,i); |
33572 | 479 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
|
480 guiInfo.Track == i, |
34333 | 481 (i << 16) + ivSetDVDTitle ); |
33572 | 482 } |
483 } | |
484 else | |
485 { | |
36694 | 486 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,MSGTR_GUI__none_,evNone ); |
33572 | 487 gtk_widget_set_sensitive( MenuItem,FALSE ); |
488 } | |
36694 | 489 DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_GUI_Chapters ); |
34420 | 490 if ( guiInfo.Chapters && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 491 { |
492 char tmp[32]; int i; | |
33876
4789b8eed97e
Get rid of a bunch of needless or redundant guiInfo members.
ib
parents:
33874
diff
changeset
|
493 for ( i=1;i <= guiInfo.Chapters;i++ ) |
33572 | 494 { |
36694 | 495 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
|
496 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i, |
34333 | 497 ( i << 16 ) + ivSetDVDChapter ); |
33572 | 498 } |
499 } | |
500 else | |
501 { | |
36694 | 502 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,MSGTR_GUI__none_,evNone ); |
33572 | 503 gtk_widget_set_sensitive( MenuItem,FALSE ); |
504 } | |
36694 | 505 DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audio_xpm, DVDSubMenu,MSGTR_GUI_AudioTracks ); |
36700 | 506 if ( guiInfo.AudioStreams && demuxer && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 507 { |
36700 | 508 char tmp[64]; int i; |
33902 | 509 for ( i=0;i < guiInfo.AudioStreams;i++ ) |
33572 | 510 { |
33902 | 511 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.AudioStream[i].language ), |
512 ChannelTypes[ guiInfo.AudioStream[i].type ], | |
513 ChannelNumbers[ guiInfo.AudioStream[i].channels ] ); | |
33572 | 514 AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp, |
36700 | 515 demuxer->audio->id == guiInfo.AudioStream[i].id, |
34333 | 516 ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio ); |
33572 | 517 } |
518 } | |
519 else | |
520 { | |
36694 | 521 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDAudioLanguageMenu,MSGTR_GUI__none_,evNone ); |
33572 | 522 gtk_widget_set_sensitive( MenuItem,FALSE ); |
523 } | |
36694 | 524 DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)subtitle_xpm, DVDSubMenu,MSGTR_GUI_Subtitles ); |
34420 | 525 if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) ) |
33572 | 526 { |
527 char tmp[64]; int i; | |
36694 | 528 AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle ); |
33902 | 529 for ( i=0;i < guiInfo.Subtitles;i++ ) |
33572 | 530 { |
33902 | 531 av_strlcpy( tmp,GetLanguage( guiInfo.Subtitle[i].language ),sizeof(tmp) ); |
33572 | 532 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp, |
33902 | 533 dvdsub_id == guiInfo.Subtitle[i].id, |
34333 | 534 ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle ); |
33572 | 535 } |
536 } | |
537 else | |
538 { | |
36694 | 539 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,evNone ); |
33572 | 540 gtk_widget_set_sensitive( MenuItem,FALSE ); |
541 } | |
542 #endif | |
36694 | 543 AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_GUI_URL"...", evLoadURL ); |
36429 | 544 #ifdef CONFIG_TV |
36694 | 545 AddMenuItem( window1, (const char*)tv_xpm, SubMenu,MSGTR_GUI_TV, evPlayTV ); |
36429 | 546 #endif |
36663 | 547 AddSeparator( SubMenu ); |
36694 | 548 AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_GUI_AudioTrack"...", evLoadAudioFile ); |
549 AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_GUI_Subtitle"... ", evLoadSubtitle ); | |
550 AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_GUI_DropSubtitle,evDropSubtitle ); | |
551 SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_GUI_Playback ); | |
552 AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_GUI_Play" ", evPlay ); | |
553 AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_GUI_Pause, evPause ); | |
554 AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_GUI_Stop, evStop ); | |
555 AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_GUI_Next, evNext ); | |
556 AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_GUI_Previous, evPrev ); | |
34419 | 557 // AddSeparator( SubMenu ); |
558 // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec ); | |
559 // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec ); | |
560 // AddMenuItem( SubMenu,"Back 1 min", evBackward1min ); | |
561 // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min ); | |
562 // SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size ); | |
36694 | 563 // AddMenuItem( SubMenu,MSGTR_GUI_SizeNormal" ", evNormalSize ); |
564 // AddMenuItem( SubMenu,MSGTR_GUI_SizeDouble, evDoubleSize ); | |
565 // AddMenuItem( SubMenu,MSGTR_GUI_SizeFullscreen, evFullScreen + ( True << 16 ) ); | |
33572 | 566 |
36261
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
567 if ( guiInfo.VideoWindow ) |
33572 | 568 { |
36273 | 569 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
|
570 AddSeparator( Menu ); |
36316
139f2b064ef9
Don't subsequently calculate original_aspect from last movie_aspect.
ib
parents:
36297
diff
changeset
|
571 if (movie_aspect == -1.0f) a11 = True; |
36273 | 572 else |
573 { | |
574 a169 = (FFABS(movie_aspect - 16.0f / 9.0f) <= 0.01f); | |
575 a43 = (FFABS(movie_aspect - 4.0f / 3.0f) <= 0.01f); | |
36276 | 576 a235 = (FFABS(movie_aspect - 2.35f) <= 0.01f); |
36273 | 577 } |
578 | |
36694 | 579 AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_GUI_AspectRatio ); |
580 H=AddMenuCheckItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_GUI_Original, a11, evSetAspect + ( 1 << 16 ) ); | |
36273 | 581 N=AddMenuCheckItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9", a169, evSetAspect + ( 2 << 16 ) ); |
582 D=AddMenuCheckItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3", a43, evSetAspect + ( 3 << 16 ) ); | |
36694 | 583 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
|
584 |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
585 if ( !guiInfo.Playing ) |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
586 { |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
587 gtk_widget_set_sensitive( H,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
588 gtk_widget_set_sensitive( N,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
589 gtk_widget_set_sensitive( D,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
590 gtk_widget_set_sensitive( F,FALSE ); |
ca1d4a7bb751
Disable aspect ratio menu in the absence of video playback.
ib
parents:
36029
diff
changeset
|
591 } |
33572 | 592 } |
593 | |
36622
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
594 if ( guiInfo.VideoWindow ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
595 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
596 int b1 = False, b2 = False, b_half = False; |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
597 |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
598 if ( !guiApp.videoWindow.isFullScreen && guiInfo.Playing ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
599 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
600 if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth * 2 )&& |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
601 ( guiApp.videoWindow.Height == guiInfo.VideoHeight * 2 ) ) b2=True; |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
602 else if ( ( guiApp.videoWindow.Width == guiInfo.VideoWidth / 2 ) && |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
603 ( 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
|
604 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
|
605 } else b1=!guiApp.videoWindow.isFullScreen; |
36694 | 606 F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_GUI_SizeFullscreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) ); |
607 D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_GUI_SizeDouble,b2,evDoubleSize ); | |
608 N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_GUI_SizeNormal" ",b1,evNormalSize ); | |
609 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
|
610 if ( !guiInfo.Playing ) |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
611 { |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
612 gtk_widget_set_sensitive( H,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
613 gtk_widget_set_sensitive( N,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
614 gtk_widget_set_sensitive( D,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
615 gtk_widget_set_sensitive( F,FALSE ); |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
616 } |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
617 } |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
618 |
b9dc795036a2
Group video and audio related entries in context menu together.
ib
parents:
36621
diff
changeset
|
619 AddSeparator( Menu ); |
36694 | 620 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
|
621 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
|
622 |
33657 | 623 if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD ) |
33572 | 624 { |
625 int i,c = 0; | |
626 | |
627 for ( i=0;i < MAX_A_STREAMS;i++ ) | |
33657 | 628 if ( demuxer->a_streams[i] ) c++; |
33572 | 629 |
630 if ( c > 1 ) | |
631 { | |
36694 | 632 SubMenu=AddSubMenu( window1, (const char*)audio_xpm, Menu,MSGTR_GUI_AudioTracks ); |
33572 | 633 for ( i=0;i < MAX_A_STREAMS;i++ ) |
33657 | 634 if ( demuxer->a_streams[i] ) |
33572 | 635 { |
33657 | 636 int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid; |
36699 | 637 int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(demuxer))); |
33572 | 638 char tmp[32]; |
36694 | 639 snprintf( tmp,32,MSGTR_GUI_TrackN,aid ); |
34555
da67e2df97be
Emphasize the default audio track in the selection list.
ib
parents:
34479
diff
changeset
|
640 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( aid << 16 ) + ivSetAudio ); |
33572 | 641 } |
642 } | |
643 | |
644 for ( c=0,i=0;i < MAX_V_STREAMS;i++ ) | |
33657 | 645 if ( demuxer->v_streams[i] ) c++; |
33572 | 646 |
647 if ( c > 1 ) | |
648 { | |
36694 | 649 SubMenu=AddSubMenu( window1, (const char*)video_xpm, Menu,MSGTR_GUI_VideoTracks ); |
33572 | 650 for ( i=0;i < MAX_V_STREAMS;i++ ) |
33657 | 651 if ( demuxer->v_streams[i] ) |
33572 | 652 { |
33657 | 653 int vid = ((sh_video_t *)demuxer->v_streams[i])->vid; |
33572 | 654 char tmp[32]; |
36699 | 655 int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(demuxer))); |
36694 | 656 snprintf( tmp,32,MSGTR_GUI_TrackN,vid ); |
36683 | 657 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( vid << 16 ) + ivSetVideo ); |
33572 | 658 } |
659 } | |
660 } | |
661 | |
662 /* cheap subtitle switching for non-DVD streams */ | |
663 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD ) | |
664 { | |
36458 | 665 int pos, i; |
666 pos = mpctx_get_global_sub_pos(guiInfo.mpcontext); | |
36694 | 667 SubMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu, MSGTR_GUI_Subtitles ); |
668 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu, MSGTR_GUI__none_, pos == -1, (-1 << 16) + ivSetSubtitle ); | |
33572 | 669 for ( i=0;i < global_sub_size;i++ ) |
670 { | |
671 char tmp[32]; | |
36694 | 672 snprintf( tmp, 32, MSGTR_GUI_TrackN, i ); |
36458 | 673 AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,pos == i,( i << 16 ) + ivSetSubtitle ); |
33572 | 674 } |
675 } | |
676 | |
677 AddSeparator( Menu ); | |
36694 | 678 AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_GUI_Equalizer, evEqualizer ); |
679 AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_GUI_Playlist, evPlaylist ); | |
680 AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_GUI_SkinBrowser, evSkinBrowser ); | |
681 AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_GUI_Preferences, evPreferences ); | |
36620 | 682 |
683 AddSeparator( Menu ); | |
36694 | 684 AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_GUI_Quit, evExit ); |
33572 | 685 |
686 return Menu; | |
687 } |