annotate gui/mplayer/gtk/opts.c @ 23761:604adfeb3e64

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