annotate gui/ui/gtk/menu.c @ 33876:4789b8eed97e

Get rid of a bunch of needless or redundant guiInfo members. Remove Title, use existing Track. Remove DVD.titles, use existing Tracks (see below). Remove DVD.current_title, use existing Track. Remove DVD.current_chapter, use existing Chapter. Remove DVD.current_angle, use existing Angle. Additionally rename member VCDTracks Tracks, move guiDVDStruct member chapters and angles to guiInterface_t struct and rename chapters Chapters and angles Angles for consistency.
author ib
date Thu, 11 Aug 2011 13:54:24 +0000
parents e1bec41397bb
children d4f80f889106
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1 /*
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
2 * This file is part of MPlayer.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
3 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
4 * MPlayer is free software; you can redistribute it and/or modify
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
5 * it under the terms of the GNU General Public License as published by
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
6 * the Free Software Foundation; either version 2 of the License, or
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
7 * (at your option) any later version.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
8 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
9 * MPlayer is distributed in the hope that it will be useful,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
12 * GNU General Public License for more details.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
13 *
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
14 * You should have received a copy of the GNU General Public License along
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
15 * with MPlayer; if not, write to the Free Software Foundation, Inc.,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
16 * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
17 */
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
18
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
19 #include <stdio.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
20 #include <stdlib.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
21 #include <string.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
22
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
23 #include "config.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
24 #include "help_mp.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
25 #include "access_mpcontext.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
26 #include "mixer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
27 #include "mpcommon.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
28
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
29 #include "menu.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
30 #include "gui/ui/widgets.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
31 #include "gui/ui/gmplayer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
32 #include "gui/app.h"
33738
998f94e62a61 Remove unnecessary #include "gui/interface.h".
ib
parents: 33657
diff changeset
33 #include "gui/interface.h"
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
34
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
35 #include "stream/stream.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
36 #include "libmpdemux/demuxer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
37 #include "libmpdemux/stheader.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
38 #include "libavutil/avstring.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
39
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
40 #include "gui/ui/pixmaps/about.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
41 #include "gui/ui/pixmaps/half.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
42 #include "gui/ui/pixmaps/normal.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
43 #include "gui/ui/pixmaps/double.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
44 #include "gui/ui/pixmaps/full.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
45 #include "gui/ui/pixmaps/exit.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
46 #include "gui/ui/pixmaps/prefs.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
47 #include "gui/ui/pixmaps/equalizer.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
48 #include "gui/ui/pixmaps/playlist.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
49 #include "gui/ui/pixmaps/skin.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
50 #include "gui/ui/pixmaps/sound.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
51 #include "gui/ui/pixmaps/open.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
52 #include "gui/ui/pixmaps/play.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
53 #include "gui/ui/pixmaps/stop.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
54 #include "gui/ui/pixmaps/pause.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
55 #include "gui/ui/pixmaps/prev.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
56 #include "gui/ui/pixmaps/next.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
57 #include "gui/ui/pixmaps/aspect.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
58 #include "gui/ui/pixmaps/aspect11.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
59 #include "gui/ui/pixmaps/aspect169.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
60 #include "gui/ui/pixmaps/aspect235.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
61 #include "gui/ui/pixmaps/aspect43.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
62 #include "gui/ui/pixmaps/file2.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
63 #include "gui/ui/pixmaps/url.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
64 #include "gui/ui/pixmaps/sub.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
65 #include "gui/ui/pixmaps/nosub.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
66 #include "gui/ui/pixmaps/empty.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
67 #include "gui/ui/pixmaps/loadeaf.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
68 #include "gui/ui/pixmaps/title.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
69 #ifdef CONFIG_DVDREAD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
70 #include "gui/ui/pixmaps/dvd.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
71 #include "gui/ui/pixmaps/playdvd.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
72 #include "gui/ui/pixmaps/chapter.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
73 #include "gui/ui/pixmaps/dolby.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
74 #include "gui/ui/pixmaps/audiolang.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
75 #include "gui/ui/pixmaps/sublang.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
76 #include "gui/ui/pixmaps/empty1px.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
77 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
78 #ifdef CONFIG_VCD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
79 #include "gui/ui/pixmaps/vcd.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
80 #include "gui/ui/pixmaps/playvcd.xpm"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
81 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
82
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
83 static void ActivateMenuItem( int Item )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
84 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
85 // fprintf( stderr,"[menu] item: %d.%d\n",Item&0xffff,Item>>16 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
86 gtkPopupMenu=Item & 0x0000ffff;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
87 gtkPopupMenuParam=Item >> 16;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
88 uiEventHandling( Item & 0x0000ffff,Item >> 16 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
89 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
90
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
91 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
92 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
93 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
94 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
95 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
96 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
97
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
98 GdkPixmap *PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
99 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
100 GdkBitmap *MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
101
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
102 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
103 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
104 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
105
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
106 Item=gtk_check_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
107 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
108
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
109 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
110 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
111 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
112 gtk_container_add (GTK_CONTAINER (Item), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
113
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
114 gtk_menu_append( GTK_MENU( Menu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
115
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
116 gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(Item),state);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
117 gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
118 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
119 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
120 gtk_widget_show_all(Item);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
121
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
122 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
123 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
124 GtkWidget * AddMenuItem( GtkWidget *window1, const char * immagine_xpm, GtkWidget * SubMenu,const char * label,int Number )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
125 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
126 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
127 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
128 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
129 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
130 GdkPixmap * PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
131 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
132 GdkBitmap * MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
133
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
134 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
135 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
136 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
137
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
138 Item=gtk_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
139 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
140
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
141 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
142 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
143 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
144 gtk_container_add (GTK_CONTAINER (Item), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
145
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
146
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
147 gtk_menu_append( GTK_MENU( SubMenu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
148 gtk_signal_connect_object( GTK_OBJECT(Item),"activate",
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
149 GTK_SIGNAL_FUNC(ActivateMenuItem),(gpointer)Number );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
150
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
151 gtk_menu_item_right_justify (GTK_MENU_ITEM (Item));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
152 gtk_widget_show_all(Item);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
153 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
154 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
155
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
156
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
157 GtkWidget * AddSubMenu( GtkWidget *window1, const char * immagine_xpm, GtkWidget * Menu,const char * label )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
158 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
159 GtkWidget * Label = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
160 GtkWidget * Pixmap = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
161 GtkWidget * hbox = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
162 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
163 GtkWidget * SubItem = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
164 GdkPixmap * PixmapIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
165 GdkColor transparent;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
166 GdkBitmap * MaskIcon = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
167
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
168 PixmapIcon = gdk_pixmap_create_from_xpm_d (window1->window, &MaskIcon, &transparent,(gchar **)immagine_xpm);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
169 Pixmap = gtk_pixmap_new (PixmapIcon, MaskIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
170 gdk_pixmap_unref (PixmapIcon);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
171
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
172 SubItem=gtk_menu_item_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
173 Item=gtk_menu_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
174 Label = gtk_label_new (label);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
175
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
176 hbox = gtk_hbox_new (FALSE, 8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
177 gtk_box_pack_start (GTK_BOX (hbox), Pixmap, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
178 gtk_box_pack_start (GTK_BOX (hbox), Label, FALSE, FALSE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
179 gtk_container_add (GTK_CONTAINER (SubItem), hbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
180
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
181 gtk_menu_append( GTK_MENU( Menu ),SubItem );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
182 gtk_menu_item_set_submenu( GTK_MENU_ITEM( SubItem ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
183
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
184 gtk_widget_show_all( SubItem );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
185 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
186 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
187
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
188 GtkWidget * AddSeparator( GtkWidget * Menu )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
189 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
190 GtkWidget * Item = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
191
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
192 Item=gtk_menu_item_new ();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
193 gtk_widget_show( Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
194 gtk_container_add( GTK_CONTAINER( Menu ),Item );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
195 gtk_widget_set_sensitive( Item,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
196
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
197 return Item;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
198 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
199
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
200 typedef struct
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
201 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
202 int id;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
203 const char * name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
204 } Languages_t;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
205
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
206 #define lng( a,b ) ( (int)(a) * 256 + b )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
207 static Languages_t Languages[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
208 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
209 { lng( 'a','b' ), "Abkhazian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
210 { lng( 'a','a' ), "Afar" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
211 { lng( 'a','f' ), "Afrikaans" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
212 { lng( 's','q' ), "Albanian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
213 { lng( 'a','m' ), "Amharic" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
214 { lng( 'a','r' ), "Arabic" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
215 { lng( 'h','y' ), "Armenian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
216 { lng( 'a','s' ), "Assamese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
217 { lng( 'a','e' ), "Avestan" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
218 { lng( 'a','y' ), "Aymara" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
219 { lng( 'a','z' ), "Azerbaijani" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
220 { lng( 'b','a' ), "Bashkir" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
221 { lng( 'e','u' ), "Basque" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
222 { lng( 'b','e' ), "Belarusian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
223 { lng( 'b','n' ), "Bengali" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
224 { lng( 'b','h' ), "Bihari" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
225 { lng( 'b','i' ), "Bislama" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
226 { lng( 'b','s' ), "Bosnian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
227 { lng( 'b','r' ), "Breton" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
228 { lng( 'b','g' ), "Bulgarian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
229 { lng( 'm','y' ), "Burmese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
230 { lng( 'c','a' ), "Catalan" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
231 { lng( 'c','h' ), "Chamorro" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
232 { lng( 'c','e' ), "Chechen" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
233 { lng( 'n','y' ), "Chichewa;Nyanja" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
234 { lng( 'z','h' ), "Chinese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
235 { lng( 'c','u' ), "ChurchSlavic" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
236 { lng( 'c','v' ), "Chuvash" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
237 { lng( 'k','w' ), "Cornish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
238 { lng( 'c','o' ), "Corsican" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
239 { lng( 'h','r' ), "Croatian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
240 { lng( 'c','s' ), "Czech" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
241 { lng( 'd','a' ), "Danish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
242 { lng( 'n','l' ), "Dutch" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
243 { lng( 'd','z' ), "Dzongkha" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
244 { lng( 'e','n' ), "English" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
245 { lng( 'e','o' ), "Esperanto" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
246 { lng( 'e','t' ), "Estonian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
247 { lng( 'f','o' ), "Faroese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
248 { lng( 'f','j' ), "Fijian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
249 { lng( 'f','i' ), "Finnish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
250 { lng( 'f','r' ), "French" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
251 { lng( 'f','y' ), "Frisian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
252 { lng( 'g','d' ), "Gaelic(Scots" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
253 { lng( 'g','l' ), "Gallegan" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
254 { lng( 'k','a' ), "Georgian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
255 { lng( 'd','e' ), "German" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
256 { lng( 'e','l' ), "Greek" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
257 { lng( 'g','n' ), "Guarani" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
258 { lng( 'g','u' ), "Gujarati" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
259 { lng( 'h','a' ), "Hausa" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
260 { lng( 'h','e' ), "Hebrew" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
261 { lng( 'i','w' ), "Hebrew" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
262 { lng( 'h','z' ), "Herero" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
263 { lng( 'h','i' ), "Hindi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
264 { lng( 'h','o' ), "HiriMotu" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
265 { lng( 'h','u' ), "Hungarian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
266 { lng( 'i','s' ), "Icelandic" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
267 { lng( 'i','d' ), "Indonesian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
268 { lng( 'i','n' ), "Indonesian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
269 { lng( 'i','a' ), "Interlingua" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
270 { lng( 'i','e' ), "Interlingue" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
271 { lng( 'i','u' ), "Inuktitut" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
272 { lng( 'i','k' ), "Inupiaq" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
273 { lng( 'g','a' ), "Irish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
274 { lng( 'i','t' ), "Italian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
275 { lng( 'j','a' ), "Japanese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
276 { lng( 'j','v' ), "Javanese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
277 { lng( 'j','w' ), "Javanese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
278 { lng( 'k','l' ), "Kalaallisut" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
279 { lng( 'k','n' ), "Kannada" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
280 { lng( 'k','s' ), "Kashmiri" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
281 { lng( 'k','k' ), "Kazakh" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
282 { lng( 'k','m' ), "Khmer" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
283 { lng( 'k','i' ), "Kikuyu" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
284 { lng( 'r','w' ), "Kinyarwanda" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
285 { lng( 'k','y' ), "Kirghiz" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
286 { lng( 'k','v' ), "Komi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
287 { lng( 'k','o' ), "Korean" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
288 { lng( 'k','j' ), "Kuanyama" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
289 { lng( 'k','u' ), "Kurdish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
290 { lng( 'l','o' ), "Lao" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
291 { lng( 'l','a' ), "Latin" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
292 { lng( 'l','v' ), "Latvian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
293 { lng( 'l','b' ), "Letzeburgesch" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
294 { lng( 'l','n' ), "Lingala" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
295 { lng( 'l','t' ), "Lithuanian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
296 { lng( 'm','k' ), "Macedonian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
297 { lng( 'm','g' ), "Malagasy" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
298 { lng( 'm','s' ), "Malay" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
299 { lng( 'm','l' ), "Malayalam" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
300 { lng( 'm','t' ), "Maltese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
301 { lng( 'g','v' ), "Manx" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
302 { lng( 'm','i' ), "Maori" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
303 { lng( 'm','r' ), "Marathi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
304 { lng( 'm','h' ), "Marshall" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
305 { lng( 'm','o' ), "Moldavian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
306 { lng( 'm','n' ), "Mongolian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
307 { lng( 'n','a' ), "Nauru" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
308 { lng( 'n','v' ), "Navajo" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
309 { lng( 'n','d' ), "North Ndebele" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
310 { lng( 'n','r' ), "South Ndebele" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
311 { lng( 'n','g' ), "Ndonga" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
312 { lng( 'n','e' ), "Nepali" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
313 { lng( 's','e' ), "NorthernSami" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
314 { lng( 'n','o' ), "Norwegian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
315 { lng( 'n','b' ), "NorwegianBokmål" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
316 { lng( 'n','n' ), "NorwegianNynorsk" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
317 { lng( 'n','y' ), "Nyanja;Chichewa" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
318 { lng( 'o','c' ), "Occitan(post1500;Provençal" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
319 { lng( 'o','r' ), "Oriya" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
320 { lng( 'o','m' ), "Oromo" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
321 { lng( 'o','s' ), "Ossetian;Ossetic" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
322 { lng( 'p','i' ), "Pali" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
323 { lng( 'p','a' ), "Panjabi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
324 { lng( 'f','a' ), "Persian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
325 { lng( 'p','l' ), "Polish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
326 { lng( 'p','t' ), "Portuguese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
327 { lng( 'o','c' ), "Provençal;Occitan(post1500" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
328 { lng( 'p','s' ), "Pushto" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
329 { lng( 'q','u' ), "Quechua" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
330 { lng( 'r','m' ), "Raeto-Romance" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
331 { lng( 'r','o' ), "Romanian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
332 { lng( 'r','n' ), "Rundi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
333 { lng( 'r','u' ), "Russian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
334 { lng( 's','m' ), "Samoan" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
335 { lng( 's','g' ), "Sango" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
336 { lng( 's','a' ), "Sanskrit" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
337 { lng( 's','c' ), "Sardinian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
338 { lng( 's','r' ), "Serbian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
339 { lng( 's','n' ), "Shona" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
340 { lng( 's','d' ), "Sindhi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
341 { lng( 's','i' ), "Sinhalese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
342 { lng( 's','k' ), "Slovak" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
343 { lng( 's','l' ), "Slovenian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
344 { lng( 's','o' ), "Somali" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
345 { lng( 's','t' ), "Sotho" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
346 { lng( 'e','s' ), "Spanish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
347 { lng( 's','u' ), "Sundanese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
348 { lng( 's','w' ), "Swahili" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
349 { lng( 's','s' ), "Swati" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
350 { lng( 's','v' ), "Swedish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
351 { lng( 't','l' ), "Tagalog" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
352 { lng( 't','y' ), "Tahitian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
353 { lng( 't','g' ), "Tajik" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
354 { lng( 't','a' ), "Tamil" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
355 { lng( 't','t' ), "Tatar" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
356 { lng( 't','e' ), "Telugu" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
357 { lng( 't','h' ), "Thai" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
358 { lng( 'b','o' ), "Tibetan" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
359 { lng( 't','i' ), "Tigrinya" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
360 { lng( 't','o' ), "Tonga" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
361 { lng( 't','s' ), "Tsonga" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
362 { lng( 't','n' ), "Tswana" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
363 { lng( 't','r' ), "Turkish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
364 { lng( 't','k' ), "Turkmen" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
365 { lng( 't','w' ), "Twi" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
366 { lng( 'u','g' ), "Uighur" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
367 { lng( 'u','k' ), "Ukrainian" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
368 { lng( 'u','r' ), "Urdu" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
369 { lng( 'u','z' ), "Uzbek" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
370 { lng( 'v','i' ), "Vietnamese" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
371 { lng( 'v','o' ), "Volapük" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
372 { lng( 'c','y' ), "Welsh" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
373 { lng( 'w','o' ), "Wolof" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
374 { lng( 'x','h' ), "Xhosa" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
375 { lng( 'y','i' ), "Yiddish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
376 { lng( 'j','i' ), "Yiddish" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
377 { lng( 'y','o' ), "Yoruba" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
378 { lng( 'z','a' ), "Zhuang" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
379 { lng( 'z','u' ), "Zulu" },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
380 };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
381 #undef lng
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
382
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
383 #ifdef CONFIG_DVDREAD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
384 static char * ChannelTypes[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
385 { "Dolby Digital","","Mpeg1","Mpeg2","PCM","","Digital Theatre System" };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
386 static char * ChannelNumbers[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
387 { "","Stereo","","","","5.1" };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
388 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
389
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
390 static const char * GetLanguage( int language )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
391 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
392 unsigned int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
393 for ( i=0;i<sizeof( Languages ) / sizeof( Languages_t );i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
394 if ( Languages[i].id == language ) return Languages[i].name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
395 return NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
396 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
397
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
398
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
399 GtkWidget * DVDSubMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
400 GtkWidget * DVDTitleMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
401 GtkWidget * DVDChapterMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
402 GtkWidget * DVDAudioLanguageMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
403 GtkWidget * DVDSubtitleLanguageMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
404 GtkWidget * AspectMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
405 GtkWidget * VCDSubMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
406 GtkWidget * VCDTitleMenu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
407
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
408 GtkWidget * create_PopUpMenu( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
409 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
410 GtkWidget * window1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
411 GtkWidget * Menu = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
412 GtkWidget * SubMenu = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
413 GtkWidget * MenuItem = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
414 GtkWidget * H, * N, * D, * F;
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
415 demuxer_t *demuxer = mpctx_get_demuxer(guiInfo.mpcontext);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
416 mixer_t *mixer = mpctx_get_mixer(guiInfo.mpcontext);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
417 int global_sub_size = mpctx_get_global_sub_size(guiInfo.mpcontext);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
418
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
419 Menu=gtk_menu_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
420 gtk_widget_realize (Menu);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
421 window1 = gtk_widget_get_toplevel(Menu);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
422
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
423
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
424 AddMenuItem( window1, (const char*)about_xpm, Menu,MSGTR_MENU_AboutMPlayer" ", evAbout );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
425 AddSeparator( Menu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
426 SubMenu=AddSubMenu( window1, (const char*)open_xpm, Menu,MSGTR_MENU_Open );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
427 AddMenuItem( window1, (const char*)file2_xpm, SubMenu,MSGTR_MENU_PlayFile" ", evLoadPlay );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
428 #ifdef CONFIG_VCD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
429 AddMenuItem( window1, (const char*)playvcd_xpm, SubMenu,MSGTR_MENU_PlayVCD, evPlayVCD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
430 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
431 #ifdef CONFIG_DVDREAD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
432 AddMenuItem( window1, (const char*)playdvd_xpm, SubMenu,MSGTR_MENU_PlayDVD, evPlayDVD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
433 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
434 AddMenuItem( window1, (const char*)url_xpm, SubMenu,MSGTR_MENU_PlayURL, evSetURL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
435 AddMenuItem( window1, (const char*)sub_xpm, SubMenu,MSGTR_MENU_LoadSubtitle" ", evLoadSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
436 AddMenuItem( window1, (const char*)nosub_xpm, SubMenu,MSGTR_MENU_DropSubtitle,evDropSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
437 AddMenuItem( window1, (const char*)loadeaf_xpm, SubMenu,MSGTR_MENU_LoadExternAudioFile, evLoadAudioFile );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
438 SubMenu=AddSubMenu(window1, (const char*)play_xpm, Menu,MSGTR_MENU_Playing );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
439 AddMenuItem( window1, (const char*)play_xpm, SubMenu,MSGTR_MENU_Play" ", evPlay );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
440 AddMenuItem( window1, (const char*)pause_xpm, SubMenu,MSGTR_MENU_Pause, evPause );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
441 AddMenuItem( window1, (const char*)stop_xpm, SubMenu,MSGTR_MENU_Stop, evStop );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
442 AddMenuItem( window1, (const char*)next_xpm, SubMenu,MSGTR_MENU_NextStream, evNext );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
443 AddMenuItem( window1, (const char*)prev_xpm, SubMenu,MSGTR_MENU_PrevStream, evPrev );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
444 // AddSeparator( SubMenu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
445 // AddMenuItem( SubMenu,"Back 10 sec", evBackward10sec );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
446 // AddMenuItem( SubMenu,"Fwd 10 sec", evForward10sec );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
447 // AddMenuItem( SubMenu,"Back 1 min", evBackward1min );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
448 // AddMenuItem( SubMenu,"Fwd 1 min", evForward1min );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
449 // SubMenu=AddSubMenu( Menu,MSGTR_MENU_Size );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
450 // AddMenuItem( SubMenu,MSGTR_MENU_NormalSize" ", evNormalSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
451 // AddMenuItem( SubMenu,MSGTR_MENU_DoubleSize, evDoubleSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
452 // AddMenuItem( SubMenu,MSGTR_MENU_FullScreen, evFullScreen );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
453 #ifdef CONFIG_VCD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
454 VCDSubMenu=AddSubMenu( window1, (const char*)vcd_xpm, Menu,MSGTR_MENU_VCD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
455 AddMenuItem( window1, (const char*)playvcd_xpm, VCDSubMenu,MSGTR_MENU_PlayDisc,evPlayVCD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
456 AddSeparator( VCDSubMenu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
457 VCDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, VCDSubMenu,MSGTR_MENU_Titles );
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
458 if ( guiInfo.Tracks )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
459 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
460 char tmp[32]; int i;
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
461 for ( i=1;i < guiInfo.Tracks;i++ )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
462 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
463 snprintf( tmp,32,MSGTR_MENU_Title,i );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
464 //AddMenuItem( VCDTitleMenu,tmp,( i << 16 ) + evSetVCDTrack );
33874
e1bec41397bb Don't let VCD track number and guiInfo.Track differ.
ib
parents: 33738
diff changeset
465 AddMenuItem(window1, (const char*)empty_xpm, VCDTitleMenu,tmp,( ( i + 1 ) << 16 ) + evSetVCDTrack );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
466 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
467 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
468 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
469 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
470 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, VCDTitleMenu,MSGTR_MENU_None,evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
471 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
472 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
473 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
474 #ifdef CONFIG_DVDREAD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
475 DVDSubMenu=AddSubMenu( window1, (const char*)dvd_xpm, Menu,MSGTR_MENU_DVD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
476 AddMenuItem( window1, (const char*)playdvd_xpm, DVDSubMenu,MSGTR_MENU_PlayDisc" ", evPlayDVD );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
477 // AddMenuItem( DVDSubMenu,MSGTR_MENU_ShowDVDMenu, evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
478 AddSeparator( DVDSubMenu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
479 DVDTitleMenu=AddSubMenu( window1, (const char*)title_xpm, DVDSubMenu,MSGTR_MENU_Titles );
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
480 if ( guiInfo.Tracks )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
481 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
482 char tmp[32]; int i;
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
483 for ( i=1 ; i<= guiInfo.Tracks;i++ )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
484 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
485 snprintf( tmp,32,MSGTR_MENU_Title,i);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
486 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
487 guiInfo.Track == i,
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
488 (i << 16) + evSetDVDTitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
489 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
490 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
491 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
492 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
493 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDTitleMenu,MSGTR_MENU_None,evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
494 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
495 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
496 DVDChapterMenu=AddSubMenu( window1, (const char*)chapter_xpm, DVDSubMenu,MSGTR_MENU_Chapters );
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
497 if ( guiInfo.Chapters )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
498 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
499 char tmp[32]; int i;
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
500 for ( i=1;i <= guiInfo.Chapters;i++ )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
501 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
502 snprintf( tmp,32,MSGTR_MENU_Chapter,i );
33876
4789b8eed97e Get rid of a bunch of needless or redundant guiInfo members.
ib
parents: 33874
diff changeset
503 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDChapterMenu,tmp,guiInfo.Chapter == i,
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
504 ( i << 16 ) + evSetDVDChapter );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
505 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
506 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
507 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
508 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
509 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDChapterMenu,MSGTR_MENU_None,evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
510 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
511 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
512 DVDAudioLanguageMenu=AddSubMenu( window1, (const char*)audiolang_xpm, DVDSubMenu,MSGTR_MENU_AudioLanguages );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
513 if ( guiInfo.DVD.nr_of_audio_channels )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
514 {
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
515 char tmp[64]; int i, id = demuxer ? demuxer->audio->id : audio_id;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
516 for ( i=0;i < guiInfo.DVD.nr_of_audio_channels;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
517 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
518 snprintf( tmp,64,"%s - %s %s",GetLanguage( guiInfo.DVD.audio_streams[i].language ),
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
519 ChannelTypes[ guiInfo.DVD.audio_streams[i].type ],
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
520 ChannelNumbers[ guiInfo.DVD.audio_streams[i].channels ] );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
521 // if ( id == -1 ) id=audio_id; //guiInfo.DVD.audio_streams[i].id;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
522 AddMenuCheckItem( window1, (const char*)dolby_xpm, DVDAudioLanguageMenu,tmp,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
523 id == guiInfo.DVD.audio_streams[i].id,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
524 ( guiInfo.DVD.audio_streams[i].id << 16 ) + evSetDVDAudio );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
525 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
526 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
527 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
528 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
529 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDAudioLanguageMenu,MSGTR_MENU_None,evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
530 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
531 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
532 DVDSubtitleLanguageMenu=AddSubMenu( window1, (const char*)sublang_xpm, DVDSubMenu,MSGTR_MENU_SubtitleLanguages );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
533 if ( guiInfo.DVD.nr_of_subtitles )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
534 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
535 char tmp[64]; int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
536 AddMenuItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,( (unsigned short)-1 << 16 ) + evSetDVDSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
537 for ( i=0;i < guiInfo.DVD.nr_of_subtitles;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
538 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
539 av_strlcpy( tmp,GetLanguage( guiInfo.DVD.subtitles[i].language ),sizeof(tmp) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
540 AddMenuCheckItem( window1, (const char*)empty1px_xpm, DVDSubtitleLanguageMenu,tmp,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
541 dvdsub_id == guiInfo.DVD.subtitles[i].id,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
542 ( guiInfo.DVD.subtitles[i].id << 16 ) + evSetDVDSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
543 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
544 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
545 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
546 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
547 MenuItem=AddMenuItem( window1, (const char*)empty_xpm, DVDSubtitleLanguageMenu,MSGTR_MENU_None,evNone );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
548 gtk_widget_set_sensitive( MenuItem,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
549 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
550 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
551
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
552 // if ( guiInfo.Playing )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
553 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
554 AspectMenu=AddSubMenu( window1, (const char*)aspect_xpm, Menu,MSGTR_MENU_AspectRatio );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
555 AddMenuItem( window1, (const char*)aspect11_xpm, AspectMenu,MSGTR_MENU_Original,( 1 << 16 ) + evSetAspect );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
556 AddMenuItem( window1, (const char*)aspect169_xpm, AspectMenu,"16:9",( 2 << 16 ) + evSetAspect );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
557 AddMenuItem( window1, (const char*)aspect43_xpm, AspectMenu,"4:3",( 3 << 16 ) + evSetAspect );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
558 AddMenuItem( window1, (const char*)aspect235_xpm, AspectMenu,"2.35",( 4 << 16 ) + evSetAspect );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
559 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
560
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
561 if ( guiInfo.Playing && demuxer && guiInfo.StreamType != STREAMTYPE_DVD )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
562 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
563 int i,c = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
564
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
565 for ( i=0;i < MAX_A_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
566 if ( demuxer->a_streams[i] ) c++;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
567
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
568 if ( c > 1 )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
569 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
570 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_AudioTrack );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
571 for ( i=0;i < MAX_A_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
572 if ( demuxer->a_streams[i] )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
573 {
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
574 int aid = ((sh_audio_t *)demuxer->a_streams[i])->aid;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
575 char tmp[32];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
576 snprintf( tmp,32,MSGTR_MENU_Track,aid );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
577 AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( aid << 16 ) + evSetAudio );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
578 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
579 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
580
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
581 for ( c=0,i=0;i < MAX_V_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
582 if ( demuxer->v_streams[i] ) c++;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
583
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
584 if ( c > 1 )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
585 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
586 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu,MSGTR_MENU_VideoTrack );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
587 for ( i=0;i < MAX_V_STREAMS;i++ )
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
588 if ( demuxer->v_streams[i] )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
589 {
33657
c92f23eac7a4 Remove guiGetEvent type guiSetDemuxer.
ib
parents: 33655
diff changeset
590 int vid = ((sh_video_t *)demuxer->v_streams[i])->vid;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
591 char tmp[32];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
592 snprintf( tmp,32,MSGTR_MENU_Track,vid );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
593 AddMenuItem( window1, (const char*)empty_xpm, SubMenu,tmp,( vid << 16 ) + evSetVideo );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
594 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
595 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
596 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
597
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
598 /* cheap subtitle switching for non-DVD streams */
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
599 if ( global_sub_size && guiInfo.StreamType != STREAMTYPE_DVD )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
600 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
601 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
602 SubMenu=AddSubMenu( window1, (const char*)empty_xpm, Menu, MSGTR_MENU_Subtitles );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
603 AddMenuItem( window1, (const char*)empty_xpm, SubMenu, MSGTR_MENU_None, (-1 << 16) + evSetSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
604 for ( i=0;i < global_sub_size;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
605 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
606 char tmp[32];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
607 snprintf( tmp, 32, MSGTR_MENU_Track, i );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
608 AddMenuItem( window1,(const char*)empty_xpm,SubMenu,tmp,( i << 16 ) + evSetSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
609 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
610 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
611
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
612 AddSeparator( Menu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
613 MenuItem=AddMenuCheckItem( window1, (const char*)sound_xpm, Menu,MSGTR_MENU_Mute,mixer->muted,evMute );
33646
f3300b0c38a9 Rename guiInterface_t member AudioType AudioChannels.
ib
parents: 33572
diff changeset
614 if ( !guiInfo.AudioChannels ) gtk_widget_set_sensitive( MenuItem,FALSE );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
615 AddMenuItem( window1, (const char*)playlist_xpm, Menu,MSGTR_MENU_PlayList, evPlayList );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
616 AddMenuItem( window1, (const char*)skin_xpm, Menu,MSGTR_MENU_SkinBrowser, evSkinBrowser );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
617 AddMenuItem( window1, (const char*)prefs_xpm, Menu,MSGTR_MENU_Preferences, evPreferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
618 AddMenuItem( window1, (const char*)equalizer_xpm, Menu,MSGTR_Equalizer, evEqualizer );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
619
33655
cbb7cfeb8c71 Rename guiInterface_t member NoWindow MovieWindow.
ib
parents: 33646
diff changeset
620 if ( guiInfo.MovieWindow )
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
621 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
622 int b1 = 0, b2 = 0, b_half = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
623 AddSeparator( Menu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
624 if ( !guiApp.subWindow.isFullScreen && guiInfo.Playing )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
625 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
626 if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth * 2 )&&
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
627 ( guiApp.subWindow.Height == guiInfo.MovieHeight * 2 ) ) b2=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
628 else if ( ( guiApp.subWindow.Width == guiInfo.MovieWidth / 2 ) &&
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
629 ( guiApp.subWindow.Height == guiInfo.MovieHeight / 2 ) ) b_half=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
630 else b1=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
631 } else b1=!guiApp.subWindow.isFullScreen;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
632 H=AddMenuCheckItem( window1, (const char*)half_xpm, Menu,MSGTR_MENU_HalfSize,b_half,evHalfSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
633 N=AddMenuCheckItem( window1, (const char*)normal_xpm, Menu,MSGTR_MENU_NormalSize" ",b1,evNormalSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
634 D=AddMenuCheckItem( window1, (const char*)double_xpm, Menu,MSGTR_MENU_DoubleSize,b2,evDoubleSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
635 F=AddMenuCheckItem( window1, (const char*)full_xpm, Menu,MSGTR_MENU_FullScreen,guiApp.subWindow.isFullScreen,evFullScreen );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
636 if ( !gtkShowVideoWindow && !guiInfo.Playing )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
637 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
638 gtk_widget_set_sensitive( H,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
639 gtk_widget_set_sensitive( N,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
640 gtk_widget_set_sensitive( D,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
641 gtk_widget_set_sensitive( F,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
642 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
643 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
644
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
645 AddSeparator( Menu );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
646 AddMenuItem( window1, (const char*)exit_xpm, Menu,MSGTR_MENU_Exit, evExit );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
647
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
648 return Menu;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
649 }