[gnome-maps/wip/contacts: 75/81] Add contactPlace module
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/contacts: 75/81] Add contactPlace module
- Date: Sat, 31 Jan 2015 17:01:38 +0000 (UTC)
commit e8d3a5de168b3e62be939cea642364edba434145
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Fri Jan 30 10:18:00 2015 +0100
Add contactPlace module
src/contactPlace.js | 45 ++++++++++++++++++++++++++++++++++
src/org.gnome.Maps.src.gresource.xml | 1 +
2 files changed, 46 insertions(+), 0 deletions(-)
---
diff --git a/src/contactPlace.js b/src/contactPlace.js
new file mode 100644
index 0000000..4e67913
--- /dev/null
+++ b/src/contactPlace.js
@@ -0,0 +1,45 @@
+/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
+/* vim: set et ts=4 sw=4: */
+/*
+ * Copyright (c) 2014 Jonas Danielsson
+ *
+ * GNOME Maps is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * GNOME Maps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNOME Maps; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+ *
+ * Author: Jonas Danielsson <jonas threetimestwo org>
+ */
+
+const Lang = imports.lang;
+
+const Place = imports.place;
+
+const ContactPlace = new Lang.Class({
+ Name: 'ContactPlace',
+ Extends: Place.Place,
+
+ _init: function(params) {
+ this._icon = params.icon;
+ delete params.avatar;
+
+ this.parent(params);
+ },
+
+ get icon() {
+ return this._icon;
+ },
+
+ get uniqueID() {
+ return this.name + '-' + this.osm_type + '-' + this.osm_id;
+ }
+});
diff --git a/src/org.gnome.Maps.src.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
index f8c8bdf..791748b 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -6,6 +6,7 @@
<file>busyMarker.js</file>
<file>checkIn.js</file>
<file>checkInDialog.js</file>
+ <file>contactPlace.js</file>
<file>contextMenu.js</file>
<file>epaf.js</file>
<file>facebookBackend.js</file>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]