[gnome-maps] Use stars instead of hearts for favorite places
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] Use stars instead of hearts for favorite places
- Date: Sun, 1 Nov 2015 09:10:24 +0000 (UTC)
commit d9e94cc68b019cdade64bfaab7f9bb66f966316c
Author: Amisha <amishas157 gmail com>
Date: Fri Oct 30 16:48:05 2015 +0530
Use stars instead of hearts for favorite places
Changed the icon used for favorite places
https://bugzilla.gnome.org/show_bug.cgi?id=755780
data/ui/main-window.ui | 2 +-
data/ui/map-bubble.ui | 2 +-
src/mapBubble.js | 20 +++++++++++++++-----
src/placeListRow.js | 2 +-
4 files changed, 18 insertions(+), 8 deletions(-)
---
diff --git a/data/ui/main-window.ui b/data/ui/main-window.ui
index d1f3136..f91dce2 100644
--- a/data/ui/main-window.ui
+++ b/data/ui/main-window.ui
@@ -89,7 +89,7 @@
<object class="GtkImage" id="favorites-button-image">
<property name="visible">True</property>
<property name="icon-size">1</property>
- <property name="icon-name">emblem-favorite-symbolic</property>
+ <property name="icon-name">starred-symbolic</property>
</object>
</child>
</object>
diff --git a/data/ui/map-bubble.ui b/data/ui/map-bubble.ui
index e488412..18a0c66 100644
--- a/data/ui/map-bubble.ui
+++ b/data/ui/map-bubble.ui
@@ -92,7 +92,7 @@
<property name="name">bubble-favorite-button-image</property>
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="icon-name">emblem-favorite-symbolic</property>
+ <property name="icon-name">starred-symbolic</property>
<property name="pixel_size">16</property>
</object>
</child>
diff --git a/src/mapBubble.js b/src/mapBubble.js
index 0d67414..28a6f37 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -75,7 +75,8 @@ const MapBubble = new Lang.Class({
'bubble-route-button',
'bubble-send-to-button',
'bubble-favorite-button',
- 'bubble-check-in-button']);
+ 'bubble-check-in-button',
+ 'bubble-favorite-button-image']);
this._image = ui.bubbleImage;
this._content = ui.bubbleContentArea;
@@ -87,7 +88,7 @@ const MapBubble = new Lang.Class({
if (buttonFlags & Button.SEND_TO)
this._initSendToButton(ui.bubbleSendToButton);
if (buttonFlags & Button.FAVORITE)
- this._initFavoriteButton(ui.bubbleFavoriteButton);
+ this._initFavoriteButton(ui.bubbleFavoriteButton, ui.bubbleFavoriteButtonImage);
if (buttonFlags & Button.CHECK_IN)
this._initCheckInButton(ui.bubbleCheckInButton, checkInMatchPlace);
}
@@ -107,19 +108,28 @@ const MapBubble = new Lang.Class({
return this._content;
},
- _initFavoriteButton: function(button) {
+ _initFavoriteButton: function(button, image) {
let placeStore = Application.placeStore;
let isFavorite = placeStore.exists(this._place,
PlaceStore.PlaceType.FAVORITE);
button.visible = true;
button.active = isFavorite;
+
+ if (button.active)
+ image.icon_name = 'starred-symbolic';
+ else
+ image.icon_name = 'non-starred-symbolic';
+
button.connect('toggled', (function() {
- if (button.active)
+ if (button.active) {
+ image.icon_name = 'starred-symbolic';
placeStore.addPlace(this._place,
PlaceStore.PlaceType.FAVORITE);
- else
+ } else {
+ image.icon_name = 'non-starred-symbolic';
placeStore.removePlace(this._place,
PlaceStore.PlaceType.FAVORITE);
+ }
}).bind(this));
},
diff --git a/src/placeListRow.js b/src/placeListRow.js
index aeefba7..34f29e4 100644
--- a/src/placeListRow.js
+++ b/src/placeListRow.js
@@ -64,7 +64,7 @@ const PlaceListRow = new Lang.Class({
type === PlaceStore.PlaceType.RECENT_ROUTE)
this._typeIcon.icon_name = 'document-open-recent-symbolic';
else if (type === PlaceStore.PlaceType.FAVORITE)
- this._typeIcon.icon_name = 'emblem-favorite-symbolic';
+ this._typeIcon.icon_name = 'starred-symbolic';
else if (type === PlaceStore.PlaceType.CONTACT)
this._typeIcon.icon_name = 'avatar-default-symbolic';
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]