~medibuntu-maintainers/mplayer/medibuntu.precise

« back to all changes in this revision

Viewing changes to gui/win32/preferences.c

  • Committer: Gauvain Pocentek
  • Date: 2012-03-06 11:59:12 UTC
  • mfrom: (66.1.15 precise)
  • Revision ID: gauvain@pocentek.net-20120306115912-h9d6kt9j0l532oo5
* Merge from Ubuntu:
  - put back faac support
  - recommends apport-hooks-medibuntu
  - change Maintainer, Uploaders & Vcs-* fields.
* New upstream snapshot
* upload to unstable
* Build against external libmpeg2
* drop 51_FTBFS_arm.patch again
* no longer build depend on libcdparanoia-dev on the Hurd
* Fix FTBFS on the hurd.
  Thanks to Samuel Thibault <sthibault@debian.org> (Closes: #654974)
* Fix FTBFS on arm
* New upstream snapshot, Closes: #650339, #643621, #481807
* Imported Upstream version 1.0~rc4+svn34492
* Bump standards version
* Bump dependency on libav >= 4:0.8~, Closes: #653887
* Fix build-indep
* Build mplayer-gui again, Closes: #568514
* Drop debian/all-lang-config-mak.sh, no longer needed
* include .dfsg1 in version number
* remove get-orig-source target
* no longer prune compiler flags from the environment
* No longer advertise nor build 3fdx, mga and dxr3 backends,
  Closes: #496106, #442181, #533546
* beautify mplayer version identification string
* Brown paperbag upload.
* Next try to fix build failure on sparce after recent binutils change.
* Brown paperbag upload.
* Really fix build failure on sparc after recent binutils change.
* Properly set Replaces/Conflicts on mplayer2{,-dbg} to avoid
  file overwrite errors.
* Adjust versioning of mplayer listed in the mplayer-dbg's Depends field.
* Fix build failure on sparc after recent binutils change.
* Urgency medium bumped because of RC-level bugfix
  and speeding up x264 transition.
* Update to my @debian.org email.
* Upload to unstable
* Enable joystick support on Linux only, Closes: #638408
* Rebuild fixes toolchain issue on arm, Closes: #637077
* New upstream snapshot
* following the discussion started by Diego Biurrun <diego@biurrun.de>
  in debian-devel, I have prepared a new packaging of 'mplayer'
  (with code that comes from CVS)
* the upstream tar.bz cannot be distributed by Debian, since it contains
   CSS code; so I am repackaging it 
* I have tried my best to address all known issues:
  - the package contains the detailed Copyright made by Diego Biurrun 
  - the package does not contain CSS code, or  AFAIK other code on which 
     there is active patent enforcement
  - there is a script  debian/cvs-changelog.sh  that shows all changes
     done to files included in this source.
    This should comply with GPLv2 sec 2.a  (in spirit if not in letter)
    For this reason, the source code contains CVS directories.
* needs   make (>= 3.80) for 'html-chunked-$(1)' in DOCS/xml/Makefile

* some corrections, as suggested Diego Biurrun
  - binary codecs should go into /usr/lib/codecs (upstream default)
  - better template 'mplayer/install_codecs'
  - an empty 'font=' in mplayer.conf breaks mplayer: postinst corrected
* correction in 'mplayer/cfgnote'
* better mplayer.postinst and mplayer.config

* New upstream release
* better debian/copyright file
* do not ship a skin
* New upstream release
* changed DEB_BUILD_OPTIONS to DEB_BUILD_CONFIGURE ,
  DEB_BUILD_OPTIONS is used as in debian policy
* use gcc-3.4
* changed xlibs-dev to a long list of dependencies, for Debian/etch
* try to adhere to  http://www.mplayerhq.hu/DOCS/tech/binary-packaging.txt
  (see README.Debian for details)
* removed dependency on xlibmesa-dev, disabled opengl
* New upstream release
* Simon McVittie <hacks@pseudorandom.co.uk> wonderful work:
- Work around Debian bug #267442 (glibc's sys/uio.h and gcc's altivec.h have
  conflicting uses for __vector) by re-ordering #includes
- Fix potential symlink attack in ./configure
- Disable support for binary codecs on platforms for which those codecs
  aren't available; also disable the corresponding Debconf note when it's
  inappropriate
