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