/[svn]/gigedit/trunk/src/gigedit/gigedit.cpp
ViewVC logotype

Diff of /gigedit/trunk/src/gigedit/gigedit.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 2474 by schoenebeck, Sun Sep 15 18:16:21 2013 UTC revision 2664 by schoenebeck, Sat Jul 5 19:43:14 2014 UTC
# Line 58  namespace { Line 58  namespace {
58  //  //
59  class GigEditState : public sigc::trackable {  class GigEditState : public sigc::trackable {
60  public:  public:
61      GigEditState(GigEdit* parent) : parent(parent) { }      GigEditState(GigEdit* parent) : parent(parent), instrument(NULL) { }
62      void run(gig::Instrument* pInstrument);      void run(gig::Instrument* pInstrument);
63    
64      MainWindow* window;      MainWindow* window;
# Line 401  void GigEditState::run(gig::Instrument* Line 401  void GigEditState::run(gig::Instrument*
401      mutex.lock(); // lock access to static variables      mutex.lock(); // lock access to static variables
402    
403      static bool main_loop_started = false;      static bool main_loop_started = false;
404        instrument = pInstrument;
405      if (!main_loop_started) {      if (!main_loop_started) {
406  #if defined(__APPLE__)  #if defined(__APPLE__)
407          // spawn GUI on main thread :          // spawn GUI on main thread :
# Line 466  void GigEditState::run(gig::Instrument* Line 467  void GigEditState::run(gig::Instrument*
467          printf("GUI is now initialized. Everything done.\n"); fflush(stdout);          printf("GUI is now initialized. Everything done.\n"); fflush(stdout);
468          main_loop_started = true;          main_loop_started = true;
469      }      }
     instrument = pInstrument;  
470      current = this;      current = this;
471      dispatcher->emit();      dispatcher->emit();
472      open.wait(); // wait until the GUI thread has read current      open.wait(); // wait until the GUI thread has read current

Legend:
Removed from v.2474  
changed lines
  Added in v.2664

  ViewVC Help
Powered by ViewVC