summaryrefslogtreecommitdiffstats
path: root/Smoke/gtk_streamlines.c
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2008-01-09 16:22:34 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2008-01-09 16:22:34 (GMT)
commit4b45e834c8a243d299f7b09960dc43db58cb7910 (patch)
tree81f58e6af8c70b1695ff374d085cacd15edd0d13 /Smoke/gtk_streamlines.c
parent19104903490d2c67f9b385804a7f89df8f6fc48c (diff)
download2iv35-4b45e834c8a243d299f7b09960dc43db58cb7910.zip
2iv35-4b45e834c8a243d299f7b09960dc43db58cb7910.tar.gz
2iv35-4b45e834c8a243d299f7b09960dc43db58cb7910.tar.bz2
fix frame history!
Diffstat (limited to 'Smoke/gtk_streamlines.c')
-rw-r--r--Smoke/gtk_streamlines.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/Smoke/gtk_streamlines.c b/Smoke/gtk_streamlines.c
index 0945b6d..8096b24 100644
--- a/Smoke/gtk_streamlines.c
+++ b/Smoke/gtk_streamlines.c
@@ -7,6 +7,8 @@
#include "palette.h"
#include "streamlines.h"
+#include "renderer_gl.h"
+
#include "gtk_streamlines.h"
@@ -33,6 +35,14 @@ static gboolean select_alpha(GtkRange *adjustment, gpointer data)
return TRUE;
}
+static gboolean select_history(GtkRange *adjustment, gpointer data)
+{
+ set_hisdex((int)gtk_range_get_value(adjustment));
+
+ return TRUE;
+}
+
+
GtkWidget *create_streamlines_page(void)
{
@@ -85,7 +95,7 @@ GtkWidget *create_streamlines_page(void)
adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(
- streamlines_get_num_colors(), 1, PALETTE_MAXCOLORS, 0.5, 5, 0.1));
+ streamlines_get_num_colors(), 1, PALETTE_MAXCOLORS, 0.5, 5, 0));
scale = gtk_hscale_new(adjustment);
gtk_scale_set_digits(GTK_SCALE(scale), 0);
g_signal_connect(GTK_RANGE(scale), "value-changed", G_CALLBACK(select_num_colors), NULL);
@@ -108,6 +118,16 @@ GtkWidget *create_streamlines_page(void)
gtk_box_pack_start(GTK_BOX(box), scale, FALSE, TRUE, 0);
gtk_widget_show(scale);
+
+ adjustment = GTK_ADJUSTMENT(gtk_adjustment_new(0, 0, HISTORY_SIZE -1, 5, 5, 0));
+ scale = gtk_hscale_new(adjustment);
+ gtk_scale_set_digits(GTK_SCALE(scale), 0);
+ g_signal_connect(GTK_RANGE(scale), "value-changed", G_CALLBACK(select_history), NULL);
+
+ gtk_box_pack_start(GTK_BOX(box), scale, FALSE, TRUE, 0);
+ gtk_widget_show(scale);
+
+
gtk_container_add(GTK_CONTAINER(frame), box);
gtk_widget_show(box);