Ignore:
Timestamp:
May 23, 2013, 5:06:17 PM (12 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 0.8.5'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • smplayer/vendor/current/src/preferences.cpp

    r137 r140  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    3939#endif
    4040
    41 #define CURRENT_CONFIG_VERSION 2
     41#define CURRENT_CONFIG_VERSION 4
    4242
    4343using namespace Global;
     
    140140        mc_value = 0;
    141141
    142         osd = Seek;
     142        osd = None;
    143143        osd_delay = 2200;
    144144
     
    175175
    176176        priority = AboveNormal; // Option only for windows
    177         frame_drop = true;
     177        frame_drop = false;
    178178        hard_frame_drop = false;
    179179        coreavc = false;
     
    189189        threads = 1;
    190190
    191         cache_for_files = 0;
    192         cache_for_streams = 1000;
     191        cache_for_files = 2048;
     192        cache_for_streams = 2048;
    193193        cache_for_dvds = 0; // not recommended to use cache for dvds
    194         cache_for_vcds = 1000;
    195         cache_for_audiocds = 1000;
     194        cache_for_vcds = 1024;
     195        cache_for_audiocds = 1024;
    196196        cache_for_tv = 3000;
    197197
     
    302302        show_tag_in_window_title = true;
    303303
    304         time_to_kill_mplayer = 5000;
     304        time_to_kill_mplayer = 1000;
    305305
    306306
     
    315315        size_factor = 100; // 100%
    316316
    317         resize_method = Always;
     317        resize_method = Never;
    318318
    319319#if STYLE_SWITCHING
    320320        style="";
    321321#endif
     322
     323        move_when_dragging = false;
    322324
    323325
     
    350352        precise_seeking = true;
    351353
     354        reset_stop = false;
     355
    352356        language = "";
    353         iconset = "";
    354357
    355358        balloon_count = 5;
     
    371374        allow_video_movement = false;
    372375
    373         gui = "DefaultGui";
     376#ifdef SKINS
     377        gui = "SkinGUI";
     378        iconset = "Gonzo";
     379#else
     380        gui = "DefaultGUI";
     381        iconset = "";
     382#endif
    374383
    375384#if USE_MINIMUMSIZE
    376385        gui_minimum_width = 0; // 0 == disabled
    377386#endif
    378         default_size = QSize(580, 440);
     387        default_size = QSize(683, 509);
    379388
    380389#if ALLOW_TO_HIDE_VIDEO_WINDOW_ON_AUDIO_FILES
     
    755764        set->setValue("style", style);
    756765#endif
     766
     767        set->setValue("move_when_dragging", move_when_dragging);
    757768
    758769        set->setValue("mouse_left_click_function", mouse_left_click_function);
     
    779790#endif
    780791        set->setValue("precise_seeking", precise_seeking);
     792
     793        set->setValue("reset_stop", reset_stop);
    781794
    782795        set->setValue("language", language);
     
    12151228#endif
    12161229
     1230        move_when_dragging = set->value("move_when_dragging", move_when_dragging).toBool();
     1231
    12171232        mouse_left_click_function = set->value("mouse_left_click_function", mouse_left_click_function).toString();
    12181233        mouse_right_click_function = set->value("mouse_right_click_function", mouse_right_click_function).toString();
     
    12401255        precise_seeking = set->value("precise_seeking", precise_seeking).toBool();
    12411256
     1257        reset_stop = set->value("reset_stop", reset_stop).toBool();
     1258
    12421259        language = set->value("language", language).toString();
    12431260        iconset= set->value("iconset", iconset).toString();
     
    14151432        if (config_version < CURRENT_CONFIG_VERSION) {
    14161433                qDebug("Preferences::load: config version is old, updating it");
     1434                /*
     1435                if (config_version <= 2) {
     1436                        use_slices = false;
     1437                }
     1438                if (config_version <= 3) {
     1439                        osd = None;
     1440                        frame_drop = false;
     1441                        cache_for_files = 2048;
     1442                        cache_for_streams = 2048;
     1443                        time_to_kill_mplayer = 1000;
     1444                }
     1445                */
     1446                if (config_version <= 4) {
     1447                        use_slices = false;
     1448                        osd = None;
     1449                        frame_drop = false;
     1450                        cache_for_files = 2048;
     1451                        cache_for_streams = 2048;
     1452                        time_to_kill_mplayer = 1000;
     1453
     1454                        resize_method = Never;
     1455                        move_when_dragging = false;
     1456                }
    14171457                config_version = CURRENT_CONFIG_VERSION;
    1418                 use_slices = false;
    14191458        }
     1459
     1460#ifdef Q_OS_WIN
     1461        // Check if the mplayer binary exists and try to fix it
     1462        if (!QFile::exists(mplayer_bin)) {
     1463                qWarning("mplayer_bin '%s' doesn' exist", mplayer_bin.toLatin1().constData());
     1464                bool fixed = false;
     1465                if (QFile::exists("mplayer/mplayer.exe")) {
     1466                        mplayer_bin = "mplayer/mplayer.exe";
     1467                        fixed = true;
     1468                } else
     1469                if (QFile::exists("mplayer/mplayer2.exe")) {
     1470                        mplayer_bin = "mplayer/mplayer2.exe";
     1471                        fixed = true;
     1472                }
     1473                if (fixed) {
     1474                        qWarning("mplayer_bin changed to '%s'", mplayer_bin.toLatin1().constData());
     1475                }
     1476        }
     1477#endif
    14201478}
    14211479
Note: See TracChangeset for help on using the changeset viewer.