[gnome-maps] mainWindow: Add toggle button to go to user location
- From: Zeeshan Ali Khattak <zeeshanak src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] mainWindow: Add toggle button to go to user location
- Date: Wed, 17 Apr 2013 14:10:13 +0000 (UTC)
commit 2605b2e7f1122bcc7d5f0b2460ade4aec287cb9b
Author: Zeeshan Ali (Khattak) <zeeshanak gnome org>
Date: Tue Apr 16 04:05:04 2013 +0300
mainWindow: Add toggle button to go to user location
src/mainWindow.js | 8 ++++++++
1 file changed, 8 insertions(+)
---
diff --git a/src/mainWindow.js b/src/mainWindow.js
index 28863bd..e00a353 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -96,6 +96,14 @@ const MainWindow = new Lang.Class({
let headerBar = new Gd.HeaderBar();
headerBar.set_custom_title(this._searchEntry);
+ let toggle = new Gd.HeaderToggleButton({ symbolic_icon_name: 'find-location-symbolic' });
+ toggle.connect('toggled', Lang.bind(this,
+ function() {
+ if (toggle.active)
+ this.mapView.gotoUserLocation(true);
+ }));
+ headerBar.pack_start(toggle);
+
grid.add(headerBar);
this.mapView = new MapView.MapView();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]