Fix GtkSpinner using style before it's set

Fix a possible division by zero when the spinner
is started before it's realized (eg. before it has a style
set).

https://bugzilla.gnome.org/show_bug.cgi?id=598496
This commit is contained in:
Bastien Nocera
2009-10-14 23:11:43 +01:00
parent 6f44b00935
commit 7fd79f42ab
2 changed files with 49 additions and 4 deletions

View File

@ -77,6 +77,10 @@ do_spinner (GtkWidget *do_widget)
g_signal_connect (G_OBJECT (button), "clicked",
G_CALLBACK (on_stop_clicked), spinner);
gtk_container_add (GTK_CONTAINER (vbox), button);
/* Start by default to test for:
* https://bugzilla.gnome.org/show_bug.cgi?id=598496 */
on_play_clicked (NULL, NULL);
}
if (!GTK_WIDGET_VISIBLE (window))