Bug #312 » 0021-gtk4-Remove-use-of-format-value-signal.patch
client/gui-gtk-4.0/gamedlgs.c | ||
---|---|---|
return scale * pmul->step + pmul->start;
|
||
}
|
||
/**********************************************************************//**
|
||
Format value for multiplier scales
|
||
**************************************************************************/
|
||
static gchar *multiplier_value_callback(GtkScale *scale, gdouble value,
|
||
void *udata)
|
||
{
|
||
const struct multiplier *pmul = udata;
|
||
return g_strdup_printf("%d", scale_to_mult(pmul, value));
|
||
}
|
||
/**********************************************************************//**
|
||
User has responded to multipliers dialog
|
||
**************************************************************************/
|
||
... | ... | |
mscale = mult_to_scale(pmul, pmul->stop) / 10;
|
||
gtk_range_set_increments(GTK_RANGE(multipliers_scale[multiplier]),
|
||
1, MAX(2, mscale));
|
||
g_signal_connect(multipliers_scale[multiplier], "format-value",
|
||
G_CALLBACK(multiplier_value_callback), pmul);
|
||
g_signal_connect(multipliers_scale[multiplier], "destroy",
|
||
G_CALLBACK(widget_destroyed),
|
||
&multipliers_scale[multiplier]);
|
- « Previous
- 1
- 2
- Next »