[gnome-maps/wip/user-location-toggle: 4/4] 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/wip/user-location-toggle: 4/4] mainWindow: Add toggle button to go to user location
- Date: Tue, 16 Apr 2013 01:07:17 +0000 (UTC)
commit e9fcf398b45b5430c36e501d732879e1e43c8f12
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]