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