[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    extragear/multimedia/amarok/playground/src/scripts/copycover
From:       Sven Krohlas <sven () asbest-online ! de>
Date:       2009-06-29 18:35:22
Message-ID: 1246300522.855343.10213.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 989213 by krohlas:

Give the copy cover script the touch of life (aka "make it start up on my system").
Simon, you might consider meaningful names for gui elements and adding yourself to the (C) list. :)

CCMAIL: simon.esneault@gmail.com

 M  +10 -10    main.js  


--- trunk/extragear/multimedia/amarok/playground/src/scripts/copycover/main.js #989212:989213
@@ -1,9 +1,9 @@
 /**************************************************************************
-*   Encoding Fixer Script for Amarok 2.0                                  *
-*   Last Modified:  22/11/2008                                            *
+*   Copy Cover Script for Amarok 2.0                                      *
 *                                                                         *
 *   Copyright                                                             *
 *   (C) 2008 Peter ZHOU  <peterzhoulei@gmail.com>                         *
+*   (C) 2009 Sven Krohlas <sven@getamarok.com>                            *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
@@ -129,14 +129,14 @@
 function readConfiguration()
 {
     if ( Amarok.Script.readConfig( "writeCover", "true" ) == "true" )
-        mainWindow.children()[2].children()[0].checked = true;
+        mainWindow.widget.checkBox.setChecked( true );
     else
-        mainWindow.children()[2].children()[0].checked = false;
-        
+        mainWindow.widget.checkBox.setChecked( false );
+
     if ( Amarok.Script.readConfig( "writeArtistAlbum", "false" ) == "false" )
-        mainWindow.children()[2].children()[1].checked = false;
+        mainWindow.widget.checkBox.setChecked( false );
     else
-        mainWindow.children()[2].children()[1].checked = true;
+        mainWindow.widget.checkBox_2.setChecked( true );
 
 }
 
@@ -159,10 +159,10 @@
 
         // read configuration
         readConfiguration();
-        
+
         // connect the button ok/cancel to save/read config.
-        mainWindow.children()[1].accepted.connect( saveConfiguration );
-        mainWindow.children()[1].rejected.connect( readConfiguration );
+        mainWindow.buttonBox.accepted.connect( saveConfiguration );
+        mainWindow.buttonBox.rejected.connect( readConfiguration );
         
         // Add tool menu, and a callback
         Amarok.Window.addToolsSeparator();
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic