[gnome-documents/gnome-3-8] properties: Local collections don't have a path or URI



commit d7e5fbde5db8e54f6a44fef54258d405905751b1
Author: Debarshi Ray <debarshir gnome org>
Date:   Fri Aug 9 17:24:01 2013 +0200

    properties: Local collections don't have a path or URI
    
    We can use "Local" as the source. It is consistent with online
    collections, and we use it in the search bar's drop down.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=705725

 src/properties.js |   17 +++++++++++------
 1 files changed, 11 insertions(+), 6 deletions(-)
---
diff --git a/src/properties.js b/src/properties.js
index abb14bb..e631e29 100644
--- a/src/properties.js
+++ b/src/properties.js
@@ -170,12 +170,17 @@ const PropertiesDialog = new Lang.Class({
                                                     uri: 'https://skydrive.live.com',
                                                     halign: Gtk.Align.START });
         } else { // local document
-            let sourceLink = Gio.file_new_for_uri(doc.uri).get_parent();
-            let sourcePath = sourceLink.get_path();
-
-            this._sourceData = new Gtk.LinkButton({ label: sourcePath,
-                                                    uri: sourceLink.get_uri(),
-                                                    halign: Gtk.Align.START });
+            if (doc.collection) {
+                this._sourceData = new Gtk.Label({ label: doc.sourceName,
+                                                   halign: Gtk.Align.START });
+            } else {
+                let sourceLink = Gio.file_new_for_uri(doc.uri).get_parent();
+                let sourcePath = sourceLink.get_path();
+
+                this._sourceData = new Gtk.LinkButton({ label: sourcePath,
+                                                        uri: sourceLink.get_uri(),
+                                                        halign: Gtk.Align.START });
+            }
         }
 
         grid.attach_next_to (this._sourceData, this._source, Gtk.PositionType.RIGHT, 2, 1);


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