[gnome-maps/wip/layers-popover: 6/6] New layers icon. Removed cog menu. Removed transport icons for now.
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/layers-popover: 6/6] New layers icon. Removed cog menu. Removed transport icons for now.
- Date: Sun, 2 Mar 2014 01:55:26 +0000 (UTC)
commit 377d9d40c70ad9448724c731ee49be5a13313736
Author: Dario Di Nucci <linkin88mail gmail com>
Date: Sun Mar 2 02:41:19 2014 +0100
New layers icon.
Removed cog menu.
Removed transport icons for now.
data/media/layers.svg | 78 +++++++++++++++++++++++++++++++++++++
src/gnome-maps.data.gresource.xml | 1 +
src/layers-popup.ui | 78 -------------------------------------
src/main-window.ui | 27 +------------
src/mainWindow.js | 10 +++-
5 files changed, 88 insertions(+), 106 deletions(-)
---
diff --git a/data/media/layers.svg b/data/media/layers.svg
new file mode 100644
index 0000000..a50bbc4
--- /dev/null
+++ b/data/media/layers.svg
@@ -0,0 +1,78 @@
+<?xml version="1.0" encoding="UTF-8" standalone="no"?>
+<!-- Created with Inkscape (http://www.inkscape.org/) -->
+
+<svg
+ xmlns:dc="http://purl.org/dc/elements/1.1/"
+ xmlns:cc="http://creativecommons.org/ns#"
+ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
+ xmlns:svg="http://www.w3.org/2000/svg"
+ xmlns="http://www.w3.org/2000/svg"
+ xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
+ xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
+ width="16px"
+ height="16px"
+ id="svg6558"
+ version="1.1"
+ inkscape:version="0.48.4 r9939"
+ sodipodi:docname="New document 2">
+ <defs
+ id="defs6560" />
+ <sodipodi:namedview
+ id="base"
+ pagecolor="#ffffff"
+ bordercolor="#666666"
+ borderopacity="1.0"
+ inkscape:pageopacity="0.0"
+ inkscape:pageshadow="2"
+ inkscape:zoom="32"
+ inkscape:cx="8.6411621"
+ inkscape:cy="4.5216328"
+ inkscape:current-layer="layer1"
+ showgrid="false"
+ inkscape:grid-bbox="true"
+ inkscape:document-units="px"
+ inkscape:snap-nodes="false"
+ inkscape:snap-bbox="true"
+ inkscape:window-width="1920"
+ inkscape:window-height="1014"
+ inkscape:window-x="0"
+ inkscape:window-y="27"
+ inkscape:window-maximized="1">
+ <inkscape:grid
+ type="xygrid"
+ id="grid7050" />
+ </sodipodi:namedview>
+ <metadata
+ id="metadata6563">
+ <rdf:RDF>
+ <cc:Work
+ rdf:about="">
+ <dc:format>image/svg+xml</dc:format>
+ <dc:type
+ rdf:resource="http://purl.org/dc/dcmitype/StillImage" />
+ <dc:title></dc:title>
+ </cc:Work>
+ </rdf:RDF>
+ </metadata>
+ <g
+ id="layer1"
+ inkscape:label="Layer 1"
+ inkscape:groupmode="layer">
+ <path
+
style="color:#000000;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20415698999999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 4.34375,7.46875 1.625,8.5625 8,11.09375 14.40625,8.5625 11.6875,7.46875 7.96875,8.9375 z"
+ id="rect6931-9"
+ inkscape:connector-curvature="0"
+ sodipodi:nodetypes="ccccccc" />
+ <path
+
style="color:#000000;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1;stroke-linecap:round;stroke-linejoin:miter;stroke-miterlimit:4;stroke-opacity:1;stroke-dasharray:none;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 8 2.9375 L 1.625 5.5 L 8 8.0625 L 14.40625 5.5 L 8 2.9375 z "
+ id="rect6931" />
+ <path
+ inkscape:connector-curvature="0"
+
style="color:#000000;fill:#2e3436;fill-opacity:1;fill-rule:nonzero;stroke:none;stroke-width:1.20415698999999998;marker:none;visibility:visible;display:inline;overflow:visible;enable-background:accumulate"
+ d="M 4.34375,10.59375 1.625,11.6875 8,14.21875 14.40625,11.6875 11.6875,10.59375 7.96875,12.0625 z"
+ id="rect6931-9-3"
+ sodipodi:nodetypes="ccccccc" />
+ </g>
+</svg>
diff --git a/src/gnome-maps.data.gresource.xml b/src/gnome-maps.data.gresource.xml
index 3edf8c5..1e9ff42 100644
--- a/src/gnome-maps.data.gresource.xml
+++ b/src/gnome-maps.data.gresource.xml
@@ -14,5 +14,6 @@
<file alias="zoom-out-insensitive.png">../data/media/zoom-out-insensitive.png</file>
<file alias="maptype-satellite.png">../data/media/maptype-satellite.png</file>
<file alias="maptype-street.png">../data/media/maptype-street.png</file>
+ <file alias="layers.svg">../data/media/layers.svg</file>
</gresource>
</gresources>
diff --git a/src/layers-popup.ui b/src/layers-popup.ui
index 0c97813..8c06d4f 100644
--- a/src/layers-popup.ui
+++ b/src/layers-popup.ui
@@ -62,83 +62,5 @@
<property name="height">1</property>
</packing>
</child>
- <child>
- <object class="GtkButton" id="bicycle-button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="action-name"></property>
- <property name="width-request">60</property>
- <property name="margin">2</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="bicycle-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">0</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="traffic-button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="action-name"></property>
- <property name="width-request">60</property>
- <property name="margin">2</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="traffic-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">1</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
- <child>
- <object class="GtkButton" id="transit-button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="action-name"></property>
- <property name="width-request">60</property>
- <property name="margin">2</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="transit-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="left_attach">2</property>
- <property name="top_attach">2</property>
- <property name="width">1</property>
- <property name="height">1</property>
- </packing>
- </child>
</object>
</interface>
diff --git a/src/main-window.ui b/src/main-window.ui
index 1e39313..d57250a 100644
--- a/src/main-window.ui
+++ b/src/main-window.ui
@@ -77,11 +77,10 @@
</packing>
</child>
<child>
- <object class="GtkButton" id="layers-button">
+ <object class="GtkToggleButton" id="layers-button">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="valign">center</property>
- <!--<property name="action-name">win.show-layers-popup</property>-->
<style>
<class name="image-button"/>
</style>
@@ -89,33 +88,11 @@
<object class="GtkImage" id="layers-image">
<property name="visible">True</property>
<property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
+ <property name="pixbuf">layers.svg</property>
</object>
</child>
</object>
</child>
- <child>
- <object class="GtkMenuButton" id="layer-menu-button">
- <property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="menu-model">map-type-menu</property>
- <property name="action-name">win.map-type-menu</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="layer-menu-button-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">emblem-system-symbolic</property>
- </object>
- </child>
- </object>
- <packing>
- <property name="pack-type">end</property>
- </packing>
- </child>
</object>
</child>
<child>
diff --git a/src/mainWindow.js b/src/mainWindow.js
index e300222..1bf58e2 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -79,8 +79,8 @@ const MainWindow = new Lang.Class({
this._contextMenu = new ContextMenu.ContextMenu(this.mapView);
this._initPlaces();
- this._initSearchWidgets();
this._initLayersWidgets();
+ this._initSearchWidgets();
this._initActions();
this._initSignals();
this._restoreWindowGeometry();
@@ -101,9 +101,13 @@ const MainWindow = new Lang.Class({
},
_initLayersWidgets: function(){
- this._layersPopup = new LayersPopup.LayersPopup(this._layersButton);
+ this._layersPopover = new LayersPopup.LayersPopup(this._layersButton);
this._layersButton.connect('clicked',
- this._layersPopup.show.bind(this._layersPopup));
+ this._layersPopover.show.bind(this._layersPopover));
+ this._layersPopover.connect('closed', (function(){
+ log("ciao")}));
+ this._layersPopover.connect('closed',
+ this._layersButton.set_active.bind(this._layersButton, false));
},
_initSearchWidgets: function() {
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]