[gnome-maps] osmEditDialog: Document COMBO types
- From: Jonas Danielsson <jonasdn src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-maps] osmEditDialog: Document COMBO types
- Date: Sun, 14 Feb 2016 12:45:43 +0000 (UTC)
commit 79a6ffccb6998fb932a79bfa9fd4e33c6a215014
Author: Jonas Danielsson <jonas threetimestwo org>
Date: Sun Feb 14 13:45:17 2016 +0100
osmEditDialog: Document COMBO types
src/osmEditDialog.js | 25 +++++++++++++------------
1 files changed, 13 insertions(+), 12 deletions(-)
---
diff --git a/src/osmEditDialog.js b/src/osmEditDialog.js
index 489e38b..bdc496f 100644
--- a/src/osmEditDialog.js
+++ b/src/osmEditDialog.js
@@ -91,6 +91,7 @@ let _osmPhoneRewriteFunc = function(text) {
* (only used for TEXT fields)
* includeHelp: when true turn the name label to a link to the
* OSM wiki for tags.
+ * options: The options for the combo box (only used for COMBO fields)
*/
const OSM_FIELDS = [
{
@@ -130,21 +131,21 @@ const OSM_FIELDS = [
name: _("Wheelchair access"),
tag: 'wheelchair',
type: EditFieldType.COMBO,
- combo: [['yes', _("Yes")],
- ['no', _("No")],
- ['limited', _("Limited")],
- ['designated', _("Designated")]]
+ options: [['yes', _("Yes")],
+ ['no', _("No")],
+ ['limited', _("Limited")],
+ ['designated', _("Designated")]]
},
{
name: _("Internet access"),
tag: 'internet_access',
type: EditFieldType.COMBO,
- combo: [['yes', _("Yes")],
- ['no', _("No")],
- ['wlan', _("Wlan")],
- ['wired', _("Wired")],
- ['terminal', _("Terminal")],
- ['service', _("Service")]]
+ options: [['yes', _("Yes")],
+ ['no', _("No")],
+ ['wlan', _("Wlan")],
+ ['wired', _("Wired")],
+ ['terminal', _("Terminal")],
+ ['service', _("Service")]]
}];
@@ -542,8 +543,8 @@ const OSMEditDialog = new Lang.Class({
let combobox = new Gtk.ComboBoxText();
- fieldSpec.combo.forEach(function(comboField) {
- combobox.append(comboField[0], comboField[1]);
+ fieldSpec.options.forEach(function(option) {
+ combobox.append(option[0], option[1]);
});
combobox.active_id = value;
combobox.hexpand = true;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]