gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), tinfo->num_chapters);
widget = GHB_WIDGET (ud->builder, "start_chapter");
gtk_spin_button_set_value (GTK_SPIN_BUTTON(widget), 1);
+ gtk_spin_button_set_range (GTK_SPIN_BUTTON(widget), 1, tinfo->num_chapters);
}
static gint preview_button_width;
// Height and width are always multiples of 2, so do the rounding
new_height = ((new_height + 1) >> 1) << 1;
new_width = ((new_width + 1) >> 1) << 1;
- g_debug("max w %d, new w %d\n", max_width, new_width);
- if (max_width && (new_width > max_width))
+ if ((max_width && new_width > max_width) ||
+ new_width > title->width)
{
height = new_height;
}
- else if (max_height && (new_height > max_height))
+ else if ((max_height && new_height > max_height) ||
+ new_height > title->height)
{
width = new_width;
}