diff options
Diffstat (limited to 'plugingui/plugingui.cc')
-rw-r--r-- | plugingui/plugingui.cc | 24 |
1 files changed, 6 insertions, 18 deletions
diff --git a/plugingui/plugingui.cc b/plugingui/plugingui.cc index 4a2f4fa..5408334 100644 --- a/plugingui/plugingui.cc +++ b/plugingui/plugingui.cc @@ -172,7 +172,6 @@ PluginGUI::PluginGUI() : MessageReceiver(MSGRCV_UI), sem("plugingui") { initialised = false; - //printf("PluginGUI::PluginGUI() begin\n"); fflush(stdout); windowClosedHandler = NULL; changeMidimapHandler = NULL; @@ -189,8 +188,6 @@ PluginGUI::PluginGUI() #endif/*USE_THREAD*/ sem.wait(); - - //printf("PluginGUI::PluginGUI() done\n"); fflush(stdout); } PluginGUI::~PluginGUI() @@ -306,8 +303,6 @@ void PluginGUI::init() { DEBUG(gui, "init"); - //printf("init begin\n"); fflush(stdout); - config = new Config(); config->load(); @@ -472,16 +467,13 @@ void PluginGUI::init() sem.post(); - //printf("init end\n"); fflush(stdout); initialised = true; } void PluginGUI::show() { - while(!initialised) { - //printf("Waiting for init to finish\n"); fflush(stdout); - sleep(1); - } + while(!initialised) usleep(10000); + if(!window) init(); window->show(); @@ -489,19 +481,15 @@ void PluginGUI::show() void PluginGUI::hide() { - while(!initialised) { - //printf("Waiting for init to finish\n"); fflush(stdout); - sleep(1); - } + while(!initialised) usleep(10000); + if(window) window->hide(); } void PluginGUI::processEvents() { - if(!initialised) { - //printf("Not yet initialised\n"); fflush(stdout); - return; - } + if(!initialised) return; + if(closing) { if(windowClosedHandler) windowClosedHandler(windowClosedPtr); closing = false; |