Index: tools/grit/grit/format/policy_templates/writers/adm_writer.py |
diff --git a/tools/grit/grit/format/policy_templates/writers/adm_writer.py b/tools/grit/grit/format/policy_templates/writers/adm_writer.py |
index 23df695979b20c1f6442c942958f12f56cab6311..54762f3458472c3179e338c3460ce35296c3fc6b 100644 |
--- a/tools/grit/grit/format/policy_templates/writers/adm_writer.py |
+++ b/tools/grit/grit/format/policy_templates/writers/adm_writer.py |
@@ -21,7 +21,8 @@ class AdmWriter(template_writer.TemplateWriter): |
TYPE_TO_INPUT = { |
'string': 'EDITTEXT', |
- 'enum': 'DROPDOWNLIST', |
+ 'string-enum': 'DROPDOWNLIST', |
+ 'int-enum': 'DROPDOWNLIST', |
'list': 'LISTBOX'} |
NEWLINE = '\r\n' |
@@ -76,10 +77,17 @@ class AdmWriter(template_writer.TemplateWriter): |
self._PrintLine('VALUEPREFIX ""') |
else: |
self._PrintLine('VALUENAME "%s"' % policy['name']) |
- if policy['type'] == 'enum': |
+ if policy['type'] == 'int-enum': |
self._PrintLine('ITEMLIST', 1) |
for item in policy['items']: |
- self._PrintLine('NAME !!%s_DropDown VALUE NUMERIC %s' % |
+ self._PrintLine('NAME !!%s_DropDown VALUE NUMERIC %d' % |
+ (item['name'], item['value'])) |
+ self._AddGuiString(item['name'] + '_DropDown', item['caption']) |
+ self._PrintLine('END ITEMLIST', -1) |
+ if policy['type'] == 'string-enum': |
gfeher
2011/01/03 10:30:10
Here and at all the similar places:
I suggest usi
danno
2011/01/07 12:24:25
Done.
|
+ self._PrintLine('ITEMLIST', 1) |
+ for item in policy['items']: |
+ self._PrintLine('NAME !!%s_DropDown VALUE "%s"' % |
(item['name'], item['value'])) |
self._AddGuiString(item['name'] + '_DropDown', item['caption']) |
self._PrintLine('END ITEMLIST', -1) |