Changeset 119 for smplayer/trunk/src/playlist.cpp
- Timestamp:
- Dec 27, 2011, 5:44:12 PM (14 years ago)
- Location:
- smplayer/trunk
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
src/playlist.cpp (modified) (16 diffs)
Legend:
- Unmodified
- Added
- Removed
-
smplayer/trunk
-
Property svn:mergeinfo
set to
/smplayer/vendor/current merged eligible
-
Property svn:mergeinfo
set to
-
smplayer/trunk/src/playlist.cpp
r112 r119 1 1 /* smplayer, GUI front-end for mplayer. 2 Copyright (C) 2006-201 0Ricardo Villalba <[email protected]>2 Copyright (C) 2006-201 Ricardo Villalba <[email protected]> 3 3 4 4 This program is free software; you can redistribute it and/or modify … … 52 52 #include "extensions.h" 53 53 #include "guiconfig.h" 54 #include "playlistpreferences.h"55 54 56 55 #include <stdlib.h> … … 74 73 save_playlist_in_config = true; 75 74 recursive_add_directory = false; 76 #ifdef Q_OS_WIN77 75 automatically_get_info = false; 78 #else79 automatically_get_info = true;80 #endif81 76 play_files_from_start = true; 82 77 … … 176 171 connect( listView, SIGNAL(cellActivated(int,int)), 177 172 this, SLOT(itemDoubleClicked(int)) ); 173 174 175 176 178 177 } 179 178 … … 205 204 shuffleAct = new MyAction(this, "pl_shuffle", false); 206 205 shuffleAct->setCheckable(true); 207 208 preferencesAct = new MyAction(this, "pl_preferences", false);209 connect( preferencesAct, SIGNAL(triggered()), this, SLOT(editPreferences()) );210 206 211 207 // Add actions … … 270 266 toolbar->addAction(moveUpAct); 271 267 toolbar->addAction(moveDownAct); 272 toolbar->addSeparator();273 toolbar->addAction(preferencesAct);274 268 275 269 // Popup menu … … 311 305 shuffleAct->change( Images::icon("shuffle"), tr("S&huffle") ); 312 306 313 preferencesAct->change( Images::icon("prefs"), tr("Preferences") );314 315 307 // Add actions 316 308 addCurrentAct->change( tr("Add ¤t file") ); … … 345 337 (*it).duration() ); 346 338 } 339 340 341 342 343 344 345 346 347 348 349 350 351 347 352 } 348 353 … … 421 426 422 427 setModified( false ); 428 429 430 431 432 433 434 435 436 437 423 438 } 424 439 … … 473 488 } 474 489 } 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 475 581 476 582 void Playlist::load_m3u(QString file) { … … 908 1014 909 1015 void Playlist::addFiles() { 1016 910 1017 QStringList files = MyFileDialog::getOpenFileNames( 911 1018 this, tr("Select one or more files to open"), 912 1019 lastDir(), 1020 913 1021 tr("All files") +" (*.*)" ); 914 1022 … … 1113 1221 qDebug(" currentRow: %d", current ); 1114 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1115 1239 if (current >= 1) { 1116 1240 swapItems( current, current-1 ); … … 1123 1247 } 1124 1248 } 1125 1126 void Playlist::downItem() { 1127 qDebug("Playlist::downItem"); 1128 1129 int current = listView->currentRow(); 1130 qDebug(" currentRow: %d", current ); 1249 void Playlist::moveItemDown(int current ){ 1250 qDebug("Playlist::moveItemDown"); 1131 1251 1132 1252 if ( (current > -1) && (current < (pl.count()-1)) ) { … … 1166 1286 setModified( true ); 1167 1287 } 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 }1184 1288 } 1185 1289 … … 1218 1322 } 1219 1323 1324 1220 1325 QStringList only_files; 1221 1326 for (int n = 0; n < files.count(); n++) { … … 1228 1333 addFiles( only_files ); 1229 1334 } 1335 1230 1336 1231 1337 void Playlist::hideEvent( QHideEvent * ) {
Note:
See TracChangeset
for help on using the changeset viewer.
