Ignore:
Timestamp:
May 27, 2013, 3:28:05 PM (12 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: update trunk to 0.8.5

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/playlist.cpp

    r139 r142  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2012 Ricardo Villalba <rvm@users.sourceforge.net>
     2    Copyright (C) 2006-2013 Ricardo Villalba <rvm@users.sourceforge.net>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    4747#include "images.h"
    4848#include "preferences.h"
     49#include "multilineinputdialog.h"
    4950#include "version.h"
    5051#include "global.h"
     
    215216        connect( addDirectoryAct, SIGNAL(triggered()), this, SLOT(addDirectory()) );
    216217
     218        addUrlsAct = new MyAction(this, "pl_add_urls", false);
     219        connect( addUrlsAct, SIGNAL(triggered()), this, SLOT(addUrls()) );
     220
    217221        // Remove actions
    218222        removeSelectedAct = new MyAction(this, "pl_remove_selected", false);
     
    239243        add_menu->addAction(addFilesAct );
    240244        add_menu->addAction(addDirectoryAct);
     245        add_menu->addAction(addUrlsAct);
    241246
    242247        add_button = new QToolButton( this );
     
    309314        addFilesAct->change( tr("Add &file(s)") );
    310315        addDirectoryAct->change( tr("Add &directory") );
     316        addUrlsAct->change( tr("Add &URL(s)") );
    311317
    312318        // Remove actions
     
    10811087}
    10821088
     1089void 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
    10831100void Playlist::addOneDirectory(QString dir) {
    10841101        QStringList filelist;
Note: See TracChangeset for help on using the changeset viewer.