diff --git a/gui/canvas.cpp b/gui/canvas.cpp index fce5edd9..0830ddf7 100644 --- a/gui/canvas.cpp +++ b/gui/canvas.cpp @@ -70,6 +70,14 @@ public: void * context; }; +bool +canvas_init( + void) +{ + Gnome::Canvas::init(); + return true; +} + bool canvas_create( double width, diff --git a/gui/canvas.h b/gui/canvas.h index e2b0ebf5..3d130cd8 100644 --- a/gui/canvas.h +++ b/gui/canvas.h @@ -41,6 +41,10 @@ extern "C" { } /* Adjust editor indent */ #endif +bool +canvas_init( + void); + bool canvas_create( double width, diff --git a/gui/main.cpp b/gui/main.cpp index 04628f69..8c76205d 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -38,6 +38,7 @@ #include "common.h" #include "Widget.hpp" #include +#include "../common/debug.h" //class a2j_proxy; //class lash_proxy; @@ -905,9 +906,13 @@ glade_open() int main(int argc, char** argv) { + if (!canvas_init()) { + lash_error("Canvas initialization failed."); + return 1; + } + try { - Gnome::Canvas::init(); Gtk::Main app(argc, argv); g_xml = glade_open();