- Changed Build-Depends: so it works in pbuilder
- Explicitly build-depend on libjpeg62-dev, libfontconfig1-dev,
  libungif4-dev 
- Tweak debian/rules to avoid certain errors being ignored
- Use --language=all
* provide a target  'debian/rules get-orig-source' 
  that recreates the orig.tar.gz ; then use the above orig.tar.gz
* rewrote some parts of debian/rules
* don't clean and recompile docs if upstream ships them
* mplayer-doc was shipping too much stuff
* translated man pages where not installed properly
* compile with libdv4-dev
* correct README.Debian
* Forgot build-dep on libtheora
* Must not depend on libxvidcore
* New upstream release
* new release.
* rc1 to become 0.90
* new pre-release
* new pre-release
* gtk bug fixed.
* new release.
* version bumped
* 0.60 pre2 release
* 0.60 pre-release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
31
31
#include "libao2/audio_out.h"
32
32
#include "osdep/priority.h"
33
33
#include "mixer.h"
 
34
#include "gui/util/list.h"
34
35
#include "gui/ui/gmplayer.h"
35
36
#include "gui/interface.h"
36
37
#include "gui.h"
55
56
    gtkCacheSize = 2048;
56
57
    gtkAutoSyncOn = 0;
57
58
    gtkAutoSync = 0;
 
59
    player_idle_mode = 1;
58
60
}
59
61
 
60
62
static LRESULT CALLBACK PrefsWndProc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
61
63
{
62
 
    HWND btn, label, edit1, edit2, edit3, updown1, updown2, track1, track2;
 
64
    HWND btn, label, edit1, edit2, updown1, updown2, track1, track2;
63
65
    static HWND vo_driver, ao_driver, prio;
64
66
    int i = 0, j = 0;
65
 
    char dvddevice[MAX_PATH];
66
 
    char cdromdevice[MAX_PATH];
67
67
    char procprio[11];
68
68
    float x = 10.0, y = 100.0, stereopos, delaypos;
69
69
    stereopos = gtkAOExtraStereoMul * x;
74
74
        case WM_CREATE:
75
75
        {
76
76
            /* video and audio drivers */
77
 
            label = CreateWindow("static", "Video Driver:",
78
 
                                 WS_CHILD | WS_VISIBLE,
79
 
                                 10, 13, 70, 15, hwnd,
80
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
81
 
                                 NULL);
82
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
83
 
 
84
 
            label = CreateWindow("static", "Audio Driver:",
85
 
                                 WS_CHILD | WS_VISIBLE,
86
 
                                 190, 13, 70, 15, hwnd,
87
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
88
 
                                 NULL);
89
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
90
 
 
91
 
            label = CreateWindow("static", "Extra stereo coefficient:",
92
 
                                 WS_CHILD | WS_VISIBLE,
93
 
                                 10, 126, 115, 15, hwnd,
94
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
95
 
                                 NULL);
96
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
97
 
 
98
 
            label = CreateWindow("static", "Audio delay:",
99
 
                                 WS_CHILD | WS_VISIBLE,
100
 
                                 36, 165, 115, 15, hwnd,
101
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
102
 
                                 NULL);
103
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
104
 
 
105
 
            label = CreateWindow("static", "OSD level:",
106
 
                                 WS_CHILD | WS_VISIBLE,
107
 
                                 10, 264, 115, 15, hwnd,
108
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
109
 
                                 NULL);
110
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
111
 
 
112
 
            label = CreateWindow("static", "DVD device:",
113
 
                                 WS_CHILD | WS_VISIBLE,
114
 
                                 80, 363, 115, 15, hwnd,
115
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
116
 
                                 NULL);
117
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
118
 
 
119
 
            label = CreateWindow("static", "CD device:",
120
 
                                 WS_CHILD | WS_VISIBLE,
121
 
                                 202, 363, 115, 15, hwnd,
122
 
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
123
 
                                 NULL);
124
 
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
125
 
 
126
 
            label = CreateWindow("static", "Priority:",
127
 
                                 WS_CHILD | WS_VISIBLE,
128
 
                                 217, 264, 115, 15, hwnd,
 
77
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Video),
 
78
                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
 
79
                                 10, 14, 60, 15, hwnd,
 
80
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
 
81
                                 NULL);
 
82
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
83
 
 
84
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Audio),
 
85
                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
 
