diff options
author | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-19 09:57:58 +0000 |
---|---|---|
committer | martin-s <martin-s@ffa7fe5e-494d-0410-b361-a75ebd5db220> | 2009-11-19 09:57:58 +0000 |
commit | 84d728efff6ce22c1f4bec09c2d12ce7f76fa658 (patch) | |
tree | 10693b3366e4f135a24029d99cabf3faaa0c37da /navit/gui.c | |
parent | c41ac062f77ebd800a56f6cf9000fe086cefbeb4 (diff) | |
download | navit-84d728efff6ce22c1f4bec09c2d12ce7f76fa658.tar.gz |
Add:gui_internal:Add via navit.xml configurable menus, expect some screwups the next time
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@2761 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/gui.c')
-rw-r--r-- | navit/gui.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/navit/gui.c b/navit/gui.c index f05a90d6a..a05d3d8ab 100644 --- a/navit/gui.c +++ b/navit/gui.c @@ -39,7 +39,7 @@ gui_new(struct attr *parent, struct attr **attrs) { struct gui *this_; struct attr *type_attr; - struct gui_priv *(*guitype_new)(struct navit *nav, struct gui_methods *meth, struct attr **attrs); + struct gui_priv *(*guitype_new)(struct navit *nav, struct gui_methods *meth, struct attr **attrs, struct gui *gui); struct attr cbl; if (! (type_attr=attr_search(attrs, NULL, attr_type))) { return NULL; @@ -54,7 +54,7 @@ gui_new(struct attr *parent, struct attr **attrs) cbl.type=attr_callback_list; cbl.u.callback_list=callback_list_new(); this_->attrs=attr_generic_add_attr(this_->attrs, &cbl); - this_->priv=guitype_new(parent->u.navit, &this_->meth, this_->attrs); + this_->priv=guitype_new(parent->u.navit, &this_->meth, this_->attrs, this_); this_->parent=*parent; return this_; } @@ -75,6 +75,15 @@ gui_get_attr(struct gui *this_, enum attr_type type, struct attr *attr, struct a return attr_generic_get_attr(this_->attrs, NULL, type, attr, iter); } +int +gui_add_attr(struct gui *this_, struct attr *attr) +{ + int ret=0; + if (this_->meth.add_attr) + ret=this_->meth.add_attr(this_->priv, attr); + return ret; +} + struct menu * gui_menubar_new(struct gui *gui) { |