annotate gui/mplayer/gtk/opts.c @ 25234:02518a3daeef

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