[gnome-documents] properties: Local collections don't have a path or URI
- From: Debarshi Ray <debarshir src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-documents] properties: Local collections don't have a path or URI
- Date: Sun, 11 Aug 2013 06:12:26 +0000 (UTC)
commit 92912ab069f4efb0e1368e94d652bd76ba8d3773
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 c6998a5..1d11f48 100644
--- a/src/properties.js
+++ b/src/properties.js
@@ -171,12 +171,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]