annotate gui/ui/gtk/preferences.c @ 34309:119af6360b00

Discard frames where the size does not match the AVCodecContext width/height. This avoids possible crashes on video size changes. The problem is that we reinitialize the vo on get_buffer but due to codec delay libavcodec might still return frames with the old size afterwards, which the vo might no longer be able to handle. Ideally libavcodec should not show this behaviour, since it requires that any application using DR1 can handle frames of different sizes simultaneously - which seems a bit extreme.
author reimar
date Mon, 05 Dec 2011 18:08:29 +0000
parents 8beec562ce0e
children 5a45efc630b8
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 <stdlib.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
20 #include <sys/types.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
21 #include <sys/stat.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
22 #include <unistd.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
23 #include <string.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
24
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
25 #include <gdk/gdkkeysyms.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
26 #include <gtk/gtk.h>
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
27
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
28 #include "config.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
29 #include "help_mp.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
30 #include "mixer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
31 #include "mpcommon.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
32 #include "libao2/audio_out.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
33 #include "sub/sub.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
34 #include "libvo/video_out.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
35 #include "libvo/x11_common.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
36 #include "stream/stream.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
37 #include "libmpdemux/demuxer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
38 #include "libmpdemux/stheader.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
39 #include "libmpcodecs/dec_video.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
40 #include "sub/font_load.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
41
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
42 #include "gui/app.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
43 #include "gui/cfg.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
44 #include "gui/interface.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
45 #include "gui/ui/gmplayer.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
46 #include "gui/ui/widgets.h"
33741
962dc701989d Create new file list.c for list related functions.
ib
parents: 33740
diff changeset
47 #include "gui/util/list.h"
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
48 #include "gui/util/mem.h"
33737
71c29e8ec68f Move string functions from interface.c to string.c.
ib
parents: 33572
diff changeset
49 #include "gui/util/string.h"
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
50 #include "preferences.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
51 #include "fileselect.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
52 #include "tools.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
53
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
54 // for mpcodecs_[av]d_drivers:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
55 #include "libmpcodecs/vd.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
56 #include "libmpcodecs/ad.h"
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
57
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
58 GtkWidget * Preferences = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
59 static GtkWidget * AConfig;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
60 static GtkWidget * VConfig;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
61 //static GtkWidget * BLoadSubtitle;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
62 static GtkWidget * BLoadFont;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
63 static GtkWidget * BOk;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
64 static GtkWidget * BCancel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
65
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
66 static GtkWidget * CLADrivers;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
67 static GtkWidget * CLVDrivers;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
68
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
69 //static GtkWidget * ESubtitleName;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
70 GtkWidget * prEFontName;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
71 GtkWidget * prEDVDDevice;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
72 GtkWidget * prECDRomDevice;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
73 static GtkWidget * EVFM;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
74 static GtkWidget * EAFM;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
75
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
76 static GtkWidget * CBVFM;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
77 static GtkWidget * CBAFM;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
78 static GtkWidget * CBAudioEqualizer;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
79 //static GtkWidget * CBSurround;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
80 static GtkWidget * CBExtraStereo;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
81 static GtkWidget * CBNormalize;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
82 static GtkWidget * CBSoftwareMixer;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
83 static GtkWidget * CBDoubleBuffer;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
84 static GtkWidget * CBDR;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
85 static GtkWidget * CBFramedrop;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
86 static GtkWidget * CBHFramedrop;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
87 //static GtkWidget * CBFullScreen;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
88 static GtkWidget * CBShowVideoWindow;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
89 static GtkWidget * CBNonInterlaved;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
90 static GtkWidget * CBIndex;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
91 static GtkWidget * CBFlip;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
92 static GtkWidget * CBNoAutoSub;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
93 static GtkWidget * CBSubUnicode;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
94 static GtkWidget * CBSubOverlap;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
95 static GtkWidget * CBDumpMPSub;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
96 static GtkWidget * CBDumpSrt;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
97 static GtkWidget * CBUseASS;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
98 static GtkWidget * CBASSUseMargins;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
99 static GtkWidget * SBASSTopMargin;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
100 static GtkWidget * SBASSBottomMargin;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
101 static GtkWidget * CBPostprocess;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
102 static GtkWidget * CBCache;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
103 static GtkWidget * CBLoadFullscreen;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
104 static GtkWidget * CBSaveWinPos;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
105 static GtkWidget * CBStopXScreenSaver;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
106 static GtkWidget * CBPlayBar;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
107 static GtkWidget * CBNoIdle;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
108
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
109 static GtkWidget * SBCache;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
110 static GtkAdjustment * SBCacheadj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
111
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
112 static GtkWidget * CBAutoSync;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
113 static GtkWidget * SBAutoSync;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
114 static GtkAdjustment * SBAutoSyncadj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
115
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
116 static GtkWidget * RBOSDNone;
33777
235c6f2514be Arrange OSD preferences according to option 'osdlevel'.
ib
parents: 33769
diff changeset
117 static GtkWidget * RBOSDIndicator;
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
118 static GtkWidget * RBOSDTandP;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
119 static GtkWidget * RBOSDTPTT;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
120
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
121 static GtkWidget * HSAudioDelay;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
122 static GtkWidget * HSExtraStereoMul;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
123 static GtkWidget * HSPanscan;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
124 static GtkWidget * HSSubDelay;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
125 static GtkWidget * HSSubPosition;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
126 static GtkWidget * HSSubFPS;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
127 static GtkWidget * HSPPQuality;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
128 static GtkWidget * HSFPS;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
129
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
130 static GtkAdjustment * HSExtraStereoMuladj, * HSAudioDelayadj, * HSPanscanadj, * HSSubDelayadj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
131 static GtkAdjustment * HSSubPositionadj, * HSSubFPSadj, * HSPPQualityadj, * HSFPSadj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
132
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
133 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
134 static GtkWidget * HSFontFactor;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
135 static GtkAdjustment * HSFontFactoradj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
136 #else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
137 static GtkWidget * HSFontBlur, * HSFontOutLine, * HSFontTextScale, * HSFontOSDScale;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
138 static GtkAdjustment * HSFontBluradj, * HSFontOutLineadj, * HSFontTextScaleadj, * HSFontOSDScaleadj;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
139 static GtkWidget * CBFontEncoding, * EFontEncoding;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
140 static GtkWidget * RBFontNoAutoScale, * RBFontAutoScaleWidth, * RBFontAutoScaleHeight, * RBFontAutoScaleDiagonal;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
141 //static GtkWidget * AutoScale;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
142 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
143
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
144 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
145 static GtkWidget * CBSubEncoding, * ESubEncoding;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
146 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
147
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
148 #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
149 static struct
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
150 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
151 char * name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
152 char * comment;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
153 } lEncoding[] =
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
154 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
155 { "unicode", MSGTR_PREFERENCES_FontEncoding1 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
156 { "iso-8859-1", MSGTR_PREFERENCES_FontEncoding2 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
157 { "iso-8859-15", MSGTR_PREFERENCES_FontEncoding3 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
158 { "iso-8859-2", MSGTR_PREFERENCES_FontEncoding4 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
159 { "cp1250", MSGTR_PREFERENCES_FontEncoding22},
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
160 { "iso-8859-3", MSGTR_PREFERENCES_FontEncoding5 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
161 { "iso-8859-4", MSGTR_PREFERENCES_FontEncoding6 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
162 { "iso-8859-5", MSGTR_PREFERENCES_FontEncoding7 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
163 { "cp1251", MSGTR_PREFERENCES_FontEncoding21},
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
164 { "iso-8859-6", MSGTR_PREFERENCES_FontEncoding8 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
165 { "cp1256", MSGTR_PREFERENCES_FontEncoding23 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
166 { "iso-8859-7", MSGTR_PREFERENCES_FontEncoding9 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
167 { "iso-8859-9", MSGTR_PREFERENCES_FontEncoding10 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
168 { "iso-8859-13", MSGTR_PREFERENCES_FontEncoding11 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
169 { "iso-8859-14", MSGTR_PREFERENCES_FontEncoding12 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
170 { "iso-8859-8", MSGTR_PREFERENCES_FontEncoding13 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
171 { "koi8-r", MSGTR_PREFERENCES_FontEncoding14 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
172 { "koi8-u/ru", MSGTR_PREFERENCES_FontEncoding15 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
173 { "cp936", MSGTR_PREFERENCES_FontEncoding16 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
174 { "big5", MSGTR_PREFERENCES_FontEncoding17 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
175 { "shift-jis", MSGTR_PREFERENCES_FontEncoding18 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
176 { "cp949", MSGTR_PREFERENCES_FontEncoding19 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
177 { "cp874", MSGTR_PREFERENCES_FontEncoding20 },
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
178 { NULL,NULL }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
179 };
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
180 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
181
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
182 static int old_audio_driver = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
183 static char * ao_driver[3];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
184 static char * vo_driver[3];
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
185 static int old_video_driver = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
186
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
187 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
188 void ShowDXR3Config( void );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
189 void HideDXR3Config( void );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
190 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
191 void ShowAudioConfig( void );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
192 void HideAudioConfig( void );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
193
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
194 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
195 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
196 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
197 #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
198 static void prEntry( GtkContainer * container,gpointer user_data );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
199 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
200
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
201 void ShowPreferences( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
202 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
203 if ( Preferences ) gtkActive( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
204 else Preferences=create_Preferences();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
205
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
206 // -- 1. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
207 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ),gtkEnableAudioEqualizer );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
208 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
209 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSurround ),gtkAOSurround );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
210 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
211 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBExtraStereo ),gtkAOExtraStereo );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
212 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNormalize ),gtkAONorm );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
213 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ),soft_vol );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
214 gtk_adjustment_set_value( HSExtraStereoMuladj,gtkAOExtraStereoMul );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
215 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
216 int i = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
217 char * tmp[3]; tmp[2]="";
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
218 old_audio_driver=-1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
219 if ( CLADrivers ) gtk_clist_clear( GTK_CLIST( CLADrivers ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
220 while ( audio_out_drivers[i] )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
221 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
222 const ao_info_t *info = audio_out_drivers[i++]->info;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
223 if ( !strcmp( info->short_name,"plugin" ) ) continue;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
224 if ( audio_driver_list )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
225 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
226 char * name = gstrdup( audio_driver_list[0] );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
227 char * sep = gstrchr( audio_driver_list[0],':' );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
228 if ( sep ) *sep=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
229 if ( !gstrcmp( name,(char *)info->short_name ) ) old_audio_driver=i - 1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
230 free( name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
231 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
232 tmp[0]=(char *)info->short_name; tmp[1]=(char *)info->name; gtk_clist_append( GTK_CLIST( CLADrivers ),tmp );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
233 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
234 if ( old_audio_driver > -1 )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
235 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
236 gtk_clist_select_row( GTK_CLIST( CLADrivers ),old_audio_driver,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
237 gtk_clist_get_text( GTK_CLIST( CLADrivers ),old_audio_driver,0,(char **)&ao_driver );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
238 gtk_widget_set_sensitive( AConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
239 if ( !strncmp( ao_driver[0],"oss",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
240 !strncmp( ao_driver[0],"alsa",4 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
241 !strncmp( ao_driver[0],"esd",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
242 !strncmp( ao_driver[0],"sdl",3 ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
243 gtk_widget_set_sensitive( AConfig,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
244 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
245 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
246
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
247 // -- 2. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
248 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ),vo_doublebuffering );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
249 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDR ),vo_directrendering );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
250
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
251 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
252 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBHFramedrop ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
253 switch ( frame_dropping )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
254 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
255 case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBHFramedrop ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
256 case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFramedrop ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
257 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
258
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
259 if (flip != -1)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
260 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBFlip ),flip );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
261 gtk_adjustment_set_value( HSPanscanadj,vo_panscan );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
262
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
263 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
264 int i = 0, c = 0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
265 char * tmp[3]; tmp[2]="";
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
266 old_video_driver=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
267 if ( CLVDrivers ) gtk_clist_clear( GTK_CLIST( CLVDrivers ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
268 while ( video_out_drivers[i] )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
269 if ( video_out_drivers[i++]->control( VOCTRL_GUISUPPORT,NULL ) == VO_TRUE )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
270 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
271 if ( video_driver_list && !gstrcmp( video_driver_list[0],(char *)video_out_drivers[i - 1]->info->short_name ) ) old_video_driver=c; c++;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
272 tmp[0]=(char *)video_out_drivers[i - 1]->info->short_name; tmp[1]=(char *)video_out_drivers[i - 1]->info->name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
273 gtk_clist_append( GTK_CLIST( CLVDrivers ),tmp );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
274 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
275 gtk_clist_select_row( GTK_CLIST( CLVDrivers ),old_video_driver,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
276 gtk_clist_get_text( GTK_CLIST( CLVDrivers ),old_video_driver,0,(char **)&vo_driver );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
277 gtk_widget_set_sensitive( VConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
278 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
279 if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
280 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
281 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
282
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
283 gtk_adjustment_set_value( HSFPSadj,force_fps );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
284
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
285 // -- 3. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
286 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubOverlap ),suboverlap_enabled );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
287 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ),!sub_auto );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
288 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ),gtkSubDumpMPSub );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
289 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBDumpSrt ),gtkSubDumpSrt );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
290 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSubUnicode ),sub_unicode );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
291 #ifdef CONFIG_ASS
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
292 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBUseASS ),gtkASS.enabled );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
293 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ),gtkASS.use_margins );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
294 gtk_spin_button_set_value( (GtkSpinButton *)SBASSTopMargin,(gdouble)gtkASS.top_margin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
295 gtk_spin_button_set_value( (GtkSpinButton *)SBASSBottomMargin,(gdouble)gtkASS.bottom_margin );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
296
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
297 if ( !gtkASS.enabled )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
298 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
299 gtk_widget_set_sensitive( CBASSUseMargins,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
300 gtk_widget_set_sensitive( SBASSTopMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
301 gtk_widget_set_sensitive( SBASSBottomMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
302 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
303 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
304
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
305 gtk_adjustment_set_value( HSSubDelayadj,sub_delay );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
306 gtk_adjustment_set_value( HSSubFPSadj,sub_fps );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
307 gtk_adjustment_set_value( HSSubPositionadj,sub_pos );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
308 switch ( osd_level )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
309 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
310 case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDNone ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
311 case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
312 case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTandP ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
313 case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
314 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
315 #if 0
33897
e0d211c62cf7 Cosmetic: Rename some guiInfo members.
ib
parents: 33786
diff changeset
316 if ( guiInfo.SubtitleFilename ) gtk_entry_set_text( GTK_ENTRY( ESubtitleName ),guiInfo.SubtitleFilename );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
317 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
318
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
319 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
320 if ( sub_cp )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
321 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
322 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
323 for ( i=0;lEncoding[i].name;i++ )
33786
0d3d8db05a59 Compare encodings case insensitively.
ib
parents: 33785
diff changeset
324 if ( !gstrcasecmp( sub_cp,lEncoding[i].name ) ) break;
33785
0c42fbe235d3 Fix segmentation fault.
ib
parents: 33778
diff changeset
325 if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( ESubEncoding ),lEncoding[i].comment );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
326 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
327 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
328
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
329 // --- 4. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
330 // font ...
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
331 if ( font_name ) gtk_entry_set_text( GTK_ENTRY( prEFontName ),font_name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
332 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
333 gtk_adjustment_set_value( HSFontFactoradj,font_factor );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
334 #else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
335 gtk_adjustment_set_value( HSFontBluradj,( subtitle_font_radius / 8.0f ) * 100.0f );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
336 gtk_adjustment_set_value( HSFontOutLineadj,( subtitle_font_thickness / 8.0f ) * 100.0f );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
337 gtk_adjustment_set_value( HSFontTextScaleadj,text_font_scale_factor );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
338 gtk_adjustment_set_value( HSFontOSDScaleadj,osd_font_scale_factor );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
339 if ( subtitle_font_encoding )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
340 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
341 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
342 for ( i=0;lEncoding[i].name;i++ )
33786
0d3d8db05a59 Compare encodings case insensitively.
ib
parents: 33785
diff changeset
343 if ( !gstrcasecmp( subtitle_font_encoding,lEncoding[i].name ) ) break;
33785
0c42fbe235d3 Fix segmentation fault.
ib
parents: 33778
diff changeset
344 if ( lEncoding[i].name ) gtk_entry_set_text( GTK_ENTRY( EFontEncoding ),lEncoding[i].comment );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
345 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
346 switch ( subtitle_autoscale )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
347 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
348 case 0: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
349 case 1: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
350 case 2: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
351 case 3: gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ),TRUE ); break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
352 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
353 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
354
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
355 // -- 5. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
356 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ),force_ni );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
357 if ( index_mode == 1 ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBIndex ),1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
358 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
359 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
360 GList * Items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
361 char * name = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
362
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
363 Items=g_list_append( Items,MSGTR_PREFERENCES_None );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
364 for( i=0;mpcodecs_vd_drivers[i];i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
365 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
366 Items=g_list_append( Items,(char *)mpcodecs_vd_drivers[i]->info->name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
367 if ( video_fm_list && !gstrcmp( video_fm_list[0],(char *)mpcodecs_vd_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_vd_drivers[i]->info->name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
368 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
369 gtk_combo_set_popdown_strings( GTK_COMBO( CBVFM ),Items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
370 g_list_free( Items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
371 if ( name ) gtk_entry_set_text( GTK_ENTRY( EVFM ),name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
372 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
373
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
374 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
375 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
376 GList * Items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
377 char * name = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
378
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
379 Items=g_list_append( Items,MSGTR_PREFERENCES_None );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
380 for( i=0;mpcodecs_ad_drivers[i];i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
381 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
382 Items=g_list_append( Items,(char *)mpcodecs_ad_drivers[i]->info->name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
383 if ( audio_fm_list && !gstrcmp( audio_fm_list[0],(char *)mpcodecs_ad_drivers[i]->info->short_name ) ) name=(char *)mpcodecs_ad_drivers[i]->info->name;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
384 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
385 gtk_combo_set_popdown_strings( GTK_COMBO( CBAFM ),Items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
386 g_list_free( Items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
387 if ( name ) gtk_entry_set_text( GTK_ENTRY( EAFM ),name );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
388 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
389
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
390 // --- 6. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
391 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPostprocess ),gtkVfPP );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
392 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ),gtkLoadFullscreen );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
393 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ),gui_save_pos );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
394 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ),gtkShowVideoWindow );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
395 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ),stop_xscreensaver );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
396 gtk_adjustment_set_value( HSPPQualityadj,auto_quality );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
397
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
398 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),gtkEnablePlayBar );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
399 if ( !guiApp.playbarIsPresent )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
400 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
401 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBPlayBar ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
402 gtk_widget_set_sensitive( CBPlayBar,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
403 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
404 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBNoIdle ),!player_idle_mode );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
405
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
406 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
407 gtk_adjustment_set_value( SBCacheadj,(float)gtkCacheSize );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
408 if ( !gtkCacheOn ) gtk_widget_set_sensitive( SBCache,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
409 else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBCache ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
410
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
411 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
412 gtk_adjustment_set_value( SBAutoSyncadj,(float)gtkAutoSync );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
413 if ( !gtkAutoSyncOn ) gtk_widget_set_sensitive( SBAutoSync,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
414 else gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( CBAutoSync ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
415
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
416 if ( dvd_device ) gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),dvd_device );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
417 else gtk_entry_set_text( GTK_ENTRY( prEDVDDevice ),DEFAULT_DVD_DEVICE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
418 if ( cdrom_device ) gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),cdrom_device );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
419 else gtk_entry_set_text( GTK_ENTRY( prECDRomDevice ),DEFAULT_CDROM_DEVICE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
420
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
421 // -- disables
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
422 #ifndef CONFIG_ASS
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
423 gtk_widget_set_sensitive( CBUseASS,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
424 gtk_widget_set_sensitive( CBASSUseMargins,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
425 gtk_widget_set_sensitive( SBASSTopMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
426 gtk_widget_set_sensitive( SBASSBottomMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
427 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
428
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
429 // -- signals
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
430 gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
431 gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
432 gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
433 gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
434 gtk_signal_connect( GTK_OBJECT( CBShowVideoWindow ),"toggled",GTK_SIGNAL_FUNC( prToggled ), (void*)3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
435 #ifdef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
436 gtk_signal_connect( GTK_OBJECT( RBFontNoAutoScale ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
437 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleHeight ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
438 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleWidth ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)6 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
439 gtk_signal_connect( GTK_OBJECT( RBFontAutoScaleDiagonal ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)7 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
440 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
441 gtk_signal_connect( GTK_OBJECT( CBCache ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)8);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
442 gtk_signal_connect( GTK_OBJECT( CBAutoSync ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)9);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
443 #ifdef CONFIG_ASS
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
444 gtk_signal_connect( GTK_OBJECT( CBUseASS ),"toggled",GTK_SIGNAL_FUNC( prToggled ),(void*)10);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
445 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
446
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
447 gtk_signal_connect( GTK_OBJECT( HSExtraStereoMul ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
448 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
449 gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
450 gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
451 gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
452 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
453 gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
454 #else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
455 gtk_signal_connect( GTK_OBJECT( HSFontBlur ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)6 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
456 gtk_signal_connect( GTK_OBJECT( HSFontOutLine ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)7 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
457 gtk_signal_connect( GTK_OBJECT( HSFontTextScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)8 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
458 gtk_signal_connect( GTK_OBJECT( HSFontOSDScale ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
459 gtk_signal_connect( GTK_OBJECT( EFontEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
460 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
461 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
462 gtk_signal_connect( GTK_OBJECT( ESubEncoding ),"changed",GTK_SIGNAL_FUNC( prEntry ),(void *)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
463 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
464 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( prHScaler ),(void*)10 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
465
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
466 gtk_signal_connect( GTK_OBJECT( CLADrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
467 gtk_signal_connect( GTK_OBJECT( CLVDrivers ),"select_row",GTK_SIGNAL_FUNC( prCListRow ),(void*)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
468
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
469 gtk_widget_show( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
470 gtkSetLayer( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
471 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
472 static int visible = 1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
473 if ( visible )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
474 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
475 gtkMessageBox( GTK_MB_WARNING,MSGTR_PREFERENCES_Message );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
476 visible=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
477 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
478 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
479 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
480
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
481 static void HidePreferences( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
482 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
483 if ( !Preferences ) return;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
484 gtk_widget_hide( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
485 gtk_widget_destroy( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
486 Preferences=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
487 HideAudioConfig();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
488 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
489 HideDXR3Config();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
490 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
491 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
492
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
493 #if defined(CONFIG_FREETYPE) || defined(CONFIG_ICONV)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
494 static void prEntry( GtkContainer * container,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
495 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
496 const char * comment;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
497 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
498
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
499 switch( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
500 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
501 #ifdef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
502 case 0: // font encoding
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
503 comment=gtk_entry_get_text( GTK_ENTRY( EFontEncoding ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
504 for ( i=0;lEncoding[i].name;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
505 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
33766
515a3b5f291e Rename the mplayer() symbolic constants.
ib
parents: 33743
diff changeset
506 if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_FONT_ENCODING,0,lEncoding[i].name );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
507 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
508 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
509 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
510 case 1: // sub encoding
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
511 comment=gtk_entry_get_text( GTK_ENTRY( ESubEncoding ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
512 for ( i=0;lEncoding[i].name;i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
513 if ( !gstrcmp( lEncoding[i].comment,comment ) ) break;
33766
515a3b5f291e Rename the mplayer() symbolic constants.
ib
parents: 33743
diff changeset
514 if ( lEncoding[i].comment ) mplayer( MPLAYER_SET_SUB_ENCODING,0,lEncoding[i].name );
515a3b5f291e Rename the mplayer() symbolic constants.
ib
parents: 33743
diff changeset
515 else mplayer( MPLAYER_SET_SUB_ENCODING,0,NULL );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
516 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
517 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
518 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
519 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
520 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
521
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
522 #define bAConfig 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
523 #define bVconfig 1
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
524 #define bOk 2
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
525 #define bCancel 3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
526 #define bLSubtitle 4
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
527 #define bLFont 5
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
528
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
529 static void prButton( GtkButton * button, gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
530 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
531 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
532 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
533 case bOk:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
534 // -- 1. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
535 gtkEnableAudioEqualizer=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAudioEqualizer ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
536 gtkAOExtraStereo=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
537 gtkAONorm=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNormalize ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
538 soft_vol=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSoftwareMixer ) );
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
539 mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
540 audio_delay=HSAudioDelayadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
541
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
542 gaddlist( &audio_driver_list,ao_driver[0] );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
543 gaddlist( &video_driver_list,vo_driver[0] );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
544
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
545 // -- 2. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
546 vo_doublebuffering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDoubleBuffer ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
547 vo_directrendering=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDR ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
548
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
549 frame_dropping=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
550 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFramedrop ) ) == TRUE ) frame_dropping=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
551 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBHFramedrop ) ) == TRUE ) frame_dropping=2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
552
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
553 flip=-1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
554 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBFlip ) ) ) flip=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
555
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
556 force_fps=HSFPSadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
557
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
558 // -- 3. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
559 suboverlap_enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubOverlap ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
560 sub_auto=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoAutoSub ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
561 gtkSubDumpMPSub=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpMPSub ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
562 gtkSubDumpSrt=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBDumpSrt ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
563 sub_unicode=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSubUnicode ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
564 #ifdef CONFIG_ASS
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
565 gtkASS.enabled=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
566 gtkASS.use_margins=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBASSUseMargins ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
567 gtkASS.top_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSTopMargin ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
568 gtkASS.bottom_margin=gtk_spin_button_get_value_as_int( GTK_SPIN_BUTTON( SBASSBottomMargin ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
569 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
570 sub_delay=HSSubDelayadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
571 sub_fps=HSSubFPSadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
572 sub_pos=(int)HSSubPositionadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
573 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDNone ) ) ) osd_level=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
574 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDIndicator ) ) ) osd_level=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
575 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTandP ) ) ) osd_level=2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
576 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBOSDTPTT ) ) ) osd_level=3;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
577
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
578
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
579 // --- 4. page
33740
2c02269701bd Remove macros guiSetFilename() and guiSetDF() from interface.h.
ib
parents: 33739
diff changeset
580 setdup( &font_name,gtk_entry_get_text( GTK_ENTRY( prEFontName ) ) );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
581 #ifndef CONFIG_FREETYPE
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
582 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
583 #else
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
584 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
585 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
586 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
587 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
588 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontNoAutoScale ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,0,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
589 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleHeight ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,1,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
590 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleWidth ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,2,0 );
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
591 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBFontAutoScaleDiagonal ) ) ) mplayer( MPLAYER_SET_FONT_AUTOSCALE,3,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
592 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
593
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
594 // -- 5. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
595 force_ni=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNonInterlaved ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
596 index_mode=-1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
597 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBIndex ) ) ) index_mode=1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
598
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
599 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
600 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
601 const char * tmp = gtk_entry_get_text( GTK_ENTRY( EVFM ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
602 for( i=0;mpcodecs_vd_drivers[i];i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
603 if ( !gstrcmp( tmp,(char *)mpcodecs_vd_drivers[i]->info->name ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
604 { gaddlist( &video_fm_list,(char *)mpcodecs_vd_drivers[i]->info->short_name ); break; }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
605 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
606
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
607 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
608 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
609 const char * tmp = gtk_entry_get_text( GTK_ENTRY( EAFM ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
610 for( i=0;mpcodecs_ad_drivers[i];i++ )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
611 if ( !gstrcmp( tmp,(char *)mpcodecs_ad_drivers[i]->info->name ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
612 { gaddlist( &audio_fm_list,(char *)mpcodecs_ad_drivers[i]->info->short_name ); break; }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
613 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
614
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
615 // --- 6. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
616 gtkVfPP=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPostprocess ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
617 gtkLoadFullscreen=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBLoadFullscreen ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
618 gui_save_pos=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBSaveWinPos ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
619 gtkShowVideoWindow=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
620 stop_xscreensaver=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBStopXScreenSaver ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
621 gtkEnablePlayBar=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBPlayBar ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
622 player_idle_mode=!gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBNoIdle ) );
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
623 mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
624
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
625 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) { gtkCacheSize=(int)SBCacheadj->value; gtkCacheOn=1; }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
626 else gtkCacheOn=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
627
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
628 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) { gtkAutoSync=(int)SBAutoSyncadj->value; gtkAutoSyncOn=1; }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
629 else gtkAutoSyncOn=0;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
630
33740
2c02269701bd Remove macros guiSetFilename() and guiSetDF() from interface.h.
ib
parents: 33739
diff changeset
631 setdup( &dvd_device,gtk_entry_get_text( GTK_ENTRY( prEDVDDevice ) ) );
2c02269701bd Remove macros guiSetFilename() and guiSetDF() from interface.h.
ib
parents: 33739
diff changeset
632 setdup( &cdrom_device,gtk_entry_get_text( GTK_ENTRY( prECDRomDevice ) ) );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
633
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
634 case bCancel:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
635 HidePreferences();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
636 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
637 case bAConfig:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
638 if ( !ao_driver[0] ) break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
639 gtk_widget_set_sensitive( AConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
640 if ( !strncmp( ao_driver[0],"oss",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
641 !strncmp( ao_driver[0],"alsa",4 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
642 !strncmp( ao_driver[0],"esd",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
643 !strncmp( ao_driver[0],"sdl",3 ) ) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
644 ShowAudioConfig();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
645 gtk_widget_set_sensitive( AConfig,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
646 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
647 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
648 case bVconfig:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
649 if ( !vo_driver[0] ) break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
650 gtk_widget_set_sensitive( VConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
651 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
652 if ( !gstrcmp( vo_driver[0],"dxr3" ) ) { ShowDXR3Config(); gtk_widget_set_sensitive( VConfig,TRUE ); }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
653 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
654 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
655 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
656 case bLSubtitle:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
657 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
658 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
659 case bLFont:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
660 ShowFileSelect( fsFontSelector,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
661 gtkSetLayer( fsFileSelect );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
662 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
663 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
664 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
665
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
666 static gboolean prHScaler( GtkWidget * widget,GdkEventMotion * event,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
667 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
668 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
669 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
670 case 0: // extra stereo coefficient
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
671 if ( !guiInfo.Playing ) break;
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
672 mplayer( MPLAYER_SET_EXTRA_STEREO,HSExtraStereoMuladj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
673 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
674 case 1: // audio delay
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
675 audio_delay=HSAudioDelayadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
676 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
677 case 2: // panscan
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
678 mplayer( MPLAYER_SET_PANSCAN,HSPanscanadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
679 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
680 case 3: // sub delay
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
681 sub_delay=HSSubDelayadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
682 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
683 case 4: // sub position
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
684 sub_pos=(int)HSSubPositionadj->value;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
685 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
686 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
687 case 5: // font factor
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
688 mplayer( MPLAYER_SET_FONT_FACTOR,HSFontFactoradj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
689 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
690 #else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
691 case 6: // font blur
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
692 mplayer( MPLAYER_SET_FONT_BLUR,HSFontBluradj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
693 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
694 case 7: // font outline
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
695 mplayer( MPLAYER_SET_FONT_OUTLINE,HSFontOutLineadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
696 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
697 case 8: // text scale
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
698 mplayer( MPLAYER_SET_FONT_TEXTSCALE,HSFontTextScaleadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
699 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
700 case 9: // osd scale
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
701 mplayer( MPLAYER_SET_FONT_OSDSCALE,HSFontOSDScaleadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
702 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
703 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
704 case 10: // auto quality
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
705 mplayer( MPLAYER_SET_AUTO_QUALITY,HSPPQualityadj->value,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
706 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
707 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
708 return FALSE;
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 static void prToggled( GtkToggleButton * togglebutton,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
712 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
713 int window;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
714 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
715 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
716 case 0: // extra stereo coefficient
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
717 if ( guiInfo.Playing )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
718 gtk_widget_set_sensitive( HSExtraStereoMul,gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBExtraStereo ) ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
719 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
720 // case 1: // normalize
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
721 // case 2: // equalizer
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
722 // if ( guiInfo.Playing ) gtkMessageBox( GTK_MB_WARNING,"Please remember, this function need restart the playing." );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
723 // break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
724 case 3:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
725 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBShowVideoWindow ) ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
726 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
727 window=wsShowWindow;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
728 gtkActive( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
729 } else window=wsHideWindow;
33941
8beec562ce0e Remove dependency between gtkShowVideoWindow and gtkLoadFullscreen
ib
parents: 33938
diff changeset
730 // NOTE TO MYSELF: doesn't work with a fullscreen window
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
731 if ( !guiInfo.Playing ) wsVisibleWindow( &guiApp.subWindow,window );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
732 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
733 case 4:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
734 case 5:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
735 case 6:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
736 case 7:
33769
fd05ddb85f03 Cosmetic: Change parameter of mplayer() calls.
ib
parents: 33766
diff changeset
737 mplayer( MPLAYER_SET_FONT_AUTOSCALE,(int)user_data - 4,0 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
738 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
739 case 8:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
740 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBCache ) ) ) gtk_widget_set_sensitive( SBCache,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
741 else gtk_widget_set_sensitive( SBCache,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
742 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
743 case 9:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
744 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBAutoSync ) ) ) gtk_widget_set_sensitive( SBAutoSync,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
745 else gtk_widget_set_sensitive( SBAutoSync,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
746 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
747 #ifdef CONFIG_ASS
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
748 case 10:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
749 if ( gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( CBUseASS ) ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
750 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
751 gtk_widget_set_sensitive( CBASSUseMargins,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
752 gtk_widget_set_sensitive( SBASSTopMargin,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
753 gtk_widget_set_sensitive( SBASSBottomMargin,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
754 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
755 else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
756 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
757 gtk_widget_set_sensitive( CBASSUseMargins,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
758 gtk_widget_set_sensitive( SBASSTopMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
759 gtk_widget_set_sensitive( SBASSBottomMargin,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
760 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
761 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
762 #endif
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
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
766 static void prCListRow( GtkCList * clist,gint row,gint column,GdkEvent * event,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
767 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
768 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
769 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
770 case 0: // audio driver
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
771 gtk_clist_get_text( GTK_CLIST( CLADrivers ),row,0,(char **)&ao_driver );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
772 gtk_widget_set_sensitive( AConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
773 if ( !strncmp( ao_driver[0],"oss",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
774 !strncmp( ao_driver[0],"alsa",4 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
775 !strncmp( ao_driver[0],"esd",3 ) ||
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
776 !strncmp( ao_driver[0],"sdl",3 ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
777 gtk_widget_set_sensitive( AConfig,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
778 #ifndef CONFIG_GTK2
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
779 if ( !strncmp( ao_driver[0],"arts",4 ) )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
780 gtkMessageBox(GTK_MB_WARNING|GTK_MB_SIMPLE, MSGTR_PREFERENCES_ArtsBroken);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
781 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
782 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
783 case 1: // video driver
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
784 gtk_clist_get_text( GTK_CLIST( CLVDrivers ),row,0,(char **)&vo_driver );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
785 gtk_widget_set_sensitive( VConfig,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
786 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
787 if ( !gstrcmp( vo_driver[0],"dxr3" ) ) gtk_widget_set_sensitive( VConfig,TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
788 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
789 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
790 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
791 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
792
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
793 GtkWidget * create_Preferences( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
794 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
795 GtkWidget * label;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
796 GtkWidget * frame;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
797
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
798 GtkWidget * vbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
799 GtkWidget * notebook1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
800 GtkWidget * hbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
801 GtkWidget * vbox2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
802 GtkWidget * scrolledwindow3;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
803 GtkWidget * vbox3;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
804 GtkWidget * hbox8;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
805 GtkWidget * hbox2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
806 GtkWidget * vbox4;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
807 GtkWidget * scrolledwindow2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
808 GtkWidget * hbuttonbox3;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
809 GtkWidget * vbox5;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
810 GtkWidget * vbox6;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
811 GtkWidget * vbox600;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
812 GSList * OSD_group = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
813 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
814 GSList * Font_group = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
815 GList * CBFontEncoding_items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
816 GList * CBSubEncoding_items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
817 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
818 GtkWidget * vbox7;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
819 GtkWidget * vbox8;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
820 GtkWidget * table1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
821 GtkWidget * vbox9;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
822 GtkWidget * vbox603;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
823 GtkWidget * hbox6;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
824 GtkWidget * hbuttonbox5;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
825 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
826 GtkWidget * hbox7;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
827 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
828 GtkWidget * vbox601;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
829 GtkWidget * vbox602;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
830 GtkWidget * hbox5;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
831 GtkWidget * hbuttonbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
832 GtkAccelGroup * accel_group;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
833
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
834 GtkWidget * hbox9;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
835 GtkWidget * hbox91;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
836 GtkWidget * hbox92;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
837
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
838 accel_group=gtk_accel_group_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
839
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
840 Preferences=gtk_window_new( GTK_WINDOW_TOPLEVEL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
841 gtk_widget_set_name( Preferences,"Preferences" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
842 gtk_object_set_data( GTK_OBJECT( Preferences ),"Preferences",Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
843 gtk_window_set_title( GTK_WINDOW( Preferences ),MSGTR_Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
844 gtk_window_set_position( GTK_WINDOW( Preferences ),GTK_WIN_POS_CENTER );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
845 // gtk_window_set_policy( GTK_WINDOW( Preferences ),FALSE,FALSE,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
846 gtk_window_set_wmclass( GTK_WINDOW( Preferences ),"Preferences","MPlayer" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
847
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
848 gtk_widget_realize( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
849 gtkAddIcon( Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
850
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
851 vbox1=AddVBox( AddDialogFrame( Preferences ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
852 notebook1=gtk_notebook_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
853 gtk_widget_set_name( notebook1,"notebook1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
854 gtk_widget_show( notebook1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
855 gtk_box_pack_start( GTK_BOX( vbox1 ),notebook1,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
856
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
857 hbox1=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
858
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
859 frame=AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
860 frame=AddFrame( NULL,GTK_SHADOW_NONE,frame,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
861
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
862 // --- 1. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
863
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
864 vbox2=AddVBox( frame,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
865
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
866 scrolledwindow3=gtk_scrolled_window_new( NULL,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
867 gtk_widget_set_name( scrolledwindow3,"scrolledwindow3" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
868 gtk_widget_show( scrolledwindow3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
869 gtk_box_pack_start( GTK_BOX( vbox2 ),scrolledwindow3,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
870 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow3 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
871
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
872 CLADrivers=gtk_clist_new( 2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
873 gtk_widget_set_name( CLADrivers,"CLADrivers" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
874 gtk_widget_show( CLADrivers );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
875 gtk_container_add( GTK_CONTAINER( scrolledwindow3 ),CLADrivers );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
876 gtk_clist_set_column_width( GTK_CLIST( CLADrivers ),0,50 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
877 gtk_clist_column_titles_show( GTK_CLIST( CLADrivers ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
878 gtk_clist_set_shadow_type( GTK_CLIST( CLADrivers ),GTK_SHADOW_NONE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
879 gtk_widget_set_usize( CLADrivers,250,-2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
880 gtk_clist_set_column_widget( GTK_CLIST( CLADrivers ),0,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
881 AddLabel( MSGTR_PREFERENCES_AvailableDrivers,NULL ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
882
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
883 AConfig=AddButton( MSGTR_ConfigDriver,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
884 AddHButtonBox( vbox2 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
885
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
886 vbox3=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
887 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
888 AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox1,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
889 gtk_widget_set_usize( vbox3,250,-2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
890
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
891 CBNormalize=AddCheckButton( MSGTR_PREFERENCES_NormalizeSound,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
892 CBAudioEqualizer=AddCheckButton( MSGTR_PREFERENCES_EnableEqualizer,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
893 CBSoftwareMixer=AddCheckButton( MSGTR_PREFERENCES_SoftwareMixer,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
894 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
895 CBSurround=AddCheckButton( "Enable surround",vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
896 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
897
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
898 AddHSeparator( vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
899 CBExtraStereo=AddCheckButton( MSGTR_PREFERENCES_ExtraStereo,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
900 hbox8=AddHBox( vbox3,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
901 label=AddLabel( MSGTR_PREFERENCES_Coefficient,hbox8 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
902 // gtk_misc_set_padding( GTK_MISC( label ),20,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
903 HSExtraStereoMuladj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
904 HSExtraStereoMul=AddHScaler( HSExtraStereoMuladj,hbox8,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
905 AddHSeparator( vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
906
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
907 hbox8=AddHBox( vbox3,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
908 AddLabel( MSGTR_PREFERENCES_AudioDelay,hbox8 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
909
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
910 HSAudioDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10,10,0.01,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
911 HSAudioDelay=AddHScaler( HSAudioDelayadj,hbox8,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
912 label=AddLabel( MSGTR_PREFERENCES_Audio,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
913 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),0 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
914
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
915 // --- 2. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
916
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
917 hbox2=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
918
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
919 vbox4=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
920 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
921 AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,1 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
922
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
923 scrolledwindow2=gtk_scrolled_window_new( NULL,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
924 gtk_widget_set_name( scrolledwindow2,"scrolledwindow2" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
925 gtk_widget_show( scrolledwindow2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
926 gtk_box_pack_start( GTK_BOX( vbox4 ),scrolledwindow2,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
927 gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( scrolledwindow2 ),GTK_POLICY_NEVER,GTK_POLICY_AUTOMATIC );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
928
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
929 CLVDrivers=gtk_clist_new( 2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
930 gtk_widget_set_name( CLVDrivers,"CLVDrivers" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
931 gtk_widget_show( CLVDrivers );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
932 gtk_container_add( GTK_CONTAINER( scrolledwindow2 ),CLVDrivers );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
933 gtk_clist_set_column_width( GTK_CLIST( CLVDrivers ),0,50 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
934 gtk_clist_column_titles_show( GTK_CLIST( CLVDrivers ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
935 gtk_clist_set_shadow_type( GTK_CLIST( CLVDrivers ),GTK_SHADOW_NONE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
936 gtk_widget_set_usize( CLVDrivers,250,-2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
937
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
938 label=AddLabel( MSGTR_PREFERENCES_AvailableDrivers,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
939 gtk_clist_set_column_widget( GTK_CLIST( CLVDrivers ),0,label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
940
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
941 hbuttonbox3=AddHButtonBox( vbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
942 VConfig=AddButton( MSGTR_ConfigDriver,hbuttonbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
943
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
944 vbox5=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
945 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
946 AddFrame( NULL,GTK_SHADOW_ETCHED_OUT,hbox2,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
947 gtk_widget_set_usize( vbox5,250,-2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
948
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
949 CBDoubleBuffer=AddCheckButton( MSGTR_PREFERENCES_DoubleBuffer,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
950 CBDR=AddCheckButton( MSGTR_PREFERENCES_DirectRender,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
951 CBFramedrop=AddCheckButton( MSGTR_PREFERENCES_FrameDrop,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
952 CBHFramedrop=AddCheckButton( MSGTR_PREFERENCES_HFrameDrop,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
953 CBFlip=AddCheckButton( MSGTR_PREFERENCES_Flip,vbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
954
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
955 table1=gtk_table_new( 3,2,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
956 gtk_widget_set_name( table1,"table1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
957 gtk_widget_show( table1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
958 gtk_box_pack_start( GTK_BOX( vbox5 ),table1,FALSE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
959
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
960 label=AddLabel( MSGTR_PREFERENCES_Panscan,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
961 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
962
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
963 label=AddLabel( MSGTR_PREFERENCES_FPS,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
964 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
965
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
966 HSPanscanadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1,0.001,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
967 HSPanscan=AddHScaler( HSPanscanadj,NULL,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
968 gtk_table_attach( GTK_TABLE( table1 ),HSPanscan,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
969
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
970 HSFPSadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,1000,0.001,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
971 HSFPS=gtk_spin_button_new( GTK_ADJUSTMENT( HSFPSadj ),1,3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
972 gtk_widget_set_name( HSFPS,"HSFPS" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
973 gtk_widget_show( HSFPS );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
974 gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSFPS ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
975 gtk_table_attach( GTK_TABLE( table1 ),HSFPS,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
976
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
977 label=AddLabel( MSGTR_PREFERENCES_Video,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
978 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),1 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
979
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
980 // --- 3. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
981
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
982 vbox6=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
983
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
984 vbox600=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
985 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
986 AddFrame( MSGTR_PREFERENCES_FRAME_OSD_Level,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
987
33778
4fcbd59b4e78 Improve OSD preference related message texts.
ib
parents: 33777
diff changeset
988 RBOSDNone=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL0,&OSD_group,vbox600 );
4fcbd59b4e78 Improve OSD preference related message texts.
ib
parents: 33777
diff changeset
989 RBOSDIndicator=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL1,&OSD_group,vbox600 );
4fcbd59b4e78 Improve OSD preference related message texts.
ib
parents: 33777
diff changeset
990 RBOSDTandP=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL2,&OSD_group,vbox600 );
4fcbd59b4e78 Improve OSD preference related message texts.
ib
parents: 33777
diff changeset
991 RBOSDTPTT=AddRadioButton( MSGTR_PREFERENCES_OSD_LEVEL3,&OSD_group,vbox600 );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
992
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
993 vbox7=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
994 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
995 AddFrame( MSGTR_PREFERENCES_FRAME_Subtitle,GTK_SHADOW_ETCHED_OUT,vbox6,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
996
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
997 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
998 hbox4=AddHBox( vbox7,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
999
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1000 AddLabel( MSGTR_PREFERENCES_Subtitle,hbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1001
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1002 ESubtitleName=gtk_entry_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1003 gtk_widget_set_name( ESubtitleName,"ESubtitleName" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1004 gtk_widget_show( ESubtitleName );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1005 gtk_box_pack_start( GTK_BOX( hbox4 ),ESubtitleName,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1006
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1007 hbuttonbox4=AddHButtonBox( hbuttonbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1008 gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox4 ),3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1009 BLoadSubtitle=AddButton( MSGTR_Browse,hbuttonbox4 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1010 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1011
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1012 vbox8=AddVBox( vbox7,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1013
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1014 table1=gtk_table_new( 3,2,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1015 gtk_widget_set_name( table1,"table1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1016 gtk_widget_show( table1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1017 gtk_box_pack_start( GTK_BOX( vbox8 ),table1,FALSE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1018
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1019 label=AddLabel( MSGTR_PREFERENCES_SUB_Delay,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1020 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1021
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1022 label=AddLabel( MSGTR_PREFERENCES_SUB_POS,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1023 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1024
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1025 label=AddLabel( MSGTR_PREFERENCES_SUB_FPS,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1026 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1027
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1028 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1029 label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1030 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1031 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1032
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1033 HSSubDelayadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,-10.0,10,0.01,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1034 HSSubDelay=AddHScaler( HSSubDelayadj,NULL,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1035 gtk_table_attach( GTK_TABLE( table1 ),HSSubDelay,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1036
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1037 HSSubPositionadj=GTK_ADJUSTMENT( gtk_adjustment_new( 100,0,100,1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1038 HSSubPosition=AddHScaler( HSSubPositionadj,NULL,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1039 gtk_table_attach( GTK_TABLE( table1 ),HSSubPosition,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1040
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1041 HSSubFPSadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.01,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1042 HSSubFPS=gtk_spin_button_new( GTK_ADJUSTMENT( HSSubFPSadj ),1,3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1043 gtk_widget_set_name( HSSubFPS,"HSSubFPS" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1044 gtk_widget_show( HSSubFPS );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1045 gtk_widget_set_usize( HSSubFPS,60,-1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1046 gtk_spin_button_set_numeric( GTK_SPIN_BUTTON( HSSubFPS ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1047 gtk_table_attach( GTK_TABLE( table1 ),HSSubFPS,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1048
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1049 #ifdef CONFIG_ICONV
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1050 CBSubEncoding=gtk_combo_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1051 gtk_widget_set_name( CBSubEncoding,"CBSubEncoding" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1052 gtk_widget_show( CBSubEncoding );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1053 gtk_table_attach( GTK_TABLE( table1 ),CBSubEncoding,1,2,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1054 CBSubEncoding_items=g_list_append( CBSubEncoding_items,MSGTR_PREFERENCES_None );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1055 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1056 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1057 for ( i=0;lEncoding[i].name;i++ ) CBSubEncoding_items=g_list_append( CBSubEncoding_items,lEncoding[i].comment );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1058 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1059 gtk_combo_set_popdown_strings( GTK_COMBO( CBSubEncoding ),CBSubEncoding_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1060 g_list_free( CBSubEncoding_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1061
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1062 ESubEncoding=GTK_COMBO( CBSubEncoding )->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1063 gtk_widget_set_name( ESubEncoding,"ESubEncoding" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1064 gtk_entry_set_editable( GTK_ENTRY( ESubEncoding ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1065 gtk_widget_show( ESubEncoding );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1066 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1067
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1068 vbox9=AddVBox( vbox8,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1069
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1070 CBSubOverlap=AddCheckButton( MSGTR_PREFERENCES_SUB_Overlap,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1071 CBNoAutoSub=AddCheckButton( MSGTR_PREFERENCES_SUB_AutoLoad,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1072 CBSubUnicode=AddCheckButton( MSGTR_PREFERENCES_SUB_Unicode,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1073 CBDumpMPSub=AddCheckButton( MSGTR_PREFERENCES_SUB_MPSUB,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1074 CBDumpSrt=AddCheckButton( MSGTR_PREFERENCES_SUB_SRT,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1075
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1076 AddHSeparator( vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1077 CBUseASS=AddCheckButton( MSGTR_PREFERENCES_SUB_USE_ASS,vbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1078 hbox9=AddHBox( vbox9,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1079 CBASSUseMargins=AddCheckButton( MSGTR_PREFERENCES_SUB_ASS_USE_MARGINS,hbox9 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1080
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1081 hbox91=gtk_hbox_new( FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1082 gtk_widget_set_name( hbox91,"hbox91" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1083 gtk_box_pack_start( GTK_BOX( hbox9 ),hbox91,TRUE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1084 gtk_widget_show( hbox91 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1085 SBASSTopMargin=AddSpinButton( MSGTR_PREFERENCES_SUB_ASS_TOP_MARGIN,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1086 (GtkAdjustment *)gtk_adjustment_new(0,0,512,1,8,0),hbox91 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1087
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1088 hbox92=gtk_hbox_new( FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1089 gtk_widget_set_name( hbox92,"hbox92" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1090 gtk_box_pack_start( GTK_BOX( hbox9 ),hbox92,TRUE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1091 gtk_widget_show( hbox92 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1092 SBASSBottomMargin=AddSpinButton( MSGTR_PREFERENCES_SUB_ASS_BOTTOM_MARGIN,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1093 (GtkAdjustment *)gtk_adjustment_new(0,0,512,1,8,0),hbox92 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1094
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1095 label=AddLabel( MSGTR_PREFERENCES_SubtitleOSD,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1096 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),2 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1097 vbox601=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1098
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1099 // --- 4. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1100
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1101 vbox603=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1102 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1103 AddFrame( MSGTR_PREFERENCES_FRAME_Font,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1104
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1105 hbox6=AddHBox( vbox603,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1106 AddLabel( MSGTR_PREFERENCES_Font,hbox6 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1107 prEFontName=gtk_entry_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1108 gtk_widget_set_name( prEFontName,"prEFontName" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1109 gtk_widget_show( prEFontName );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1110 gtk_box_pack_start( GTK_BOX( hbox6 ),prEFontName,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1111 hbuttonbox5=AddHButtonBox( hbox6 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1112 gtk_container_set_border_width( GTK_CONTAINER( hbuttonbox5 ),3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1113 BLoadFont=AddButton( MSGTR_Browse,hbuttonbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1114
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1115 #ifndef CONFIG_FREETYPE
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1116 hbox7=AddHBox( vbox603,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1117 AddLabel( MSGTR_PREFERENCES_FontFactor,hbox7 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1118 HSFontFactoradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10,0.05,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1119 HSFontFactor=AddHScaler( HSFontFactoradj,hbox7,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1120 #else
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1121
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1122 RBFontNoAutoScale=AddRadioButton( MSGTR_PREFERENCES_FontNoAutoScale,&Font_group,vbox603 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1123 RBFontAutoScaleHeight=AddRadioButton( MSGTR_PREFERENCES_FontPropHeight,&Font_group,vbox603 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1124 RBFontAutoScaleWidth=AddRadioButton( MSGTR_PREFERENCES_FontPropWidth,&Font_group,vbox603 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1125 RBFontAutoScaleDiagonal=AddRadioButton( MSGTR_PREFERENCES_FontPropDiagonal,&Font_group,vbox603 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1126
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1127 table1=gtk_table_new( 3,2,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1128 gtk_widget_set_name( table1,"table1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1129 gtk_widget_show( table1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1130 gtk_box_pack_start( GTK_BOX( vbox603 ),table1,FALSE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1131
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1132 label=AddLabel( MSGTR_PREFERENCES_FontEncoding,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1133 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1134
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1135 CBFontEncoding=gtk_combo_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1136 gtk_widget_set_name( CBFontEncoding,"CBFontEncoding" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1137 gtk_widget_show( CBFontEncoding );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1138 gtk_table_attach( GTK_TABLE( table1 ),CBFontEncoding,1,2,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1139 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1140 int i;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1141 for ( i=0;lEncoding[i].name;i++ ) CBFontEncoding_items=g_list_append( CBFontEncoding_items,lEncoding[i].comment );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1142 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1143 gtk_combo_set_popdown_strings( GTK_COMBO( CBFontEncoding ),CBFontEncoding_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1144 g_list_free( CBFontEncoding_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1145
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1146 EFontEncoding=GTK_COMBO( CBFontEncoding )->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1147 gtk_widget_set_name( EFontEncoding,"EFontEncoding" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1148 gtk_entry_set_editable( GTK_ENTRY( EFontEncoding ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1149 gtk_widget_show( EFontEncoding );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1150
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1151 label=AddLabel( MSGTR_PREFERENCES_FontBlur,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1152 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1153
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1154 HSFontBluradj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1155 HSFontBlur=AddHScaler( HSFontBluradj,NULL,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1156 gtk_table_attach( GTK_TABLE( table1 ),HSFontBlur,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1157
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1158 label=AddLabel( MSGTR_PREFERENCES_FontOutLine,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1159 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,2,3,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1160
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1161 HSFontOutLineadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1162 HSFontOutLine=AddHScaler( HSFontOutLineadj,NULL,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1163 gtk_table_attach( GTK_TABLE( table1 ),HSFontOutLine,1,2,2,3,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1164
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1165 label=AddLabel( MSGTR_PREFERENCES_FontTextScale,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1166 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,3,4,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1167
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1168 HSFontTextScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1169 HSFontTextScale=AddHScaler( HSFontTextScaleadj,NULL,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1170 gtk_table_attach( GTK_TABLE( table1 ),HSFontTextScale,1,2,3,4,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1171
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1172 label=AddLabel( MSGTR_PREFERENCES_FontOSDScale,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1173 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,4,5,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1174
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1175 HSFontOSDScaleadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0.1,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1176 HSFontOSDScale=AddHScaler( HSFontOSDScaleadj,NULL,2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1177 gtk_table_attach( GTK_TABLE( table1 ),HSFontOSDScale,1,2,4,5,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1178 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1179
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1180 label=AddLabel( MSGTR_PREFERENCES_FRAME_Font,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1181 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),3 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1182
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1183 // --- 5. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1184
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1185 vbox601=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1186
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1187 vbox602=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1188 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1189 AddFrame( MSGTR_PREFERENCES_FRAME_CodecDemuxer,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1190
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1191 CBNonInterlaved=AddCheckButton( MSGTR_PREFERENCES_NI,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1192 CBIndex=AddCheckButton( MSGTR_PREFERENCES_IDX,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1193
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1194 hbox5=AddHBox( vbox602,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1195
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1196 AddLabel( MSGTR_PREFERENCES_VideoCodecFamily,hbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1197
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1198 CBVFM=gtk_combo_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1199 gtk_widget_set_name( CBVFM,"CBVFM" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1200 gtk_widget_show( CBVFM );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1201 gtk_box_pack_start( GTK_BOX( hbox5 ),CBVFM,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1202
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1203 EVFM=GTK_COMBO( CBVFM )->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1204 gtk_widget_set_name( EVFM,"CEVFM" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1205 gtk_entry_set_editable( GTK_ENTRY( EVFM ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1206 gtk_widget_show( EVFM );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1207
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1208 hbox5=AddHBox( vbox602,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1209
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1210 AddLabel( MSGTR_PREFERENCES_AudioCodecFamily,hbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1211
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1212 CBAFM=gtk_combo_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1213 gtk_widget_set_name( CBAFM,"CBAFM" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1214 gtk_widget_show( CBAFM );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1215 gtk_box_pack_start( GTK_BOX( hbox5 ),CBAFM,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1216
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1217 EAFM=GTK_COMBO( CBAFM )->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1218 gtk_widget_set_name( EAFM,"EAFM" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1219 gtk_entry_set_editable( GTK_ENTRY( EAFM ),FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1220 gtk_widget_show( EAFM );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1221
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1222 label=AddLabel( MSGTR_PREFERENCES_Codecs,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1223 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),4 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1224
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1225 vbox601=AddVBox( notebook1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1226
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1227 // --- 6. page
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1228
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1229 vbox602=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1230 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1231 AddFrame( MSGTR_PREFERENCES_FRAME_PostProcess,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1232
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1233 CBPostprocess=AddCheckButton( MSGTR_PREFERENCES_PostProcess,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1234
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1235 hbox5=AddHBox( vbox602,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1236
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1237 AddLabel( MSGTR_PREFERENCES_AutoQuality,hbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1238
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1239 if ( guiInfo.sh_video && guiInfo.Playing ) HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,get_video_quality_max( guiInfo.sh_video ),0,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1240 else HSPPQualityadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,100,0,0,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1241 HSPPQuality=AddHScaler( HSPPQualityadj,hbox5,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1242
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1243 vbox602=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1244 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1245 AddFrame( MSGTR_PREFERENCES_FRAME_Cache,GTK_SHADOW_ETCHED_OUT,vbox601,0 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1246
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1247 CBCache=AddCheckButton( MSGTR_PREFERENCES_Cache,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1248
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1249 hbox5=AddHBox( vbox602,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1250
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1251 AddLabel( MSGTR_PREFERENCES_CacheSize,hbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1252
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1253 SBCacheadj=GTK_ADJUSTMENT( gtk_adjustment_new( gtkCacheSize,32,1048576,1,32,0 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1254 SBCache=gtk_spin_button_new( GTK_ADJUSTMENT( SBCacheadj ),1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1255 gtk_widget_show( SBCache );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1256 gtk_box_pack_start( GTK_BOX( hbox5 ),SBCache,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1257
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1258 vbox602=AddVBox(
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1259 AddFrame( NULL,GTK_SHADOW_NONE,
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1260 AddFrame( MSGTR_PREFERENCES_FRAME_Misc,GTK_SHADOW_ETCHED_OUT,vbox601,1 ),1 ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1261
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1262 CBShowVideoWindow=AddCheckButton( MSGTR_PREFERENCES_ShowVideoWindow,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1263 CBLoadFullscreen=AddCheckButton( MSGTR_PREFERENCES_LoadFullscreen,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1264 CBSaveWinPos=AddCheckButton( MSGTR_PREFERENCES_SaveWinPos,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1265 CBStopXScreenSaver=AddCheckButton( MSGTR_PREFERENCES_XSCREENSAVER,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1266 CBPlayBar=AddCheckButton( MSGTR_PREFERENCES_PlayBar,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1267 CBNoIdle=AddCheckButton( MSGTR_PREFERENCES_NoIdle,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1268
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1269 AddHSeparator( vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1270
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1271 CBAutoSync=AddCheckButton( MSGTR_PREFERENCES_AutoSync,vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1272 hbox5=AddHBox( vbox602,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1273 AddLabel( MSGTR_PREFERENCES_AutoSyncValue,hbox5 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1274 SBAutoSyncadj=GTK_ADJUSTMENT( gtk_adjustment_new( 0,0,10000,1,10,10 ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1275 SBAutoSync=gtk_spin_button_new( GTK_ADJUSTMENT( SBAutoSyncadj ),1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1276 gtk_widget_show( SBAutoSync );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1277 gtk_box_pack_start( GTK_BOX( hbox5 ),SBAutoSync,TRUE,TRUE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1278
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1279 AddHSeparator( vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1280
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1281 table1=gtk_table_new( 2,2,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1282 gtk_widget_set_name( table1,"table1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1283 gtk_widget_show( table1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1284 gtk_box_pack_start( GTK_BOX( vbox602 ),table1,FALSE,FALSE,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1285
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1286 label=AddLabel( MSGTR_PREFERENCES_DVDDevice,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1287 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,0,1,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1288 prEDVDDevice=gtk_entry_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1289 gtk_widget_set_name( prEDVDDevice,"prEDVDDevice" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1290 gtk_widget_show( prEDVDDevice );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1291 gtk_table_attach( GTK_TABLE( table1 ),prEDVDDevice,1,2,0,1,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1292
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1293 label=AddLabel( MSGTR_PREFERENCES_CDROMDevice,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1294 gtk_table_attach( GTK_TABLE( table1 ),label,0,1,1,2,(GtkAttachOptions)( GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1295 prECDRomDevice=gtk_entry_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1296 gtk_widget_set_name( prECDRomDevice,"prECDRomDevice" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1297 gtk_widget_show( prECDRomDevice );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1298 gtk_table_attach( GTK_TABLE( table1 ),prECDRomDevice,1,2,1,2,(GtkAttachOptions)( GTK_EXPAND | GTK_FILL ),(GtkAttachOptions)( 0 ),0,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1299
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1300 // AddHSeparator( vbox602 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1301
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1302 label=AddLabel( MSGTR_PREFERENCES_Misc,NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1303 gtk_notebook_set_tab_label( GTK_NOTEBOOK( notebook1 ),gtk_notebook_get_nth_page( GTK_NOTEBOOK( notebook1 ),5 ),label );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1304
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1305 // ---
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1306
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1307 AddHSeparator( vbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1308
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1309 hbuttonbox1=AddHButtonBox( vbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1310 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1311 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1312 BOk=AddButton( MSGTR_Ok,hbuttonbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1313 BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1314
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1315 gtk_widget_add_accelerator( BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1316 gtk_widget_add_accelerator( BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1317
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1318 gtk_signal_connect( GTK_OBJECT( Preferences ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&Preferences );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1319
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1320 gtk_signal_connect( GTK_OBJECT( AConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bAConfig );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1321 gtk_signal_connect( GTK_OBJECT( BOk ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bOk );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1322 gtk_signal_connect( GTK_OBJECT( BCancel ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bCancel );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1323 gtk_signal_connect( GTK_OBJECT( VConfig ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bVconfig );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1324 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1325 gtk_signal_connect( GTK_OBJECT( BLoadSubtitle ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bLSubtitle );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1326 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1327 gtk_signal_connect( GTK_OBJECT( BLoadFont ),"clicked",GTK_SIGNAL_FUNC( prButton ),(void*)bLFont );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1328
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1329 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1330 gtk_signal_connect( GTK_OBJECT( CBNormalize ),"toggled",GTK_SIGNAL_FUNC( on_CBNormalize_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1331 gtk_signal_connect( GTK_OBJECT( CBSoftwareMixer ),"toggled",GTK_SIGNAL_FUNC( on_CBSoftwareMixer_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1332 gtk_signal_connect( GTK_OBJECT( CBSurround ),"toggled",GTK_SIGNAL_FUNC( on_CBSurround_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1333 gtk_signal_connect( GTK_OBJECT( CBExtraStereo ),"toggled",GTK_SIGNAL_FUNC( on_CBExtraStereo_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1334 gtk_signal_connect( GTK_OBJECT( CBDoubleBuffer ),"toggled",GTK_SIGNAL_FUNC( on_CBDoubleBuffer_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1335 gtk_signal_connect( GTK_OBJECT( CBDR ),"toggled",GTK_SIGNAL_FUNC( on_CBDR_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1336 gtk_signal_connect( GTK_OBJECT( CBFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBFramedrop_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1337 gtk_signal_connect( GTK_OBJECT( CBHFramedrop ),"toggled",GTK_SIGNAL_FUNC( on_CBHFramedrop_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1338 gtk_signal_connect( GTK_OBJECT( CBFullScreen ),"toggled",GTK_SIGNAL_FUNC( on_CBFullScreen_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1339 gtk_signal_connect( GTK_OBJECT( CBNonInterlaved ),"toggled",GTK_SIGNAL_FUNC( on_CBNonInterlaved_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1340 gtk_signal_connect( GTK_OBJECT( CBFlip ),"toggled",GTK_SIGNAL_FUNC( on_CBFlip_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1341 gtk_signal_connect( GTK_OBJECT( CBPostprocess ),"toggled",GTK_SIGNAL_FUNC( on_CBPostprocess_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1342 gtk_signal_connect( GTK_OBJECT( CBNoAutoSub ),"toggled",GTK_SIGNAL_FUNC( on_CBNoAutoSub_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1343 gtk_signal_connect( GTK_OBJECT( CBSubUnicode ),"toggled",GTK_SIGNAL_FUNC( on_CNSubUnicode_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1344 gtk_signal_connect( GTK_OBJECT( CBDumpMPSub ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpMPSub_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1345 gtk_signal_connect( GTK_OBJECT( CBDumpSrt ),"toggled",GTK_SIGNAL_FUNC( on_CBDumpSrt_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1346 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1347 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1348 gtk_signal_connect( GTK_OBJECT( RBOSDNone ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDNone_toggled ),NULL );
33777
235c6f2514be Arrange OSD preferences according to option 'osdlevel'.
ib
parents: 33769
diff changeset
1349 gtk_signal_connect( GTK_OBJECT( RBOSDIndicator ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1350 gtk_signal_connect( GTK_OBJECT( RBOSDTandP ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDTandP_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1351 gtk_signal_connect( GTK_OBJECT( RBOSDTPTT ),"toggled",GTK_SIGNAL_FUNC( on_RBOSDIndicator_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1352 gtk_signal_connect( GTK_OBJECT( CBAudioEqualizer ),"toggled",GTK_SIGNAL_FUNC( on_CBAudioEqualizer_toggled ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1353 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1354 #if 0
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1355 gtk_signal_connect( GTK_OBJECT( HSAudioDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSAudioDelay_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1356 gtk_signal_connect( GTK_OBJECT( HSPanscan ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPanscan_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1357 gtk_signal_connect( GTK_OBJECT( label2 ),"motion_notify_event",GTK_SIGNAL_FUNC( on_label2_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1358 gtk_signal_connect( GTK_OBJECT( HSSubDelay ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubDelay_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1359 gtk_signal_connect( GTK_OBJECT( HSSubPosition ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubPosition_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1360 gtk_signal_connect( GTK_OBJECT( HSSubFPS ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSSubFPS_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1361 gtk_signal_connect( GTK_OBJECT( HSFontFactor ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSFontFactor_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1362 gtk_signal_connect( GTK_OBJECT( HSPPQuality ),"motion_notify_event",GTK_SIGNAL_FUNC( on_HSPPQuality_motion_notify_event ),NULL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1363 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1364
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1365 gtk_notebook_set_page( GTK_NOTEBOOK( notebook1 ),2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1366
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1367 gtk_window_add_accel_group( GTK_WINDOW( Preferences ),accel_group );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1368
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1369 return Preferences;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1370 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1371
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1372 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1373 static GList *appendOSSDevices(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1374 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1375 // careful! the current implementation allows only string constants!
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1376 l = g_list_append(l, (gpointer)"/dev/dsp");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1377 if (gtkAOOSSDevice && strncmp(gtkAOOSSDevice, "/dev/sound", 10) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1378 l = g_list_append(l, (gpointer)"/dev/sound/dsp0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1379 l = g_list_append(l, (gpointer)"/dev/sound/dsp1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1380 l = g_list_append(l, (gpointer)"/dev/sound/dsp2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1381 l = g_list_append(l, (gpointer)"/dev/sound/dsp3");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1382 } else {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1383 l = g_list_append(l, (gpointer)"/dev/dsp0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1384 l = g_list_append(l, (gpointer)"/dev/dsp1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1385 l = g_list_append(l, (gpointer)"/dev/dsp2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1386 l = g_list_append(l, (gpointer)"/dev/dsp3");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1387 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1388 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1389 l = g_list_append(l, (gpointer)"/dev/em8300_ma");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1390 l = g_list_append(l, (gpointer)"/dev/em8300_ma-0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1391 l = g_list_append(l, (gpointer)"/dev/em8300_ma-1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1392 l = g_list_append(l, (gpointer)"/dev/em8300_ma-2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1393 l = g_list_append(l, (gpointer)"/dev/em8300_ma-3");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1394 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1395 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1396 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1397
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1398 static GList *appendOSSMixers(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1399 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1400 // careful! the current implementation allows only string constants!
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1401 l = g_list_append(l, (gpointer)"/dev/mixer");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1402 if (gtkAOOSSMixer && strncmp(gtkAOOSSMixer, "/dev/sound", 10) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1403 l = g_list_append(l, (gpointer)"/dev/sound/mixer0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1404 l = g_list_append(l, (gpointer)"/dev/sound/mixer1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1405 l = g_list_append(l, (gpointer)"/dev/sound/mixer2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1406 l = g_list_append(l, (gpointer)"/dev/sound/mixer3");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1407 } else {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1408 l = g_list_append(l, (gpointer)"/dev/mixer0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1409 l = g_list_append(l, (gpointer)"/dev/mixer1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1410 l = g_list_append(l, (gpointer)"/dev/mixer2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1411 l = g_list_append(l, (gpointer)"/dev/mixer3");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1412 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1413 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1414 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1415
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1416 static GList *appendOSSMixerChannels(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1417 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1418 l = g_list_append(l, (gpointer)"vol");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1419 l = g_list_append(l, (gpointer)"pcm");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1420 l = g_list_append(l, (gpointer)"line");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1421 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1422 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1423 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1424
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1425 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1426 static GList *appendALSADevices(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1427 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1428 l = g_list_append(l, (gpointer)"default");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1429 l = g_list_append(l, (gpointer)"hw=0.0");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1430 l = g_list_append(l, (gpointer)"hw=0.1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1431 l = g_list_append(l, (gpointer)"hw=0.2");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1432 l = g_list_append(l, (gpointer)"surround40");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1433 l = g_list_append(l, (gpointer)"surround51");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1434 l = g_list_append(l, (gpointer)"plug=surround40");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1435 l = g_list_append(l, (gpointer)"plug=surround51");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1436 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1437 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1438
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1439 static GList *appendALSAMixers(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1440 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1441 l = g_list_append(l, (gpointer)"default");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1442 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1443 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1444
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1445 static GList *appendALSAMixerChannels(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1446 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1447 l = g_list_append(l, (gpointer)"Master");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1448 l = g_list_append(l, (gpointer)"Line");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1449 l = g_list_append(l, (gpointer)"PCM");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1450 l = g_list_append(l, (gpointer)"PCM,1");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1451 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1452 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1453 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1454
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1455 #ifdef CONFIG_SDL
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1456 static GList *appendSDLDevices(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1457 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1458 l = g_list_append(l, (gpointer)"alsa");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1459 l = g_list_append(l, (gpointer)"arts");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1460 l = g_list_append(l, (gpointer)"esd");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1461 l = g_list_append(l, (gpointer)"jack");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1462 l = g_list_append(l, (gpointer)"oss");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1463 l = g_list_append(l, (gpointer)"nas");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1464 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1465 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1466 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1467
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1468 #ifdef CONFIG_ESD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1469 static GList *appendESDDevices(GList *l)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1470 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1471 l = g_list_append(l, (gpointer)"Enter Remote IP");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1472 l = g_list_append(l, (gpointer)"Use Software Mixer");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1473 return l;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1474 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1475 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1476
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1477 // Gets text string from a gtk entry, interpreting
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1478 // MSGTR_PREFERENCES_DriverDefault as null string.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1479 static const char *getGtkEntryText(GtkWidget *from)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1480 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1481 const char *tmp = gtk_entry_get_text(GTK_ENTRY(from));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1482 if (strcmp(tmp, MSGTR_PREFERENCES_DriverDefault) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1483 tmp = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1484 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1485 return tmp;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1486 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1487
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1488 // Sets text string of a gtk entry, interpreting
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1489 // null string as MSGTR_PREFERENCES_DriverDefault.
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1490 static void setGtkEntryText(GtkWidget *dest, char *to)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1491 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1492 if (!to) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1493 to = MSGTR_PREFERENCES_DriverDefault;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1494 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1495 gtk_entry_set_text(GTK_ENTRY(dest),to);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1496 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1497
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1498 GtkWidget *AudioConfig;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1499 static GtkWidget *CEAudioDevice;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1500 static GtkWidget *CBAudioDevice;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1501 static GtkWidget *CEAudioMixer;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1502 static GtkWidget *CBAudioMixer;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1503 static GtkWidget *CEAudioMixerChannel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1504 static GtkWidget *CBAudioMixerChannel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1505 static GtkWidget *BAudioOk;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1506 static GtkWidget *BAudioCancel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1507
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1508 void ShowAudioConfig( void ) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1509 if (AudioConfig) gtkActive(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1510 else AudioConfig = create_AudioConfig();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1511
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1512 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1513 if (strncmp(ao_driver[0], "oss", 3) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1514 setGtkEntryText(CEAudioDevice, gtkAOOSSDevice);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1515 setGtkEntryText(CEAudioMixer, gtkAOOSSMixer);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1516 setGtkEntryText(CEAudioMixerChannel, gtkAOOSSMixerChannel);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1517 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1518 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1519 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1520 if (strncmp(ao_driver[0], "alsa", 4) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1521 setGtkEntryText(CEAudioDevice, gtkAOALSADevice);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1522 setGtkEntryText(CEAudioMixer, gtkAOALSAMixer);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1523 setGtkEntryText(CEAudioMixerChannel, gtkAOALSAMixerChannel);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1524 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1525 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1526 #ifdef CONFIG_SDL
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1527 if (strncmp(ao_driver[0], "sdl", 3) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1528 setGtkEntryText(CEAudioDevice, gtkAOSDLDriver);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1529 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1530 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1531 #ifdef CONFIG_ESD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1532 if (strncmp(ao_driver[0], "esd", 3) == 0) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1533 setGtkEntryText(CEAudioDevice, gtkAOESDDevice);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1534 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1535 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1536
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1537 gtk_widget_show(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1538 gtkSetLayer(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1539 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1540
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1541 void HideAudioConfig( void ) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1542 if (!AudioConfig) return;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1543 gtk_widget_hide(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1544 gtk_widget_destroy(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1545 AudioConfig=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1546 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1547
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1548 static void audioButton(GtkButton *button, gpointer user_data) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1549 switch( (int)user_data ) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1550 case 1:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1551 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1552 if (strncmp(ao_driver[0], "oss", 3) == 0) {
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1553 nfree(gtkAOOSSDevice);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1554 gtkAOOSSDevice = gstrdup(getGtkEntryText(CEAudioDevice));
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1555 nfree(gtkAOOSSMixer);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1556 gtkAOOSSMixer = gstrdup(getGtkEntryText(CEAudioMixer));
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1557 nfree(gtkAOOSSMixerChannel);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1558 gtkAOOSSMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1559 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1560 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1561 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1562 if (strncmp(ao_driver[0], "alsa", 4) == 0) {
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1563 nfree(gtkAOALSADevice);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1564 gtkAOALSADevice = gstrdup(getGtkEntryText(CEAudioDevice));
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1565 nfree(gtkAOALSAMixer);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1566 gtkAOALSAMixer = gstrdup(getGtkEntryText(CEAudioMixer));
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1567 nfree(gtkAOALSAMixerChannel);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1568 gtkAOALSAMixerChannel = gstrdup(getGtkEntryText(CEAudioMixerChannel));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1569 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1570 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1571 #ifdef CONFIG_SDL
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1572 if (strncmp(ao_driver[0], "sdl", 3) == 0) {
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1573 nfree(gtkAOSDLDriver);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1574 gtkAOSDLDriver = gstrdup(getGtkEntryText(CEAudioDevice));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1575 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1576 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1577 #ifdef CONFIG_ESD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1578 if (strncmp(ao_driver[0], "esd", 3) == 0) {
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1579 nfree(gtkAOESDDevice);
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1580 gtkAOESDDevice = gstrdup(getGtkEntryText(CEAudioDevice));
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1581 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1582 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1583 case 0:
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1584 HideAudioConfig();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1585 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1586 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1587 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1588
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1589 GtkWidget *create_AudioConfig( void ) {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1590 GList *items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1591 GtkWidget *vbox;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1592 GtkWidget *table;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1593 GtkWidget *label;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1594 GtkWidget *hbuttonbox;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1595 GtkAccelGroup *accel_group;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1596
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1597 AudioConfig = gtk_window_new(GTK_WINDOW_TOPLEVEL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1598 gtk_widget_set_name(AudioConfig, "AudioConfig");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1599 gtk_object_set_data(GTK_OBJECT(AudioConfig), "AudioConfig", AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1600 gtk_window_set_title(GTK_WINDOW(AudioConfig), MSGTR_AudioPreferences);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1601 gtk_window_set_position(GTK_WINDOW(AudioConfig), GTK_WIN_POS_CENTER);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1602 gtk_window_set_policy(GTK_WINDOW(AudioConfig), FALSE, FALSE, FALSE);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1603 gtk_window_set_wmclass(GTK_WINDOW(AudioConfig), "Audio Config", "MPlayer");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1604
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1605 gtk_widget_realize(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1606 gtkAddIcon(AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1607
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1608 vbox = AddVBox(AddDialogFrame(AudioConfig), 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1609
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1610 table = gtk_table_new(2, 3, FALSE);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1611 gtk_widget_set_name(table, "table");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1612 gtk_widget_show(table);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1613 gtk_box_pack_start(GTK_BOX(vbox), table, TRUE, TRUE, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1614
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1615 label = AddLabel(MSGTR_PREFERENCES_Audio_Device, NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1616 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 0, 1, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1617
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1618 CBAudioDevice = AddComboBox(NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1619 gtk_table_attach(GTK_TABLE(table), CBAudioDevice, 1, 2, 0, 1, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1620 items = g_list_append(items,(gpointer)MSGTR_PREFERENCES_DriverDefault);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1621 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1622 if (strncmp(ao_driver[0], "oss", 3) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1623 items = appendOSSDevices(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1624 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1625 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1626 if (strncmp(ao_driver[0], "alsa", 4) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1627 items = appendALSADevices(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1628 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1629 #ifdef CONFIG_SDL
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1630 if (strncmp(ao_driver[0], "sdl", 3) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1631 items = appendSDLDevices(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1632 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1633 #ifdef CONFIG_ESD
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1634 if (strncmp(ao_driver[0], "esd", 3) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1635 items = appendESDDevices(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1636 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1637 gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioDevice), items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1638 g_list_free(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1639 items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1640
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1641 CEAudioDevice = GTK_COMBO(CBAudioDevice)->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1642 gtk_widget_set_name(CEAudioDevice, "CEAudioDevice");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1643 gtk_widget_show(CEAudioDevice);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1644
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1645 label = AddLabel(MSGTR_PREFERENCES_Audio_Mixer, NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1646 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 1, 2, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1647
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1648 CBAudioMixer = AddComboBox(NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1649 gtk_table_attach(GTK_TABLE(table), CBAudioMixer, 1, 2, 1, 2, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1650 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1651 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1652 if (strncmp(ao_driver[0], "oss", 3) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1653 items = appendOSSMixers(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1654 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1655 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1656 if (strncmp(ao_driver[0], "alsa", 4) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1657 items = appendALSAMixers(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1658 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1659 gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixer), items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1660 g_list_free(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1661 items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1662
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1663 CEAudioMixer = GTK_COMBO(CBAudioMixer)->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1664 gtk_widget_set_name(CEAudioMixer, "CEAudioMixer");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1665 gtk_widget_show(CEAudioMixer);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1666
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1667 label = AddLabel(MSGTR_PREFERENCES_Audio_MixerChannel, NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1668 gtk_table_attach(GTK_TABLE(table), label, 0, 1, 2, 3, (GtkAttachOptions)(GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1669
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1670 CBAudioMixerChannel = AddComboBox(NULL);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1671 gtk_table_attach(GTK_TABLE(table), CBAudioMixerChannel, 1, 2, 2, 3, (GtkAttachOptions)(GTK_EXPAND | GTK_FILL), (GtkAttachOptions)(0), 0, 0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1672 items = g_list_append(items, (gpointer)MSGTR_PREFERENCES_DriverDefault);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1673 #ifdef CONFIG_OSS_AUDIO
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1674 if (strncmp(ao_driver[0], "oss", 3) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1675 items = appendOSSMixerChannels(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1676 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1677 #ifdef CONFIG_ALSA
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1678 if (strncmp(ao_driver[0], "alsa", 4) == 0)
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1679 items = appendALSAMixerChannels(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1680 #endif
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1681 gtk_combo_set_popdown_strings(GTK_COMBO(CBAudioMixerChannel), items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1682 g_list_free(items);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1683 items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1684
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1685 CEAudioMixerChannel = GTK_COMBO(CBAudioMixerChannel)->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1686 gtk_widget_set_name(CEAudioMixerChannel, "CEAudioMixerChannel");
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1687 gtk_widget_show(CEAudioMixerChannel);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1688
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1689 AddHSeparator(vbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1690
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1691 hbuttonbox = AddHButtonBox(vbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1692 gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox), GTK_BUTTONBOX_END);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1693 gtk_button_box_set_spacing(GTK_BUTTON_BOX(hbuttonbox), 10);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1694 BAudioOk = AddButton(MSGTR_Ok, hbuttonbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1695 BAudioCancel = AddButton(MSGTR_Cancel, hbuttonbox);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1696
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1697 gtk_signal_connect(GTK_OBJECT(AudioConfig), "destroy", GTK_SIGNAL_FUNC(WidgetDestroy), &AudioConfig);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1698 gtk_signal_connect(GTK_OBJECT(BAudioOk), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)1);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1699 gtk_signal_connect(GTK_OBJECT(BAudioCancel), "clicked", GTK_SIGNAL_FUNC(audioButton), (void*)0);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1700
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1701 accel_group = gtk_accel_group_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1702 gtk_widget_add_accelerator(BAudioOk, "clicked", accel_group, GDK_Return, 0, GTK_ACCEL_VISIBLE);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1703 gtk_widget_add_accelerator(BAudioCancel, "clicked", accel_group, GDK_Escape, 0, GTK_ACCEL_VISIBLE);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1704 gtk_window_add_accel_group(GTK_WINDOW(AudioConfig), accel_group);
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1705
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1706 return AudioConfig;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1707 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1708
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1709 #ifdef CONFIG_DXR3
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1710 // --- dxr3 config box
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1711
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1712 static GtkWidget * DXR3Config;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1713 static GtkWidget * CBDevice;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1714 static GtkWidget * CEDXR3Device;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1715 static GtkWidget * RBVNone;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1716 static GtkWidget * RBVLavc;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1717 static GtkWidget * dxr3BOk;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1718 static GtkWidget * dxr3BCancel;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1719
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1720 GtkWidget * create_DXR3Config( void );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1721
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1722 void ShowDXR3Config( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1723 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1724 if ( DXR3Config ) gtkActive( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1725 else DXR3Config=create_DXR3Config();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1726
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1727 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),gtkDXR3Device );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1728
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1729 gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVNone ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1730 if ( gtkVfLAVC ) gtk_toggle_button_set_active( GTK_TOGGLE_BUTTON( RBVLavc ),TRUE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1731
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1732 gtk_widget_show( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1733 gtkSetLayer( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1734 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1735
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1736 void HideDXR3Config( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1737 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1738 if ( !DXR3Config ) return;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1739 gtk_widget_hide( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1740 gtk_widget_destroy( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1741 DXR3Config=NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1742 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1743
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1744 static void dxr3Button( GtkButton * button,gpointer user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1745 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1746 switch ( (int)user_data )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1747 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1748 case 0: // Ok
33739
9f6d46d325de Remove gfree() from interface.c.
ib
parents: 33737
diff changeset
1749 nfree( gtkDXR3Device ); gtkDXR3Device=strdup( gtk_entry_get_text( GTK_ENTRY( CEDXR3Device ) ) );
33572
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1750 gtkVfLAVC=gtk_toggle_button_get_active( GTK_TOGGLE_BUTTON( RBVLavc ) );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1751 case 1: // Cancel
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1752 HideDXR3Config();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1753 break;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1754 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1755 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1756
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1757 GtkWidget * create_DXR3Config( void )
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1758 {
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1759 GtkWidget * vbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1760 GtkWidget * vbox2;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1761 GtkWidget * hbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1762 GList * CBDevice_items = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1763 GtkWidget * vbox3;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1764 GSList * VEncoder_group = NULL;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1765 GtkWidget * hbuttonbox1;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1766 GtkAccelGroup * accel_group;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1767
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1768 accel_group=gtk_accel_group_new();
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1769
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1770 DXR3Config=gtk_window_new( GTK_WINDOW_TOPLEVEL );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1771 gtk_widget_set_name( DXR3Config,"DXR3Config" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1772 gtk_object_set_data( GTK_OBJECT( DXR3Config ),"DXR3Config",DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1773 // gtk_widget_set_usize( DXR3Config,300,156 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1774 GTK_WIDGET_SET_FLAGS( DXR3Config,GTK_CAN_DEFAULT );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1775 gtk_window_set_title( GTK_WINDOW( DXR3Config ),"DXR3/H+" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1776 gtk_window_set_position( GTK_WINDOW( DXR3Config ),GTK_WIN_POS_CENTER );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1777 gtk_window_set_policy( GTK_WINDOW( DXR3Config ),FALSE,FALSE,FALSE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1778 gtk_window_set_wmclass( GTK_WINDOW( DXR3Config ),"DXR3","MPlayer" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1779
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1780 gtk_widget_realize( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1781 gtkAddIcon( DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1782
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1783 vbox1=AddVBox( AddDialogFrame( DXR3Config ),0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1784 vbox2=AddVBox( vbox1,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1785 hbox1=AddHBox( vbox2,1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1786 AddLabel( MSGTR_PREFERENCES_Audio_Device,hbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1787
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1788 CBDevice=AddComboBox( hbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1789
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1790 CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1791 CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-0" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1792 CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-1" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1793 CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-2" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1794 CBDevice_items=g_list_append( CBDevice_items,( gpointer ) "/dev/em8300-3" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1795 gtk_combo_set_popdown_strings( GTK_COMBO( CBDevice ),CBDevice_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1796 g_list_free( CBDevice_items );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1797
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1798 CEDXR3Device=GTK_COMBO( CBDevice )->entry;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1799 gtk_widget_set_name( CEDXR3Device,"CEDXR3Device" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1800 gtk_widget_show( CEDXR3Device );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1801 gtk_entry_set_text( GTK_ENTRY( CEDXR3Device ),"/dev/em8300" );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1802
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1803 AddHSeparator( vbox2 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1804 vbox3=AddVBox( vbox2,0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1805 AddLabel( MSGTR_PREFERENCES_DXR3_VENC,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1806 RBVNone=AddRadioButton( MSGTR_PREFERENCES_None,&VEncoder_group,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1807 RBVLavc=AddRadioButton( MSGTR_PREFERENCES_DXR3_LAVC,&VEncoder_group,vbox3 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1808
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1809 AddHSeparator( vbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1810
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1811 hbuttonbox1=AddHButtonBox( vbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1812 gtk_button_box_set_layout( GTK_BUTTON_BOX( hbuttonbox1 ),GTK_BUTTONBOX_END );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1813 gtk_button_box_set_spacing( GTK_BUTTON_BOX( hbuttonbox1 ),10 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1814 dxr3BOk=AddButton( MSGTR_Ok,hbuttonbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1815 dxr3BCancel=AddButton( MSGTR_Cancel,hbuttonbox1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1816
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1817 gtk_widget_add_accelerator( dxr3BOk,"clicked",accel_group,GDK_Return,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1818 gtk_widget_add_accelerator( dxr3BCancel,"clicked",accel_group,GDK_Escape,0,GTK_ACCEL_VISIBLE );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1819
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1820 gtk_signal_connect( GTK_OBJECT( DXR3Config ),"destroy",GTK_SIGNAL_FUNC( WidgetDestroy ),&DXR3Config );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1821
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1822 gtk_signal_connect( GTK_OBJECT( dxr3BOk ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)0 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1823 gtk_signal_connect( GTK_OBJECT( dxr3BCancel ),"clicked",GTK_SIGNAL_FUNC( dxr3Button ),(void *)1 );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1824
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1825 gtk_window_add_accel_group( GTK_WINDOW( DXR3Config ),accel_group );
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1826
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1827 return DXR3Config;
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1828 }
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1829
d9b805602aa1 Rename some gtk files.
ib
parents:
diff changeset
1830 #endif