Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1047)

Unified Diff: tools/grit/grit/format/policy_templates/writers/adm_writer.py

Issue 5958014: Policy: Add ProxyMode and deprecate ProxyServerMode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: small tweaks Created 10 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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)

Powered by Google App Engine
This is Rietveld 408576698