[gnome-documents] properties: show an appropriate source for OwncloudDocuments



commit cdf08827a34739f15c74e3f59f4d05cc1e25fee9
Author: Debarshi Ray <debarshir gnome org>
Date:   Mon Aug 19 12:24:12 2013 +0200

    properties: show an appropriate source for OwncloudDocuments
    
    The presentation-identity from GOA is shown as the source. We could
    have also shown the GVfs URI as the source, but I guess, we don't want
    to promote the file manager any more than we need to.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=686527

 src/properties.js |    7 +++++++
 1 files changed, 7 insertions(+), 0 deletions(-)
---
diff --git a/src/properties.js b/src/properties.js
index 922dc8c..91d297a 100644
--- a/src/properties.js
+++ b/src/properties.js
@@ -168,6 +168,13 @@ const PropertiesDialog = new Lang.Class({
             this._sourceData = new Gtk.LinkButton({ label: doc.sourceName,
                                                     uri: 'http://docs.google.com/',
                                                     halign: Gtk.Align.START });
+        } else if (doc instanceof Documents.OwncloudDocument) {
+            let source = Application.sourceManager.getItemById(doc.resourceUrn);
+            let account = source.object.get_account();
+            let presentation_identity = account.presentation_identity;
+            this._sourceData = new Gtk.LinkButton({ label: presentation_identity,
+                                                    uri: 'https://' + presentation_identity + '/',
+                                                    halign: Gtk.Align.START });
         } else if (doc instanceof Documents.SkydriveDocument) {
             this._sourceData = new Gtk.LinkButton({ label: doc.sourceName,
                                                     uri: 'https://skydrive.live.com',


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