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