aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-02-22 00:32:29 -0800
committerThomas White <taw@physics.org>2012-02-22 15:27:15 +0100
commit06ffec86ab14cedb4880158a2161fd0ad616d302 (patch)
treec461308b252c0ab26a3ebf5745d084f11a17a028 /src
parent1a443ce35e96fb39ca0a152a38e35adb7e655ca2 (diff)
hdfsee: Allow non-integer boost value
Diffstat (limited to 'src')
-rw-r--r--src/displaywindow.c8
-rw-r--r--src/displaywindow.h2
2 files changed, 5 insertions, 5 deletions
diff --git a/src/displaywindow.c b/src/displaywindow.c
index 4120e3b4..49e9ef1a 100644
--- a/src/displaywindow.c
+++ b/src/displaywindow.c
@@ -327,15 +327,15 @@ static gint displaywindow_set_boostint_response(GtkWidget *widget,
if ( response == GTK_RESPONSE_OK ) {
const char *sboostint;
- unsigned int boostint;
+ float boostint;
int scanval;
sboostint = gtk_entry_get_text(
GTK_ENTRY(dw->boostint_dialog->entry));
- scanval = sscanf(sboostint, "%u", &boostint);
+ scanval = sscanf(sboostint, "%f", &boostint);
if ( (scanval != 1) || (boostint <= 0) ) {
displaywindow_error(dw, "Please enter a positive "
- "integer for the intensity boost "
+ "number for the intensity boost "
"factor.");
done = 0;
} else {
@@ -413,7 +413,7 @@ static gint displaywindow_set_boostint(GtkWidget *widget, DisplayWindow *dw)
1, 2, 3, 4);
bd->entry = gtk_entry_new();
- snprintf(tmp, 63, "%i", dw->boostint);
+ snprintf(tmp, 63, "%.2f", dw->boostint);
gtk_entry_set_text(GTK_ENTRY(bd->entry), tmp);
gtk_table_attach_defaults(GTK_TABLE(table), GTK_WIDGET(bd->entry),
2, 3, 3, 4);
diff --git a/src/displaywindow.h b/src/displaywindow.h
index 9d078bf8..72917e00 100644
--- a/src/displaywindow.h
+++ b/src/displaywindow.h
@@ -61,7 +61,7 @@ typedef struct {
int width;
int height; /* Size of the drawing area */
int binning;
- int boostint;
+ double boostint;
int cmfilter; /* Use CM subtraction */
int noisefilter; /* Use aggressive noise filter */