[gnome-documents/gnome-3-8] documents: Get rid of redundant string operations



commit 3966356c26c559ec32278845f29dd6606f035e84
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 9 17:29:26 2013 +0200

    documents: Get rid of redundant string operations
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705725

 src/documents.js |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/src/documents.js b/src/documents.js
index 5220a15..4da2a4f 100644
--- a/src/documents.js
+++ b/src/documents.js
@@ -782,12 +782,12 @@ const GoogleDocument = new Lang.Class({
     updateTypeDescription: function() {
         let description;
 
-        if (this.rdfType.indexOf('nfo#Spreadsheet') != -1)
+        if (this.collection)
+            description = _("Collection");
+        else if (this.rdfType.indexOf('nfo#Spreadsheet') != -1)
             description = _("Spreadsheet");
         else if (this.rdfType.indexOf('nfo#Presentation') != -1)
             description = _("Presentation");
-        else if (this.rdfType.indexOf('nfo#DataContainer') != -1)
-            description = _("Collection");
         else
             description = _("Document");
 
@@ -880,12 +880,12 @@ const SkydriveDocument = new Lang.Class({
     updateTypeDescription: function() {
         let description;
 
-        if (this.rdfType.indexOf('nfo#Spreadsheet') != -1)
+        if (this.collection)
+            description = _("Collection");
+        else if (this.rdfType.indexOf('nfo#Spreadsheet') != -1)
             description = _("Spreadsheet");
         else if (this.rdfType.indexOf('nfo#Presentation') != -1)
             description = _("Presentation");
-        else if (this.rdfType.indexOf('nfo#DataContainer') != -1)
-            description = _("Collection");
         else
             description = _("Document");
 


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