[plasma-mediacenter] mediaelements/playlist: Revert "PMC remembers the last playlist used."

Shantanu Tushar shantanu at kde.org
Tue Dec 17 19:01:03 UTC 2013


Git commit 5b664d5d5d6ca90d2960a43ff5499c7ffe296351 by Shantanu Tushar.
Committed on 17/12/2013 at 19:00.
Pushed by shantanu into branch 'master'.

Revert "PMC remembers the last playlist used."

This reverts commit 5fdf522c413869d98135494cb2e379d4bf639ded.

CCMAIL: plasma-devel at kde.org

M  +1    -36   mediaelements/playlist/MultiplePlaylists.qml

http://commits.kde.org/plasma-mediacenter/5b664d5d5d6ca90d2960a43ff5499c7ffe296351

diff --git a/mediaelements/playlist/MultiplePlaylists.qml b/mediaelements/playlist/MultiplePlaylists.qml
index 155b222..42877f0 100644
--- a/mediaelements/playlist/MultiplePlaylists.qml
+++ b/mediaelements/playlist/MultiplePlaylists.qml
@@ -29,9 +29,6 @@ FocusScope {
     Row {
         id: multiplePlaylistRow
         anchors.fill: parent
-        MediaCenterElements.Settings {
-           id: settings
-        }
 
         ListView {
             id: multiplePlaylistList
@@ -69,22 +66,7 @@ FocusScope {
 
                 MouseArea {
                     anchors.fill: parent
-                    onClicked: {
-                         playlistText.ListView.view.currentIndex = index;
-                         multiplePlaylistRow.createCurrentPlaylistNameConfig(display);
-                    }
-                }
-
-                Component.onCompleted: {
-                     if (display == settings.value("currentPlaylistName","Default")) {
-                         autoSelectPlaylistTimer.start();
-                     }
-                }
-
-                Timer {
-                   id: autoSelectPlaylistTimer
-                   interval: 10
-                   onTriggered: multiplePlaylistList.currentIndex = index
+                    onClicked: playlistText.ListView.view.currentIndex = index
                 }
             }
 
@@ -92,10 +74,6 @@ FocusScope {
                 multiplePlaylistList.model.switchToPlaylist(
                     currentItem.currentPlaylist);
             }
-
-            Component.onCompleted: {
-                multiplePlaylistList.model.switchToPlaylist(settings.value("currentPlaylistName","Default"));
-            }
         }
 
         PlasmaComponents.TextField {
@@ -136,7 +114,6 @@ FocusScope {
                 if (createPlaylistTextField.text != "") {
                     multiplePlaylistList.model.createNewPlaylist (createPlaylistTextField.text)
                     multiplePlaylistList.currentIndex = multiplePlaylistList.count - 1
-                    multiplePlaylistRow.createCurrentPlaylistNameConfig(createPlaylistTextField.text);
                     createPlaylistTextField.text = ""
                 }
                 if (createPlaylistTextField.visible) {
@@ -155,23 +132,11 @@ FocusScope {
 
             iconSource: "list-remove"
             onClicked: {
-                var playlistToDelete = "";
-                if (multiplePlaylistList.currentItem.currentPlaylist == settings.value("currentPlaylistName","Default")) {
-                   playlistToDelete = multiplePlaylistList.currentItem.currentPlaylist;
-                }
                 multiplePlaylistList.model.removeCurrentPlaylist ()
                 if (multiplePlaylistList.currentIndex > 0) {
                     multiplePlaylistList.currentIndex = multiplePlaylistList.currentIndex-1;
                 }
-                if (playlistToDelete != "") {
-                    multiplePlaylistRow.createCurrentPlaylistNameConfig(multiplePlaylistList.currentItem.currentPlaylist);
-                }
             }
         }
-
-        function createCurrentPlaylistNameConfig(name)  {
-           settings.setValue("currentPlaylistName",name);
-           settings.sync();
-        }
     }
 }


More information about the Plasma-devel mailing list