summaryrefslogtreecommitdiffstats
path: root/Smoke/gtk_heightplots.c
diff options
context:
space:
mode:
Diffstat (limited to 'Smoke/gtk_heightplots.c')
-rw-r--r--Smoke/gtk_heightplots.c19
1 files changed, 13 insertions, 6 deletions
diff --git a/Smoke/gtk_heightplots.c b/Smoke/gtk_heightplots.c
index 42ddf70..dadec94 100644
--- a/Smoke/gtk_heightplots.c
+++ b/Smoke/gtk_heightplots.c
@@ -15,9 +15,7 @@ static GtkAdjustment *rho_adj, *vel_adj, *force_adj, *divv_adj, *divf_adj;
static gboolean set_dataset(GtkToggleButton *button, gpointer data)
{
- GtkAdjustment *temp;
- gchar *s;
-
+ printf("height: %d\n", heightplots_get_height());
if (gtk_toggle_button_get_active(button)) {
switch ((int)data) {
default:
@@ -72,7 +70,7 @@ static void init_adjustments(void)
g_object_ref(rho_adj);
heightplots_set_dataset(DATASET_VEL);
vel_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
- heightplots_get_height(), 1, 1000, 5, 50, 0));
+ heightplots_get_height(), 1, 2000, 5, 50, 0));
g_object_ref(vel_adj);
heightplots_set_dataset(DATASET_FORCE);
force_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
@@ -80,16 +78,25 @@ static void init_adjustments(void)
g_object_ref(force_adj);
heightplots_set_dataset(DATASET_DIVV);
divv_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
- heightplots_get_height(), 1, 3000, 5, 50, 0));
+ heightplots_get_height(), 1, 500, 5, 50, 0));
g_object_ref(divv_adj);
heightplots_set_dataset(DATASET_DIVF);
divf_adj = GTK_ADJUSTMENT(gtk_adjustment_new(
- heightplots_get_height(), 1, 4000, 5, 50, 0));
+ heightplots_get_height(), 1, 500, 5, 50, 0));
g_object_ref(divf_adj);
heightplots_set_dataset(dataset);
}
+/* should be called by destroy */
+void clean_adjustments(void)
+{
+ g_object_unref(rho_adj);
+ g_object_unref(vel_adj);
+ g_object_unref(force_adj);
+ g_object_unref(divv_adj);
+ g_object_unref(divf_adj);
+}
GtkWidget *create_heightplots_page(void)
{