new toys :P

git-svn-id: svn://svn.icculus.org/netradiant/trunk@153 61c419a2-8eb2-4b30-bcec-8cead039b335
This commit is contained in:
divverent
2009-01-07 08:37:33 +00:00
parent 9ddf10f7d1
commit c75a6b31c6
3 changed files with 39 additions and 87 deletions

View File

@@ -272,10 +272,6 @@ void SaveCommandMap(const char* path)
{
m_file << key;
}
else if(accelerator.key != 0)
{
m_file << gdk_keyval_name(accelerator.key);
}
if(accelerator.modifiers & GDK_MOD1_MASK)
{
@@ -357,15 +353,6 @@ public:
accelerator.modifiers = (GdkModifierType)modifiers;
// strBuff has been cleaned of it's modifiers .. switch between a regular key and a virtual one
// based on length
if(keyEnd - value == 1 && std::isalnum(value[0])) // most often case.. deal with first
{
accelerator.key = std::toupper(value[0]);
++m_count;
}
else // special key
{
CopiedString keyName(StringRange(value, keyEnd));
accelerator.key = global_keys_find(keyName.c_str());
if(accelerator.key != 0)
@@ -376,7 +363,11 @@ public:
{
globalOutputStream() << "WARNING: failed to parse user command " << makeQuoted(value) << ": unknown key " << makeQuoted(keyName.c_str()) << "\n";
}
}
accelerator.key = gdk_keyval_from_name(CopiedString(StringRange(value, keyEnd)).c_str());
if(accelerator.key == GDK_VoidSymbol)
accelerator.key = 0;
}
}
std::size_t count() const