diff options
author | Sebastian Leske <sebastian.leske@sleske.name> | 2015-09-16 19:04:45 +0200 |
---|---|---|
committer | Sebastian Leske <sebastian.leske@sleske.name> | 2015-09-17 00:22:40 +0200 |
commit | d677c4563ddf20878cfcb8e8d83b5a0f1a457908 (patch) | |
tree | 0b96af5304ab569d1191f254a3468d3e6f840dd6 | |
parent | 8dd0ad167b969eb479dc58f7ec50259999cc42a0 (diff) | |
download | navit-d677c4563ddf20878cfcb8e8d83b5a0f1a457908.tar.gz |
Better error msg for wrong OSD entries in navit.xmlR6274
Do not report error for an attempt to load an already loaded plugin;
this is normal for libosd_core.
Report error for trying to create an OSD with an invalid type.
Remove invalid OSD entries from navit_shipped.xml
-rw-r--r-- | navit/navit_shipped.xml | 4 | ||||
-rw-r--r-- | navit/osd.c | 4 | ||||
-rw-r--r-- | navit/plugin.c | 4 |
3 files changed, 5 insertions, 7 deletions
diff --git a/navit/navit_shipped.xml b/navit/navit_shipped.xml index bbf1db3db..479e370c8 100644 --- a/navit/navit_shipped.xml +++ b/navit/navit_shipped.xml @@ -151,10 +151,6 @@ Waypoint</text></img> <log enabled="no" type="textfile_debug" data="debug_%Y%m%d-%i.txt" flush_size="1000" flush_time="30"/> <!-- osd items allow to position display and control items directly on top of the map: --> <osd enabled="no" type="compass"/> - <osd enabled="no" type="eta"/> - <osd enabled="no" type="navigation_distance_to_target"/> - <osd enabled="no" type="navigation"/> - <osd enabled="no" type="navigation_distance_to_next"/> <osd enabled="no" type="navigation_next_turn"/> <!-- Commands include gui_internal_menu, gui_internal_fullscreen, zoom_in and zoom_out. diff --git a/navit/osd.c b/navit/osd.c index dd87392fb..921b2d8ab 100644 --- a/navit/osd.c +++ b/navit/osd.c @@ -53,8 +53,10 @@ osd_new(struct attr *parent, struct attr **attrs) if (! type) return NULL; new=plugin_get_osd_type(type->u.str); - if (! new) + if (! new) { + dbg(lvl_error, "invalid OSD type '%s'\n", type->u.str); return NULL; + } o=g_new0(struct osd, 1); o->attrs=attr_list_dup(attrs); cbl.type=attr_callback_list; diff --git a/navit/plugin.c b/navit/plugin.c index 0f3e89583..2edf9ed74 100644 --- a/navit/plugin.c +++ b/navit/plugin.c @@ -170,8 +170,8 @@ plugin_load(struct plugin *pl) GModule *mod; if (pl->mod) { - dbg(lvl_error,"can't load '%s', already loaded\n", pl->name); - return 0; + dbg(lvl_debug,"'%s' already loaded, returning\n", pl->name); + return 1; } mod=g_module_open(pl->name, G_MODULE_BIND_LOCAL | (pl->lazy ? G_MODULE_BIND_LAZY : 0)); if (! mod) { |