]> git.apps.os.sepia.ceph.com Git - ceph.git/commitdiff
cephtool: fix initialization race
authorColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 28 Oct 2010 22:01:59 +0000 (15:01 -0700)
committerColin Patrick McCabe <cmccabe@alumni.cmu.edu>
Thu, 28 Oct 2010 22:51:19 +0000 (15:51 -0700)
Call GuiMonitor::link_elements before GuiMonitor::connect_signals.

It doesn't seem safe to set up callbacks before the GUI elements are
fully initialized.

Signed-off-by: Colin McCabe <colinm@hq.newdream.net>
src/tools/gui.cc

index 602f216cc681c78650962a47ed3b68b3b19192f3..9872b94cd0e991a8838014986567d7a2f19bb525 100644 (file)
@@ -217,13 +217,13 @@ bool GuiMonitor::init()
   if (!open_icon(PGIcon, resource_path(PG_ICON_PATH)))
     return false;
 
-  // connect callbacks to their corresponding signals.
-  connect_signals();
-
   // Link elements (e.g., text buffers, list stores, etc.) to their
   // containers (e.g., text views, list views, etc.)
   link_elements();
 
+  // connect callbacks to their corresponding signals.
+  connect_signals();
+
   thread = new GuiMonitorThread(this);
   thread->create();
   return true;