diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-06 15:41:19 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2008-01-06 15:41:19 (GMT) |
commit | 5297d5f9565da695a6a9891f829118ecaea6ad8a (patch) | |
tree | 5ad10fc27445604c010f1f678b913fb2286b0fd3 /Smoke/gtk_heightplots.c | |
parent | 11e1578b67647a603e23fae44fe658fe2806e19a (diff) | |
download | 2iv35-5297d5f9565da695a6a9891f829118ecaea6ad8a.zip 2iv35-5297d5f9565da695a6a9891f829118ecaea6ad8a.tar.gz 2iv35-5297d5f9565da695a6a9891f829118ecaea6ad8a.tar.bz2 |
fixed heightplot get/setters
Diffstat (limited to 'Smoke/gtk_heightplots.c')
-rw-r--r-- | Smoke/gtk_heightplots.c | 19 |
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) { |