[gnome-maps] placeBubble: Do not add favorite button for contacts
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] placeBubble: Do not add favorite button for contacts
- Date: Sat, 31 Jan 2015 23:50:03 +0000 (UTC)
commit fca944a028b094d1aec273cd6ecdf882ee9c7f33
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Mon Jan 12 06:52:33 2015 -0500
placeBubble: Do not add favorite button for contacts
https://bugzilla.gnome.org/show_bug.cgi?id=741591
src/placeBubble.js | 9 +++++++--
1 files changed, 7 insertions(+), 2 deletions(-)
---
diff --git a/src/placeBubble.js b/src/placeBubble.js
index 302ce9f..66ab8ca 100644
--- a/src/placeBubble.js
+++ b/src/placeBubble.js
@@ -25,6 +25,7 @@ const Format = imports.format;
const Lang = imports.lang;
const Application = imports.application;
+const ContactPlace = imports.contactPlace;
const MapBubble = imports.mapBubble;
const Overpass = imports.overpass;
const Place = imports.place;
@@ -41,8 +42,12 @@ const PlaceBubble = new Lang.Class({
'box-content',
'label-title']);
params.buttons = (MapBubble.Button.ROUTE |
- MapBubble.Button.SHARE |
- MapBubble.Button.FAVORITE);
+ MapBubble.Button.SHARE);
+
+ // We do not serialize contacts to file, so adding them
+ // as favourites does not makes sense right now.
+ if (!params.place instanceof ContactPlace.ContactPlace)
+ params.buttons |= MapBubble.Button.FAVORITE;
this.parent(params);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]