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
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1 /*
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
2 * This file is part of MPlayer.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
3 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
7 * (at your option) any later version.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
8 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
12 * GNU General Public License for more details.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
13 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License along
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
17 */
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
18
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
19 #include <stdio.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
20 #include <stdlib.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
21 #include <string.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
22
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
23 #include "config.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
24 #include "help_mp.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
25 #include "access_mpcontext.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
26 #include "mixer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
27 #include "mpcommon.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
28
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
29 #include "menu.h"
35529
8ad4d2fb46e8 Rebuild GUI directory structure.
ib
parents: 35528
diff changeset
30 #include "dialog.h"
35772
3fec1d4b2736 Relocate uiMainEvent() prototype.
ib
parents: 35768
diff changeset
31 #include "gui/ui/actions.h"
35525
e27855a45128 Rebuild GUI directory structure.
ib
parents: 35493
diff changeset
32 #include "gui/app/app.h"
e27855a45128 Rebuild GUI directory structure.
ib
parents: 35493
diff changeset
33 #include "gui/app/gui.h"
33738
998f94e62a61 Remove unnecessary #include "gui/interface.h".
ib
parents: 33657
diff changeset
34 #include "gui/interface.h"
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
35
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
36 #include "stream/stream.h"
36273
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
37 #include "libavutil/common.h"
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
38 #include "libmpcodecs/vd.h"
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
39 #include "libmpdemux/demuxer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
40 #include "libmpdemux/stheader.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
41 #include "libavutil/avstring.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
42
35526
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
43 #include "pixmaps/about.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
44 #include "pixmaps/half.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
45 #include "pixmaps/normal.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
46 #include "pixmaps/double.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
47 #include "pixmaps/full.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
48 #include "pixmaps/exit.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
49 #include "pixmaps/prefs.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
50 #include "pixmaps/equalizer.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
51 #include "pixmaps/playlist.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
52 #include "pixmaps/skin.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
53 #include "pixmaps/sound.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
54 #include "pixmaps/open.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
55 #include "pixmaps/play.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
56 #include "pixmaps/stop.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
57 #include "pixmaps/pause.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
58 #include "pixmaps/prev.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
59 #include "pixmaps/next.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
60 #include "pixmaps/aspect.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
61 #include "pixmaps/aspect11.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
62 #include "pixmaps/aspect169.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
63 #include "pixmaps/aspect235.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
64 #include "pixmaps/aspect43.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
65 #include "pixmaps/file2.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
66 #include "pixmaps/url.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
67 #include "pixmaps/sub.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
68 #include "pixmaps/nosub.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
69 #include "pixmaps/empty.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
70 #include "pixmaps/loadeaf.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
71 #include "pixmaps/title.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
72 #include "pixmaps/subtitle.xpm"
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
73 #ifdef CONFIG_CDDA
35526
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
74 #include "pixmaps/cd.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
75 #include "pixmaps/playcd.xpm"
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
76 #endif
34077
deff81b57903 Cosmetic: Order STREAMTYPE related code.
ib
parents: 33951
diff changeset
77 #ifdef CONFIG_VCD
35526
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
78 #include "pixmaps/vcd.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
79 #include "pixmaps/playvcd.xpm"
34077
deff81b57903 Cosmetic: Order STREAMTYPE related code.
ib
parents: 33951
diff changeset
80 #endif
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
81 #ifdef CONFIG_DVDREAD
35526
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
82 #include "pixmaps/dvd.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
83 #include "pixmaps/playdvd.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
84 #include "pixmaps/chapter.xpm"
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
85 #include "pixmaps/dolby.xpm"
36665
045bb0dcea27 Add new audio pixmap.
ib
parents: 36664
diff changeset
86 #include "pixmaps/audio.xpm"
36666
1862771a5ba9 Add new video pixmap.
ib
parents: 36665
diff changeset
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
28ea255e40ce Add support for TV/DVB to the GUI.
ib
parents: 36316
diff changeset
89 #ifdef CONFIG_TV
28ea255e40ce Add support for TV/DVB to the GUI.
ib
parents: 36316
diff changeset
90 #include "pixmaps/tv.xpm"
28ea255e40ce Add support for TV/DVB to the GUI.
ib
parents: 36316
diff changeset
91 #endif
35526
3c901704a27c Rebuild GUI directory structure.
ib
parents: 35525
diff changeset
92 #include "pixmaps/empty1px.xpm"
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
97 static void ActivateMenuItem( int Item )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
98 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
99 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
100 gtkPopupMenu=Item & 0x0000ffff;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
101 gtkPopupMenuParam=Item >> 16;
35773
c688b0dcbe66 Cosmetic: Rename uiMainEvent() uiEvent().
ib
parents: 35772
diff changeset
102 uiEvent( Item & 0x0000ffff,Item >> 16 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
103 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
104
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
105 static GtkWidget * AddMenuCheckItem(GtkWidget *window1, const char * immagine_xpm, GtkWidget* Menu,const char* label, gboolean state, int Number)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
106 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
107 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
108 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
109 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
110 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
111
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
112 GdkPixmap *PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
113 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
114 GdkBitmap *MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
115
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
116 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
117 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
118 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
119
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
120 Item=gtk_check_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
121 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
122
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
123 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
124 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
125 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
126 gtk_container_add (GTK_CONTAINER (Item), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
127
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
128 gtk_menu_append( GTK_MENU( Menu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
129
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
130 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
131 gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
132 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
133 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
134 gtk_widget_show_all(Item);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
135
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
136 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
137 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
138 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
139 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
140 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
141 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
142 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
143 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
144 GdkPixmap * PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
145 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
146 GdkBitmap * MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
147
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
148 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
149 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
150 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
151
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
152 Item=gtk_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
153 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
154
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
155 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
156 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
157 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
158 gtk_container_add (GTK_CONTAINER (Item), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
159
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
160
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
161 gtk_menu_append( GTK_MENU( SubMenu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
162 gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
163 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
164
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
165 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
166 gtk_widget_show_all(Item);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
167 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
168 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
169
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
170
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
171 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
172 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
173 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
174 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
175 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
176 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
177 GtkWidget * SubItem = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
178 GdkPixmap * PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
179 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
180 GdkBitmap * MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
181
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
182 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
183 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
184 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
185
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
186 SubItem=gtk_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
187 Item=gtk_menu_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
188 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
189
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
190 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
191 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
192 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
193 gtk_container_add (GTK_CONTAINER (SubItem), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
194
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
195 gtk_menu_append( GTK_MENU( Menu ),SubItem );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
196 gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
197
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
198 gtk_widget_show_all( SubItem );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
199 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
200 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
201
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
202 GtkWidget * AddSeparator( GtkWidget * Menu )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
203 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
204 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
205
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
206 Item=gtk_menu_item_new ();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
207 gtk_widget_show( Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
208 gtk_container_add( GTK_CONTAINER( Menu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
209 gtk_widget_set_sensitive( Item,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
210
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
211 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
212 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
213
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
214 typedef struct
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
215 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
216 int id;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
217 const char * name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
218 } Languages_t;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
219
34454
5a45efc630b8 Remove all unnecessary #ifdefs from GUI code.
ib
parents: 34423
diff changeset
220 #ifdef CONFIG_DVDREAD
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
221 #define lng( a,b ) ( (int)(a) * 256 + b )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
222 static Languages_t Languages[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
373 };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
374 #undef lng
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
375
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
376 static char * ChannelTypes[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
377 { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
378 static char * ChannelNumbers[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
379 { "","Stereo","","","","5.1" };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
380
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
381 static const char * GetLanguage( int language )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
382 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
383 unsigned int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
384 for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
385 if ( Languages[i].id == language ) return Languages[i].name;
36701
eb1a6a0b268f Make unknown audio language translatable.
ib
parents: 36700
diff changeset
386 return MSGTR_GUI_Unknown;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
387 }
34454
5a45efc630b8 Remove all unnecessary #ifdefs from GUI code.
ib
parents: 34423
diff changeset
388 #endif
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
389
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
390
36028
8c62c9931075 Make variable DVDSubMenu static.
ib
parents: 35996
diff changeset
391 static GtkWidget * DVDSubMenu;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
392 GtkWidget * DVDTitleMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
393 GtkWidget * DVDChapterMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
394 GtkWidget * DVDAudioLanguageMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
395 GtkWidget * DVDSubtitleLanguageMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
396 GtkWidget * AspectMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
397 GtkWidget * VCDSubMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
398 GtkWidget * VCDTitleMenu;
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
399 GtkWidget * CDSubMenu;
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
400 GtkWidget * CDTitleMenu;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
401
35996
6c891a0e3fea Cosmetic: Rename the functions creating the dialogs.
ib
parents: 35773
diff changeset
402 GtkWidget * CreatePopUpMenu( void )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
403 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
404 GtkWidget * window1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
405 GtkWidget * Menu = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
406 GtkWidget * SubMenu = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
407 GtkWidget * MenuItem = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
408 GtkWidget * H, * N, * D, * F;
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
409 demuxer_t *demuxer = mpctx_get_demuxer(guiInfo.mpcontext);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
410 mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
411 int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
412
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
413 Menu=gtk_menu_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
414 gtk_widget_realize (Menu);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
415 window1 = gtk_widget_get_toplevel(Menu);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
416
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
417
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
418 AddMenuItem( window1, (const char*)about_xpm, Menu,MSGTR_GUI_AboutMPlayer" ", evAbout );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
419 AddSeparator( Menu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
420 SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_GUI_Open );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
421 AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_GUI_File"... ", evLoadPlay );
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
422 #ifdef CONFIG_CDDA
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
423 AddMenuItem( window1, (const char*)playcd_xpm, SubMenu,MSGTR_GUI_CD, evPlayCD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
424 CDSubMenu=AddSubMenu( window1, (const char*)cd_xpm, Menu,MSGTR_GUI_CD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
425 AddMenuItem( window1, (const char*)playcd_xpm, CDSubMenu,MSGTR_GUI_Play,evPlayCD );
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
426 AddSeparator( CDSubMenu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
427 CDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, CDSubMenu,MSGTR_GUI_Titles );
34420
0b31cf6cec25 Fix bug in CD / VCD / DVD related menus.
ib
parents: 34419
diff changeset
428 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_CDDA ) )
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
429 {
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
430 char tmp[32]; int i;
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
431 for ( i=1;i <= guiInfo.Tracks;i++ )
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
432 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
433 snprintf( tmp,32,MSGTR_GUI_TitleNN,i );
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
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
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
436 }
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
437 }
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
438 else
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
439 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
440 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, CDTitleMenu,MSGTR_GUI__none_,evNone );
34387
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
441 gtk_widget_set_sensitive( MenuItem,FALSE );
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
442 }
0ba85cad4c7e Add audio CD playback support to the X11/GTK GUI.
ib
parents: 34333
diff changeset
443 #endif
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
444 #ifdef CONFIG_VCD
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
445 AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_GUI_VCD, evPlayVCD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
446 VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_GUI_VCD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
447 AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_GUI_Play,evPlayVCD );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
448 AddSeparator( VCDSubMenu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
449 VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_GUI_Titles );
34420
0b31cf6cec25 Fix bug in CD / VCD / DVD related menus.
ib
parents: 34419
diff changeset
450 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_VCD ) )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
451 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
454 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
455 snprintf( tmp,32,MSGTR_GUI_TitleNN,i );
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34324
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
458 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
459 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
460 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
461 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
462 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, VCDTitleMenu,MSGTR_GUI__none_,evNone );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
463 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
464 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
465 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
466 #ifdef CONFIG_DVDREAD
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
467 AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_GUI_DVD, evPlayDVD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
468 DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_GUI_DVD );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
469 AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_GUI_Play" ", evPlayDVD );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
470 // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
471 AddSeparator( DVDSubMenu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
472 DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_GUI_Titles );
34420
0b31cf6cec25 Fix bug in CD / VCD / DVD related menus.
ib
parents: 34419
diff changeset
473 if ( guiInfo.Tracks && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
474 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
477 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
478 snprintf( tmp,32,MSGTR_GUI_TitleNN,i);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34324
diff changeset
481 (i << 16) + ivSetDVDTitle );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
482 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
483 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
484 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
485 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
486 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDTitleMenu,MSGTR_GUI__none_,evNone );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
487 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
488 }
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
489 DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_GUI_Chapters );
34420
0b31cf6cec25 Fix bug in CD / VCD / DVD related menus.
ib
parents: 34419
diff changeset
490 if ( guiInfo.Chapters && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
491 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
494 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
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
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34324
diff changeset
497 ( i << 16 ) + ivSetDVDChapter );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
498 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
499 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
500 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
501 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
502 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,MSGTR_GUI__none_,evNone );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
503 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
504 }
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
505 DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audio_xpm, DVDSubMenu,MSGTR_GUI_AudioTracks );
36700
9f19f1bd34eb Simplify code.
ib
parents: 36699
diff changeset
506 if ( guiInfo.AudioStreams && demuxer && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
507 {
36700
9f19f1bd34eb Simplify code.
ib
parents: 36699
diff changeset
508 char tmp[64]; int i;
33902
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
509 for ( i=0;i < guiInfo.AudioStreams;i++ )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
510 {
33902
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
511 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.AudioStream[i].language ),
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
512 ChannelTypes[ guiInfo.AudioStream[i].type ],
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
513 ChannelNumbers[ guiInfo.AudioStream[i].channels ] );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
514 AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp,
36700
9f19f1bd34eb Simplify code.
ib
parents: 36699
diff changeset
515 demuxer->audio->id == guiInfo.AudioStream[i].id,
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34324
diff changeset
516 ( guiInfo.AudioStream[i].id << 16 ) + ivSetDVDAudio );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
517 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
518 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
519 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
520 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
521 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDAudioLanguageMenu,MSGTR_GUI__none_,evNone );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
522 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
523 }
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
524 DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)subtitle_xpm, DVDSubMenu,MSGTR_GUI_Subtitles );
34420
0b31cf6cec25 Fix bug in CD / VCD / DVD related menus.
ib
parents: 34419
diff changeset
525 if ( guiInfo.Subtitles && ( guiInfo.StreamType == STREAMTYPE_DVD ) )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
526 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
527 char tmp[64]; int i;
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
528 AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,( (unsigned short)-1 << 16 ) + ivSetDVDSubtitle );
33902
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
529 for ( i=0;i < guiInfo.Subtitles;i++ )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
530 {
33902
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
531 av_strlcpy( tmp,GetLanguage( guiInfo.Subtitle[i].language ),sizeof(tmp) );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
532 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
33902
dd0e5dc6ebbf Add guiDVDStruct members to guiInfo.
ib
parents: 33901
diff changeset
533 dvdsub_id == guiInfo.Subtitle[i].id,
34333
e8e4e6f9b7ac Change prefix for internal events from ev to iv.
ib
parents: 34324
diff changeset
534 ( guiInfo.Subtitle[i].id << 16 ) + ivSetDVDSubtitle );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
535 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
536 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
537 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
538 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
539 MenuItem=AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_GUI__none_,evNone );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
540 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
541 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
542 #endif
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
543 AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_GUI_URL"...", evLoadURL );
36429
28ea255e40ce Add support for TV/DVB to the GUI.
ib
parents: 36316
diff changeset
544 #ifdef CONFIG_TV
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
545 AddMenuItem( window1, (const char*)tv_xpm, SubMenu,MSGTR_GUI_TV, evPlayTV );
36429
28ea255e40ce Add support for TV/DVB to the GUI.
ib
parents: 36316
diff changeset
546 #endif
36663
ece867ba2a75 Move up entry "external audio" in the context menu.
ib
parents: 36623
diff changeset
547 AddSeparator( SubMenu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
548 AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_GUI_AudioTrack"...", evLoadAudioFile );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
549 AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_GUI_Subtitle"... ", evLoadSubtitle );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
550 AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_GUI_DropSubtitle,evDropSubtitle );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
551 SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_GUI_Playback );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
552 AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_GUI_Play" ", evPlay );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
553 AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_GUI_Pause, evPause );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
554 AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_GUI_Stop, evStop );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
555 AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_GUI_Next, evNext );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
556 AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_GUI_Previous, evPrev );
34419
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
557 // AddSeparator( SubMenu );
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
558 // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec );
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
559 // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec );
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
560 // AddMenuItem( SubMenu,"Back 1 min", evBackward1min );
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
561 // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min );
a56707da37cd Move CD / VCD / DVD related menu code.
ib
parents: 34387
diff changeset
562 // SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
563 // AddMenuItem( SubMenu,MSGTR_GUI_SizeNormal" ", evNormalSize );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
564 // AddMenuItem( SubMenu,MSGTR_GUI_SizeDouble, evDoubleSize );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
565 // AddMenuItem( SubMenu,MSGTR_GUI_SizeFullscreen, evFullScreen + ( True << 16 ) );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
566
36261
ca1d4a7bb751 Disable aspect ratio menu in the absence of video playback.
ib
parents: 36029
diff changeset
567 if ( guiInfo.VideoWindow )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
568 {
36273
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
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
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
572 else
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
573 {
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
574 a169 = (FFABS(movie_aspect - 16.0f / 9.0f) <= 0.01f);
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
575 a43 = (FFABS(movie_aspect - 4.0f / 3.0f) <= 0.01f);
36276
f7ef757c95c0 Be more pedantic about type of the constant.
ib
parents: 36273
diff changeset
576 a235 = (FFABS(movie_aspect - 2.35f) <= 0.01f);
36273
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
577 }
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
578
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
579 AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_GUI_AspectRatio );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
580 H=AddMenuCheckItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_GUI_Original, a11, evSetAspect + ( 1 << 16 ) );
36273
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
581 N=AddMenuCheckItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9", a169, evSetAspect + ( 2 << 16 ) );
55cac32d68c2 Add check marks to the video aspect ratio menu items.
ib
parents: 36261
diff changeset
582 D=AddMenuCheckItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3", a43, evSetAspect + ( 3 << 16 ) );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
592 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
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
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
606 F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_GUI_SizeFullscreen,guiApp.videoWindow.isFullScreen,evFullScreen + ( True << 16 ) );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
607 D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_GUI_SizeDouble,b2,evDoubleSize );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
608 N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_GUI_SizeNormal" ",b1,evNormalSize );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
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
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
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
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
623 if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
624 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
625 int i,c = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
626
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
627 for ( i=0;i < MAX_A_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
628 if ( demuxer->a_streams[i] ) c++;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
629
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
630 if ( c > 1 )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
631 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
632 SubMenu=AddSubMenu( window1, (const char*)audio_xpm, Menu,MSGTR_GUI_AudioTracks );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
633 for ( i=0;i < MAX_A_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
634 if ( demuxer->a_streams[i] )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
635 {
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
636 int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
36699
51fccd9e0dc7 Simplify code.
ib
parents: 36694
diff changeset
637 int selected_id = (audio_id == aid || (audio_id == -1 && aid == demuxer_default_audio_track(demuxer)));
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
638 char tmp[32];
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
641 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
642 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
643
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
644 for ( c=0,i=0;i < MAX_V_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
645 if ( demuxer->v_streams[i] ) c++;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
646
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
647 if ( c > 1 )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
648 {
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
649 SubMenu=AddSubMenu( window1, (const char*)video_xpm, Menu,MSGTR_GUI_VideoTracks );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
650 for ( i=0;i < MAX_V_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
651 if ( demuxer->v_streams[i] )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
652 {
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
653 int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
654 char tmp[32];
36699
51fccd9e0dc7 Simplify code.
ib
parents: 36694
diff changeset
655 int selected_id = (video_id == vid || (video_id == -1 && vid == demuxer_default_video_track(demuxer)));
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
656 snprintf( tmp,32,MSGTR_GUI_TrackN,vid );
36683
acb4a92aba16 Improve emphasizing of the current video track.
ib
parents: 36672
diff changeset
657 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu,tmp,selected_id,( vid << 16 ) + ivSetVideo );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
658 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
659 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
660 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
661
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
662 /* cheap subtitle switching for non-DVD streams */
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
663 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
664 {
36458
4634a3085efc Add mpctx_get_global_sub_pos().
ib
parents: 36429
diff changeset
665 int pos, i;
4634a3085efc Add mpctx_get_global_sub_pos().
ib
parents: 36429
diff changeset
666 pos = mpctx_get_global_sub_pos(guiInfo.mpcontext);
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
667 SubMenu=AddSubMenu( window1, (const char*)subtitle_xpm, Menu, MSGTR_GUI_Subtitles );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
668 AddMenuCheckItem( window1, (const char*)empty1px_xpm, SubMenu, MSGTR_GUI__none_, pos == -1, (-1 << 16) + ivSetSubtitle );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
669 for ( i=0;i < global_sub_size;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
670 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
671 char tmp[32];
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
672 snprintf( tmp, 32, MSGTR_GUI_TrackN, i );
36458
4634a3085efc Add mpctx_get_global_sub_pos().
ib
parents: 36429
diff changeset
673 AddMenuCheckItem( window1,(const char*)empty1px_xpm,SubMenu,tmp,pos == i,( i << 16 ) + ivSetSubtitle );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
674 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
675 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
676
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
677 AddSeparator( Menu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
678 AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_GUI_Equalizer, evEqualizer );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
679 AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_GUI_Playlist, evPlaylist );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
680 AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_GUI_SkinBrowser, evSkinBrowser );
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
681 AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_GUI_Preferences, evPreferences );
36620
e79d56d7d9d3 Relocate the video size entries in the context menu.
ib
parents: 36619
diff changeset
682
e79d56d7d9d3 Relocate the video size entries in the context menu.
ib
parents: 36619
diff changeset
683 AddSeparator( Menu );
36694
eed2fb870f43 Rename symbolic constants of GUI help message texts.
ib
parents: 36683
diff changeset
684 AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_GUI_Quit, evExit );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
685
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
686 return Menu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
687 }