From ad9551a28a8cf0c30028baa6d9d764075a707605 Mon Sep 17 00:00:00 2001 From: Nedko Arnaudov Date: Mon, 17 Aug 2009 04:17:26 +0300 Subject: [PATCH] Move the call of Gnome::Canvas::init() to proper place --- gui/canvas.cpp | 8 ++++++++ gui/canvas.h | 4 ++++ gui/main.cpp | 7 ++++++- 3 files changed, 18 insertions(+), 1 deletion(-) 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();