Ignore:
Timestamp:
Dec 27, 2011, 5:44:12 PM (14 years ago)
Author:
Silvan Scherrer
Message:

SMPlayer: latest svn update

Location:
smplayer/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • smplayer/trunk

  • smplayer/trunk/src/playlist.cpp

    r112 r119  
    11/*  smplayer, GUI front-end for mplayer.
    2     Copyright (C) 2006-2010 Ricardo Villalba <[email protected]>
     2    Copyright (C) 2006-201 Ricardo Villalba <[email protected]>
    33
    44    This program is free software; you can redistribute it and/or modify
     
    5252#include "extensions.h"
    5353#include "guiconfig.h"
    54 #include "playlistpreferences.h"
    5554
    5655#include <stdlib.h>
     
    7473        save_playlist_in_config = true;
    7574        recursive_add_directory = false;
    76 #ifdef Q_OS_WIN
    7775        automatically_get_info = false;
    78 #else
    79         automatically_get_info = true;
    80 #endif
    8176        play_files_from_start = true;
    8277
     
    176171        connect( listView, SIGNAL(cellActivated(int,int)),
    177172             this, SLOT(itemDoubleClicked(int)) );
     173
     174
     175
     176
    178177}
    179178
     
    205204        shuffleAct = new MyAction(this, "pl_shuffle", false);
    206205        shuffleAct->setCheckable(true);
    207 
    208         preferencesAct = new MyAction(this, "pl_preferences", false);
    209         connect( preferencesAct, SIGNAL(triggered()), this, SLOT(editPreferences()) );
    210206
    211207        // Add actions
     
    270266        toolbar->addAction(moveUpAct);
    271267        toolbar->addAction(moveDownAct);
    272         toolbar->addSeparator();
    273         toolbar->addAction(preferencesAct);
    274268
    275269        // Popup menu
     
    311305        shuffleAct->change( Images::icon("shuffle"), tr("S&huffle") );
    312306
    313         preferencesAct->change( Images::icon("prefs"), tr("Preferences") );
    314 
    315307        // Add actions
    316308        addCurrentAct->change( tr("Add &current file") );
     
    345337               (*it).duration() );
    346338        }
     339
     340
     341
     342
     343
     344
     345
     346
     347
     348
     349
     350
     351
    347352}
    348353
     
    421426
    422427        setModified( false );
     428
     429
     430
     431
     432
     433
     434
     435
     436
     437
    423438}
    424439
     
    473488        }
    474489}
     490
     491
     492
     493
     494
     495
     496
     497
     498
     499
     500
     501
     502
     503
     504
     505
     506
     507
     508
     509
     510
     511
     512
     513
     514
     515
     516
     517
     518
     519
     520
     521
     522
     523
     524
     525
     526
     527
     528
     529
     530
     531
     532
     533
     534
     535
     536
     537
     538
     539
     540
     541
     542
     543
     544
     545
     546
     547
     548
     549
     550
     551
     552
     553
     554
     555
     556
     557
     558
     559
     560
     561
     562
     563
     564
     565
     566
     567
     568
     569
     570
     571
     572
     573
     574
     575
     576
     577
     578
     579
     580
    475581
    476582void Playlist::load_m3u(QString file) {
     
    9081014
    9091015void Playlist::addFiles() {
     1016
    9101017        QStringList files = MyFileDialog::getOpenFileNames(
    9111018                            this, tr("Select one or more files to open"),
    9121019                            lastDir(),
     1020
    9131021                            tr("All files") +" (*.*)" );
    9141022
     
    11131221        qDebug(" currentRow: %d", current );
    11141222
     1223
     1224
     1225
     1226
     1227
     1228
     1229
     1230
     1231
     1232
     1233
     1234
     1235
     1236
     1237
     1238
    11151239        if (current >= 1) {
    11161240                swapItems( current, current-1 );
     
    11231247        }
    11241248}
    1125 
    1126 void Playlist::downItem() {
    1127         qDebug("Playlist::downItem");
    1128 
    1129         int current = listView->currentRow();
    1130         qDebug(" currentRow: %d", current );
     1249void Playlist::moveItemDown(int current ){
     1250        qDebug("Playlist::moveItemDown");
    11311251
    11321252        if ( (current > -1) && (current < (pl.count()-1)) ) {
     
    11661286                setModified( true );
    11671287    }
    1168 }
    1169 
    1170 void Playlist::editPreferences() {
    1171         PlaylistPreferences d(this);
    1172 
    1173         d.setDirectoryRecursion(recursive_add_directory);
    1174         d.setAutoGetInfo(automatically_get_info);
    1175         d.setSavePlaylistOnExit(save_playlist_in_config);
    1176         d.setPlayFilesFromStart(play_files_from_start);
    1177 
    1178         if (d.exec() == QDialog::Accepted) {
    1179                 recursive_add_directory = d.directoryRecursion();
    1180                 automatically_get_info = d.autoGetInfo();
    1181                 save_playlist_in_config = d.savePlaylistOnExit();
    1182                 play_files_from_start = d.playFilesFromStart();
    1183         }
    11841288}
    11851289
     
    12181322        }
    12191323
     1324
    12201325        QStringList only_files;
    12211326        for (int n = 0; n < files.count(); n++) {
     
    12281333        addFiles( only_files );
    12291334}
     1335
    12301336
    12311337void Playlist::hideEvent( QHideEvent * ) {
Note: See TracChangeset for help on using the changeset viewer.