summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: a9b9dd2)
raw | patch | inline | side by side (parent: a9b9dd2)
author | tweenk <tweenk@users.sourceforge.net> | |
Wed, 17 Sep 2008 14:29:50 +0000 (14:29 +0000) | ||
committer | tweenk <tweenk@users.sourceforge.net> | |
Wed, 17 Sep 2008 14:29:50 +0000 (14:29 +0000) |
src/display/canvas-axonomgrid.cpp | patch | blob | history | |
src/display/canvas-grid.cpp | patch | blob | history |
index 7aecfb0b558a289b11fb2398de1ab7f9a4b14e7e..df402831ece261eea64ea12b31d4fb1f19d51be3 100644 (file)
void
CanvasAxonomGrid::readRepr()
{
+ /// @todo Replace direct XML preference node manipulation with calls to public prefs API
gchar const *value;
if ( (value = repr->attribute("originx")) ) {
sp_nv_read_length(value, SP_UNIT_ABSOLUTE | SP_UNIT_DEVICE, &origin[NR::X], &gridunit);
}
if ( (value = repr->attribute("visible")) ) {
- visible = (strcmp(value,"true") == 0);
+ visible = (strcmp(value,"false") != 0 && strcmp(value, "0") != 0);
}
if ( (value = repr->attribute("enabled")) ) {
g_assert(snapper != NULL);
- snapper->setEnabled(strcmp(value,"true") == 0);
+ snapper->setEnabled(strcmp(value,"false") != 0 && strcmp(value, "0") != 0);
}
for (GSList *l = canvasitems; l != NULL; l = l->next) {
index 27f7030e448698a127a76c240fee4abfb81e6a02..948b89e6afd03eb8a3099af51a89f5d500ad6e6a 100644 (file)
}
if ( (value = repr->attribute("dotted")) ) {
- render_dotted = (strcmp(value,"true") == 0);
+ render_dotted = (strcmp(value,"false") != 0 && strcmp(value, "0") != 0);
}
if ( (value = repr->attribute("visible")) ) {
- visible = (strcmp(value,"true") == 0);
+ visible = (strcmp(value,"false") != 0 && strcmp(value, "0") != 0);
}
if ( (value = repr->attribute("enabled")) ) {
g_assert(snapper != NULL);
- snapper->setEnabled(strcmp(value,"true") == 0);
+ snapper->setEnabled(strcmp(value,"false") != 0 && strcmp(value, "0") != 0);
}
for (GSList *l = canvasitems; l != NULL; l = l->next) {