Ignore:
Timestamp:
May 15, 2014, 7:53:54 PM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 0.8.7

File:
1 edited

Legend:

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

    r140 r163  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    4040        connect( style_border_style_combo, SIGNAL(currentIndexChanged(int)),
    4141             this, SLOT(checkBorderStyleCombo(int)) );
     42
     43#ifndef Q_OS_WIN
     44        windowsfontdir_check->hide();
     45#endif
    4246
    4347        retranslateStrings();
     
    156160        setForceAssStyles(pref->force_ass_styles);
    157161        setCustomizedAssStyle(pref->user_forced_ass_style);
     162
     163#ifdef Q_OS_WIN
     164        windowsfontdir_check->setChecked(pref->use_windowsfontdir);
     165        if (!windowsfontdir_check->isChecked()) on_windowsfontdir_check_toggled(false);
     166#endif
    158167}
    159168
     
    199208        TEST_AND_SET(pref->force_ass_styles, forceAssStyles());
    200209        TEST_AND_SET(pref->user_forced_ass_style, customizedAssStyle());
     210
     211#ifdef Q_OS_WIN
     212        pref->use_windowsfontdir = windowsfontdir_check->isChecked();
     213#endif
    201214}
    202215
     
    406419}
    407420
     421void PrefSubtitles::on_windowsfontdir_check_toggled(bool b) {
     422        qDebug("PrefSubtitles::on_windowsfontdir_check_toggled: %d", b);
     423
     424#ifdef Q_OS_WIN
     425        if (b) {
     426                style_font_combo->setFontsFromDir(QString::null);
     427        } else {
     428                QString fontdir = Paths::fontPath();
     429                //QString fontdir = "/tmp/fonts/";
     430                style_font_combo->setFontsFromDir(fontdir);
     431        }
     432#endif
     433}
     434
    408435void PrefSubtitles::createHelp() {
    409436        clearHelp();
     
    445472           "<b>Disabling this option could make that subtitles won't work "
    446473           "at all!</b>") );
     474
     475#ifdef Q_OS_WIN
     476        setWhatsThis(windowsfontdir_check, tr("Enable Windows fonts"),
     477                tr("If this option is enabled the Windows system fonts will be "
     478           "available for subtitles. There's an inconvenience: a font cache have "
     479           "to be created which can take some time.") +"<br>"+
     480                tr("If this option is not checked then only a few fonts bundled with SMPlayer "
     481           "can be used, but this is faster.") );
     482#endif
    447483
    448484        addSectionTitle(tr("Font"));
Note: See TracChangeset for help on using the changeset viewer.