summaryrefslogtreecommitdiff
path: root/data
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2016-01-31 15:01:27 +0100
committerMarcus Lundblad <ml@update.uu.se>2016-02-12 08:34:54 +0100
commitc4c25a8ed6553e081c3b723d2bbc8cd729a6dce8 (patch)
treed65b18b5ce711a861accbc399958d58614341bd4 /data
parent00aad3df22d846ca862caf36a6e39446cfa5ce6f (diff)
downloadgnome-maps-c4c25a8ed6553e081c3b723d2bbc8cd729a6dce8.tar.gz
osmEdit: Add support for creating new locations in the edit dialog
Adds the ability to edit newly created locations in the dialog. Also adds a module to handle OSM tag key/value mapping to translated POI types and a list of recently used POI types. Also enables editing the POI type of existing objects in more simple cases (known tag values with no combined tags). https://bugzilla.gnome.org/show_bug.cgi?id=761327
Diffstat (limited to 'data')
-rw-r--r--data/org.gnome.Maps.data.gresource.xml3
-rw-r--r--data/ui/osm-edit-dialog.ui111
-rw-r--r--data/ui/osm-type-list-row.ui29
-rw-r--r--data/ui/osm-type-popover.ui16
-rw-r--r--data/ui/osm-type-search-entry.ui10
5 files changed, 168 insertions, 1 deletions
diff --git a/data/org.gnome.Maps.data.gresource.xml b/data/org.gnome.Maps.data.gresource.xml
index 81dc771a..7483d3d4 100644
--- a/data/org.gnome.Maps.data.gresource.xml
+++ b/data/org.gnome.Maps.data.gresource.xml
@@ -18,6 +18,9 @@
<file preprocess="xml-stripblanks">ui/notification.ui</file>
<file preprocess="xml-stripblanks">ui/osm-account-dialog.ui</file>
<file preprocess="xml-stripblanks">ui/osm-edit-dialog.ui</file>
+ <file preprocess="xml-stripblanks">ui/osm-type-list-row.ui</file>
+ <file preprocess="xml-stripblanks">ui/osm-type-search-entry.ui</file>
+ <file preprocess="xml-stripblanks">ui/osm-type-popover.ui</file>
<file preprocess="xml-stripblanks">ui/place-bubble.ui</file>
<file preprocess="xml-stripblanks">ui/place-entry.ui</file>
<file preprocess="xml-stripblanks">ui/place-list-row.ui</file>
diff --git a/data/ui/osm-edit-dialog.ui b/data/ui/osm-edit-dialog.ui
index 3f2623d9..b3336066 100644
--- a/data/ui/osm-edit-dialog.ui
+++ b/data/ui/osm-edit-dialog.ui
@@ -51,6 +51,56 @@
<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>
+ <property name="halign">GTK_ALIGN_END</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="yes">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>
@@ -159,6 +209,65 @@
<property name="name">upload</property>
</packing>
</child>
+ <child>
+ <object class="GtkGrid" id="typeSearchGrid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="margin_start">60</property>
+ <property name="margin_end">60</property>
+ <property name="margin_top">15</property>
+ <property name="margin_bottom">30</property>
+ <property name="row-spacing">5</property>
+ <!--
+ <child>
+ <object class="Gjs_OSMTypeSearchEntry" id="typeSearchEntry">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="hexpand">True</property>
+ <property name="margin_start">10</property>
+ <property name="margin_end">10</property>
+ <property name="margin_bottom">10</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ -->
+ <child>
+ <object class="GtkLabel" id="recentTypesLabel">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="label" translatable="yes">Recently Used</property>
+ <property name="halign">GTK_ALIGN_START</property>
+ <style>
+ <class name="dim-label"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">1</property>
+ </packing>
+ </child>
+ <child>
+ <object class="GtkListBox" id="recentTypesListBox">
+ <property name="visible">True</property>
+ <property name="can_focus">True</property>
+ <property name="selection-mode">none</property>
+ <style>
+ <class name="frame"/>
+ </style>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">2</property>
+ </packing>
+ </child>
+ </object>
+ <packing>
+ <property name="name">select-type</property>
+ </packing>
+ </child>
</object>
</child>
</object>
@@ -168,7 +277,7 @@
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="show-close-button">False</property>
- <property name="title" translatable="yes">Edit Location</property>
+ <property name="title" translatable="yes">Edit on OpenStreetMap</property>
<child>
<object class="GtkButton" id="cancelButton">
<property name="label" translatable="yes">Cancel</property>
diff --git a/data/ui/osm-type-list-row.ui b/data/ui/osm-type-list-row.ui
new file mode 100644
index 00000000..4dda2381
--- /dev/null
+++ b/data/ui/osm-type-list-row.ui
@@ -0,0 +1,29 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <template class="Gjs_OSMTypeListRow" parent="GtkListBoxRow">
+ <property name="visible">True</property>
+ <child>
+ <object class="GtkGrid" id="grid">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="row-homogeneous">True</property>
+ <property name="margin">5</property>
+ <child>
+ <object class="GtkLabel" id="name">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="halign">start</property>
+ <property name="valign">end</property>
+ <property name="hexpand">True</property>
+ <property name="use_markup">True</property>
+ </object>
+ <packing>
+ <property name="left_attach">0</property>
+ <property name="top_attach">0</property>
+ </packing>
+ </child>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/data/ui/osm-type-popover.ui b/data/ui/osm-type-popover.ui
new file mode 100644
index 00000000..4ae9e7fb
--- /dev/null
+++ b/data/ui/osm-type-popover.ui
@@ -0,0 +1,16 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <template class="Gjs_OSMTypePopover" parent="Gjs_SearchPopover">
+ <property name="position">GTK_POS_BOTTOM</property>
+ <property name="modal">False</property>
+ <child>
+ <object class="GtkListBox" id="list">
+ <property name="visible">True</property>
+ <property name="can_focus">False</property>
+ <property name="expand">True</property>
+ <property name="activate_on_single_click">True</property>
+ </object>
+ </child>
+ </template>
+</interface>
diff --git a/data/ui/osm-type-search-entry.ui b/data/ui/osm-type-search-entry.ui
new file mode 100644
index 00000000..db292a76
--- /dev/null
+++ b/data/ui/osm-type-search-entry.ui
@@ -0,0 +1,10 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<interface>
+ <requires lib="gtk+" version="3.12"/>
+ <template class="Gjs_OSMTypeSearchEntry" parent="GtkSearchEntry">
+ <property name="hexpand">True</property>
+ <property name="margin_start">10</property>
+ <property name="margin_end">10</property>
+ <property name="margin_bottom">10</property>
+ </template>
+</interface>