]> jspc29.x-matter.uni-frankfurt.de Git - coral.git/commitdiff
added cleared image
authorMichael Wiebusch <antiquark@gmx.net>
Thu, 21 Aug 2014 12:36:44 +0000 (14:36 +0200)
committerMichael Wiebusch <antiquark@gmx.net>
Thu, 21 Aug 2014 12:36:44 +0000 (14:36 +0200)
user_interface/clear.png [new file with mode: 0644]
user_interface/gui.pl
user_interface/plot2.png [deleted file]

diff --git a/user_interface/clear.png b/user_interface/clear.png
new file mode 100644 (file)
index 0000000..cffb1c1
Binary files /dev/null and b/user_interface/clear.png differ
index 2913639b8294753d3ffb31fb3d5750b5038f9688..12436d2da7ba78634f7a61f2bf7a57f2370b8b0f 100755 (executable)
@@ -62,7 +62,7 @@ $quit_button->signal_connect( clicked => sub {
 
 
 
-my $image = Gtk2::Image->new_from_file ("plot.png");
+my $image = Gtk2::Image->new_from_file ("clear.png");
 # $vbox->pack_start($image, TRUE, TRUE, 0);
 $plot_frame->add($image);
 
@@ -91,18 +91,14 @@ $plot_button->signal_connect( clicked => sub {
 
 #   $label->set_text(qx%echo blah%);
   execute("./plot.sh");
-  $plot_frame->remove($image);
-  $image->clear;
-  $image = Gtk2::Image->new_from_file ("plot.png");
-  $plot_frame->add($image);
-  $window->show_all;
+  show_image("plot.png");
   
 });
 
 $clear_button->signal_connect( clicked => sub {
 
   execute("./analyzer.pl --clear");
-  $image->clear;
+  show_image("clear.png");
   
 });
 
@@ -111,6 +107,7 @@ $setWindowLength_button->signal_connect( clicked => sub {
   execute("./analyzer.pl --window $windowLength");
 #   $label->set_text($windowLength_entry->get_text());
   execute("./analyzer.pl --clear");
+  show_image("clear.png");
   
 });
 
@@ -123,6 +120,15 @@ sub execute {
   
 }
 
+sub show_image{
+  my $filename = shift;
+  $plot_frame->remove($image);
+  $image->clear;
+  $image = Gtk2::Image->new_from_file($filename);
+  $plot_frame->add($image);
+  $window->show_all;
+}
+
 
 
 
diff --git a/user_interface/plot2.png b/user_interface/plot2.png
deleted file mode 100644 (file)
index 3f7b5ee..0000000
Binary files a/user_interface/plot2.png and /dev/null differ