Ignore:
Timestamp:
Jan 24, 2017, 12:24:46 PM (8 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update vendor to 17.1.0

File:
1 edited

Legend:

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

    r179 r186  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2016 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2017 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    2727#include "playerid.h"
    2828
    29 #if USE_ALSA_DEVICES || USE_DSOUND_DEVICES
     29#if USE_ALSA_DEVICES || USE_PULSEAUDIO_DEVICES || USE_XV_ADAPTORS || USE_DSOUND_DEVICES
    3030#include "deviceinfo.h"
    3131#endif
     
    6565#if USE_ALSA_DEVICES
    6666        alsa_devices = DeviceInfo::alsaDevices();
     67#endif
     68#if USE_MPV_ALSA_DEVICES
     69        mpv_alsa_devices = DeviceInfo::mpvAlsaDevices();
     70#endif
     71#if USE_PULSEAUDIO_DEVICES
     72        pa_devices = DeviceInfo::paDevices();
    6773#endif
    6874#if USE_XV_ADAPTORS
     
    8995#ifndef AUTO_SHUTDOWN_PC
    9096        shutdown_widget->hide();
     97#endif
     98
     99#ifndef ADD_BLACKBORDERS_FS
     100        blackborders_on_fs_check->hide();
     101#endif
     102
     103#ifndef INITIAL_BLACKBORDERS
     104        blackborders_check->hide();
    91105#endif
    92106
     
    245259        setUseSlices( pref->use_slices );
    246260        setStartInFullscreen( pref->start_in_fullscreen );
     261
     262#ifdef ADD_BLACKBORDERS_FS
    247263        setBlackbordersOnFullscreen( pref->add_blackborders_on_fullscreen );
     264#endif
     265
     266#ifdef INITIAL_BLACKBORDERS
     267        blackborders_check->setChecked(pref->initial_blackborders);
     268#endif
     269
    248270        setAutoq( pref->autoq );
    249271
     
    338360        TEST_AND_SET(pref->use_slices, useSlices());
    339361        pref->start_in_fullscreen = startInFullscreen();
     362
     363#ifdef ADD_BLACKBORDERS_FS
    340364        if (pref->add_blackborders_on_fullscreen != blackbordersOnFullscreen()) {
    341365                pref->add_blackborders_on_fullscreen = blackbordersOnFullscreen();
    342366                if (pref->fullscreen) requires_restart = true;
    343367        }
     368#endif
     369
     370#ifdef INITIAL_BLACKBORDERS
     371        pref->initial_blackborders = blackborders_check->isChecked();
     372#endif
     373
    344374        TEST_AND_SET(pref->autoq, autoq());
    345375
     
    446476                ao = ao_list[n].name();
    447477                ao_combo->addItem( ao, ao );
     478                /*
    448479                #ifdef Q_OS_OS2
    449480                if ( ao == "kai") {
     
    452483                }
    453484                #endif
     485                */
    454486                #if USE_ALSA_DEVICES
    455487                if ((ao == "alsa") && (!alsa_devices.isEmpty())) {
    456488                        for (int n=0; n < alsa_devices.count(); n++) {
    457                                 ao_combo->addItem( "alsa (" + alsa_devices[n].ID().toString() + " - " + alsa_devices[n].desc() + ")",
    458                                    "alsa:device=hw=" + alsa_devices[n].ID().toString() );
     489                                ao_combo->addItem( DeviceInfo::printableName("alsa", alsa_devices[n]), DeviceInfo::internalName("alsa", alsa_devices[n]) );
     490                        }
     491                }
     492                #endif
     493                #if USE_MPV_ALSA_DEVICES
     494                if ((ao == "alsa") && (!mpv_alsa_devices.isEmpty())) {
     495                        for (int n=0; n < mpv_alsa_devices.count(); n++) {
     496                                ao_combo->addItem( DeviceInfo::printableName("alsa", mpv_alsa_devices[n]), DeviceInfo::internalName("alsa", mpv_alsa_devices[n]) );
     497                        }
     498                }
     499                #endif
     500                #if USE_PULSEAUDIO_DEVICES
     501                if ((ao == "pulse") && (!pa_devices.isEmpty())) {
     502                        for (int n=0; n < pa_devices.count(); n++) {
     503                                ao_combo->addItem( DeviceInfo::printableName("pulse", pa_devices[n]), DeviceInfo::internalName("pulse", pa_devices[n]) );
    459504                        }
    460505                }
     
    463508                if ((ao == "dsound") && (!dsound_devices.isEmpty())) {
    464509                        for (int n=0; n < dsound_devices.count(); n++) {
    465                                 ao_combo->addItem( "dsound (" + dsound_devices[n].ID().toString() + " - " + dsound_devices[n].desc() + ")",
    466                                    "dsound:device=" + dsound_devices[n].ID().toString() );
     510                                ao_combo->addItem( DeviceInfo::printableName("dsound", dsound_devices[n]), DeviceInfo::internalName("dsound", dsound_devices[n]) );
    467511                        }
    468512                }
     
    519563
    520564QString PrefGeneral::screenshotDir() {
    521         return screenshot_edit->text();
     565        return screenshot_edit->text().trimmed();
    522566}
    523567
     
    863907#endif
    864908
     909#ifdef ADD_BLACKBORDERS_FS
    865910void PrefGeneral::setBlackbordersOnFullscreen(bool b) {
    866911        blackborders_on_fs_check->setChecked(b);
     
    870915        return blackborders_on_fs_check->isChecked();
    871916}
     917#endif
    872918
    873919void PrefGeneral::setAutoq(int n) {
     
    10581104        tr("<b>Note:</b> This option won't be used for TV channels.") );
    10591105
     1106#ifdef INITIAL_BLACKBORDERS
     1107        setWhatsThis(blackborders_check, tr("Add black borders for subtitles by default"),
     1108                tr("If this option is enabled, black borders will be added to the image "
     1109           "by default on new opened files."));
     1110#endif
     1111
    10601112        setWhatsThis(zoom_spin, tr("Default zoom"),
    10611113                tr("This option sets the default zoom which will be used for "
     
    10881140           "fullscreen mode.") );
    10891141
     1142#ifdef ADD_BLACKBORDERS_FS
    10901143        setWhatsThis(blackborders_on_fs_check, tr("Add black borders on fullscreen"),
    10911144                tr("If this option is enabled, black borders will be added to the "
     
    10951148           "some video drivers (like gl) are already able to display the "
    10961149           "subtitles automatically in the black borders.") */ );
     1150#endif
    10971151
    10981152#ifdef Q_OS_WIN
Note: See TracChangeset for help on using the changeset viewer.