86
                                 205, 14, 60, 15, hwnd,
 
87
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
 
88
                                 NULL);
 
89
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
90
 
 
91
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Coefficient),
 
92
                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
 
93
                                 10, 148, 140, 15, hwnd,
 
94
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
 
95
                                 NULL);
 
96
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
97
 
 
98
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_AudioDelay),
 
99
                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
 
100
                                 10, 187, 140, 15, hwnd,
 
101
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
 
102
                                 NULL);
 
103
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
104
 
 
105
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_FRAME_OSD_Level),
 
106
                                 WS_CHILD | WS_VISIBLE,
 
107
                                 10, 286, 115, 15, hwnd,
 
108
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
 
109
                                 NULL);
 
110
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
111
 
 
112
            label = CreateWindow("static", acp(MSGTR_PREFERENCES_Priority),
 
113
                                 WS_CHILD | WS_VISIBLE | SS_RIGHT,
 
114
                                 200, 286, 100, 15, hwnd,
129
115
                                 NULL, ((LPCREATESTRUCT) lParam) -> hInstance,
130
116
                                 NULL);
131
117
            SendMessage(label, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
145
131
                                     CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |
146
132
                                     WS_CHILD | WS_VISIBLE |
147
133
                                     WS_VSCROLL | WS_TABSTOP,
148
 
                                     260, 10, 100, 160, hwnd,
 
134
                                     275, 10, 100, 160, hwnd,
149
135
                                     (HMENU) ID_AO_DRIVER,
150
136
                                     ((LPCREATESTRUCT) lParam) -> hInstance,
151
137
                                     NULL);
155
141
                                CBS_NOINTEGRALHEIGHT | CBS_HASSTRINGS |
156
142
                                WS_CHILD | WS_VISIBLE |
157
143
                                WS_VSCROLL | WS_TABSTOP,
158
 
                                260, 260, 100, 160, hwnd,
 
144
                                310, 282, 100, 160, hwnd,
159
145
                                (HMENU) ID_PRIO,
160
146
                                ((LPCREATESTRUCT) lParam) -> hInstance,
161
147
                                NULL);
162
148
 
163
149
            /* checkboxes */
164
 
            btn = CreateWindow("button", "Enable double buffering",
 
150
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DoubleBuffer),
165
151
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
166
 
                               25, 35, 150, 25,
 
152
                               10, 35, 160, 25,
167
153
                               hwnd, (HMENU) ID_DOUBLE,
168
154
                               ((LPCREATESTRUCT) lParam) -> hInstance,
169
155
                               NULL);
170
156
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
171
157
 
172
 
            btn = CreateWindow("button", "Enable direct rendering",
 
158
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_DirectRender),
173
159
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
174
 
                               25, 57, 150, 25,
 
160
                               10, 57, 160, 25,
175
161
                               hwnd, (HMENU) ID_DIRECT,
176
162
                               ((LPCREATESTRUCT) lParam) -> hInstance,
177
163
                               NULL);
178
164
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
179
165
 
180
 
            btn = CreateWindow("button", "Enable framedropping",
 
166
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_FrameDrop),
181
167
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
182
 
                               25, 79, 150, 25,
 
168
                               10, 79, 160, 25,
183
169
                               hwnd, (HMENU) ID_FRAMEDROP,
184
170
                               ((LPCREATESTRUCT) lParam) -> hInstance,
185
171
                               NULL);
186
172
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
187
173
 
188
 
            btn = CreateWindow("button", "Normalize sound",
189
 
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
190
 
                               205, 35, 150, 25,
 
174
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NoIdle),
 
175
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
 
176
                               10, 101, 225, 25,
 
177
                               hwnd, (HMENU) ID_IDLE,
 
178
                               ((LPCREATESTRUCT) lParam) -> hInstance,
 
179
                               NULL);
 
180
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
 
181
 
 
182
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_NormalizeSound),
 
183
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
 
184
                               220, 35, 160, 25,
191
185
                               hwnd, (HMENU) ID_NORMALIZE,
192
186
                               ((LPCREATESTRUCT) lParam) -> hInstance,
193
187
                               NULL);
194
188
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
195
189
 
196
 
            btn = CreateWindow("button", "Enable software mixer",
 
190
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_SoftwareMixer),
197
191
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
198
 
                               205, 57, 150, 25,
 
