annotate Gui/mplayer/gtk/opts.c @ 21621:28ade900407d

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