[gnome-maps/wip/osm-edit: 40/47] osmEdit: Load the name tag value into the name edit entry in the map bubble.



commit aa00a0991f09af8c2214a3f13f631a4516a22b09
Author: Marcus Lundblad <ml update uu se>
Date:   Thu Mar 12 21:33:42 2015 +0100

    osmEdit: Load the name tag value into the name edit entry in the map bubble.

 data/ui/map-bubble.ui |    2 +-
 src/mapBubble.js      |    7 +++++--
 2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/map-bubble.ui b/data/ui/map-bubble.ui
index a7b795e..faa1397 100644
--- a/data/ui/map-bubble.ui
+++ b/data/ui/map-bubble.ui
@@ -169,7 +169,7 @@
            </child>
 
            <child>
-             <object class="GtkEntry" id="edit-name-entry">
+             <object class="GtkEntry" id="bubble-edit-name-entry">
                <property name="visible">True</property>
                <property name="can_focus">False</property>
              </object>
diff --git a/src/mapBubble.js b/src/mapBubble.js
index e794a9f..7b808b6 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -79,12 +79,14 @@ const MapBubble = new Lang.Class({
                                                    'bubble-send-to-button',
                                                    'bubble-favorite-button',
                                                    'bubble-check-in-button',
-                                                  'bubble-edit-button']);
+                                                  'bubble-edit-button',
+                                                  'bubble-edit-name-entry']);
        this._viewOrEditStack = ui.stack;
        this._mainGrid = ui.bubbleMainGrid;
        this._editGrid = ui.bubbleEditGrid;
         this._image = ui.bubbleImage;
         this._content = ui.bubbleContentArea;
+       this._nameEntry = ui.bubbleEditNameEntry;
 
         if (!buttonFlags)
             ui.bubbleButtonArea.visible = false;
@@ -208,7 +210,8 @@ const MapBubble = new Lang.Class({
     },
 
     _loadOSMData: function(data) {
-
+       this._osmObject = data;
+       this._nameEntry.text = this._osmObject.getTag('name');
     },
 
     _showError: function(status) {


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