summaryrefslogtreecommitdiffstats
path: root/tools/gen_keyboard_overlay_data
diff options
context:
space:
mode:
authormazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 09:51:47 +0000
committermazda@chromium.org <mazda@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-16 09:51:47 +0000
commita62684cdbae1899ead245a5aa630e7e280540892 (patch)
treefa04a7017bfb87dd5c6a287554555bc580355730 /tools/gen_keyboard_overlay_data
parent2f1d8414e3f5437f7683e4860c914ac3b5d4fa4e (diff)
downloadchromium_src-a62684cdbae1899ead245a5aa630e7e280540892.zip
chromium_src-a62684cdbae1899ead245a5aa630e7e280540892.tar.gz
chromium_src-a62684cdbae1899ead245a5aa630e7e280540892.tar.bz2
Revert "Remove duplicate entries from the keyboard overlay code."
This reverts commit bc655f7f6df0801b2d65dd905d06ae0aa6604cd2. TBR=hashimoto@chromium.org git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89313 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'tools/gen_keyboard_overlay_data')
-rwxr-xr-xtools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py16
1 files changed, 2 insertions, 14 deletions
diff --git a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
index dd40249..18f3735 100755
--- a/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
+++ b/tools/gen_keyboard_overlay_data/gen_keyboard_overlay_data.py
@@ -340,18 +340,6 @@ def GenerateCopyrightHeader():
return COPYRIGHT_HEADER_TEMPLATE % datetime.date.today().year
-def UniqueBehaviors(hotkey_data):
- """Retrieves a list of unique behaviors from |hotkey_data|."""
- behaviors = []
- added = set()
- for (behavior, _) in hotkey_data:
- if behavior in added:
- continue
- behaviors.append(behavior)
- added.add(behavior)
- return behaviors
-
-
def OutputJson(keyboard_glyph_data, hotkey_data, layouts, var_name, outfile):
"""Outputs the keyboard overlay data as a JSON file."""
print 'Generating: %s' % outfile
@@ -375,7 +363,7 @@ def OutputGrd(hotkey_data, outfile):
print 'Generating: %s' % outfile
desc = 'The text in the keyboard overlay to explain the shortcut.'
out = file(outfile, 'w')
- for behavior in UniqueBehaviors(hotkey_data):
+ for (behavior, _) in hotkey_data:
out.write(GRD_SNIPPET_TEMPLATE % (ToMessageName(behavior), desc, behavior))
@@ -383,7 +371,7 @@ def OutputCC(hotkey_data, outfile):
"""Outputs a snippet used for C++ file."""
print 'Generating: %s' % outfile
out = file(outfile, 'w')
- for behavior in UniqueBehaviors(hotkey_data):
+ for (behavior, _) in hotkey_data:
message_name = ToMessageName(behavior)
# Indent the line if message_name is longer than 45 characters, which means
# the second line in the generated code is longer than 80 characters.