1 | /* smplayer, GUI front-end for mplayer.
|
---|
2 | Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
|
---|
3 |
|
---|
4 | This program is free software; you can redistribute it and/or modify
|
---|
5 | it under the terms of the GNU General Public License as published by
|
---|
6 | the Free Software Foundation; either version 2 of the License, or
|
---|
7 | (at your option) any later version.
|
---|
8 |
|
---|
9 | This program is distributed in the hope that it will be useful,
|
---|
10 | but WITHOUT ANY WARRANTY; without even the implied warranty of
|
---|
11 | MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
---|
12 | GNU General Public License for more details.
|
---|
13 |
|
---|
14 | You should have received a copy of the GNU General Public License
|
---|
15 | along with this program; if not, write to the Free Software
|
---|
16 | Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
---|
17 | */
|
---|
18 |
|
---|
19 | #include "preferences.h"
|
---|
20 | #include "global.h"
|
---|
21 | #include "paths.h"
|
---|
22 | #include "mediasettings.h"
|
---|
23 | #include "recents.h"
|
---|
24 | #include "urlhistory.h"
|
---|
25 | #include "filters.h"
|
---|
26 |
|
---|
27 | #include <QSettings>
|
---|
28 | #include <QFileInfo>
|
---|
29 | #include <QRegExp>
|
---|
30 | #include <QDir>
|
---|
31 | #include <QLocale>
|
---|
32 |
|
---|
33 | #if QT_VERSION >= 0x040400
|
---|
34 | #include <QDesktopServices>
|
---|
35 | #endif
|
---|
36 |
|
---|
37 | #ifdef YOUTUBE_SUPPORT
|
---|
38 | #include "retrieveyoutubeurl.h"
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | #define CURRENT_CONFIG_VERSION 1
|
---|
42 |
|
---|
43 | using namespace Global;
|
---|
44 |
|
---|
45 | Preferences::Preferences() {
|
---|
46 | history_recents = new Recents;
|
---|
47 | history_urls = new URLHistory;
|
---|
48 | filters = new Filters;
|
---|
49 |
|
---|
50 | reset();
|
---|
51 |
|
---|
52 | #ifndef NO_USE_INI_FILES
|
---|
53 | load();
|
---|
54 | #endif
|
---|
55 | }
|
---|
56 |
|
---|
57 | Preferences::~Preferences() {
|
---|
58 | #ifndef NO_USE_INI_FILES
|
---|
59 | save();
|
---|
60 | #endif
|
---|
61 |
|
---|
62 | delete history_recents;
|
---|
63 | delete history_urls;
|
---|
64 | delete filters;
|
---|
65 | }
|
---|
66 |
|
---|
67 | void Preferences::reset() {
|
---|
68 | /* *******
|
---|
69 | General
|
---|
70 | ******* */
|
---|
71 |
|
---|
72 | config_version = CURRENT_CONFIG_VERSION;
|
---|
73 |
|
---|
74 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
75 | mplayer_bin= "mplayer/mplayer.exe";
|
---|
76 | #else
|
---|
77 | mplayer_bin = "mplayer";
|
---|
78 | #endif
|
---|
79 |
|
---|
80 | vo = "";
|
---|
81 | ao = "";
|
---|
82 |
|
---|
83 | use_screenshot = true;
|
---|
84 | screenshot_directory="";
|
---|
85 | #ifdef PORTABLE_APP
|
---|
86 | screenshot_directory= "./screenshots";
|
---|
87 | #else
|
---|
88 | #if QT_VERSION < 0x040400
|
---|
89 | QString default_screenshot_path = Paths::configPath() + "/screenshots";
|
---|
90 | if (QFile::exists(default_screenshot_path)) {
|
---|
91 | screenshot_directory = default_screenshot_path;
|
---|
92 | }
|
---|
93 | #endif
|
---|
94 | #endif
|
---|
95 |
|
---|
96 | dont_remember_media_settings = false;
|
---|
97 | dont_remember_time_pos = false;
|
---|
98 |
|
---|
99 | audio_lang = "";
|
---|
100 | subtitle_lang = "";
|
---|
101 |
|
---|
102 | use_direct_rendering = false;
|
---|
103 | use_double_buffer = true;
|
---|
104 |
|
---|
105 | use_soft_video_eq = false;
|
---|
106 | use_slices = true;
|
---|
107 | autoq = 6;
|
---|
108 | add_blackborders_on_fullscreen = false;
|
---|
109 |
|
---|
110 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
111 | turn_screensaver_off = false;
|
---|
112 | avoid_screensaver = true;
|
---|
113 | #else
|
---|
114 | disable_screensaver = true;
|
---|
115 | #endif
|
---|
116 |
|
---|
117 | #ifndef Q_OS_WIN
|
---|
118 | vdpau.ffh264vdpau = true;
|
---|
119 | vdpau.ffmpeg12vdpau = true;
|
---|
120 | vdpau.ffwmv3vdpau = true;
|
---|
121 | vdpau.ffvc1vdpau = true;
|
---|
122 | vdpau.ffodivxvdpau = false;
|
---|
123 | vdpau.disable_video_filters = true;
|
---|
124 | #endif
|
---|
125 |
|
---|
126 | use_soft_vol = true;
|
---|
127 | softvol_max = 110; // 110 = default value in mplayer
|
---|
128 | use_scaletempo = Detect;
|
---|
129 | use_hwac3 = false;
|
---|
130 | use_audio_equalizer = true;
|
---|
131 |
|
---|
132 | global_volume = true;
|
---|
133 | volume = 50;
|
---|
134 | mute = false;
|
---|
135 |
|
---|
136 | autosync = false;
|
---|
137 | autosync_factor = 100;
|
---|
138 |
|
---|
139 | use_mc = false;
|
---|
140 | mc_value = 0;
|
---|
141 |
|
---|
142 | osd = Seek;
|
---|
143 | osd_delay = 2200;
|
---|
144 |
|
---|
145 | file_settings_method = "hash"; // Possible values: normal & hash
|
---|
146 |
|
---|
147 |
|
---|
148 | /* ***************
|
---|
149 | Drives (CD/DVD)
|
---|
150 | *************** */
|
---|
151 |
|
---|
152 | dvd_device = "";
|
---|
153 | cdrom_device = "";
|
---|
154 |
|
---|
155 | #ifndef Q_OS_WIN
|
---|
156 | // Try to set default values
|
---|
157 | if (QFile::exists("/dev/dvd")) dvd_device = "/dev/dvd";
|
---|
158 | if (QFile::exists("/dev/cdrom")) cdrom_device = "/dev/cdrom";
|
---|
159 | #endif
|
---|
160 |
|
---|
161 | #ifdef Q_OS_WIN
|
---|
162 | enable_audiocd_on_windows = false;
|
---|
163 | #endif
|
---|
164 |
|
---|
165 | vcd_initial_title = 2; // Most VCD's start at title #2
|
---|
166 |
|
---|
167 | #if DVDNAV_SUPPORT
|
---|
168 | use_dvdnav = false;
|
---|
169 | #endif
|
---|
170 |
|
---|
171 |
|
---|
172 | /* ***********
|
---|
173 | Performance
|
---|
174 | *********** */
|
---|
175 |
|
---|
176 | priority = AboveNormal; // Option only for windows
|
---|
177 | frame_drop = true;
|
---|
178 | hard_frame_drop = false;
|
---|
179 | coreavc = false;
|
---|
180 | h264_skip_loop_filter = LoopEnabled;
|
---|
181 | HD_height = 720;
|
---|
182 |
|
---|
183 | // MPlayer 1.0rc1 require restart, new versions don't
|
---|
184 | fast_audio_change = Detect;
|
---|
185 | #if !SMART_DVD_CHAPTERS
|
---|
186 | fast_chapter_change = false;
|
---|
187 | #endif
|
---|
188 |
|
---|
189 | threads = 1;
|
---|
190 |
|
---|
191 | cache_for_files = 0;
|
---|
192 | cache_for_streams = 1000;
|
---|
193 | cache_for_dvds = 0; // not recommended to use cache for dvds
|
---|
194 | cache_for_vcds = 1000;
|
---|
195 | cache_for_audiocds = 1000;
|
---|
196 | cache_for_tv = 3000;
|
---|
197 |
|
---|
198 | #ifdef YOUTUBE_SUPPORT
|
---|
199 | yt_quality = RetrieveYoutubeUrl::MP4_720p;
|
---|
200 | yt_user_agent = QString::null;
|
---|
201 | #endif
|
---|
202 |
|
---|
203 |
|
---|
204 | /* *********
|
---|
205 | Subtitles
|
---|
206 | ********* */
|
---|
207 |
|
---|
208 | font_file = "";
|
---|
209 | font_name = "";
|
---|
210 | use_fontconfig = false;
|
---|
211 | subcp = "ISO-8859-1";
|
---|
212 | use_enca = false;
|
---|
213 | enca_lang = QString(QLocale::system().name()).section("_",0,0);
|
---|
214 | font_autoscale = 1;
|
---|
215 | subfuzziness = 1;
|
---|
216 | autoload_sub = true;
|
---|
217 |
|
---|
218 | use_ass_subtitles = true;
|
---|
219 | ass_line_spacing = 0;
|
---|
220 |
|
---|
221 | use_forced_subs_only = false;
|
---|
222 |
|
---|
223 | sub_visibility = true;
|
---|
224 |
|
---|
225 | subtitles_on_screenshots = false;
|
---|
226 |
|
---|
227 | use_new_sub_commands = Detect;
|
---|
228 | change_sub_scale_should_restart = Detect;
|
---|
229 |
|
---|
230 | fast_load_sub = true;
|
---|
231 |
|
---|
232 | // ASS styles
|
---|
233 | // Nothing to do, default values are given in
|
---|
234 | // AssStyles constructor
|
---|
235 |
|
---|
236 | force_ass_styles = false;
|
---|
237 | user_forced_ass_style.clear();
|
---|
238 |
|
---|
239 | freetype_support = true;
|
---|
240 |
|
---|
241 |
|
---|
242 | /* ********
|
---|
243 | Advanced
|
---|
244 | ******** */
|
---|
245 |
|
---|
246 | #if USE_ADAPTER
|
---|
247 | adapter = -1;
|
---|
248 | #endif
|
---|
249 |
|
---|
250 | #if USE_COLORKEY
|
---|
251 | color_key = 0x020202;
|
---|
252 | #endif
|
---|
253 |
|
---|
254 | use_mplayer_window = false;
|
---|
255 |
|
---|
256 | monitor_aspect=""; // Autodetect
|
---|
257 |
|
---|
258 | use_idx = false;
|
---|
259 |
|
---|
260 | mplayer_additional_options="";
|
---|
261 | #ifdef PORTABLE_APP
|
---|
262 | mplayer_additional_options="-nofontconfig";
|
---|
263 | #endif
|
---|
264 | mplayer_additional_video_filters="";
|
---|
265 | mplayer_additional_audio_filters="";
|
---|
266 |
|
---|
267 | #ifdef LOG_MPLAYER
|
---|
268 | log_mplayer = true;
|
---|
269 | verbose_log = false;
|
---|
270 | autosave_mplayer_log = false;
|
---|
271 | mplayer_log_saveto = "";
|
---|
272 | #endif
|
---|
273 | #ifdef LOG_SMPLAYER
|
---|
274 | log_smplayer = true;
|
---|
275 | log_filter = ".*";
|
---|
276 | save_smplayer_log = false;
|
---|
277 | #endif
|
---|
278 |
|
---|
279 | #if REPAINT_BACKGROUND_OPTION
|
---|
280 | // "Repaint video background" in the preferences dialog
|
---|
281 | #ifndef Q_OS_WIN
|
---|
282 | repaint_video_background = false;
|
---|
283 | #else
|
---|
284 | repaint_video_background = true;
|
---|
285 | #endif
|
---|
286 | #endif
|
---|
287 |
|
---|
288 | use_edl_files = true;
|
---|
289 |
|
---|
290 | prefer_ipv4 = true;
|
---|
291 |
|
---|
292 | use_short_pathnames = false;
|
---|
293 |
|
---|
294 | change_video_equalizer_on_startup = true;
|
---|
295 |
|
---|
296 | use_pausing_keep_force = true;
|
---|
297 |
|
---|
298 | use_correct_pts = Detect;
|
---|
299 |
|
---|
300 | actions_to_run = "";
|
---|
301 |
|
---|
302 | show_tag_in_window_title = true;
|
---|
303 |
|
---|
304 |
|
---|
305 | /* *********
|
---|
306 | GUI stuff
|
---|
307 | ********* */
|
---|
308 |
|
---|
309 | fullscreen = false;
|
---|
310 | start_in_fullscreen = false;
|
---|
311 | compact_mode = false;
|
---|
312 | stay_on_top = NeverOnTop;
|
---|
313 | size_factor = 100; // 100%
|
---|
314 |
|
---|
315 | resize_method = Always;
|
---|
316 |
|
---|
317 | #if STYLE_SWITCHING
|
---|
318 | style="";
|
---|
319 | #endif
|
---|
320 |
|
---|
321 |
|
---|
322 | #if DVDNAV_SUPPORT
|
---|
323 | mouse_left_click_function = "dvdnav_mouse";
|
---|
324 | #else
|
---|
325 | mouse_left_click_function = "";
|
---|
326 | #endif
|
---|
327 | mouse_right_click_function = "show_context_menu";
|
---|
328 | mouse_double_click_function = "fullscreen";
|
---|
329 | mouse_middle_click_function = "mute";
|
---|
330 | mouse_xbutton1_click_function = "";
|
---|
331 | mouse_xbutton2_click_function = "";
|
---|
332 | wheel_function = Seeking;
|
---|
333 | wheel_function_cycle = Seeking | Volume | Zoom | ChangeSpeed;
|
---|
334 | wheel_function_seeking_reverse = false;
|
---|
335 |
|
---|
336 | seeking1 = 10;
|
---|
337 | seeking2 = 60;
|
---|
338 | seeking3 = 10*60;
|
---|
339 | seeking4 = 30;
|
---|
340 |
|
---|
341 | update_while_seeking = false;
|
---|
342 | #if ENABLE_DELAYED_DRAGGING
|
---|
343 | time_slider_drag_delay = 100;
|
---|
344 | #endif
|
---|
345 | #if SEEKBAR_RESOLUTION
|
---|
346 | relative_seeking = false;
|
---|
347 | #endif
|
---|
348 | precise_seeking = true;
|
---|
349 |
|
---|
350 | language = "";
|
---|
351 | iconset = "";
|
---|
352 |
|
---|
353 | balloon_count = 5;
|
---|
354 |
|
---|
355 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
356 | restore_pos_after_fullscreen = true;
|
---|
357 | #else
|
---|
358 | restore_pos_after_fullscreen = false;
|
---|
359 | #endif
|
---|
360 |
|
---|
361 | save_window_size_on_exit = true;
|
---|
362 |
|
---|
363 | close_on_finish = false;
|
---|
364 |
|
---|
365 | default_font = "";
|
---|
366 |
|
---|
367 | pause_when_hidden = false;
|
---|
368 |
|
---|
369 | allow_video_movement = false;
|
---|
370 |
|
---|
371 | gui = "DefaultGui";
|
---|
372 |
|
---|
373 | #if USE_MINIMUMSIZE
|
---|
374 | gui_minimum_width = 0; // 0 == disabled
|
---|
375 | #endif
|
---|
376 | default_size = QSize(580, 440);
|
---|
377 |
|
---|
378 | #if ALLOW_TO_HIDE_VIDEO_WINDOW_ON_AUDIO_FILES
|
---|
379 | hide_video_window_on_audio_files = true;
|
---|
380 | #endif
|
---|
381 |
|
---|
382 | report_mplayer_crashes = true;
|
---|
383 |
|
---|
384 | #if REPORT_OLD_MPLAYER
|
---|
385 | reported_mplayer_is_old = false;
|
---|
386 | #endif
|
---|
387 |
|
---|
388 | auto_add_to_playlist = true;
|
---|
389 | add_to_playlist_consecutive_files = false;
|
---|
390 |
|
---|
391 | #if LOGO_ANIMATION
|
---|
392 | animated_logo = true;
|
---|
393 | #endif
|
---|
394 |
|
---|
395 |
|
---|
396 | /* ********
|
---|
397 | TV (dvb)
|
---|
398 | ******** */
|
---|
399 |
|
---|
400 | check_channels_conf_on_startup = true;
|
---|
401 | initial_tv_deinterlace = MediaSettings::Yadif_1;
|
---|
402 | last_dvb_channel = "";
|
---|
403 | last_tv_channel = "";
|
---|
404 |
|
---|
405 |
|
---|
406 | /* ***********
|
---|
407 | Directories
|
---|
408 | *********** */
|
---|
409 |
|
---|
410 | latest_dir = QDir::homePath();
|
---|
411 | last_dvd_directory="";
|
---|
412 | save_dirs = true;
|
---|
413 |
|
---|
414 | /* **************
|
---|
415 | Initial values
|
---|
416 | ************** */
|
---|
417 |
|
---|
418 | initial_sub_scale = 5;
|
---|
419 | initial_sub_scale_ass = 1;
|
---|
420 | initial_volume = 40;
|
---|
421 | initial_contrast = 0;
|
---|
422 | initial_brightness = 0;
|
---|
423 | initial_hue = 0;
|
---|
424 | initial_saturation = 0;
|
---|
425 | initial_gamma = 0;
|
---|
426 |
|
---|
427 | initial_audio_equalizer << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0;
|
---|
428 |
|
---|
429 | initial_zoom_factor = 1.0;
|
---|
430 | initial_sub_pos = 100; // 100%
|
---|
431 |
|
---|
432 | initial_postprocessing = false;
|
---|
433 | initial_volnorm = false;
|
---|
434 |
|
---|
435 | initial_deinterlace = MediaSettings::NoDeinterlace;
|
---|
436 |
|
---|
437 | initial_audio_channels = MediaSettings::ChDefault;
|
---|
438 | initial_stereo_mode = MediaSettings::Stereo;
|
---|
439 |
|
---|
440 | initial_audio_track = 1;
|
---|
441 | initial_subtitle_track = 1;
|
---|
442 |
|
---|
443 |
|
---|
444 | /* ************
|
---|
445 | MPlayer info
|
---|
446 | ************ */
|
---|
447 |
|
---|
448 | mplayer_detected_version = -1; //None version parsed yet
|
---|
449 | mplayer_user_supplied_version = -1;
|
---|
450 | mplayer_is_mplayer2 = false;
|
---|
451 | mplayer2_detected_version = QString::null;
|
---|
452 |
|
---|
453 |
|
---|
454 | /* *********
|
---|
455 | Instances
|
---|
456 | ********* */
|
---|
457 | #ifdef SINGLE_INSTANCE
|
---|
458 | use_single_instance = true;
|
---|
459 | #endif
|
---|
460 |
|
---|
461 |
|
---|
462 | /* ****************
|
---|
463 | Floating control
|
---|
464 | **************** */
|
---|
465 |
|
---|
466 | floating_control_margin = 0;
|
---|
467 | floating_control_width = 70; //70 %
|
---|
468 | floating_control_animated = true;
|
---|
469 | floating_display_in_compact_mode = false;
|
---|
470 | #ifndef Q_OS_WIN
|
---|
471 | bypass_window_manager = true;
|
---|
472 | #endif
|
---|
473 |
|
---|
474 |
|
---|
475 | /* *******
|
---|
476 | History
|
---|
477 | ******* */
|
---|
478 |
|
---|
479 | history_recents->clear();
|
---|
480 | history_urls->clear();
|
---|
481 |
|
---|
482 |
|
---|
483 | /* *******
|
---|
484 | Filters
|
---|
485 | ******* */
|
---|
486 |
|
---|
487 | filters->init();
|
---|
488 | }
|
---|
489 |
|
---|
490 | #ifndef NO_USE_INI_FILES
|
---|
491 | void Preferences::save() {
|
---|
492 | qDebug("Preferences::save");
|
---|
493 |
|
---|
494 | QSettings * set = settings;
|
---|
495 |
|
---|
496 |
|
---|
497 | /* *******
|
---|
498 | General
|
---|
499 | ******* */
|
---|
500 |
|
---|
501 | set->beginGroup( "general");
|
---|
502 |
|
---|
503 | set->setValue("config_version", config_version);
|
---|
504 |
|
---|
505 | set->setValue("mplayer_bin", mplayer_bin);
|
---|
506 | set->setValue("driver/vo", vo);
|
---|
507 | set->setValue("driver/audio_output", ao);
|
---|
508 |
|
---|
509 | set->setValue("use_screenshot", use_screenshot);
|
---|
510 | #if QT_VERSION >= 0x040400
|
---|
511 | set->setValue("screenshot_folder", screenshot_directory);
|
---|
512 | #else
|
---|
513 | set->setValue("screenshot_directory", screenshot_directory);
|
---|
514 | #endif
|
---|
515 |
|
---|
516 | set->setValue("dont_remember_media_settings", dont_remember_media_settings);
|
---|
517 | set->setValue("dont_remember_time_pos", dont_remember_time_pos);
|
---|
518 |
|
---|
519 | set->setValue("audio_lang", audio_lang);
|
---|
520 | set->setValue("subtitle_lang", subtitle_lang);
|
---|
521 |
|
---|
522 | set->setValue("use_direct_rendering", use_direct_rendering);
|
---|
523 | set->setValue("use_double_buffer", use_double_buffer);
|
---|
524 | set->setValue("use_soft_video_eq", use_soft_video_eq);
|
---|
525 | set->setValue("use_slices", use_slices );
|
---|
526 | set->setValue("autoq", autoq);
|
---|
527 | set->setValue("add_blackborders_on_fullscreen", add_blackborders_on_fullscreen);
|
---|
528 |
|
---|
529 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
530 | set->setValue("turn_screensaver_off", turn_screensaver_off);
|
---|
531 | set->setValue("avoid_screensaver", avoid_screensaver);
|
---|
532 | #else
|
---|
533 | set->setValue("disable_screensaver", disable_screensaver);
|
---|
534 | #endif
|
---|
535 |
|
---|
536 | #ifndef Q_OS_WIN
|
---|
537 | set->setValue("vdpau_ffh264vdpau", vdpau.ffh264vdpau);
|
---|
538 | set->setValue("vdpau_ffmpeg12vdpau", vdpau.ffmpeg12vdpau);
|
---|
539 | set->setValue("vdpau_ffwmv3vdpau", vdpau.ffwmv3vdpau);
|
---|
540 | set->setValue("vdpau_ffvc1vdpau", vdpau.ffvc1vdpau);
|
---|
541 | set->setValue("vdpau_ffodivxvdpau", vdpau.ffodivxvdpau);
|
---|
542 | set->setValue("vdpau_disable_video_filters", vdpau.disable_video_filters);
|
---|
543 | #endif
|
---|
544 |
|
---|
545 | set->setValue("use_soft_vol", use_soft_vol);
|
---|
546 | set->setValue("softvol_max", softvol_max);
|
---|
547 | set->setValue("use_scaletempo", use_scaletempo);
|
---|
548 | set->setValue("use_hwac3", use_hwac3 );
|
---|
549 | set->setValue("use_audio_equalizer", use_audio_equalizer );
|
---|
550 |
|
---|
551 | set->setValue("global_volume", global_volume);
|
---|
552 | set->setValue("volume", volume);
|
---|
553 | set->setValue("mute", mute);
|
---|
554 |
|
---|
555 | set->setValue("autosync", autosync);
|
---|
556 | set->setValue("autosync_factor", autosync_factor);
|
---|
557 |
|
---|
558 | set->setValue("use_mc", use_mc);
|
---|
559 | set->setValue("mc_value", mc_value);
|
---|
560 |
|
---|
561 | set->setValue("osd", osd);
|
---|
562 | set->setValue("osd_delay", osd_delay);
|
---|
563 |
|
---|
564 | set->setValue("file_settings_method", file_settings_method);
|
---|
565 |
|
---|
566 | set->endGroup(); // general
|
---|
567 |
|
---|
568 |
|
---|
569 | /* ***************
|
---|
570 | Drives (CD/DVD)
|
---|
571 | *************** */
|
---|
572 |
|
---|
573 | set->beginGroup( "drives");
|
---|
574 |
|
---|
575 | set->setValue("dvd_device", dvd_device);
|
---|
576 | set->setValue("cdrom_device", cdrom_device);
|
---|
577 |
|
---|
578 | #ifdef Q_OS_WIN
|
---|
579 | set->setValue("enable_audiocd_on_windows", enable_audiocd_on_windows);
|
---|
580 | #endif
|
---|
581 |
|
---|
582 | set->setValue("vcd_initial_title", vcd_initial_title);
|
---|
583 |
|
---|
584 | #if DVDNAV_SUPPORT
|
---|
585 | set->setValue("use_dvdnav", use_dvdnav);
|
---|
586 | #endif
|
---|
587 |
|
---|
588 | set->endGroup(); // drives
|
---|
589 |
|
---|
590 |
|
---|
591 | /* ***********
|
---|
592 | Performance
|
---|
593 | *********** */
|
---|
594 |
|
---|
595 | set->beginGroup( "performance");
|
---|
596 |
|
---|
597 | set->setValue("priority", priority);
|
---|
598 | set->setValue("frame_drop", frame_drop);
|
---|
599 | set->setValue("hard_frame_drop", hard_frame_drop);
|
---|
600 | set->setValue("coreavc", coreavc);
|
---|
601 | set->setValue("h264_skip_loop_filter", h264_skip_loop_filter);
|
---|
602 | set->setValue("HD_height", HD_height);
|
---|
603 |
|
---|
604 | set->setValue("fast_audio_change", fast_audio_change);
|
---|
605 | #if !SMART_DVD_CHAPTERS
|
---|
606 | set->setValue("fast_chapter_change", fast_chapter_change);
|
---|
607 | #endif
|
---|
608 |
|
---|
609 | set->setValue("threads", threads);
|
---|
610 |
|
---|
611 | set->setValue("cache_for_files", cache_for_files);
|
---|
612 | set->setValue("cache_for_streams", cache_for_streams);
|
---|
613 | set->setValue("cache_for_dvds", cache_for_dvds);
|
---|
614 | set->setValue("cache_for_vcds", cache_for_vcds);
|
---|
615 | set->setValue("cache_for_audiocds", cache_for_audiocds);
|
---|
616 | set->setValue("cache_for_tv", cache_for_tv);
|
---|
617 |
|
---|
618 | set->endGroup(); // performance
|
---|
619 |
|
---|
620 | #ifdef YOUTUBE_SUPPORT
|
---|
621 | set->beginGroup("youtube");
|
---|
622 | set->setValue("quality", yt_quality);
|
---|
623 | set->setValue("user_agent", yt_user_agent);
|
---|
624 | set->endGroup();
|
---|
625 | #endif
|
---|
626 |
|
---|
627 |
|
---|
628 | /* *********
|
---|
629 | Subtitles
|
---|
630 | ********* */
|
---|
631 |
|
---|
632 | set->beginGroup("subtitles");
|
---|
633 |
|
---|
634 | set->setValue("font_file", font_file);
|
---|
635 | set->setValue("font_name", font_name);
|
---|
636 |
|
---|
637 | set->setValue("use_fontconfig", use_fontconfig);
|
---|
638 | set->setValue("subcp", subcp);
|
---|
639 | set->setValue("use_enca", use_enca);
|
---|
640 | set->setValue("enca_lang", enca_lang);
|
---|
641 | set->setValue("font_autoscale", font_autoscale);
|
---|
642 | set->setValue("subfuzziness", subfuzziness);
|
---|
643 | set->setValue("autoload_sub", autoload_sub);
|
---|
644 |
|
---|
645 | set->setValue("use_ass_subtitles", use_ass_subtitles);
|
---|
646 | set->setValue("ass_line_spacing", ass_line_spacing);
|
---|
647 | set->setValue("use_forced_subs_only", use_forced_subs_only);
|
---|
648 |
|
---|
649 | set->setValue("sub_visibility", sub_visibility);
|
---|
650 |
|
---|
651 | set->setValue("subtitles_on_screenshots", subtitles_on_screenshots);
|
---|
652 |
|
---|
653 | set->setValue("use_new_sub_commands", use_new_sub_commands);
|
---|
654 | set->setValue("change_sub_scale_should_restart", change_sub_scale_should_restart);
|
---|
655 |
|
---|
656 | set->setValue("fast_load_sub", fast_load_sub);
|
---|
657 |
|
---|
658 | // ASS styles
|
---|
659 | ass_styles.save(set);
|
---|
660 | set->setValue("force_ass_styles", force_ass_styles);
|
---|
661 | set->setValue("user_forced_ass_style", user_forced_ass_style);
|
---|
662 |
|
---|
663 | set->setValue("freetype_support", freetype_support);
|
---|
664 |
|
---|
665 | set->endGroup(); // subtitles
|
---|
666 |
|
---|
667 |
|
---|
668 | /* ********
|
---|
669 | Advanced
|
---|
670 | ******** */
|
---|
671 |
|
---|
672 | set->beginGroup( "advanced");
|
---|
673 |
|
---|
674 | #if USE_ADAPTER
|
---|
675 | set->setValue("adapter", adapter);
|
---|
676 | #endif
|
---|
677 |
|
---|
678 | #if USE_COLORKEY
|
---|
679 | set->setValue("color_key", QString::number(color_key,16));
|
---|
680 | #endif
|
---|
681 |
|
---|
682 | set->setValue("use_mplayer_window", use_mplayer_window);
|
---|
683 |
|
---|
684 | set->setValue("monitor_aspect", monitor_aspect);
|
---|
685 |
|
---|
686 | set->setValue("use_idx", use_idx);
|
---|
687 |
|
---|
688 | set->setValue("mplayer_additional_options", mplayer_additional_options);
|
---|
689 | set->setValue("mplayer_additional_video_filters", mplayer_additional_video_filters);
|
---|
690 | set->setValue("mplayer_additional_audio_filters", mplayer_additional_audio_filters);
|
---|
691 |
|
---|
692 | #ifdef LOG_MPLAYER
|
---|
693 | set->setValue("log_mplayer", log_mplayer);
|
---|
694 | set->setValue("verbose_log", verbose_log);
|
---|
695 | set->setValue("autosave_mplayer_log", autosave_mplayer_log);
|
---|
696 | set->setValue("mplayer_log_saveto", mplayer_log_saveto);
|
---|
697 | #endif
|
---|
698 | #ifdef LOG_SMPLAYER
|
---|
699 | set->setValue("log_smplayer", log_smplayer);
|
---|
700 | set->setValue("log_filter", log_filter);
|
---|
701 | set->setValue("save_smplayer_log", save_smplayer_log);
|
---|
702 | #endif
|
---|
703 |
|
---|
704 | #if REPAINT_BACKGROUND_OPTION
|
---|
705 | set->setValue("repaint_video_background", repaint_video_background);
|
---|
706 | #endif
|
---|
707 |
|
---|
708 | set->setValue("use_edl_files", use_edl_files);
|
---|
709 |
|
---|
710 | set->setValue("prefer_ipv4", prefer_ipv4);
|
---|
711 |
|
---|
712 | set->setValue("use_short_pathnames", use_short_pathnames);
|
---|
713 |
|
---|
714 | set->setValue("change_video_equalizer_on_startup", change_video_equalizer_on_startup);
|
---|
715 |
|
---|
716 | set->setValue("use_pausing_keep_force", use_pausing_keep_force);
|
---|
717 |
|
---|
718 | set->setValue("correct_pts", use_correct_pts);
|
---|
719 |
|
---|
720 | set->setValue("actions_to_run", actions_to_run);
|
---|
721 |
|
---|
722 | set->setValue("show_tag_in_window_title", show_tag_in_window_title);
|
---|
723 |
|
---|
724 | set->endGroup(); // advanced
|
---|
725 |
|
---|
726 |
|
---|
727 | /* *********
|
---|
728 | GUI stuff
|
---|
729 | ********* */
|
---|
730 |
|
---|
731 | set->beginGroup("gui");
|
---|
732 |
|
---|
733 | set->setValue("fullscreen", fullscreen);
|
---|
734 | set->setValue("start_in_fullscreen", start_in_fullscreen);
|
---|
735 |
|
---|
736 | set->setValue("compact_mode", compact_mode);
|
---|
737 | set->setValue("stay_on_top", (int) stay_on_top);
|
---|
738 | set->setValue("size_factor", size_factor);
|
---|
739 | set->setValue("resize_method", resize_method);
|
---|
740 |
|
---|
741 | #if STYLE_SWITCHING
|
---|
742 | set->setValue("style", style);
|
---|
743 | #endif
|
---|
744 |
|
---|
745 | set->setValue("mouse_left_click_function", mouse_left_click_function);
|
---|
746 | set->setValue("mouse_right_click_function", mouse_right_click_function);
|
---|
747 | set->setValue("mouse_double_click_function", mouse_double_click_function);
|
---|
748 | set->setValue("mouse_middle_click_function", mouse_middle_click_function);
|
---|
749 | set->setValue("mouse_xbutton1_click_function", mouse_xbutton1_click_function);
|
---|
750 | set->setValue("mouse_xbutton2_click_function", mouse_xbutton2_click_function);
|
---|
751 | set->setValue("mouse_wheel_function", wheel_function);
|
---|
752 | set->setValue("wheel_function_cycle", (int) wheel_function_cycle);
|
---|
753 | set->setValue("wheel_function_seeking_reverse", wheel_function_seeking_reverse);
|
---|
754 |
|
---|
755 | set->setValue("seeking1", seeking1);
|
---|
756 | set->setValue("seeking2", seeking2);
|
---|
757 | set->setValue("seeking3", seeking3);
|
---|
758 | set->setValue("seeking4", seeking4);
|
---|
759 |
|
---|
760 | set->setValue("update_while_seeking", update_while_seeking);
|
---|
761 | #if ENABLE_DELAYED_DRAGGING
|
---|
762 | set->setValue("time_slider_drag_delay", time_slider_drag_delay);
|
---|
763 | #endif
|
---|
764 | #if SEEKBAR_RESOLUTION
|
---|
765 | set->setValue("relative_seeking", relative_seeking);
|
---|
766 | #endif
|
---|
767 | set->setValue("precise_seeking", precise_seeking);
|
---|
768 |
|
---|
769 | set->setValue("language", language);
|
---|
770 | set->setValue("iconset", iconset);
|
---|
771 |
|
---|
772 | set->setValue("balloon_count", balloon_count);
|
---|
773 |
|
---|
774 | set->setValue("restore_pos_after_fullscreen", restore_pos_after_fullscreen);
|
---|
775 | set->setValue("save_window_size_on_exit", save_window_size_on_exit);
|
---|
776 |
|
---|
777 | set->setValue("close_on_finish", close_on_finish);
|
---|
778 |
|
---|
779 | set->setValue("default_font", default_font);
|
---|
780 |
|
---|
781 | set->setValue("pause_when_hidden", pause_when_hidden);
|
---|
782 |
|
---|
783 | set->setValue("allow_video_movement", allow_video_movement);
|
---|
784 |
|
---|
785 | set->setValue("gui", gui);
|
---|
786 |
|
---|
787 | #if USE_MINIMUMSIZE
|
---|
788 | set->setValue("gui_minimum_width", gui_minimum_width);
|
---|
789 | #endif
|
---|
790 | set->setValue("default_size", default_size);
|
---|
791 |
|
---|
792 | #if ALLOW_TO_HIDE_VIDEO_WINDOW_ON_AUDIO_FILES
|
---|
793 | set->setValue("hide_video_window_on_audio_files", hide_video_window_on_audio_files);
|
---|
794 | #endif
|
---|
795 |
|
---|
796 | set->setValue("report_mplayer_crashes", report_mplayer_crashes);
|
---|
797 |
|
---|
798 | #if REPORT_OLD_MPLAYER
|
---|
799 | set->setValue("reported_mplayer_is_old", reported_mplayer_is_old);
|
---|
800 | #endif
|
---|
801 |
|
---|
802 | set->setValue("auto_add_to_playlist", auto_add_to_playlist);
|
---|
803 | set->setValue("add_to_playlist_consecutive_files", add_to_playlist_consecutive_files);
|
---|
804 |
|
---|
805 | #if LOGO_ANIMATION
|
---|
806 | set->setValue("animated_logo", animated_logo);
|
---|
807 | #endif
|
---|
808 |
|
---|
809 | set->endGroup(); // gui
|
---|
810 |
|
---|
811 |
|
---|
812 | /* ********
|
---|
813 | TV (dvb)
|
---|
814 | ******** */
|
---|
815 |
|
---|
816 | set->beginGroup( "tv");
|
---|
817 | set->setValue("check_channels_conf_on_startup", check_channels_conf_on_startup);
|
---|
818 | set->setValue("initial_tv_deinterlace", initial_tv_deinterlace);
|
---|
819 | set->setValue("last_dvb_channel", last_dvb_channel);
|
---|
820 | set->setValue("last_tv_channel", last_tv_channel);
|
---|
821 | set->endGroup(); // tv
|
---|
822 |
|
---|
823 | /* ***********
|
---|
824 | Directories
|
---|
825 | *********** */
|
---|
826 |
|
---|
827 | set->beginGroup( "directories");
|
---|
828 | if (save_dirs) {
|
---|
829 | set->setValue("latest_dir", latest_dir);
|
---|
830 | set->setValue("last_dvd_directory", last_dvd_directory);
|
---|
831 | } else {
|
---|
832 | set->setValue("latest_dir", "");
|
---|
833 | set->setValue("last_dvd_directory", "");
|
---|
834 | }
|
---|
835 | set->setValue("save_dirs", save_dirs);
|
---|
836 | set->endGroup(); // directories
|
---|
837 |
|
---|
838 |
|
---|
839 | /* **************
|
---|
840 | Initial values
|
---|
841 | ************** */
|
---|
842 |
|
---|
843 | set->beginGroup( "defaults");
|
---|
844 |
|
---|
845 | set->setValue("initial_sub_scale", initial_sub_scale);
|
---|
846 | set->setValue("initial_sub_scale_ass", initial_sub_scale_ass);
|
---|
847 | set->setValue("initial_volume", initial_volume);
|
---|
848 | set->setValue("initial_contrast", initial_contrast);
|
---|
849 | set->setValue("initial_brightness", initial_brightness);
|
---|
850 | set->setValue("initial_hue", initial_hue);
|
---|
851 | set->setValue("initial_saturation", initial_saturation);
|
---|
852 | set->setValue("initial_gamma", initial_gamma);
|
---|
853 |
|
---|
854 | set->setValue("initial_audio_equalizer", initial_audio_equalizer);
|
---|
855 |
|
---|
856 | set->setValue("initial_zoom_factor", initial_zoom_factor);
|
---|
857 | set->setValue("initial_sub_pos", initial_sub_pos);
|
---|
858 |
|
---|
859 | set->setValue("initial_volnorm", initial_volnorm);
|
---|
860 | set->setValue("initial_postprocessing", initial_postprocessing);
|
---|
861 |
|
---|
862 | set->setValue("initial_deinterlace", initial_deinterlace);
|
---|
863 |
|
---|
864 | set->setValue("initial_audio_channels", initial_audio_channels);
|
---|
865 | set->setValue("initial_stereo_mode", initial_stereo_mode);
|
---|
866 |
|
---|
867 | set->setValue("initial_audio_track", initial_audio_track);
|
---|
868 | set->setValue("initial_subtitle_track", initial_subtitle_track);
|
---|
869 |
|
---|
870 | set->endGroup(); // defaults
|
---|
871 |
|
---|
872 |
|
---|
873 | /* ************
|
---|
874 | MPlayer info
|
---|
875 | ************ */
|
---|
876 |
|
---|
877 | set->beginGroup( "mplayer_info");
|
---|
878 | set->setValue("mplayer_detected_version", mplayer_detected_version);
|
---|
879 | set->setValue("mplayer_user_supplied_version", mplayer_user_supplied_version);
|
---|
880 | set->setValue("is_mplayer2", mplayer_is_mplayer2);
|
---|
881 | set->setValue("mplayer2_detected_version", mplayer2_detected_version);
|
---|
882 | set->endGroup(); // mplayer_info
|
---|
883 |
|
---|
884 |
|
---|
885 | /* *********
|
---|
886 | Instances
|
---|
887 | ********* */
|
---|
888 | #ifdef SINGLE_INSTANCE
|
---|
889 | set->beginGroup("instances");
|
---|
890 | set->setValue("single_instance_enabled", use_single_instance);
|
---|
891 | set->endGroup(); // instances
|
---|
892 | #endif
|
---|
893 |
|
---|
894 |
|
---|
895 | /* ****************
|
---|
896 | Floating control
|
---|
897 | **************** */
|
---|
898 |
|
---|
899 | set->beginGroup("floating_control");
|
---|
900 | set->setValue("margin", floating_control_margin);
|
---|
901 | set->setValue("width", floating_control_width);
|
---|
902 | set->setValue("animated", floating_control_animated);
|
---|
903 | set->setValue("display_in_compact_mode", floating_display_in_compact_mode);
|
---|
904 | #ifndef Q_OS_WIN
|
---|
905 | set->setValue("bypass_window_manager", bypass_window_manager);
|
---|
906 | #endif
|
---|
907 | set->endGroup(); // floating_control
|
---|
908 |
|
---|
909 |
|
---|
910 | /* *******
|
---|
911 | History
|
---|
912 | ******* */
|
---|
913 |
|
---|
914 | set->beginGroup("history");
|
---|
915 | set->setValue("recents", history_recents->toStringList());
|
---|
916 | set->setValue("recents/max_items", history_recents->maxItems());
|
---|
917 | set->setValue("urls", history_urls->toStringList());
|
---|
918 | set->setValue("urls/max_items", history_urls->maxItems());
|
---|
919 | set->endGroup(); // history
|
---|
920 |
|
---|
921 |
|
---|
922 | /* *******
|
---|
923 | Filters
|
---|
924 | ******* */
|
---|
925 |
|
---|
926 | filters->save(set);
|
---|
927 |
|
---|
928 |
|
---|
929 | set->sync();
|
---|
930 | }
|
---|
931 |
|
---|
932 | void Preferences::load() {
|
---|
933 | qDebug("Preferences::load");
|
---|
934 |
|
---|
935 | QSettings * set = settings;
|
---|
936 |
|
---|
937 |
|
---|
938 | /* *******
|
---|
939 | General
|
---|
940 | ******* */
|
---|
941 |
|
---|
942 | set->beginGroup( "general");
|
---|
943 |
|
---|
944 | config_version = set->value("config_version", 0).toInt();
|
---|
945 |
|
---|
946 | mplayer_bin = set->value("mplayer_bin", mplayer_bin).toString();
|
---|
947 | vo = set->value("driver/vo", vo).toString();
|
---|
948 | ao = set->value("driver/audio_output", ao).toString();
|
---|
949 |
|
---|
950 | use_screenshot = set->value("use_screenshot", use_screenshot).toBool();
|
---|
951 | #if QT_VERSION >= 0x040400
|
---|
952 | screenshot_directory = set->value("screenshot_folder", screenshot_directory).toString();
|
---|
953 | setupScreenshotFolder();
|
---|
954 | #else
|
---|
955 | screenshot_directory = set->value("screenshot_directory", screenshot_directory).toString();
|
---|
956 | #endif
|
---|
957 |
|
---|
958 | dont_remember_media_settings = set->value("dont_remember_media_settings", dont_remember_media_settings).toBool();
|
---|
959 | dont_remember_time_pos = set->value("dont_remember_time_pos", dont_remember_time_pos).toBool();
|
---|
960 |
|
---|
961 | audio_lang = set->value("audio_lang", audio_lang).toString();
|
---|
962 | subtitle_lang = set->value("subtitle_lang", subtitle_lang).toString();
|
---|
963 |
|
---|
964 | use_direct_rendering = set->value("use_direct_rendering", use_direct_rendering).toBool();
|
---|
965 | use_double_buffer = set->value("use_double_buffer", use_double_buffer).toBool();
|
---|
966 |
|
---|
967 | use_soft_video_eq = set->value("use_soft_video_eq", use_soft_video_eq).toBool();
|
---|
968 | use_slices = set->value("use_slices", use_slices ).toBool();
|
---|
969 | autoq = set->value("autoq", autoq).toInt();
|
---|
970 | add_blackborders_on_fullscreen = set->value("add_blackborders_on_fullscreen", add_blackborders_on_fullscreen).toBool();
|
---|
971 |
|
---|
972 | #if defined(Q_OS_WIN) || defined(Q_OS_OS2)
|
---|
973 | turn_screensaver_off = set->value("turn_screensaver_off", turn_screensaver_off).toBool();
|
---|
974 | avoid_screensaver = set->value("avoid_screensaver", avoid_screensaver).toBool();
|
---|
975 | #else
|
---|
976 | disable_screensaver = set->value("disable_screensaver", disable_screensaver).toBool();
|
---|
977 | #endif
|
---|
978 |
|
---|
979 | #ifndef Q_OS_WIN
|
---|
980 | vdpau.ffh264vdpau = set->value("vdpau_ffh264vdpau", vdpau.ffh264vdpau).toBool();
|
---|
981 | vdpau.ffmpeg12vdpau = set->value("vdpau_ffmpeg12vdpau", vdpau.ffmpeg12vdpau).toBool();
|
---|
982 | vdpau.ffwmv3vdpau = set->value("vdpau_ffwmv3vdpau", vdpau.ffwmv3vdpau).toBool();
|
---|
983 | vdpau.ffvc1vdpau = set->value("vdpau_ffvc1vdpau", vdpau.ffvc1vdpau).toBool();
|
---|
984 | vdpau.ffodivxvdpau = set->value("vdpau_ffodivxvdpau", vdpau.ffodivxvdpau).toBool();
|
---|
985 | vdpau.disable_video_filters = set->value("vdpau_disable_video_filters", vdpau.disable_video_filters).toBool();
|
---|
986 | #endif
|
---|
987 |
|
---|
988 | use_soft_vol = set->value("use_soft_vol", use_soft_vol).toBool();
|
---|
989 | softvol_max = set->value("softvol_max", softvol_max).toInt();
|
---|
990 | use_scaletempo = (OptionState) set->value("use_scaletempo", use_scaletempo).toInt();
|
---|
991 | use_hwac3 = set->value("use_hwac3", use_hwac3 ).toBool();
|
---|
992 | use_audio_equalizer = set->value("use_audio_equalizer", use_audio_equalizer ).toBool();
|
---|
993 |
|
---|
994 | global_volume = set->value("global_volume", global_volume).toBool();
|
---|
995 | volume = set->value("volume", volume).toInt();
|
---|
996 | mute = set->value("mute", mute).toBool();
|
---|
997 |
|
---|
998 | autosync = set->value("autosync", autosync).toBool();
|
---|
999 | autosync_factor = set->value("autosync_factor", autosync_factor).toInt();
|
---|
1000 |
|
---|
1001 | use_mc = set->value("use_mc", use_mc).toBool();
|
---|
1002 | mc_value = set->value("mc_value", mc_value).toDouble();
|
---|
1003 |
|
---|
1004 | osd = set->value("osd", osd).toInt();
|
---|
1005 | osd_delay = set->value("osd_delay", osd_delay).toInt();
|
---|
1006 |
|
---|
1007 | file_settings_method = set->value("file_settings_method", file_settings_method).toString();
|
---|
1008 |
|
---|
1009 | set->endGroup(); // general
|
---|
1010 |
|
---|
1011 |
|
---|
1012 | /* ***************
|
---|
1013 | Drives (CD/DVD)
|
---|
1014 | *************** */
|
---|
1015 |
|
---|
1016 | set->beginGroup( "drives");
|
---|
1017 |
|
---|
1018 | dvd_device = set->value("dvd_device", dvd_device).toString();
|
---|
1019 | cdrom_device = set->value("cdrom_device", cdrom_device).toString();
|
---|
1020 |
|
---|
1021 | #ifdef Q_OS_WIN
|
---|
1022 | enable_audiocd_on_windows = set->value("enable_audiocd_on_windows", enable_audiocd_on_windows).toBool();
|
---|
1023 | #endif
|
---|
1024 |
|
---|
1025 | vcd_initial_title = set->value("vcd_initial_title", vcd_initial_title ).toInt();
|
---|
1026 |
|
---|
1027 | #if DVDNAV_SUPPORT
|
---|
1028 | use_dvdnav = set->value("use_dvdnav", use_dvdnav).toBool();
|
---|
1029 | #endif
|
---|
1030 |
|
---|
1031 | set->endGroup(); // drives
|
---|
1032 |
|
---|
1033 |
|
---|
1034 | /* ***********
|
---|
1035 | Performance
|
---|
1036 | *********** */
|
---|
1037 |
|
---|
1038 | set->beginGroup( "performance");
|
---|
1039 |
|
---|
1040 | priority = set->value("priority", priority).toInt();
|
---|
1041 | frame_drop = set->value("frame_drop", frame_drop).toBool();
|
---|
1042 | hard_frame_drop = set->value("hard_frame_drop", hard_frame_drop).toBool();
|
---|
1043 | coreavc = set->value("coreavc", coreavc).toBool();
|
---|
1044 | h264_skip_loop_filter = (H264LoopFilter) set->value("h264_skip_loop_filter", h264_skip_loop_filter).toInt();
|
---|
1045 | HD_height = set->value("HD_height", HD_height).toInt();
|
---|
1046 |
|
---|
1047 | fast_audio_change = (OptionState) set->value("fast_audio_change", fast_audio_change).toInt();
|
---|
1048 | #if !SMART_DVD_CHAPTERS
|
---|
1049 | fast_chapter_change = set->value("fast_chapter_change", fast_chapter_change).toBool();
|
---|
1050 | #endif
|
---|
1051 |
|
---|
1052 | threads = set->value("threads", threads).toInt();
|
---|
1053 |
|
---|
1054 | cache_for_files = set->value("cache_for_files", cache_for_files).toInt();
|
---|
1055 | cache_for_streams = set->value("cache_for_streams", cache_for_streams).toInt();
|
---|
1056 | cache_for_dvds = set->value("cache_for_dvds", cache_for_dvds).toInt();
|
---|
1057 | cache_for_vcds = set->value("cache_for_vcds", cache_for_vcds).toInt();
|
---|
1058 | cache_for_audiocds = set->value("cache_for_audiocds", cache_for_audiocds).toInt();
|
---|
1059 | cache_for_tv = set->value("cache_for_tv", cache_for_tv).toInt();
|
---|
1060 |
|
---|
1061 | set->endGroup(); // performance
|
---|
1062 |
|
---|
1063 | #ifdef YOUTUBE_SUPPORT
|
---|
1064 | set->beginGroup("youtube");
|
---|
1065 | yt_quality = set->value("quality", yt_quality).toInt();
|
---|
1066 | yt_user_agent = set->value("user_agent", yt_user_agent).toString();
|
---|
1067 | set->endGroup();
|
---|
1068 | #endif
|
---|
1069 |
|
---|
1070 |
|
---|
1071 | /* *********
|
---|
1072 | Subtitles
|
---|
1073 | ********* */
|
---|
1074 |
|
---|
1075 | set->beginGroup("subtitles");
|
---|
1076 |
|
---|
1077 | font_file = set->value("font_file", font_file).toString();
|
---|
1078 | font_name = set->value("font_name", font_name).toString();
|
---|
1079 |
|
---|
1080 | use_fontconfig = set->value("use_fontconfig", use_fontconfig).toBool();
|
---|
1081 | subcp = set->value("subcp", subcp).toString();
|
---|
1082 | use_enca = set->value("use_enca", use_enca).toBool();
|
---|
1083 | enca_lang = set->value("enca_lang", enca_lang).toString();
|
---|
1084 | font_autoscale = set->value("font_autoscale", font_autoscale).toInt();
|
---|
1085 | subfuzziness = set->value("subfuzziness", subfuzziness).toInt();
|
---|
1086 | autoload_sub = set->value("autoload_sub", autoload_sub).toBool();
|
---|
1087 |
|
---|
1088 | use_ass_subtitles = set->value("use_ass_subtitles", use_ass_subtitles).toBool();
|
---|
1089 | ass_line_spacing = set->value("ass_line_spacing", ass_line_spacing).toInt();
|
---|
1090 |
|
---|
1091 | use_forced_subs_only = set->value("use_forced_subs_only", use_forced_subs_only).toBool();
|
---|
1092 |
|
---|
1093 | sub_visibility = set->value("sub_visibility", sub_visibility).toBool();
|
---|
1094 |
|
---|
1095 | subtitles_on_screenshots = set->value("subtitles_on_screenshots", subtitles_on_screenshots).toBool();
|
---|
1096 |
|
---|
1097 | use_new_sub_commands = (OptionState) set->value("use_new_sub_commands", use_new_sub_commands).toInt();
|
---|
1098 | change_sub_scale_should_restart = (OptionState) set->value("change_sub_scale_should_restart", change_sub_scale_should_restart).toInt();
|
---|
1099 |
|
---|
1100 | fast_load_sub = set->value("fast_load_sub", fast_load_sub).toBool();
|
---|
1101 |
|
---|
1102 | // ASS styles
|
---|
1103 | ass_styles.load(set);
|
---|
1104 | force_ass_styles = set->value("force_ass_styles", force_ass_styles).toBool();
|
---|
1105 | user_forced_ass_style = set->value("user_forced_ass_style", user_forced_ass_style).toString();
|
---|
1106 |
|
---|
1107 | freetype_support = set->value("freetype_support", freetype_support).toBool();
|
---|
1108 |
|
---|
1109 | set->endGroup(); // subtitles
|
---|
1110 |
|
---|
1111 |
|
---|
1112 | /* ********
|
---|
1113 | Advanced
|
---|
1114 | ******** */
|
---|
1115 |
|
---|
1116 | set->beginGroup( "advanced");
|
---|
1117 |
|
---|
1118 | #if USE_ADAPTER
|
---|
1119 | adapter = set->value("adapter", adapter).toInt();
|
---|
1120 | #endif
|
---|
1121 |
|
---|
1122 | #if USE_COLORKEY
|
---|
1123 | bool ok;
|
---|
1124 | QString color = set->value("color_key", QString::number(color_key,16)).toString();
|
---|
1125 | unsigned int temp_color_key = color.toUInt(&ok, 16);
|
---|
1126 | if (ok)
|
---|
1127 | color_key = temp_color_key;
|
---|
1128 | //color_key = set->value("color_key", color_key).toInt();
|
---|
1129 | #endif
|
---|
1130 |
|
---|
1131 | use_mplayer_window = set->value("use_mplayer_window", use_mplayer_window).toBool();
|
---|
1132 |
|
---|
1133 | monitor_aspect = set->value("monitor_aspect", monitor_aspect).toString();
|
---|
1134 |
|
---|
1135 | use_idx = set->value("use_idx", use_idx).toBool();
|
---|
1136 |
|
---|
1137 | mplayer_additional_options = set->value("mplayer_additional_options", mplayer_additional_options).toString();
|
---|
1138 | mplayer_additional_video_filters = set->value("mplayer_additional_video_filters", mplayer_additional_video_filters).toString();
|
---|
1139 | mplayer_additional_audio_filters = set->value("mplayer_additional_audio_filters", mplayer_additional_audio_filters).toString();
|
---|
1140 |
|
---|
1141 | #ifdef LOG_MPLAYER
|
---|
1142 | log_mplayer = set->value("log_mplayer", log_mplayer).toBool();
|
---|
1143 | verbose_log = set->value("verbose_log", verbose_log).toBool();
|
---|
1144 | autosave_mplayer_log = set->value("autosave_mplayer_log", autosave_mplayer_log).toBool();
|
---|
1145 | mplayer_log_saveto = set->value("mplayer_log_saveto", mplayer_log_saveto).toString();
|
---|
1146 | #endif
|
---|
1147 | #ifdef LOG_SMPLAYER
|
---|
1148 | log_smplayer = set->value("log_smplayer", log_smplayer).toBool();
|
---|
1149 | log_filter = set->value("log_filter", log_filter).toString();
|
---|
1150 | save_smplayer_log = set->value("save_smplayer_log", save_smplayer_log).toBool();
|
---|
1151 | #endif
|
---|
1152 |
|
---|
1153 | #if REPAINT_BACKGROUND_OPTION
|
---|
1154 | repaint_video_background = set->value("repaint_video_background", repaint_video_background).toBool();
|
---|
1155 | #endif
|
---|
1156 |
|
---|
1157 | use_edl_files = set->value("use_edl_files", use_edl_files).toBool();
|
---|
1158 |
|
---|
1159 | prefer_ipv4 = set->value("prefer_ipv4", prefer_ipv4).toBool();
|
---|
1160 |
|
---|
1161 | use_short_pathnames = set->value("use_short_pathnames", use_short_pathnames).toBool();
|
---|
1162 |
|
---|
1163 | use_pausing_keep_force = set->value("use_pausing_keep_force", use_pausing_keep_force).toBool();
|
---|
1164 |
|
---|
1165 | use_correct_pts = (OptionState) set->value("correct_pts", use_correct_pts).toInt();
|
---|
1166 |
|
---|
1167 | actions_to_run = set->value("actions_to_run", actions_to_run).toString();
|
---|
1168 |
|
---|
1169 | show_tag_in_window_title = set->value("show_tag_in_window_title", show_tag_in_window_title).toBool();
|
---|
1170 |
|
---|
1171 | set->endGroup(); // advanced
|
---|
1172 |
|
---|
1173 |
|
---|
1174 | /* *********
|
---|
1175 | GUI stuff
|
---|
1176 | ********* */
|
---|
1177 |
|
---|
1178 | set->beginGroup("gui");
|
---|
1179 |
|
---|
1180 | fullscreen = set->value("fullscreen", fullscreen).toBool();
|
---|
1181 | start_in_fullscreen = set->value("start_in_fullscreen", start_in_fullscreen).toBool();
|
---|
1182 |
|
---|
1183 | compact_mode = set->value("compact_mode", compact_mode).toBool();
|
---|
1184 | stay_on_top = (Preferences::OnTop) set->value("stay_on_top", (int) stay_on_top).toInt();
|
---|
1185 | size_factor = set->value("size_factor", size_factor).toInt();
|
---|
1186 | resize_method = set->value("resize_method", resize_method).toInt();
|
---|
1187 |
|
---|
1188 | #if STYLE_SWITCHING
|
---|
1189 | style = set->value("style", style).toString();
|
---|
1190 | #endif
|
---|
1191 |
|
---|
1192 | mouse_left_click_function = set->value("mouse_left_click_function", mouse_left_click_function).toString();
|
---|
1193 | mouse_right_click_function = set->value("mouse_right_click_function", mouse_right_click_function).toString();
|
---|
1194 | mouse_double_click_function = set->value("mouse_double_click_function", mouse_double_click_function).toString();
|
---|
1195 | mouse_middle_click_function = set->value("mouse_middle_click_function", mouse_middle_click_function).toString();
|
---|
1196 | mouse_xbutton1_click_function = set->value("mouse_xbutton1_click_function", mouse_xbutton1_click_function).toString();
|
---|
1197 | mouse_xbutton2_click_function = set->value("mouse_xbutton2_click_function", mouse_xbutton2_click_function).toString();
|
---|
1198 | wheel_function = set->value("mouse_wheel_function", wheel_function).toInt();
|
---|
1199 | int wheel_function_cycle_int = set->value("wheel_function_cycle", (int) wheel_function_cycle).toInt();
|
---|
1200 | wheel_function_cycle = QFlags<Preferences::WheelFunctions> (QFlag(wheel_function_cycle_int));
|
---|
1201 | wheel_function_seeking_reverse = set->value("wheel_function_seeking_reverse", wheel_function_seeking_reverse).toBool();
|
---|
1202 |
|
---|
1203 | seeking1 = set->value("seeking1", seeking1).toInt();
|
---|
1204 | seeking2 = set->value("seeking2", seeking2).toInt();
|
---|
1205 | seeking3 = set->value("seeking3", seeking3).toInt();
|
---|
1206 | seeking4 = set->value("seeking4", seeking4).toInt();
|
---|
1207 |
|
---|
1208 | update_while_seeking = set->value("update_while_seeking", update_while_seeking).toBool();
|
---|
1209 | #if ENABLE_DELAYED_DRAGGING
|
---|
1210 | time_slider_drag_delay = set->value("time_slider_drag_delay", time_slider_drag_delay).toInt();
|
---|
1211 | #endif
|
---|
1212 | #if SEEKBAR_RESOLUTION
|
---|
1213 | relative_seeking = set->value("relative_seeking", relative_seeking).toBool();
|
---|
1214 | #endif
|
---|
1215 | precise_seeking = set->value("precise_seeking", precise_seeking).toBool();
|
---|
1216 |
|
---|
1217 | language = set->value("language", language).toString();
|
---|
1218 | iconset= set->value("iconset", iconset).toString();
|
---|
1219 |
|
---|
1220 | balloon_count = set->value("balloon_count", balloon_count).toInt();
|
---|
1221 |
|
---|
1222 | restore_pos_after_fullscreen = set->value("restore_pos_after_fullscreen", restore_pos_after_fullscreen).toBool();
|
---|
1223 | save_window_size_on_exit = set->value("save_window_size_on_exit", save_window_size_on_exit).toBool();
|
---|
1224 |
|
---|
1225 | close_on_finish = set->value("close_on_finish", close_on_finish).toBool();
|
---|
1226 |
|
---|
1227 | default_font = set->value("default_font", default_font).toString();
|
---|
1228 |
|
---|
1229 | pause_when_hidden = set->value("pause_when_hidden", pause_when_hidden).toBool();
|
---|
1230 |
|
---|
1231 | allow_video_movement = set->value("allow_video_movement", allow_video_movement).toBool();
|
---|
1232 |
|
---|
1233 | gui = set->value("gui", gui).toString();
|
---|
1234 |
|
---|
1235 | #if USE_MINIMUMSIZE
|
---|
1236 | gui_minimum_width = set->value("gui_minimum_width", gui_minimum_width).toInt();
|
---|
1237 | #endif
|
---|
1238 | default_size = set->value("default_size", default_size).toSize();
|
---|
1239 |
|
---|
1240 | #if ALLOW_TO_HIDE_VIDEO_WINDOW_ON_AUDIO_FILES
|
---|
1241 | hide_video_window_on_audio_files = set->value("hide_video_window_on_audio_files", hide_video_window_on_audio_files).toBool();
|
---|
1242 | #endif
|
---|
1243 |
|
---|
1244 | report_mplayer_crashes = set->value("report_mplayer_crashes", report_mplayer_crashes).toBool();
|
---|
1245 |
|
---|
1246 | #if REPORT_OLD_MPLAYER
|
---|
1247 | reported_mplayer_is_old = set->value("reported_mplayer_is_old", reported_mplayer_is_old).toBool();
|
---|
1248 | #endif
|
---|
1249 |
|
---|
1250 | auto_add_to_playlist = set->value("auto_add_to_playlist", auto_add_to_playlist).toBool();
|
---|
1251 | add_to_playlist_consecutive_files = set->value("add_to_playlist_consecutive_files", add_to_playlist_consecutive_files).toBool();
|
---|
1252 |
|
---|
1253 | #if LOGO_ANIMATION
|
---|
1254 | animated_logo = set->value("animated_logo", animated_logo).toBool();
|
---|
1255 | #endif
|
---|
1256 |
|
---|
1257 | set->endGroup(); // gui
|
---|
1258 |
|
---|
1259 |
|
---|
1260 | /* ********
|
---|
1261 | TV (dvb)
|
---|
1262 | ******** */
|
---|
1263 |
|
---|
1264 | set->beginGroup( "tv");
|
---|
1265 | check_channels_conf_on_startup = set->value("check_channels_conf_on_startup", check_channels_conf_on_startup).toBool();
|
---|
1266 | initial_tv_deinterlace = set->value("initial_tv_deinterlace", initial_tv_deinterlace).toInt();
|
---|
1267 | last_dvb_channel = set->value("last_dvb_channel", last_dvb_channel).toString();
|
---|
1268 | last_tv_channel = set->value("last_tv_channel", last_tv_channel).toString();
|
---|
1269 | set->endGroup(); // tv
|
---|
1270 |
|
---|
1271 |
|
---|
1272 | /* ***********
|
---|
1273 | Directories
|
---|
1274 | *********** */
|
---|
1275 |
|
---|
1276 | set->beginGroup( "directories");
|
---|
1277 | save_dirs = set->value("save_dirs", save_dirs).toBool();
|
---|
1278 | if (save_dirs) {
|
---|
1279 | latest_dir = set->value("latest_dir", latest_dir).toString();
|
---|
1280 | last_dvd_directory = set->value("last_dvd_directory", last_dvd_directory).toString();
|
---|
1281 | }
|
---|
1282 | set->endGroup(); // directories
|
---|
1283 |
|
---|
1284 |
|
---|
1285 | /* **************
|
---|
1286 | Initial values
|
---|
1287 | ************** */
|
---|
1288 |
|
---|
1289 | set->beginGroup( "defaults");
|
---|
1290 |
|
---|
1291 | initial_sub_scale = set->value("initial_sub_scale", initial_sub_scale).toDouble();
|
---|
1292 | initial_sub_scale_ass = set->value("initial_sub_scale_ass", initial_sub_scale_ass).toDouble();
|
---|
1293 | initial_volume = set->value("initial_volume", initial_volume).toInt();
|
---|
1294 | initial_contrast = set->value("initial_contrast", initial_contrast).toInt();
|
---|
1295 | initial_brightness = set->value("initial_brightness", initial_brightness).toInt();
|
---|
1296 | initial_hue = set->value("initial_hue", initial_hue).toInt();
|
---|
1297 | initial_saturation = set->value("initial_saturation", initial_saturation).toInt();
|
---|
1298 | initial_gamma = set->value("initial_gamma", initial_gamma).toInt();
|
---|
1299 |
|
---|
1300 | initial_audio_equalizer = set->value("initial_audio_equalizer", initial_audio_equalizer).toList();
|
---|
1301 |
|
---|
1302 | initial_zoom_factor = set->value("initial_zoom_factor", initial_zoom_factor).toDouble();
|
---|
1303 | initial_sub_pos = set->value("initial_sub_pos", initial_sub_pos).toInt();
|
---|
1304 |
|
---|
1305 | initial_volnorm = set->value("initial_volnorm", initial_volnorm).toBool();
|
---|
1306 | initial_postprocessing = set->value("initial_postprocessing", initial_postprocessing).toBool();
|
---|
1307 |
|
---|
1308 | initial_deinterlace = set->value("initial_deinterlace", initial_deinterlace).toInt();
|
---|
1309 |
|
---|
1310 | initial_audio_channels = set->value("initial_audio_channels", initial_audio_channels).toInt();
|
---|
1311 | initial_stereo_mode = set->value("initial_stereo_mode", initial_stereo_mode).toInt();
|
---|
1312 |
|
---|
1313 | initial_audio_track = set->value("initial_audio_track", initial_audio_track).toInt();
|
---|
1314 | initial_subtitle_track = set->value("initial_subtitle_track", initial_subtitle_track).toInt();
|
---|
1315 |
|
---|
1316 | set->endGroup(); // defaults
|
---|
1317 |
|
---|
1318 |
|
---|
1319 | /* ************
|
---|
1320 | MPlayer info
|
---|
1321 | ************ */
|
---|
1322 |
|
---|
1323 | set->beginGroup( "mplayer_info");
|
---|
1324 | mplayer_detected_version = set->value("mplayer_detected_version", mplayer_detected_version).toInt();
|
---|
1325 | mplayer_user_supplied_version = set->value("mplayer_user_supplied_version", mplayer_user_supplied_version).toInt();
|
---|
1326 | mplayer_is_mplayer2 = set->value("is_mplayer2", mplayer_is_mplayer2).toBool();
|
---|
1327 | mplayer2_detected_version = set->value("mplayer2_detected_version", mplayer2_detected_version).toString();
|
---|
1328 |
|
---|
1329 | set->endGroup(); // mplayer_info
|
---|
1330 |
|
---|
1331 |
|
---|
1332 | /* *********
|
---|
1333 | Instances
|
---|
1334 | ********* */
|
---|
1335 | #ifdef SINGLE_INSTANCE
|
---|
1336 | set->beginGroup("instances");
|
---|
1337 | use_single_instance = set->value("single_instance_enabled", use_single_instance).toBool();
|
---|
1338 | set->endGroup(); // instances
|
---|
1339 | #endif
|
---|
1340 |
|
---|
1341 |
|
---|
1342 | /* ****************
|
---|
1343 | Floating control
|
---|
1344 | **************** */
|
---|
1345 |
|
---|
1346 | set->beginGroup("floating_control");
|
---|
1347 | floating_control_margin = set->value("margin", floating_control_margin).toInt();
|
---|
1348 | floating_control_width = set->value("width", floating_control_width).toInt();
|
---|
1349 | floating_control_animated = set->value("animated", floating_control_animated).toBool();
|
---|
1350 | floating_display_in_compact_mode = set->value("display_in_compact_mode", floating_display_in_compact_mode).toBool();
|
---|
1351 | #ifndef Q_OS_WIN
|
---|
1352 | bypass_window_manager = set->value("bypass_window_manager", bypass_window_manager).toBool();
|
---|
1353 | #endif
|
---|
1354 | set->endGroup(); // floating_control
|
---|
1355 |
|
---|
1356 |
|
---|
1357 | /* *******
|
---|
1358 | History
|
---|
1359 | ******* */
|
---|
1360 |
|
---|
1361 | set->beginGroup("history");
|
---|
1362 |
|
---|
1363 | history_recents->setMaxItems( set->value("recents/max_items", history_recents->maxItems()).toInt() );
|
---|
1364 | history_recents->fromStringList( set->value("recents", history_recents->toStringList()).toStringList() );
|
---|
1365 |
|
---|
1366 | history_urls->setMaxItems( set->value("urls/max_items", history_urls->maxItems()).toInt() );
|
---|
1367 | history_urls->fromStringList( set->value("urls", history_urls->toStringList()).toStringList() );
|
---|
1368 |
|
---|
1369 | set->endGroup(); // history
|
---|
1370 |
|
---|
1371 |
|
---|
1372 | /* *******
|
---|
1373 | Filters
|
---|
1374 | ******* */
|
---|
1375 |
|
---|
1376 | filters->load(set);
|
---|
1377 |
|
---|
1378 | // Fix some values if config is old
|
---|
1379 | if (config_version < CURRENT_CONFIG_VERSION) {
|
---|
1380 | qDebug("Preferences::load: config version is old, updating it");
|
---|
1381 | config_version = CURRENT_CONFIG_VERSION;
|
---|
1382 | /*
|
---|
1383 | iconset = "Nuvola";
|
---|
1384 | yt_user_agent = "Mozilla/5.0 (compatible; Googlebot/2.1; +http://www.google.com/bot.html)";
|
---|
1385 | */
|
---|
1386 | }
|
---|
1387 | }
|
---|
1388 |
|
---|
1389 | #endif // NO_USE_INI_FILES
|
---|
1390 |
|
---|
1391 | double Preferences::monitor_aspect_double() {
|
---|
1392 | qDebug("Preferences::monitor_aspect_double");
|
---|
1393 |
|
---|
1394 | QRegExp exp("(\\d+)[:/](\\d+)");
|
---|
1395 | if (exp.indexIn( monitor_aspect ) != -1) {
|
---|
1396 | int w = exp.cap(1).toInt();
|
---|
1397 | int h = exp.cap(2).toInt();
|
---|
1398 | qDebug(" monitor_aspect parsed successfully: %d:%d", w, h);
|
---|
1399 | return (double) w/h;
|
---|
1400 | }
|
---|
1401 |
|
---|
1402 | bool ok;
|
---|
1403 | double res = monitor_aspect.toDouble(&ok);
|
---|
1404 | if (ok) {
|
---|
1405 | qDebug(" monitor_aspect parsed successfully: %f", res);
|
---|
1406 | return res;
|
---|
1407 | } else {
|
---|
1408 | qDebug(" warning: monitor_aspect couldn't be parsed!");
|
---|
1409 | qDebug(" monitor_aspect set to 0");
|
---|
1410 | return 0;
|
---|
1411 | }
|
---|
1412 | }
|
---|
1413 |
|
---|
1414 | void Preferences::setupScreenshotFolder() {
|
---|
1415 | #if QT_VERSION >= 0x040400
|
---|
1416 | if (screenshot_directory.isEmpty()) {
|
---|
1417 | QString pdir = QDesktopServices::storageLocation(QDesktopServices::PicturesLocation);
|
---|
1418 | if (pdir.isEmpty()) pdir = QDesktopServices::storageLocation(QDesktopServices::DocumentsLocation);
|
---|
1419 | if (pdir.isEmpty()) pdir = QDesktopServices::storageLocation(QDesktopServices::HomeLocation);
|
---|
1420 | if (pdir.isEmpty()) pdir = "/tmp";
|
---|
1421 | if (!QFile::exists(pdir)) {
|
---|
1422 | qWarning("Preferences::setupScreenshotFolder: folder '%s' does not exist. Using /tmp as fallback", pdir.toUtf8().constData());
|
---|
1423 | pdir = "/tmp";
|
---|
1424 | }
|
---|
1425 | QString default_screenshot_path = pdir + "/smplayer_screenshots";
|
---|
1426 | if (!QFile::exists(default_screenshot_path)) {
|
---|
1427 | qDebug("Preferences::setupScreenshotFolder: creating '%s'", default_screenshot_path.toUtf8().constData());
|
---|
1428 | if (!QDir().mkdir(default_screenshot_path)) {
|
---|
1429 | qWarning("Preferences::setupScreenshotFolder: failed to create '%s'", default_screenshot_path.toUtf8().constData());
|
---|
1430 | }
|
---|
1431 | }
|
---|
1432 | if (QFile::exists(default_screenshot_path)) {
|
---|
1433 | screenshot_directory = default_screenshot_path;
|
---|
1434 | }
|
---|
1435 | }
|
---|
1436 | #endif
|
---|
1437 | }
|
---|