192
                               220, 57, 160, 25,
199
193
                               hwnd, (HMENU) ID_SOFTMIX,
200
194
                               ((LPCREATESTRUCT) lParam) -> hInstance,
201
195
                               NULL);
202
196
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
203
197
 
204
 
            btn = CreateWindow("button", "Enable extra stereo",
 
198
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_ExtraStereo),
205
199
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
206
 
                               205, 79, 150, 25,
 
200
                               220, 79, 160, 25,
207
201
                               hwnd, (HMENU) ID_EXTRASTEREO,
208
202
                               ((LPCREATESTRUCT) lParam) -> hInstance,
209
203
                               NULL);
210
204
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
211
205
 
212
 
            btn = CreateWindow("button", "Enable cache",
 
206
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_Cache),
213
207
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
214
 
                               10, 200, 90, 25,
 
208
                               10, 222, 90, 25,
215
209
                               hwnd, (HMENU) ID_CACHE,
216
210
                               ((LPCREATESTRUCT) lParam) -> hInstance,
217
211
                               NULL);
218
212
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
219
213
 
220
 
            btn = CreateWindow("button", "Enable autosync",
 
214
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_AutoSync),
221
215
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
222
 
                               192, 200, 100, 25, hwnd,
 
216
                               240, 222, 110, 25, hwnd,
223
217
                               (HMENU) ID_AUTOSYNC,
224
218
                               ((LPCREATESTRUCT) lParam) -> hInstance,
225
219
                               NULL);
226
220
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
227
221
 
228
 
            btn = CreateWindow("button", "Display videos in the sub window",
 
222
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_VideoInSubwin),
229
223
                               WS_CHILD | WS_VISIBLE | BS_AUTOCHECKBOX,
230
 
                               85, 227, 250, 25,
 
224
                               10, 249, 250, 25,
231
225
                               hwnd, (HMENU) ID_SUBWINDOW,
232
226
                               ((LPCREATESTRUCT) lParam) -> hInstance,
233
227
                               NULL);
234
228
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
235
229
 
236
230
            /* osd level */
237
 
            btn = CreateWindow("button", "None",
 
231
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL0),
238
232
                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
239
 
                               95, 260, 100, 25, hwnd,
 
233
                               15, 297, 200, 25, hwnd,
240
234
                               (HMENU) ID_NONE,
241
235
                               ((LPCREATESTRUCT) lParam) -> hInstance,
242
236
                               NULL);
243
237
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
244
238
 
245
 
            btn = CreateWindow("button", "Timer and indicators",
 
239
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL1),
246
240
                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
247
 
                               95, 280, 180, 25, hwnd,
 
241
                               15, 317, 395, 25, hwnd,
248
242
                               (HMENU) ID_OSD1,
249
243
                               ((LPCREATESTRUCT) lParam) -> hInstance,
250
244
                               NULL);
251
245
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
252
246
 
253
 
            btn = CreateWindow("button", "Progress bar only",
 
247
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL2),
254
248
                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
255
 
                               95, 300, 180, 25, hwnd,
 
249
                               15, 337, 395, 25, hwnd,
256
250
                               (HMENU) ID_OSD2,
257
251
                               ((LPCREATESTRUCT) lParam) -> hInstance,
258
252
                               NULL);
259
253
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
260
254
 
