summaryrefslogtreecommitdiff
path: root/navit/graphics
diff options
context:
space:
mode:
authorwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-08-16 20:44:47 +0000
committerwoglinde <woglinde@ffa7fe5e-494d-0410-b361-a75ebd5db220>2011-08-16 20:44:47 +0000
commitfecaf5c4b8304c9104824d82fb84cdd0ca2950c9 (patch)
tree9a1f5831102a4adeea6f3c6f81ff3d3baf20ad53 /navit/graphics
parente0358f566027aeb9edf930cdb6d6222e5961bdbf (diff)
downloadnavit-fecaf5c4b8304c9104824d82fb84cdd0ca2950c9.tar.gz
Add:graphics_null: add an attribute event_loop_system, so we can choose if the null graphics can have events, usefull if you want run navit as a routing-enginge with dbus and no graphics
git-svn-id: http://svn.code.sf.net/p/navit/code/trunk/navit@4684 ffa7fe5e-494d-0410-b361-a75ebd5db220
Diffstat (limited to 'navit/graphics')
-rw-r--r--navit/graphics/null/graphics_null.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/navit/graphics/null/graphics_null.c b/navit/graphics/null/graphics_null.c
index f69530b5c..41b49097b 100644
--- a/navit/graphics/null/graphics_null.c
+++ b/navit/graphics/null/graphics_null.c
@@ -22,6 +22,7 @@
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
+#include "item.h"
#include "point.h"
#include "graphics.h"
#include "color.h"
@@ -230,8 +231,19 @@ static struct graphics_priv *
graphics_null_new(struct navit *nav, struct graphics_methods *meth, struct attr **attrs, struct callback_list *cbl)
{
*meth=graphics_methods;
- if (!event_request_system("null","graphics_null"))
- return NULL;
+ struct attr *event_loop_system = NULL;
+
+ event_loop_system = attr_search(attrs, NULL, attr_event_loop_system);
+
+ if (event_loop_system && event_loop_system->u.str) {
+ dbg(1, "event_system is %s\n", event_loop_system->u.str);
+ if (!event_request_system(event_loop_system->u.str, "graphics_null"))
+ return NULL;
+ } else {
+ if (!event_request_system("null", "graphics_null"))
+ return NULL;
+ }
+
return &graphics_priv;
}