Well, there are lots of ways to do it. For example, you callback function can have a static variable to hold the previous value and use the g_strtod to convert the value in the entry into a numeric.
simple example... not tested, just off the top of my head:
Code:
gdouble previous_value;
gdouble value;
gchar new_text;
value = g_strtod (gtk_entry_get_text ( GTK_ENTRY (widget) );
if (previous_value)
{
value += previous_value;
previous_value = null;
new_text = g_strdup_printf ("%f", value);
gtk_entry_set_text (GTK_ENTRY (widget), new_text);
/* don't free new_text, it's owned by the entry */
}
else
{
previous_value = value;
}