[gnome-maps/wip/favorites: 7/9] MainWindow: Add favorites toggle
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/favorites: 7/9] MainWindow: Add favorites toggle
- Date: Sat, 22 Nov 2014 19:22:57 +0000 (UTC)
commit d77ff3d052a9de397acf39199e747ee3c51b302f
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sat Nov 22 00:55:55 2014 +0100
MainWindow: Add favorites toggle
https://bugzilla.gnome.org/show_bug.cgi?id=722102
https://bugzilla.gnome.org/show_bug.cgi?id=728117
src/mainWindow.js | 11 +++++++++--
src/map-bubble.ui | 17 +++++++++++++++++
2 files changed, 26 insertions(+), 2 deletions(-)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index bbdb4bd..10c1896 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -31,9 +31,11 @@ const Mainloop = imports.mainloop;
const Application = imports.application;
const Config = imports.config;
const ContextMenu = imports.contextMenu;
+const FavoritesPopover = imports.favoritesPopover;
const LayersPopover = imports.layersPopover;
const MapView = imports.mapView;
const PlaceEntry = imports.placeEntry;
+const PlaceStore = imports.placeStore;
const Sidebar = imports.sidebar;
const Utils = imports.utils;
const ZoomControl = imports.zoomControl;
@@ -56,7 +58,8 @@ const MainWindow = new Lang.Class({
'no-network-view',
'goto-user-location-button',
'toggle-sidebar-button',
- 'layers-button']);
+ 'layers-button',
+ 'favorites-button' ]);
this.window = ui.appWindow;
this.window.application = app;
this._overlay = overlay;
@@ -71,7 +74,7 @@ const MainWindow = new Lang.Class({
this._contextMenu = new ContextMenu.ContextMenu(this.mapView);
ui.layersButton.popover = new LayersPopover.LayersPopover();
-
+ ui.favoritesButton.popover = new FavoritesPopover.FavoritesPopover({ mapView: this.mapView });
this._overlay.add_overlay(new ZoomControl.ZoomControl(this.mapView));
this._mainStack = ui.mainStack;
@@ -81,6 +84,7 @@ const MainWindow = new Lang.Class({
this._gotoUserLocationButton = ui.gotoUserLocationButton;
this._toggleSidebarButton = ui.toggleSidebarButton;
this._layersButton = ui.layersButton;
+ this._favoritesButton = ui.favoritesButton;
this._initHeaderbar();
this._initActions();
@@ -204,6 +208,9 @@ const MainWindow = new Lang.Class({
this._toggleSidebarButton, 'sensitive',
GObject.BindingFlags.DEFAULT);
app.bind_property('connected',
+ this._favoritesButton, 'sensitive',
+ GObject.BindingFlags.DEFAULT);
+ app.bind_property('connected',
this._placeEntry, 'sensitive',
GObject.BindingFlags.DEFAULT);
},
diff --git a/src/map-bubble.ui b/src/map-bubble.ui
index 1cbb149..b7143ab 100644
--- a/src/map-bubble.ui
+++ b/src/map-bubble.ui
@@ -78,6 +78,23 @@
</child>
</object>
</child>
+ <child>
+ <object class="GtkToggleButton" id="bubble-favorite-button">
+ <property name="name">bubble-favorite-button</property>
+ <property name="visible">False</property>
+ <property name="can_focus">True</property>
+ <property name="receives_default">False</property>
+ <child>
+ <object class="GtkImage" id="bubble-favorite-button-image">
+ <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="pixel_size">16</property>
+ </object>
+ </child>
+ </object>
+ </child>
</object>
<packing>
<property name="left_attach">0</property>
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]