Ignore:
Timestamp:
May 16, 2014, 9:51:55 AM (11 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to latest 0.8.7

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/prefplaylist.cpp

    r142 r165  
    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
     
    2626        setupUi(this);
    2727
     28        media_to_add_combo->addItem(tr("None"), Preferences::NoFiles);
     29        media_to_add_combo->addItem(tr("Video files"), Preferences::VideoFiles);
     30        media_to_add_combo->addItem(tr("Audio files"), Preferences::AudioFiles);
     31        media_to_add_combo->addItem(tr("Video and audio files"), Preferences::MultimediaFiles);
     32        media_to_add_combo->addItem(tr("Consecutive files"), Preferences::ConsecutiveFiles);
     33
    2834        createHelp();
    2935}
     
    4854void PrefPlaylist::setData(Preferences * pref) {
    4955        setAutoAddFilesToPlaylist( pref->auto_add_to_playlist );
    50         setAddConsecutiveFiles( pref->add_to_playlist_consecutive_files );
     56        setMediaToAdd( pref->media_to_add_to_playlist );
    5157}
    5258
     
    5561
    5662        pref->auto_add_to_playlist = autoAddFilesToPlaylist();
    57         pref->add_to_playlist_consecutive_files = addConsecutiveFiles();
     63        pref->media_to_add_to_playlist = (Preferences::AutoAddToPlaylistFilter) mediaToAdd();
    5864}
    5965
     
    6672}
    6773
    68 void PrefPlaylist::setAddConsecutiveFiles(bool b) {
    69         add_consecutive_files_check->setChecked(b);
     74void PrefPlaylist::setMediaToAdd(int type) {
     75        int i = media_to_add_combo->findData(type);
     76        if (i < 0) i = 0;
     77        media_to_add_combo->setCurrentIndex(i);
    7078}
    7179
    72 bool PrefPlaylist::addConsecutiveFiles() {
    73         return add_consecutive_files_check->isChecked();
     80int PrefPlaylist::mediaToAdd() {
     81        return media_to_add_combo->itemData( media_to_add_combo->currentIndex() ).toInt();
    7482}
    7583
     
    115123           "to the playlist.") );
    116124
    117         setWhatsThis(add_consecutive_files_check, tr("Add consecutive files"),
    118                 tr("If this option is enabled, SMPlayer will look for consecutive "
    119            "files (e.g. video_1.avi, video_2.avi...) and if found, they'll be "
    120            "added to the playlist.") );
     125        setWhatsThis(media_to_add_combo, tr("Add files from folder"),
     126                tr("This option allows to add files automatically to the playlist:") +"<br>"+
     127                tr("<b>None</b>: no files will be added") +"<br>"+
     128                tr("<b>Video files</b>: all video files found in the folder will be added") +"<br>"+
     129                tr("<b>Audio files</b>: all audio files found in the folder will be added") +"<br>"+
     130                tr("<b>Video and audio files</b>: all video and audio files found in the folder will be added") +"<br>"+
     131                tr("<b>Consecutive files</b>: consecutive files (like video_1.avi, video_2.avi) will be added") );
    121132
    122133        setWhatsThis(play_from_start_check, tr("Play files from start"),
Note: See TracChangeset for help on using the changeset viewer.