261
 
            btn = CreateWindow("button", "Timer, percentage, and total time",
 
255
            btn = CreateWindow("button", acp(MSGTR_PREFERENCES_OSD_LEVEL3),
262
256
                               WS_CHILD | WS_VISIBLE | BS_AUTORADIOBUTTON,
263
 
                               95, 320, 180, 25, hwnd,
 
257
                               15, 357, 395, 25, hwnd,
264
258
                               (HMENU) ID_OSD3,
265
259
                               ((LPCREATESTRUCT) lParam) -> hInstance,
266
260
                               NULL);
267
261
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
268
262
 
269
 
            btn = CreateWindow("button", "Apply",
 
263
            btn = CreateWindow("button", acp(MSGTR_Ok),
270
264
                               WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
271
 
                               199, 395, 80, 25, hwnd,
 
265
                               248, 417, 80, 25, hwnd,
272
266
                               (HMENU) ID_APPLY,
273
267
                               ((LPCREATESTRUCT) lParam) -> hInstance,
274
268
                               NULL);
275
269
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
276
270
 
277
 
            btn = CreateWindow("button", "Cancel",
 
271
            btn = CreateWindow("button", acp(MSGTR_Cancel),
278
272
                               WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
279
 
                               285, 395, 80, 25, hwnd,
 
273
                               334, 417, 80, 25, hwnd,
280
274
                               (HMENU) ID_CANCEL,
281
275
                               ((LPCREATESTRUCT) lParam) -> hInstance,
282
276
                               NULL);
283
277
            SendMessage(btn, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
284
278
 
285
 
            btn = CreateWindow("button", "Defaults",
 
279
            btn = CreateWindow("button", acp(MSGTR_Default),
286
280
                               WS_CHILD | WS_VISIBLE | BS_PUSHBUTTON,
287
 
                               4, 395, 80, 25, hwnd,
 
281
                               5, 417, 80, 25, hwnd,
288
282
                               (HMENU) ID_DEFAULTS,
289
283
                               ((LPCREATESTRUCT) lParam) -> hInstance,
290
284
                               NULL);
295
289
                                  WS_CHILD | WS_VISIBLE | WS_TABSTOP |
296
290
                                  WS_DISABLED | TBS_HORZ |
297
291
                                  TBS_BOTTOM | TBS_NOTICKS,
298
 
                                  120, 120, 245, 35, hwnd,
 
292
                                  165, 142, 245, 35, hwnd,
299
293
                                  (HMENU) ID_TRACKBAR1,
300
294
                                  ((LPCREATESTRUCT) lParam) -> hInstance,
301
295
                                  NULL);
306
300
                                  WS_CHILD | WS_VISIBLE | WS_TABSTOP |
307
301
                                  WS_DISABLED | TBS_HORZ |
308
302
                                  TBS_BOTTOM | TBS_NOTICKS,
309
 
                                  120, 160, 245, 35, hwnd,
 
303
                                  165, 182, 245, 35, hwnd,
310
304
                                  (HMENU) ID_TRACKBAR2,
311
305
                                  ((LPCREATESTRUCT) lParam) -> hInstance,
312
306
                                  NULL);
316
310
            edit1 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "cache",
317
311
                                   WS_CHILD | WS_VISIBLE | WS_DISABLED |
318
312
                                   ES_LEFT | ES_AUTOHSCROLL,
319
 
                                   105, 203, 40, 20, hwnd,
 
313
                                   105, 225, 40, 20, hwnd,
320
314
                                   (HMENU) ID_EDIT1,
321
315
                                   ((LPCREATESTRUCT) lParam) -> hInstance,
322
316
                                   NULL);
325
319
            updown1 = CreateUpDownControl(WS_CHILD | WS_VISIBLE |
326
320
                                          WS_DISABLED | UDS_SETBUDDYINT |
327
321
                                          UDS_ARROWKEYS | UDS_NOTHOUSANDS,
328
 
                                          145, 203, 20, 20, hwnd,
 
322
                                          145, 225, 20, 20, hwnd,
329
323
                                          ID_UPDOWN1,
330
324
                                          ((LPCREATESTRUCT) lParam) -> hInstance,
331
325
                                          (HWND)edit1, 0, 0, 0);
335
329
            edit2 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", "autosync",
336
330
                                   WS_CHILD | WS_VISIBLE | WS_DISABLED |
337
331
                                   ES_LEFT | ES_AUTOHSCROLL,
338
 
                                   300, 203, 40, 20, hwnd,
 
332
                                   355, 225, 40, 20, hwnd,
339
333
                                   (HMENU) ID_EDIT2,
340
334
                                   ((LPCREATESTRUCT) lParam) -> hInstance,
341
335
                                   NULL);
344
338
            updown2 = CreateUpDownControl(WS_CHILD | WS_VISIBLE |
345
339
                                          WS_DISABLED | UDS_SETBUDDYINT |
346
340
                                          UDS_ARROWKEYS | UDS_NOTHOUSANDS,
347
 
                                          340, 203, 20, 20, hwnd,
 
341
                                          395, 225, 20, 20, hwnd,
348
342
                                          ID_UPDOWN2,
349
343
                                          ((LPCREATESTRUCT) lParam) -> hInstance,
350
344
                                          (HWND)edit2, 0, 0, 0);
351
345
            SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETRANGE32, (WPARAM)0, (LPARAM)10000);
