Ignore:
Timestamp:
Mar 15, 2012, 5:14:10 PM (13 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer 0.7.1: vendor update

File:
1 edited

Legend:

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

    r118 r121  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2011 Ricardo Villalba <rvm@escomposlinux.org>
     2    Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    2929#include <QStyleFactory>
    3030#include <QFontDialog>
     31
     32#define SINGLE_INSTANCE_TAB 2
    3133
    3234PrefInterface::PrefInterface(QWidget * parent, Qt::WindowFlags f)
     
    8486
    8587QPixmap PrefInterface::sectionIcon() {
    86     return Images::icon("pref_gui");
     88    return Images::icon("pref_gui", 22);
    8789}
    8890
     
    181183        setUpdateWhileDragging(pref->update_while_seeking);
    182184        setRelativeSeeking(pref->relative_seeking);
     185        setPreciseSeeking(pref->precise_seeking);
    183186
    184187        setDefaultFont(pref->default_font);
     188
     189        setHideVideoOnAudioFiles(pref->hide_video_window_on_audio_files);
    185190
    186191#if STYLE_SWITCHING
     
    244249        pref->update_while_seeking = updateWhileDragging();
    245250        pref->relative_seeking= relativeSeeking();
     251        pref->precise_seeking = preciseSeeking();
    246252
    247253        pref->default_font = defaultFont();
     254
     255        pref->hide_video_window_on_audio_files = hideVideoOnAudioFiles();
    248256
    249257#if STYLE_SWITCHING
     
    366374}
    367375
     376void PrefInterface::setSingleInstanceTabEnabled(bool b) {
     377        tabWidget->setTabEnabled(SINGLE_INSTANCE_TAB, b);
     378}
     379
     380bool PrefInterface::singleInstanceTabEnabled() {
     381        return tabWidget->isTabEnabled(SINGLE_INSTANCE_TAB);
     382}
     383
    368384void PrefInterface::setRecentsMaxItems(int n) {
    369385        recents_max_items_spin->setValue(n);
     
    426442}
    427443
     444void PrefInterface::setPreciseSeeking(bool b) {
     445        precise_seeking_check->setChecked(b);
     446}
     447
     448bool PrefInterface::preciseSeeking() {
     449        return precise_seeking_check->isChecked();
     450}
     451
    428452void PrefInterface::setDefaultFont(QString font_desc) {
    429453        default_font_edit->setText(font_desc);
     
    456480}
    457481
     482void PrefInterface::setHideVideoOnAudioFiles(bool b) {
     483        hide_video_window_on_audio_check->setChecked(b);
     484}
     485
     486bool PrefInterface::hideVideoOnAudioFiles() {
     487        return hide_video_window_on_audio_check->isChecked();
     488}
     489
    458490// Floating tab
    459491void PrefInterface::setFloatingAnimated(bool b) {
     
    511543        tr("If you check this option, the position and size of the main "
    512544           "window will be saved and restored when you run SMPlayer again.") );
     545
     546        setWhatsThis(hide_video_window_on_audio_check, tr("Hide video window when playing audio files"),
     547        tr("If this option is enabled the video window will be hidden when playing audio files.") );
    513548
    514549        setWhatsThis(recents_max_items_spin, tr("Recent files"),
     
    565600           "relative seeking may work better with files with a wrong length.") );
    566601
     602        setWhatsThis(precise_seeking_check, tr("Precise seeking"),
     603                tr("If this option is enabled, seeks are more accurate but they "
     604           "can be a little bit slower. May not work with some video formats.") +"<br>"+
     605                tr("Note: this option only works with MPlayer2") );
     606
    567607        addSectionTitle(tr("Instances"));
    568608
Note: See TracChangeset for help on using the changeset viewer.