Ignore:
Timestamp:
May 3, 2016, 2:14:41 PM (10 years ago)
Author:
Silvan Scherrer
Message:

smplayer: update vendor to version 16.4

File:
1 edited

Legend:

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

    r168 r175  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2014 Ricardo Villalba <[email protected]>
     2    Copyright (C) 2006-201 Ricardo Villalba <[email protected]>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    2525#include "filters.h"
    2626#include "autohidewidget.h"
     27
    2728
    2829#include <QSettings>
     
    3132#include <QDir>
    3233#include <QLocale>
     34
    3335
    3436#if QT_VERSION >= 0x050000
     
    8789
    8890        use_screenshot = true;
     91
     92
     93
     94
    8995        screenshot_directory="";
    9096#ifdef PORTABLE_APP
     
    99105#endif
    100106
     107
     108
     109
     110
    101111        dont_remember_media_settings = false;
    102112        dont_remember_time_pos = false;
     
    133143#endif
    134144
     145
     146
     147
    135148        use_soft_vol = true;
     149
    136150        softvol_max = 110; // 110 = default value in mplayer
    137151        use_scaletempo = Detect;
     
    156170
    157171        osd = None;
     172
     173
    158174        osd_delay = 2200;
    159175
     
    199215        HD_height = 720;
    200216
     217
    201218        // MPlayer 1.0rc1 require restart, new versions don't
    202219        fast_audio_change = Detect;
     220
     221
    203222#if !SMART_DVD_CHAPTERS
    204223        fast_chapter_change = false;
     
    206225
    207226        threads = 1;
     227
    208228
    209229        cache_for_files = 2048;
     
    214234        cache_for_tv = 3000;
    215235
    216 #ifdef YOUTUBE_SUPPORT
    217         yt_quality = RetrieveYoutubeUrl::MP4_720p;
    218         //yt_user_agent = "Mozilla/5.0 (X11; Linux x86_64; rv:5.0.1) Gecko/20100101 Firefox/5.0.1";
    219         yt_user_agent = "";
    220         yt_use_https_main = false;
    221         yt_use_https_vi = false;
    222 #endif
    223 
    224236
    225237    /* *********
     
    227239       ********* */
    228240
    229         font_file = "";
    230         font_name = "";
    231         use_fontconfig = false;
    232241        subcp = "ISO-8859-1";
    233242        use_enca = false;
    234243        enca_lang = QString(QLocale::system().name()).section("_",0,0);
    235         font_autoscale = 1;
    236244        subfuzziness = 1;
    237245        autoload_sub = true;
    238246
    239247        use_ass_subtitles = true;
     248
    240249        ass_line_spacing = 0;
    241250
     
    246255        subtitles_on_screenshots = false;
    247256
    248         use_new_sub_commands = Detect;
    249257        change_sub_scale_should_restart = Detect;
    250258
     
    259267
    260268        freetype_support = true;
    261 #ifdef Q_OS_WIN
     269#ifdef
    262270        use_windowsfontdir = false;
    263271#endif
     
    284292
    285293        mplayer_additional_options="";
    286         #ifdef PORTABLE_APP
     294        #if
    287295        mplayer_additional_options="-nofontconfig";
    288296        #endif
     
    313321        use_edl_files = true;
    314322
     323
     324
     325
     326
    315327        prefer_ipv4 = true;
    316328
     
    328340
    329341        time_to_kill_mplayer = 1000;
     342
     343
     344
     345
    330346
    331347
     
    346362#endif
    347363
    348         move_when_dragging = false;
    349 
     364        = false;
     365        center_window_if_outside = true;
    350366
    351367#if DVDNAV_SUPPORT
     
    363379        wheel_function_seeking_reverse = false;
    364380
     381
     382
    365383        seeking1 = 10;
    366384        seeking2 = 60;
     
    404422        allow_video_movement = false;
    405423
    406 #ifdef SKINS
    407         gui = "SkinGUI";
    408         iconset = "Gonzo";
    409 #else
    410424        gui = "DefaultGUI";
    411         iconset = "";
    412 #endif
     425        iconset = "";
     426
    413427
    414428#if USE_MINIMUMSIZE
     
    443457        last_dvb_channel = "";
    444458        last_tv_channel = "";
     459
     460
     461
     462
     463
     464
     465
     466
     467
     468
     469
     470
     471
     472
     473
     474
     475
     476
     477
     478
     479
     480
     481
     482
     483
     484
    445485
    446486
     
    489529        mplayer_detected_version = -1; //None version parsed yet
    490530        mplayer_user_supplied_version = -1;
     531
    491532        mplayer_is_mplayer2 = false;
    492533        mplayer2_detected_version = QString::null;
     534
    493535
    494536
     
    561603
    562604        set->setValue("use_screenshot", use_screenshot);
     605
     606
     607
     608
    563609        #if QT_VERSION >= 0x040400
    564610        set->setValue("screenshot_folder", screenshot_directory);
    565611        #else
    566612        set->setValue("screenshot_directory", screenshot_directory);
     613
     614
     615
     616
    567617        #endif
    568618
     
    623673
    624674        set->setValue("osd", osd);
     675
     676
    625677        set->setValue("osd_delay", osd_delay);
    626678
     
    668720        set->setValue("HD_height", HD_height);
    669721
     722
    670723        set->setValue("fast_audio_change", fast_audio_change);
     724
     725
    671726#if !SMART_DVD_CHAPTERS
    672727        set->setValue("fast_chapter_change", fast_chapter_change);
     
    674729
    675730        set->setValue("threads", threads);
     731
    676732
    677733        set->setValue("cache_for_files", cache_for_files);
     
    684740        set->endGroup(); // performance
    685741
    686 #ifdef YOUTUBE_SUPPORT
    687         set->beginGroup("youtube");
    688         set->setValue("quality", yt_quality);
    689         set->setValue("user_agent", yt_user_agent);
    690         set->setValue("yt_use_https_main", yt_use_https_main);
    691         set->setValue("yt_use_https_vi", yt_use_https_vi);
    692         set->endGroup();
    693 #endif
    694 
    695742
    696743    /* *********
     
    700747        set->beginGroup("subtitles");
    701748
    702         set->setValue("font_file", font_file);
    703         set->setValue("font_name", font_name);
    704 
    705         set->setValue("use_fontconfig", use_fontconfig);
    706749        set->setValue("subcp", subcp);
    707750        set->setValue("use_enca", use_enca);
    708751        set->setValue("enca_lang", enca_lang);
    709         set->setValue("font_autoscale", font_autoscale);
    710752        set->setValue("subfuzziness", subfuzziness);
    711753        set->setValue("autoload_sub", autoload_sub);
    712754
    713755        set->setValue("use_ass_subtitles", use_ass_subtitles);
     756
    714757        set->setValue("ass_line_spacing", ass_line_spacing);
    715758        set->setValue("use_forced_subs_only", use_forced_subs_only);
     
    719762        set->setValue("subtitles_on_screenshots", subtitles_on_screenshots);
    720763
    721         set->setValue("use_new_sub_commands", use_new_sub_commands);
    722764        set->setValue("change_sub_scale_should_restart", change_sub_scale_should_restart);
    723765
     
    730772
    731773        set->setValue("freetype_support", freetype_support);
    732 #ifdef Q_OS_WIN
     774#ifdef
    733775        set->setValue("use_windowsfontdir", use_windowsfontdir);
    734776#endif
     
    780822        set->setValue("use_edl_files", use_edl_files);
    781823
     824
     825
     826
     827
    782828        set->setValue("prefer_ipv4", prefer_ipv4);
    783829
     
    795841
    796842        set->setValue("time_to_kill_mplayer", time_to_kill_mplayer);
     843
     844
     845
     846
    797847
    798848        set->endGroup(); // advanced
     
    817867#endif
    818868
    819         set->setValue("move_when_dragging", move_when_dragging);
     869        set->setValue("center_window", center_window);
     870        set->setValue("center_window_if_outside", center_window_if_outside);
    820871
    821872        set->setValue("mouse_left_click_function", mouse_left_click_function);
     
    829880        set->setValue("wheel_function_seeking_reverse", wheel_function_seeking_reverse);
    830881
     882
     883
    831884        set->setValue("seeking1", seeking1);
    832885        set->setValue("seeking2", seeking2);
     
    903956        set->setValue("last_tv_channel", last_tv_channel);
    904957        set->endGroup(); // tv
     958
     959
     960
     961
     962
     963
     964
     965
     966
     967
     968
     969
     970
     971
     972
     973
     974
     975
     976
     977
     978
     979
     980
     981
     982
     983
     984
     985
    905986
    906987    /* ***********
     
    9611042        set->setValue("mplayer_detected_version", mplayer_detected_version);
    9621043        set->setValue("mplayer_user_supplied_version", mplayer_user_supplied_version);
     1044
    9631045        set->setValue("is_mplayer2", mplayer_is_mplayer2);
    9641046        set->setValue("mplayer2_detected_version", mplayer2_detected_version);
     1047
    9651048        set->endGroup(); // mplayer_info
    9661049
     
    10541137
    10551138        use_screenshot = set->value("use_screenshot", use_screenshot).toBool();
     1139
     1140
     1141
     1142
    10561143        #if QT_VERSION >= 0x040400
    10571144        screenshot_directory = set->value("screenshot_folder", screenshot_directory).toString();
     
    10591146        #else
    10601147        screenshot_directory = set->value("screenshot_directory", screenshot_directory).toString();
     1148
     1149
     1150
     1151
    10611152        #endif
    10621153
     
    11181209
    11191210        osd = set->value("osd", osd).toInt();
     1211
     1212
    11201213        osd_delay = set->value("osd_delay", osd_delay).toInt();
    11211214
     
    11631256        HD_height = set->value("HD_height", HD_height).toInt();
    11641257
     1258
    11651259        fast_audio_change = (OptionState) set->value("fast_audio_change", fast_audio_change).toInt();
     1260
     1261
    11661262#if !SMART_DVD_CHAPTERS
    11671263        fast_chapter_change = set->value("fast_chapter_change", fast_chapter_change).toBool();
     
    11691265
    11701266        threads = set->value("threads", threads).toInt();
     1267
    11711268
    11721269        cache_for_files = set->value("cache_for_files", cache_for_files).toInt();
     
    11791276        set->endGroup(); // performance
    11801277
    1181 #ifdef YOUTUBE_SUPPORT
    1182         set->beginGroup("youtube");
    1183         yt_quality = set->value("quality", yt_quality).toInt();
    1184         yt_user_agent = set->value("user_agent", yt_user_agent).toString();
    1185         yt_use_https_main = set->value("yt_use_https_main", yt_use_https_main).toBool();
    1186         yt_use_https_vi = set->value("yt_use_https_vi", yt_use_https_vi).toBool();
    1187         set->endGroup();
    1188 #endif
    1189 
    11901278
    11911279    /* *********
     
    11951283        set->beginGroup("subtitles");
    11961284
    1197         font_file = set->value("font_file", font_file).toString();
    1198         font_name = set->value("font_name", font_name).toString();
    1199 
    1200         use_fontconfig = set->value("use_fontconfig", use_fontconfig).toBool();
    12011285        subcp = set->value("subcp", subcp).toString();
    12021286        use_enca = set->value("use_enca", use_enca).toBool();
    12031287        enca_lang = set->value("enca_lang", enca_lang).toString();
    1204         font_autoscale = set->value("font_autoscale", font_autoscale).toInt();
    12051288        subfuzziness = set->value("subfuzziness", subfuzziness).toInt();
    12061289        autoload_sub = set->value("autoload_sub", autoload_sub).toBool();
    12071290
    12081291        use_ass_subtitles = set->value("use_ass_subtitles", use_ass_subtitles).toBool();
     1292
    12091293        ass_line_spacing = set->value("ass_line_spacing", ass_line_spacing).toInt();
    12101294
     
    12151299        subtitles_on_screenshots = set->value("subtitles_on_screenshots", subtitles_on_screenshots).toBool();
    12161300
    1217         use_new_sub_commands = (OptionState) set->value("use_new_sub_commands", use_new_sub_commands).toInt();
    12181301        change_sub_scale_should_restart = (OptionState) set->value("change_sub_scale_should_restart", change_sub_scale_should_restart).toInt();
    12191302
     
    12261309
    12271310        freetype_support = set->value("freetype_support", freetype_support).toBool();
    1228 #ifdef Q_OS_WIN
     1311#ifdef
    12291312        use_windowsfontdir = set->value("use_windowsfontdir", use_windowsfontdir).toBool();
    12301313#endif
     
    12811364        use_edl_files = set->value("use_edl_files", use_edl_files).toBool();
    12821365
     1366
     1367
     1368
     1369
    12831370        prefer_ipv4 = set->value("prefer_ipv4", prefer_ipv4).toBool();
    12841371
     
    12941381
    12951382        time_to_kill_mplayer = set->value("time_to_kill_mplayer", time_to_kill_mplayer).toInt();
     1383
     1384
     1385
     1386
    12961387
    12971388        set->endGroup(); // advanced
     
    13161407#endif
    13171408
    1318         move_when_dragging = set->value("move_when_dragging", move_when_dragging).toBool();
     1409        center_window = set->value("center_window", center_window).toBool();
     1410        center_window_if_outside = set->value("center_window_if_outside", center_window_if_outside).toBool();
    13191411
    13201412        mouse_left_click_function = set->value("mouse_left_click_function", mouse_left_click_function).toString();
     
    13311423        wheel_function_seeking_reverse = set->value("wheel_function_seeking_reverse", wheel_function_seeking_reverse).toBool();
    13321424
     1425
     1426
    13331427        seeking1 = set->value("seeking1", seeking1).toInt();
    13341428        seeking2 = set->value("seeking2", seeking2).toInt();
     
    14051499        last_tv_channel = set->value("last_tv_channel", last_tv_channel).toString();
    14061500        set->endGroup(); // tv
     1501
     1502
     1503
     1504
     1505
     1506
     1507
     1508
     1509
     1510
     1511
     1512
     1513
     1514
     1515
     1516
     1517
     1518
     1519
     1520
     1521
     1522
     1523
     1524
     1525
     1526
     1527
    14071528
    14081529
     
    14611582        mplayer_detected_version = set->value("mplayer_detected_version", mplayer_detected_version).toInt();
    14621583        mplayer_user_supplied_version = set->value("mplayer_user_supplied_version", mplayer_user_supplied_version).toInt();
     1584
    14631585        mplayer_is_mplayer2 = set->value("is_mplayer2", mplayer_is_mplayer2).toBool();
    14641586        mplayer2_detected_version = set->value("mplayer2_detected_version", mplayer2_detected_version).toString();
    1465 
     1587#endif
    14661588        set->endGroup(); // mplayer_info
    14671589
     
    15171639       ********* */
    15181640
     1641
    15191642#ifdef CHECK_UPGRADED
    1520         set->beginGroup("smplayer");
    15211643        smplayer_stable_version = set->value("stable_version", smplayer_stable_version).toString();
    15221644        check_if_upgraded = set->value("check_if_upgraded", check_if_upgraded).toBool();
     
    15621684
    15631685                        resize_method = Never;
    1564                         move_when_dragging = false;
     1686                        move_when_dragging = false;
    15651687                }
    15661688                config_version = CURRENT_CONFIG_VERSION;
     
    15701692        // Check if the mplayer binary exists and try to fix it
    15711693        if (!QFile::exists(mplayer_bin)) {
    1572                 qWarning("mplayer_bin '%s' doesn' exist", mplayer_bin.toLatin1().constData());
     1694                qWarning("mplayer_bin '%s' doesn' exist", mplayer_bin.toLatin1().constData());
    15731695                bool fixed = false;
    15741696                if (QFile::exists("mplayer/mplayer.exe")) {
    15751697                        mplayer_bin = "mplayer/mplayer.exe";
    15761698                        fixed = true;
    1577                 } else
     1699                }
     1700                else
    15781701                if (QFile::exists("mplayer/mplayer2.exe")) {
    15791702                        mplayer_bin = "mplayer/mplayer2.exe";
    15801703                        fixed = true;
    15811704                }
     1705
     1706
     1707
     1708
     1709
    15821710                if (fixed) {
    15831711                        qWarning("mplayer_bin changed to '%s'", mplayer_bin.toLatin1().constData());
     1712
     1713
     1714
     1715
     1716
     1717
     1718
     1719
     1720
     1721
     1722
     1723
     1724
     1725
     1726
     1727
     1728
     1729
     1730
     1731
    15841732                }
    15851733        }
     
    16291777                        pdir = "/tmp";
    16301778                }
    1631                 QString default_screenshot_path = pdir + "/smplayer_screenshots";
     1779                QString default_screenshot_path = ;
    16321780                if (!QFile::exists(default_screenshot_path)) {
    16331781                        qDebug("Preferences::setupScreenshotFolder: creating '%s'", default_screenshot_path.toUtf8().constData());
     
    16401788                }
    16411789        }
     1790
     1791
     1792
    16421793#endif
    16431794}
Note: See TracChangeset for help on using the changeset viewer.