Changeset 142 for smplayer/trunk/src/playlist.cpp
- Timestamp:
- May 27, 2013, 3:28:05 PM (12 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
- Property svn:mergeinfo changed
/smplayer/vendor/current merged: 140
- Property svn:mergeinfo changed
-
smplayer/trunk/src/playlist.cpp
r139 r142 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 2Ricardo Villalba <rvm@users.sourceforge.net>2 Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 47 47 #include "images.h" 48 48 #include "preferences.h" 49 #include "multilineinputdialog.h" 49 50 #include "version.h" 50 51 #include "global.h" … … 215 216 connect( addDirectoryAct, SIGNAL(triggered()), this, SLOT(addDirectory()) ); 216 217 218 addUrlsAct = new MyAction(this, "pl_add_urls", false); 219 connect( addUrlsAct, SIGNAL(triggered()), this, SLOT(addUrls()) ); 220 217 221 // Remove actions 218 222 removeSelectedAct = new MyAction(this, "pl_remove_selected", false); … … 239 243 add_menu->addAction(addFilesAct ); 240 244 add_menu->addAction(addDirectoryAct); 245 add_menu->addAction(addUrlsAct); 241 246 242 247 add_button = new QToolButton( this ); … … 309 314 addFilesAct->change( tr("Add &file(s)") ); 310 315 addDirectoryAct->change( tr("Add &directory") ); 316 addUrlsAct->change( tr("Add &URL(s)") ); 311 317 312 318 // Remove actions … … 1081 1087 } 1082 1088 1089 void Playlist::addUrls() { 1090 MultilineInputDialog d(this); 1091 if (d.exec() == QDialog::Accepted) { 1092 QStringList urls = d.lines(); 1093 foreach(QString u, urls) { 1094 if (!u.isEmpty()) addItem( u, "", 0 ); 1095 } 1096 updateView(); 1097 } 1098 } 1099 1083 1100 void Playlist::addOneDirectory(QString dir) { 1084 1101 QStringList filelist;
Note:
See TracChangeset
for help on using the changeset viewer.