gnome-shell r149 - trunk/js/ui



Author: otaylor
Date: Fri Jan 16 20:40:16 2009
New Revision: 149
URL: http://svn.gnome.org/viewvc/gnome-shell?rev=149&view=rev

Log:
Cleanup: use destructuring assignment

For multiple return values use

 let [val1, val2, val3] = function();

Rather than:

 temp = function();
 val1 = temp[0];
 ...

Modified:
   trunk/js/ui/docDisplay.js

Modified: trunk/js/ui/docDisplay.js
==============================================================================
--- trunk/js/ui/docDisplay.js	(original)
+++ trunk/js/ui/docDisplay.js	Fri Jan 16 20:40:16 2009
@@ -65,11 +65,7 @@
     // Opens a document represented by this display item.
     launch : function() {
         let appName = this._docInfo.last_application();
-        let appData = this._docInfo.get_application_info(appName);
-        let success = appData[0]; 
-        let appExec = appData[1];
-        let count = appData[2];
-        let time = appData[3];
+        let [success, appExec, count, time] = this._docInfo.get_application_info(appName);
         if (success) {
             log("Will open a document with the following command: " + appExec);
             // TODO: Change this once better support for creating GAppInfo is added to 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]