Delayed loading image to clicking the button.
authorStanislaw Klekot <dozzie@jarowit.net>
Tue, 22 Oct 2013 19:01:20 +0000 (21:01 +0200)
committerStanislaw Klekot <dozzie@jarowit.net>
Tue, 22 Oct 2013 19:01:20 +0000 (21:01 +0200)
rrdplot

diff --git a/rrdplot b/rrdplot
index d70b6ef..4a64c14 100755 (executable)
--- a/rrdplot
+++ b/rrdplot
@@ -19,6 +19,7 @@ class Base:
     self.window.connect("destroy", self.destroy)
     # why this is false by default?
     self.window.set_property("allow-shrink", True)
+    self.window.set_default_size(500, 340)
 
     # some time later I'll use more widgets than just canvas
     vbox = gtk.VBox()
@@ -45,19 +46,20 @@ class Base:
     # RRD plot object {{{
 
     self.rrdplot = rrdplot.plot.RRDPlot()
-    self.rrdplot.load_rrd("wandora.rrd")
 
     # }}}
     #-------------------------------------------------------
     # button support {{{
 
     def button_handler(widget, data = None):
+      self.rrdplot.load_rrd("skip/wandora.rrd")
       self.reload_image()
 
     self.button = gtk.Button("refresh")
     self.button.show()
     self.button.connect("clicked", button_handler, None)
     vbox.add(self.button)
+    vbox.child_set_property(self.button, "expand", False)
 
     # }}}
     #-------------------------------------------------------