annotate gui/dialog/menu.c @ 36738:e3d879a5f1cf

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