352
346
 
353
 
            /* dvd and cd devices */
354
 
            edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
355
 
                                   WS_CHILD | WS_VISIBLE |
356
 
                                   ES_LEFT | ES_AUTOHSCROLL,
357
 
                                   145, 360, 20, 20, hwnd,
358
 
                                   (HMENU) ID_DVDDEVICE,
359
 
                                   ((LPCREATESTRUCT) lParam) -> hInstance,
360
 
                                   NULL);
361
 
            SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
362
 
 
363
 
            edit3 = CreateWindowEx(WS_EX_CLIENTEDGE, "edit", NULL,
364
 
                                   WS_CHILD | WS_VISIBLE |
365
 
                                   ES_LEFT| ES_AUTOHSCROLL,
366
 
                                   260, 360, 20, 20, hwnd,
367
 
                                   (HMENU) ID_CDDEVICE,
368
 
                                   ((LPCREATESTRUCT) lParam) -> hInstance,
369
 
                                   NULL);
370
 
            SendMessage(edit3, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
371
 
 
372
347
            while(video_out_drivers[i])
373
348
            {
374
349
                const vo_info_t *info = video_out_drivers[i++]->info;
393
368
            SendMessage(ao_driver, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
394
369
 
395
370
            /* priority list, i'm leaving out realtime for safety's sake */
396
 
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "low");
397
 
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "belownormal");
398
 
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "normal");
399
 
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "abovenormal");
400
 
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) "high");
 
371
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityLow));
 
372
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalBelow));
 
373
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormal));
 
374
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityNormalAbove));
 
375
            SendDlgItemMessage(hwnd, ID_PRIO, CB_INSERTSTRING, 0, (LPARAM) acp(MSGTR_PREFERENCES_PriorityHigh));
401
376
            SendMessage(prio, WM_SETFONT, (WPARAM) GetStockObject(DEFAULT_GUI_FONT), 0);
402
377
 
403
378
            /* set our preferences on what we already have */
415
390
                SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 1, 0);
416
391
            if(vo_directrendering)
417
392
                SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 1, 0);
 
393
            if(!player_idle_mode)
 
394
                SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 1, 0);
418
395
            if(frame_dropping)
419
396
                SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 1, 0);
420
397
            if(gtkAONorm)
464
441
            else if(osd_level == 3)
465
442
                SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 1, 0);
466
443
 
467
 
            if(dvd_device)
468
 
                SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)dvd_device);
469
 
            else SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
470
 
 
471
 
            if(cdrom_device)
472
 
                SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)cdrom_device);
473
 
            else SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
474
 
 
475
444
            if(proc_priority)
476
445
                SendDlgItemMessage(hwnd, ID_PRIO, CB_SETCURSEL,
477
446
                                   (WPARAM)SendMessage(prio, CB_FINDSTRING, -1,
553
522
                    SendDlgItemMessage(hwnd, ID_UPDOWN2, UDM_SETPOS32, 0, (LPARAM)gtkAutoSync);
554
523
                    SendDlgItemMessage(hwnd, ID_DOUBLE, BM_SETCHECK, 0, 0);
555
524
                    SendDlgItemMessage(hwnd, ID_DIRECT, BM_SETCHECK, 0, 0);
 
525
                    SendDlgItemMessage(hwnd, ID_IDLE, BM_SETCHECK, 0, 0);
556
526
                    SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_SETCHECK, 0, 0);
557
527
                    SendDlgItemMessage(hwnd, ID_NORMALIZE, BM_SETCHECK, 0, 0);
558
528
                    SendDlgItemMessage(hwnd, ID_SOFTMIX, BM_SETCHECK, 0, 0);
564
534
                    SendDlgItemMessage(hwnd, ID_OSD1, BM_SETCHECK, 1, 0);
565
535
                    SendDlgItemMessage(hwnd, ID_OSD2, BM_SETCHECK, 0, 0);
566
536
                    SendDlgItemMessage(hwnd, ID_OSD3, BM_SETCHECK, 0, 0);
567
 
                    SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
568
 
                    SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_SETTEXT, 0, (LPARAM)"D:");
569
537
                    SendMessage(hwnd, WM_COMMAND, (WPARAM)ID_APPLY, 0);
