[gnome-maps/wip/osm-edit] osmEdit: WIP, implement editing objects in OSM.
- From: Marcus Lundblad <mlundblad src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps/wip/osm-edit] osmEdit: WIP, implement editing objects in OSM.
- Date: Thu, 3 Sep 2015 20:51:27 +0000 (UTC)
commit ba628b79c7d77ee816db4582ad5d1758afcbc912
Author: Marcus Lundblad <ml update uu se>
Date: Mon Jan 19 22:24:34 2015 +0100
osmEdit: WIP, implement editing objects in OSM.
data/ui/map-bubble.ui | 41 ++++++++++++++++++++++++++++++++++++++++-
src/mapBubble.js | 12 ++++++++++--
2 files changed, 50 insertions(+), 3 deletions(-)
---
diff --git a/data/ui/map-bubble.ui b/data/ui/map-bubble.ui
index 89519f9..440b136 100644
--- a/data/ui/map-bubble.ui
+++ b/data/ui/map-bubble.ui
@@ -175,12 +175,51 @@
</child>
<child>
+ <object class="GtkGrid" id="bubble-edit-comment-grid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin-top">10</property>
+ <property name="margin-start">15</property>
+ <property name="column-spacing">5</property>
+ <property name="row-spacing">5</property>
+
+ <child>
+ <object class="GtkLabel" id="bubble-edit-comment-label">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="True">Comment</property>
+ <property name="halign">GTK_ALIGN_END</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+ <child>
+ <object class="GtkEntry" id="bubble-edit-comment-entry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="placeholder-text">Describe changes…</property>
+ <property name="expand">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">1</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+
+
+ </object>
+ </child>
+
+ <child>
<object class="GtkGrid" id="bubble-edit-button-area">
<property name="visible">True</property>
<property name="can_focus">False</property>
<property name="margin-top">10</property>
<property name="margin-start">15</property>
- <child>
+ <child>
<object class="GtkBox" id="bubble-edit-button-box">
<property name="visible">True</property>
<property name="can_focus">False</property>
diff --git a/src/mapBubble.js b/src/mapBubble.js
index 6eec277..503e8a9 100644
--- a/src/mapBubble.js
+++ b/src/mapBubble.js
@@ -100,7 +100,8 @@ const MapBubble = new Lang.Class({
'bubble-add-name-button',
'bubble-add-wikipedia-button',
'bubble-add-population-button',
- 'bubble-add-wheelchair-button']);
+ 'bubble-add-wheelchair-button',
+ 'bubble-edit-comment-entry']);
this._viewOrEditStack = ui.stack;
this._mainGrid = ui.bubbleMainGrid;
this._editBox = ui.bubbleEditBox;
@@ -114,6 +115,7 @@ const MapBubble = new Lang.Class({
this._addWikipediaButton = ui.bubbleAddWikipediaButton;
this._addPopulationButton = ui.bubbleAddPopulationButton;
this._addWheelchairButton = ui.bubbleAddWheelchairButton;
+ this._editCommentEntry = ui.bubbleEditCommentEntry;
this._setupEditingButtons();
@@ -402,6 +404,12 @@ const MapBubble = new Lang.Class({
this._connectAddEditFieldButton(this._addWheelchairButton,
_("Wheelchair"), 'wheelchair',
EditFieldType.YES_NO_LIMITED_DESIGNATED);
+
+ // initially set unexisting changeset comment
+ this._changesetComment = null;
+ this._editCommentEntry.connect('changed', (function() {
+ this._changesetComment = this._editCommentEntry.text;
+ }).bind(this));
},
_loadOSMData: function(osmObject, osmType) {
@@ -456,7 +464,7 @@ const MapBubble = new Lang.Class({
_onSaveClicked: function() {
Application.osmEditManager.uploadObject(this._osmObject,
this._osmType,
- null, // TODO: add comment editing
+ this._changesetComment,
null,
this._uploadObjectCB.bind(this));
},
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]