[xiph-commits] r12556 - trunk/sushivision
xiphmont at svn.xiph.org
xiphmont at svn.xiph.org
Sat Feb 24 19:40:12 PST 2007
Author: xiphmont
Date: 2007-02-24 19:40:11 -0800 (Sat, 24 Feb 2007)
New Revision: 12556
Modified:
trunk/sushivision/dimension.c
Log:
Minor fix to dimension entries; they were displaying the value
internal to the thumb, not the quantized value actually set in the
dimension and relevant to the plot.
Modified: trunk/sushivision/dimension.c
===================================================================
--- trunk/sushivision/dimension.c 2007-02-25 03:39:20 UTC (rev 12555)
+++ trunk/sushivision/dimension.c 2007-02-25 03:40:11 UTC (rev 12556)
@@ -235,13 +235,6 @@
_sushiv_panel_undo_suspend(p);
}
- snprintf(buffer,80,"%.10g",d->bracket[0]);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[0]),buffer);
- snprintf(buffer,80,"%.10g",val);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[1]),buffer);
- snprintf(buffer,80,"%.10g",d->bracket[1]);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[2]),buffer);
-
if(d->val != val){
int i;
@@ -263,6 +256,13 @@
if(buttonstate == 2)
_sushiv_panel_undo_resume(p);
+
+ snprintf(buffer,80,"%.10g",d->bracket[0]);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[0]),buffer);
+ snprintf(buffer,80,"%.10g",d->val);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[1]),buffer);
+ snprintf(buffer,80,"%.10g",d->bracket[1]);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[2]),buffer);
dw->center_updating = 0;
}
@@ -291,13 +291,6 @@
_sushiv_panel_undo_suspend(p);
}
- snprintf(buffer,80,"%.10g",lo);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[0]),buffer);
- snprintf(buffer,80,"%.10g",d->val);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[1]),buffer);
- snprintf(buffer,80,"%.10g",hi);
- gtk_entry_set_text(GTK_ENTRY(dw->entry[2]),buffer);
-
if(d->bracket[0] != lo || d->bracket[1] != hi){
int i;
@@ -323,6 +316,13 @@
if(buttonstate == 2)
_sushiv_panel_undo_resume(p);
+ snprintf(buffer,80,"%.10g",d->bracket[0]);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[0]),buffer);
+ snprintf(buffer,80,"%.10g",d->val);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[1]),buffer);
+ snprintf(buffer,80,"%.10g",d->bracket[1]);
+ gtk_entry_set_text(GTK_ENTRY(dw->entry[2]),buffer);
+
dw->bracket_updating = 0;
}
gdk_threads_leave();
@@ -522,9 +522,9 @@
slice_thumb_set(s, atof(gtk_entry_get_text(entry)));
}
-static gboolean entry_refresh_callback (GtkEntry *entry, GdkEventFocus *event, Slice *s){
+static gboolean entry_refresh_callback (GtkEntry *entry, GdkEventFocus *event, double *v){
char buffer[80];
- snprintf(buffer,80,"%.10g",s->thumb_val);
+ snprintf(buffer,80,"%.10g",*v);
gtk_entry_set_text(entry,buffer);
return FALSE;
}
@@ -609,11 +609,11 @@
G_CALLBACK (entry_callback), sl[2]);
g_signal_connect (G_OBJECT (dw->entry[0]), "focus-out-event",
- G_CALLBACK (entry_refresh_callback), sl[0]);
+ G_CALLBACK (entry_refresh_callback), &d->bracket[0]);
g_signal_connect (G_OBJECT (dw->entry[1]), "focus-out-event",
- G_CALLBACK (entry_refresh_callback), sl[1]);
+ G_CALLBACK (entry_refresh_callback), &d->val);
g_signal_connect (G_OBJECT (dw->entry[2]), "focus-out-event",
- G_CALLBACK (entry_refresh_callback), sl[2]);
+ G_CALLBACK (entry_refresh_callback), &d->bracket[1]);
slice_set_active_callback((Slice *)sl[0], entry_active_callback, dw->entry[0]);
slice_set_active_callback((Slice *)sl[1], entry_active_callback, dw->entry[1]);
More information about the commits
mailing list