From 36b266be895e3708615e9370588b40e2ede5a788 Mon Sep 17 00:00:00 2001 From: fgerlits Date: Thu, 17 Aug 2006 14:48:28 +0000 Subject: [PATCH] sprinkled some runMainLoop() calls at more-or-less random locations; this might improve the responsiveness --- livesupport/src/products/gLiveSupport/src/CuePlayer.cxx | 4 ++++ livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx | 3 +++ .../src/products/gLiveSupport/src/MasterPanelWindow.cxx | 3 +++ 3 files changed, 10 insertions(+) diff --git a/livesupport/src/products/gLiveSupport/src/CuePlayer.cxx b/livesupport/src/products/gLiveSupport/src/CuePlayer.cxx index d0d5910d0..78d8cd86b 100644 --- a/livesupport/src/products/gLiveSupport/src/CuePlayer.cxx +++ b/livesupport/src/products/gLiveSupport/src/CuePlayer.cxx @@ -136,6 +136,7 @@ CuePlayer :: onPlayItem(void) throw () remove(*playButton); pack_end(*pauseButton, Gtk::PACK_SHRINK, 3); pauseButton->show(); + gLiveSupport->runMainLoop(); } } @@ -157,6 +158,7 @@ CuePlayer :: onPlayButtonClicked(void) throw () remove(*playButton); pack_end(*pauseButton, Gtk::PACK_SHRINK, 3); pauseButton->show(); + gLiveSupport->runMainLoop(); } catch (std::logic_error &e) { std::cerr << "GLiveSupport::pauseCueAudio() error:" << std::endl << e.what() << std::endl; @@ -183,6 +185,7 @@ CuePlayer :: onPauseButtonClicked(void) throw () remove(*pauseButton); pack_end(*playButton, Gtk::PACK_SHRINK, 3); playButton->show(); + gLiveSupport->runMainLoop(); } catch (std::logic_error &e) { std::cerr << "GLiveSupport::pauseCueAudio() error:" << std::endl << e.what() << std::endl; @@ -227,5 +230,6 @@ CuePlayer :: onStop(void) throw () audioState = waitingState; pack_end(*playButton, Gtk::PACK_SHRINK, 3); playButton->show(); + gLiveSupport->runMainLoop(); } diff --git a/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx b/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx index a45ec162c..6963853cc 100644 --- a/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/LiveModeWindow.cxx @@ -252,6 +252,7 @@ LiveModeWindow :: addItem(Ptr::Ref playable) throw () infoString->append(""); row[modelColumns.infoColumn] = *infoString; + gLiveSupport->runMainLoop(); } @@ -268,6 +269,7 @@ LiveModeWindow :: popTop(void) throw () playable = (*iter)[modelColumns.playableColumn]; treeModel->erase(iter); } + gLiveSupport->runMainLoop(); return playable; } @@ -297,6 +299,7 @@ LiveModeWindow :: onOutputPlay(void) throw () std::cerr << "cannot play on live mode output device: " << e.what() << std::endl; } + gLiveSupport->runMainLoop(); } } diff --git a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx index bd046b9bc..af245673d 100644 --- a/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx +++ b/livesupport/src/products/gLiveSupport/src/MasterPanelWindow.cxx @@ -423,6 +423,9 @@ MasterPanelWindow :: onUpdateTime(int dummy) throw () } } + // refresh all windows + gLiveSupport->runMainLoop(); + return true; }