~ubuntu-branches/ubuntu/trusty/smplayer/trusty

« back to all changes in this revision

Viewing changes to src/preferences.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Maia Kozheva
  • Date: 2010-05-09 21:23:36 UTC
  • mfrom: (1.1.11 upstream) (3.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20100509212336-a9jv748zn5625qo7
Tags: 0.6.9-1
* New upstream release.
* debian/control:
  - Removed mplayer-nogui from Depends, as it is now a transitional package
    to mplayer in both Debian and Ubuntu.
  - Bumped Standards-Version to 3.8.4 (no changes needed).

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/*  smplayer, GUI front-end for mplayer.
2
 
    Copyright (C) 2006-2009 Ricardo Villalba <rvm@escomposlinux.org>
 
2
    Copyright (C) 2006-2010 Ricardo Villalba <rvm@escomposlinux.org>
3
3
 
4
4
    This program is free software; you can redistribute it and/or modify
5
5
    it under the terms of the GNU General Public License as published by
99
99
        disable_screensaver = true;
100
100
#endif
101
101
 
 
102
#ifndef Q_OS_WIN
 
103
        disable_video_filters_with_vdpau = true;
 
104
#endif
 
105
 
102
106
        use_soft_vol = true;
103
107
        softvol_max = 110; // 110 = default value in mplayer
104
108
        use_scaletempo = Detect;
115
119
        use_mc = false;
116
120
        mc_value = 0;
117
121
 
118
 
        loop = false;
119
122
        osd = Seek;
 
123
        osd_delay = 2200;
120
124
 
121
125
        file_settings_method = "hash"; // Possible values: normal & hash
122
126
 
164
168
 
165
169
        threads = 1;
166
170
 
167
 
        cache_for_files = 2000;
 
171
        cache_for_files = 0;
168
172
        cache_for_streams = 1000;
169
173
        cache_for_dvds = 0; // not recommended to use cache for dvds
170
174
        cache_for_vcds = 1000;
199
203
        use_new_sub_commands = Detect;
200
204
        change_sub_scale_should_restart = Detect;
201
205
 
 
206
        fast_load_sub = true;
 
207
 
202
208
        // ASS styles
203
209
        // Nothing to do, default values are given in
204
210
        // AssStyles constructor
238
244
        log_smplayer = true;
239
245
        log_filter = ".*";
240
246
        verbose_log = false;
 
247
        save_smplayer_log = false;
241
248
 
242
249
    //mplayer log autosaving
243
250
    autosave_mplayer_log = false;
284
291
        style="";
285
292
#endif
286
293
 
287
 
        show_frame_counter = FALSE;
288
294
        show_motion_vectors = false;
289
295
 
290
296
#if DVDNAV_SUPPORT
299
305
        mouse_xbutton2_click_function = "";
300
306
        wheel_function = Seeking;
301
307
        wheel_function_cycle = Seeking | Volume | Zoom | ChangeSpeed;
 
308
        wheel_function_seeking_reverse = false;
302
309
 
303
310
        seeking1 = 10;
304
311
        seeking2 = 60;
309
316
#if ENABLE_DELAYED_DRAGGING
310
317
        time_slider_drag_delay = 100;
311
318
#endif
 
319
#if SEEKBAR_RESOLUTION
 
320
        relative_seeking = true;
 
321
#endif
312
322
 
313
323
        language = "";
314
324
        iconset = "";
385
395
 
386
396
        initial_audio_equalizer << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0 << 0;
387
397
 
388
 
        initial_panscan_factor = 1.0;
 
398
        initial_zoom_factor = 1.0;
389
399
        initial_sub_pos = 100; // 100%
390
400
 
391
401
        initial_postprocessing = false;
467
477
 
468
478
        set->setValue("mplayer_bin", mplayer_bin);
469
479
        set->setValue("driver/vo", vo);
470
 
        set->setValue("driver/ao", ao);
 
480
        set->setValue("driver/audio_output", ao);
471
481
 
472
482
        set->setValue("use_screenshot", use_screenshot);
473
483
        set->setValue("screenshot_directory", screenshot_directory);
492
502
        set->setValue("disable_screensaver", disable_screensaver);
493
503
#endif
494
504
 
 
505
#ifndef Q_OS_WIN
 
506
        set->setValue("disable_video_filters_with_vdpau", disable_video_filters_with_vdpau);
 
507
#endif
 
508
 
495
509
        set->setValue("use_soft_vol", use_soft_vol);
496
510
        set->setValue("softvol_max", softvol_max);
497
511
        set->setValue("use_scaletempo", use_scaletempo);
508
522
        set->setValue("use_mc", use_mc);
509
523
        set->setValue("mc_value", mc_value);
510
524
 
511
 
        set->setValue("loop", loop);
512
525
        set->setValue("osd", osd);
 
526
        set->setValue("osd_delay", osd_delay);
513
527
 
514
528
        set->setValue("file_settings_method", file_settings_method);
515
529
 
597
611
        set->setValue("use_new_sub_commands", use_new_sub_commands);
598
612
        set->setValue("change_sub_scale_should_restart", change_sub_scale_should_restart);
599
613
 
 
614
        set->setValue("fast_load_sub", fast_load_sub);
 
615
 
600
616
        // ASS styles
601
617
        ass_styles.save(set);
602
618
        set->setValue("force_ass_styles", force_ass_styles);
635
651
        set->setValue("log_smplayer", log_smplayer);
636
652
        set->setValue("log_filter", log_filter);
637
653
        set->setValue("verbose_log", verbose_log);
 
654
        set->setValue("save_smplayer_log", save_smplayer_log);
638
655
 
639
656
    //mplayer log autosaving
640
657
    set->setValue("autosave_mplayer_log", autosave_mplayer_log);
680
697
        set->setValue("style", style);
681
698
#endif
682
699
 
683
 
        set->setValue("show_frame_counter", show_frame_counter);
684
700
        set->setValue("show_motion_vectors", show_motion_vectors);
685
701
 
686
702
        set->setValue("mouse_left_click_function", mouse_left_click_function);
691
707
        set->setValue("mouse_xbutton2_click_function", mouse_xbutton2_click_function);
692
708
        set->setValue("mouse_wheel_function", wheel_function);
693
709
        set->setValue("wheel_function_cycle", (int) wheel_function_cycle);
 
710
        set->setValue("wheel_function_seeking_reverse", wheel_function_seeking_reverse);
694
711
 
695
712
        set->setValue("seeking1", seeking1);
696
713
        set->setValue("seeking2", seeking2);
701
718
#if ENABLE_DELAYED_DRAGGING
702
719
        set->setValue("time_slider_drag_delay", time_slider_drag_delay);
703
720
#endif
 
721
#if SEEKBAR_RESOLUTION
 
722
        set->setValue("relative_seeking", relative_seeking);
 
723
#endif
704
724
 
705
725
        set->setValue("language", language);
706
726
        set->setValue("iconset", iconset);
779
799
 
780
800
        set->setValue("initial_audio_equalizer", initial_audio_equalizer);
781
801
 
782
 
        set->setValue("initial_panscan_factor", initial_panscan_factor);
 
802
        set->setValue("initial_zoom_factor", initial_zoom_factor);
783
803
        set->setValue("initial_sub_pos", initial_sub_pos);
784
804
 
785
805
        set->setValue("initial_volnorm", initial_volnorm);
869
889
 
870
890
        mplayer_bin = set->value("mplayer_bin", mplayer_bin).toString();
871
891
        vo = set->value("driver/vo", vo).toString();
872
 
        ao = set->value("driver/ao", ao).toString();
 
892
        ao = set->value("driver/audio_output", ao).toString();
873
893
 
874
894
        use_screenshot = set->value("use_screenshot", use_screenshot).toBool();
875
895
        screenshot_directory = set->value("screenshot_directory", screenshot_directory).toString();
895
915
        disable_screensaver = set->value("disable_screensaver", disable_screensaver).toBool();
896
916
#endif
897
917
 
 
918
#ifndef Q_OS_WIN
 
919
        disable_video_filters_with_vdpau = set->value("disable_video_filters_with_vdpau", disable_video_filters_with_vdpau).toBool();
 
920
#endif
 
921
 
898
922
        use_soft_vol = set->value("use_soft_vol", use_soft_vol).toBool();
899
923
        softvol_max = set->value("softvol_max", softvol_max).toInt();
900
924
        use_scaletempo = (OptionState) set->value("use_scaletempo", use_scaletempo).toInt();
911
935
        use_mc = set->value("use_mc", use_mc).toBool();
912
936
        mc_value = set->value("mc_value", mc_value).toDouble();
913
937
 
914
 
        loop = set->value("loop", loop).toBool();
915
938
        osd = set->value("osd", osd).toInt();
 
939
        osd_delay = set->value("osd_delay", osd_delay).toInt();
916
940
 
917
941
        file_settings_method = set->value("file_settings_method", file_settings_method).toString();
918
942
 
1001
1025
        use_new_sub_commands = (OptionState) set->value("use_new_sub_commands", use_new_sub_commands).toInt();
1002
1026
        change_sub_scale_should_restart = (OptionState) set->value("change_sub_scale_should_restart", change_sub_scale_should_restart).toInt();
1003
1027
 
 
1028
        fast_load_sub = set->value("fast_load_sub", fast_load_sub).toBool();
 
1029
 
1004
1030
        // ASS styles
1005
1031
        ass_styles.load(set);
1006
1032
        force_ass_styles = set->value("force_ass_styles", force_ass_styles).toBool();
1044
1070
        log_smplayer = set->value("log_smplayer", log_smplayer).toBool();
1045
1071
        log_filter = set->value("log_filter", log_filter).toString();
1046
1072
        verbose_log = set->value("verbose_log", verbose_log).toBool();
 
1073
        save_smplayer_log = set->value("save_smplayer_log", save_smplayer_log).toBool();
1047
1074
 
1048
1075
    //mplayer log autosaving
1049
1076
    autosave_mplayer_log = set->value("autosave_mplayer_log", autosave_mplayer_log).toBool();
1087
1114
        style = set->value("style", style).toString();
1088
1115
#endif
1089
1116
 
1090
 
        show_frame_counter = set->value("show_frame_counter", show_frame_counter).toBool();
1091
1117
        show_motion_vectors = set->value("show_motion_vectors", show_motion_vectors).toBool();
1092
1118
 
1093
1119
        mouse_left_click_function = set->value("mouse_left_click_function", mouse_left_click_function).toString();
1099
1125
        wheel_function = set->value("mouse_wheel_function", wheel_function).toInt();
1100
1126
        int wheel_function_cycle_int = set->value("wheel_function_cycle", (int) wheel_function_cycle).toInt();
1101
1127
        wheel_function_cycle = QFlags<Preferences::WheelFunctions> (QFlag(wheel_function_cycle_int));
 
1128
        wheel_function_seeking_reverse = set->value("wheel_function_seeking_reverse", wheel_function_seeking_reverse).toBool();
1102
1129
 
1103
1130
        seeking1 = set->value("seeking1", seeking1).toInt();
1104
1131
        seeking2 = set->value("seeking2", seeking2).toInt();
1109
1136
#if ENABLE_DELAYED_DRAGGING
1110
1137
        time_slider_drag_delay = set->value("time_slider_drag_delay", time_slider_drag_delay).toInt();
1111
1138
#endif
 
1139
#if SEEKBAR_RESOLUTION
 
1140
        relative_seeking = set->value("relative_seeking", relative_seeking).toBool();
 
1141
#endif
1112
1142
 
1113
1143
        language = set->value("language", language).toString();
1114
1144
        iconset= set->value("iconset", iconset).toString();
1188
1218
 
1189
1219
        initial_audio_equalizer = set->value("initial_audio_equalizer", initial_audio_equalizer).toList();
1190
1220
 
1191
 
        initial_panscan_factor = set->value("initial_panscan_factor", initial_panscan_factor).toDouble();
 
1221
        initial_zoom_factor = set->value("initial_zoom_factor", initial_zoom_factor).toDouble();
1192
1222
        initial_sub_pos = set->value("initial_sub_pos", initial_sub_pos).toInt();
1193
1223
 
1194
1224
        initial_volnorm = set->value("initial_volnorm", initial_volnorm).toBool();
1247
1277
       ******* */
1248
1278
 
1249
1279
        set->beginGroup("history");
 
1280
 
 
1281
        history_recents->setMaxItems( set->value("recents/max_items", history_recents->maxItems()).toInt() );
1250
1282
        history_recents->fromStringList( set->value("recents", history_recents->toStringList()).toStringList() );
1251
 
        history_recents->setMaxItems( set->value("recents/max_items", history_recents->maxItems()).toInt() );;
 
1283
 
 
1284
        history_urls->setMaxItems( set->value("urls/max_items", history_urls->maxItems()).toInt() );
1252
1285
        history_urls->fromStringList( set->value("urls", history_urls->toStringList()).toStringList() );
1253
 
        history_urls->setMaxItems( set->value("urls/max_items", history_urls->maxItems()).toInt() );;
 
1286
 
1254
1287
        set->endGroup(); // history
1255
1288
 
1256
1289