annotate gui/mplayer/gtk/opts.c @ 29283:dfa1653da85f

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