[gnome-maps/wip/layers-popover: 3/6] Replaced ListBox with Grid.
- From: Mattias Bengtsson <mattiasb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/layers-popover: 3/6] Replaced ListBox with Grid.
- Date: Sun, 2 Mar 2014 01:55:11 +0000 (UTC)
commit 414f53c2d515745934b721f16a952a4e6a4df4a9
Author: Dario Di Nucci <linkin88mail gmail com>
Date: Sun Mar 2 00:03:46 2014 +0100
Replaced ListBox with Grid.
src/layers-popup.ui | 213 ++++++++++++++++++++++++++-------------------------
src/mainWindow.js | 6 +-
2 files changed, 113 insertions(+), 106 deletions(-)
---
diff --git a/src/layers-popup.ui b/src/layers-popup.ui
index ed9b067..2dabef4 100644
--- a/src/layers-popup.ui
+++ b/src/layers-popup.ui
@@ -1,135 +1,140 @@
<?xml version="1.0" encoding="UTF-8"?>
<interface>
<!-- interface-requires gtk+ 3.10 -->
- <object class="GtkListBox" id="list-box">
+ <object class="GtkGrid" id="list-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
- <property name="selection-mode">GTK_SELECTION_NONE</property>
<child>
- <object class="GtkListBoxRow" id="street-layer-button-row">
+ <object class="GtkToggleButton" id="street-layer-button">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">True</property>
+ <property name="valign">center</property>
+ <property name="height-request">80</property>
+ <property name="margin">2</property>
+ <property name="action-name">win.map-type</property>
+ <property name="action-target">"STREET"</property>
+ <style>
+ <class name="image-button"/>
+ </style>
<child>
- <object class="GtkButton" id="street-layer-button">
+ <object class="GtkImage" id="street-layer-image">
<property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="height-request">80</property>
- <property name="margin">2</property>
- <property name="action-name">win.map-type</property>
- <property name="action-target">"STREET"</property>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="street-layer-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
- </object>
- </child>
+ <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">0</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
- <object class="GtkListBoxRow" id="satellite-layer-button-row">
+ <object class="GtkToggleButton" id="satellite-layer-button">
<property name="visible">True</property>
- <property name="can_focus">False</property>
+ <property name="can-focus">True</property>
+ <property name="valign">center</property>
+ <property name="height-request">80</property>
+ <property name="margin">2</property>
+ <property name="action-name">win.map-type</property>
+ <property name="action-target">"AERIAL"</property>>
+ <style>
+ <class name="image-button"/>
+ </style>
<child>
- <object class="GtkButton" id="satellite-layer-button">
+ <object class="GtkImage" id="satellite-layer-image">
<property name="visible">True</property>
- <property name="can-focus">True</property>
- <property name="valign">center</property>
- <property name="height-request">80</property>
- <property name="margin">2</property>
- <property name="action-name">win.map-type</property>
- <property name="action-target">"AERIAL"</property>>
- <style>
- <class name="image-button"/>
- </style>
- <child>
- <object class="GtkImage" id="satellite-layer-image">
- <property name="visible">True</property>
- <property name="icon-size">1</property>
- <property name="icon-name">find-location-symbolic</property>
- </object>
- </child>
+ <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">1</property>
+ <property name="width">3</property>
+ <property name="height">1</property>
+ </packing>
</child>
<child>
- <object class="GtkListBoxRow" id="transport-button-row">
+ <object class="GtkButton" id="bicycle-button">
<property name="visible">True</property>
- <property name="can_focus">False</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="GtkBox" id="transport-button-container">
+ <object class="GtkImage" id="bicycle-image">
<property name="visible">True</property>
- <property name="can_focus">False</property>
- <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>
- </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>
- </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>
- </child>
+ <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/mainWindow.js b/src/mainWindow.js
index 18e163d..7e7cd18 100644
--- a/src/mainWindow.js
+++ b/src/mainWindow.js
@@ -118,8 +118,10 @@ const MainWindow = new Lang.Class({
this._onSearchPopupSelected.bind(this));
this.mapView.view.connect('button-press-event',
this._searchPopup.hide.bind(this._searchPopup));
- this.mapView.view.connect('button-press-event',
- this.mapView.grab_focus.bind(this.mapView));
+ //this.mapView.view.connect('button-press-event', (function(){
+ //
+ // });
+ //this.mapView.grab_focus.bind(this.mapView));
this._searchEntry.connect('changed',
this._searchPopup.hide.bind(this._searchPopup));
this._searchCompletion.set_model(this._placeStore);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]