annotate gui/dialog/preferences.c @ 36019:d2d776c8e040

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