summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-22 19:50:39 +0000
committermartin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220>2013-05-22 19:50:39 +0000
commit7badcc4b43df620475d38894714cc75672229a2b (patch)
tree442102ca0bdccc359464963af78d10934b73b4f9
parent22b31f438dccabbacd708c3f7589ae4e4cedf0e2 (diff)
downloadnavit-7badcc4b43df620475d38894714cc75672229a2b.tar.gz
Fix:Core:Better solution for the default attribute problem
git-svn-id: https://navit.svn.sourceforge.net/svnroot/navit/trunk@5499 ffa7fe5e-494d-0410-b361-a75ebd5db220
-rw-r--r--navit/navit/speech.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/navit/navit/speech.c b/navit/navit/speech.c
index 712338f6a..1dbe40535 100644
--- a/navit/navit/speech.c
+++ b/navit/navit/speech.c
@@ -80,6 +80,11 @@ speech_say(struct speech *this_, const char *text)
return (this_->meth.say)(this_->priv, text);
}
+struct attr *speech_default_attrs[]={
+ ATTR_DEF_INT(active, 1),
+ NULL,
+};
+
/**
* @brief Gets an attribute from a speech plugin
*
@@ -93,13 +98,7 @@ speech_say(struct speech *this_, const char *text)
int
speech_get_attr(struct speech *this_, enum attr_type type, struct attr *attr, struct attr_iter *iter)
{
- int ret=attr_generic_get_attr(this_->attrs, NULL, type, attr, iter);
- if (!ret && type == attr_active) {
- attr->u.num=1;
- attr->type=type;
- ret=1;
- }
- return ret;
+ return attr_generic_get_attr(this_->attrs, speech_default_attrs, type, attr, iter);
}
/**