diff --git a/src/shortcuts.cpp b/src/shortcuts.cpp
index ffd5aa94879cf0915261de32b9b1f9f9104905ea..cf7f485c6d9197bb94c51942b286f00dce1eb642 100644 (file)
--- a/src/shortcuts.cpp
+++ b/src/shortcuts.cpp
bool is_primary;
if (!strcmp(iter->name(), "bind")) {
- if (iter->attribute("display") && strcmp(iter->attribute("display"), "false") && strcmp(iter->attribute("display"), "0")) {
- is_primary = true;
- } else {
- is_primary = false;
- }
+ is_primary = iter->attribute("display") && strcmp(iter->attribute("display"), "false") && strcmp(iter->attribute("display"), "0");
} else {
// some unknown element, do not complain
continue;
continue;
}
- if (Inkscape::Verb::getbyid(verb_name) == NULL) {
+ Inkscape::Verb *verb=Inkscape::Verb::getbyid(verb_name);
+ if (!verb) {
g_warning("Unknown verb name: %s", verb_name);
continue;
}
// that's ok, it's just listed for reference without assignment, skip it
continue;
}
+
guint keyval=gdk_keyval_from_name(keyval_name);
if (keyval == GDK_VoidSymbol) {
g_warning("Unknown keyval %s for %s", keyval_name, verb_name);
}
}
- sp_shortcut_set(keyval | modifiers,
- Inkscape::Verb::getbyid(verb_name),
- is_primary);
+ sp_shortcut_set(keyval | modifiers, verb, is_primary);
}
GC::release(doc);