diff options
author | Thomas White <taw@bitwiz.org.uk> | 2011-02-22 00:32:29 -0800 |
---|---|---|
committer | Thomas White <taw@physics.org> | 2012-02-22 15:27:15 +0100 |
commit | 06ffec86ab14cedb4880158a2161fd0ad616d302 (patch) | |
tree | c461308b252c0ab26a3ebf5745d084f11a17a028 /src/displaywindow.c | |
parent | 1a443ce35e96fb39ca0a152a38e35adb7e655ca2 (diff) |
hdfsee: Allow non-integer boost value
Diffstat (limited to 'src/displaywindow.c')
-rw-r--r-- | src/displaywindow.c | 8 |
1 files changed, 4 insertions, 4 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); |