570
538
                    break;
571
539
                }
575
543
                case ID_APPLY:
576
544
                {
577
545
                    int strl;
578
 
                    if(guiInfo.Playing) guiGetEvent(guiSetState, (void *)GUI_STOP);
 
546
                    if(guiInfo.Playing) gui(GUI_SET_STATE, (void *)GUI_STOP);
579
547
 
580
548
                    /* Set the video driver */
581
549
                    free(video_driver_list[0]);
605
573
                        vo_directrendering = 1;
606
574
                    else vo_directrendering = 0;
607
575
 
 
576
                    /* quit after playing */
 
577
                    if(SendDlgItemMessage(hwnd, ID_IDLE, BM_GETCHECK, 0, 0) == BST_CHECKED)
 
578
                        player_idle_mode = 0;
 
579
                    else player_idle_mode = 1;
 
580
 
608
581
                    /* frame dropping */
609
582
                    if(SendDlgItemMessage(hwnd, ID_FRAMEDROP, BM_GETCHECK, 0, 0) == BST_CHECKED)
610
583
                        frame_dropping = 1;
659
632
                    else if(SendDlgItemMessage(hwnd, ID_OSD3, BM_GETCHECK, 0, 0) == BST_CHECKED)
660
633
                        osd_level = 3;
661
634
 
662
 
                    /* dvd and cd devices */
663
 
                    SendDlgItemMessage(hwnd, ID_DVDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)dvddevice);
664
 
                    dvd_device = strdup(dvddevice);
665
 
                    SendDlgItemMessage(hwnd, ID_CDDEVICE, WM_GETTEXT, MAX_PATH, (LPARAM)cdromdevice);
666
 
                    cdrom_device = strdup(cdromdevice);
667
 
 
668
 
                    MessageBox(hwnd, "You must restart MPlayer for the changes to take effect.", "MPlayer - Info:", MB_OK);
 
635
                    MessageBox(hwnd, acp(MSGTR_PREFERENCES_Message), acp(MSGTR_MSGBOX_LABEL_Warning), MB_OK);
669
636
                    DestroyWindow(hwnd);
670
637
                    break;
671
638
                }
682
649
    HINSTANCE hInstance = GetModuleHandle(NULL);
683
650
    WNDCLASS wc;
684
651
    int x, y;
685
 
    if(FindWindow(NULL, "MPlayer - Preferences")) return;
 
652
    if(FindWindow(NULL, acp(MSGTR_Preferences))) return;
686
653
    wc.style         = CS_HREDRAW | CS_VREDRAW;
687
654
    wc.lpfnWndProc   = PrefsWndProc;
688
655
    wc.cbClsExtra    = 0;
691
658
    wc.hCursor       = LoadCursor(NULL,IDC_ARROW);
692
659
    wc.hIcon         = gui->icon;
693
660
    wc.hbrBackground = SOLID_GREY;
694
 
    wc.lpszClassName = "MPlayer - Preferences";
 
661
    wc.lpszClassName = acp(MSGTR_Preferences);
695
662
    wc.lpszMenuName  = NULL;
696
663
    RegisterClass(&wc);
697
 
    x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (375 / 2);
698
 
    y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (452 / 2);
699
 
    hWnd = CreateWindow("MPlayer - Preferences",
700
 
                        "MPlayer - Preferences",
 
664
    x = (GetSystemMetrics(SM_CXSCREEN) / 2) - (425 / 2);
 
665
    y = (GetSystemMetrics(SM_CYSCREEN) / 2) - (474 / 2);
 
666
    hWnd = CreateWindow(acp(MSGTR_Preferences),
 
667
                        acp(MSGTR_Preferences),
701
668
                        WS_POPUPWINDOW | WS_CAPTION,
702
669
                        x,
703
670
                        y,
704
 
                        375,
705
 
                        452,
 
671
                        425,
 
672
                        474,
706
673
                        NULL,
707
674
                        NULL,
708
675
                        hInstance,
709
676
                        NULL);
710
 
   SetWindowLongPtr(hWnd, GWLP_USERDATA, (DWORD) gui);
 
677
   SetWindowLongPtr(hWnd, GWLP_USERDATA, (LONG_PTR) gui);
711
678
   ShowWindow(hWnd, SW_SHOW);
712
679
   UpdateWindow(hWnd);
713
680
}