Changeset 165 for smplayer/trunk/src/prefplaylist.cpp
- Timestamp:
- May 16, 2014, 9:51:55 AM (11 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 163
- Property svn:mergeinfo changed
-
smplayer/trunk/src/prefplaylist.cpp
r142 r165 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 3Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2014 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 26 26 setupUi(this); 27 27 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 28 34 createHelp(); 29 35 } … … 48 54 void PrefPlaylist::setData(Preferences * pref) { 49 55 setAutoAddFilesToPlaylist( pref->auto_add_to_playlist ); 50 set AddConsecutiveFiles( pref->add_to_playlist_consecutive_files);56 setMediaToAdd( pref->media_to_add_to_playlist ); 51 57 } 52 58 … … 55 61 56 62 pref->auto_add_to_playlist = autoAddFilesToPlaylist(); 57 pref-> add_to_playlist_consecutive_files = addConsecutiveFiles();63 pref->media_to_add_to_playlist = (Preferences::AutoAddToPlaylistFilter) mediaToAdd(); 58 64 } 59 65 … … 66 72 } 67 73 68 void PrefPlaylist::setAddConsecutiveFiles(bool b) { 69 add_consecutive_files_check->setChecked(b); 74 void 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); 70 78 } 71 79 72 bool PrefPlaylist::addConsecutiveFiles() {73 return add_consecutive_files_check->isChecked();80 int PrefPlaylist::mediaToAdd() { 81 return media_to_add_combo->itemData( media_to_add_combo->currentIndex() ).toInt(); 74 82 } 75 83 … … 115 123 "to the playlist.") ); 116 124 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") ); 121 132 122 133 setWhatsThis(play_from_start_check, tr("Play files from start"),
Note:
See TracChangeset
for help on using the changeset viewer.