[gnome-maps/wip/mlundblad/osm-add-location] wip



commit 295bb726d07b92eb8c4faea14cee629189d8e464
Author: Marcus Lundblad <ml update uu se>
Date:   Sun Dec 20 23:22:50 2015 +0100

    wip

 data/ui/osm-edit-dialog.ui |   49 ++++++++++++++++++++++++++++++++++++++++++++
 src/osmEditDialog.js       |    7 ++++-
 2 files changed, 54 insertions(+), 2 deletions(-)
---
diff --git a/data/ui/osm-edit-dialog.ui b/data/ui/osm-edit-dialog.ui
index 9cb9139..7a9d9be 100644
--- a/data/ui/osm-edit-dialog.ui
+++ b/data/ui/osm-edit-dialog.ui
@@ -51,6 +51,55 @@
                     <property name="row-spacing">12</property>
                     <property name="column-spacing">6</property>
                     <property name="margin-bottom">12</property>
+                    <child>
+                      <object class="GtkLabel" id="typeLabel">
+                        <property name="visible">False</property>
+                        <property name="can_focus">False</property>
+                        <property name="label" translatable="true">Type</property>
+                        <style>
+                          <class name="dim-label"/>
+                        </style>
+                      </object>
+                      <packing>
+                        <property name="left_attach">0</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
+                    <child>
+                      <object class="GtkButton" id="typeButton">
+                        <property name="visible">False</property>
+                        <property name="can_focus">True</property>
+                        <property name="hexpand">True</property>
+                        <child>
+                          <object class="GtkGrid">
+                            <property name="visible">True</property>
+                            <property name="can_focus">False</property>
+                            <property name="row-spacing">5</property>
+                            <property name="column-spacing">5</property>
+                            <child>
+                              <object class="GtkLabel" id="typeValueLabel">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="label" translatable="true">None</property>
+                              </object>
+                            </child>
+                            <child>
+                              <object class="GtkImage">
+                                <property name="visible">True</property>
+                                <property name="can_focus">False</property>
+                                <property name="halign">GTK_ALIGN_END</property>
+                                <property name="hexpand">True</property>
+                                <property name="icon-name">go-next-symbolic</property>
+                              </object>
+                            </child>
+                          </object>
+                        </child>
+                      </object>
+                      <packing>
+                        <property name="left_attach">1</property>
+                        <property name="top_attach">0</property>
+                      </packing>
+                    </child>
                   </object>
                 </child>
                 <child>
diff --git a/src/osmEditDialog.js b/src/osmEditDialog.js
index 599e98f..101bbbd 100644
--- a/src/osmEditDialog.js
+++ b/src/osmEditDialog.js
@@ -94,6 +94,9 @@ const OSMEditDialog = new Lang.Class({
         this._place = params.place;
         delete params.place;
 
+        this._addLocation = params.addLocation;
+        delete params.addLocation;
+
         /* This is a construct-only property and cannot be set by GtkBuilder */
         params.use_header_bar = true;
 
@@ -196,7 +199,7 @@ const OSMEditDialog = new Lang.Class({
 
     /* GtkContainer.child_get_property doesn't seem to be usable from GJS */
     _getRowOfDeleteButton: function(button) {
-        for (let row = 0;; row++) {
+        for (let row = 1;; row++) {
             let label = this._editorGrid.get_child_at(0, row);
             let deleteButton = this._editorGrid.get_child_at(2, row);
 
@@ -375,7 +378,7 @@ const OSMEditDialog = new Lang.Class({
 
         /* keeps track of the current insertion row in the grid for editing
            widgets */
-        this._currentRow = 0;
+        this._currentRow = 1;
 
         /* create edit widgets */
         for (let i = 0; i < OSM_FIELDS.length; i++) {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]