diff options
author | Christian Persch <chpe@cvs.gnome.org> | 2006-10-18 04:32:46 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2006-10-18 04:32:46 +0800 |
commit | 03d63a3c1d4522010a58e61aff6aad83d28a7db4 (patch) | |
tree | e354364730ed010c7dd7667cadb0be6c66fc2e78 /lib/widgets/ephy-spinner.c | |
parent | 954a2a7825f65bcb401e28379c553450758c6f62 (diff) | |
download | gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.gz gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.zst gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.zip |
Fix a crash after failing to get the spinner animation or rest icons.
2006-10-17 Christian Persch <chpe@cvs.gnome.org>
* lib/widgets/ephy-spinner.c: (ephy_spinner_images_load),
(ephy_spinner_cache_get_images), (ephy_spinner_get_type),
(ephy_spinner_init), (ephy_spinner_new):
* lib/widgets/ephy-spinner.h:
Fix a crash after failing to get the spinner animation or rest icons.
Derive EphySpinner from GtkWidget not GtkEventBox.
Diffstat (limited to 'lib/widgets/ephy-spinner.c')
-rw-r--r-- | lib/widgets/ephy-spinner.c | 19 |
1 files changed, 9 insertions, 10 deletions
diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c index 03d43b9c9..a1d0f209e 100644 --- a/lib/widgets/ephy-spinner.c +++ b/lib/widgets/ephy-spinner.c @@ -1,9 +1,7 @@ /* - * Nautilus - * * Copyright © 2000 Eazel, Inc. * Copyright © 2002-2004 Marco Pesenti Gritti - * Copyright © 2004 Christian Persch + * Copyright © 2004, 2006 Christian Persch * * Nautilus is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -23,8 +21,6 @@ * * Ephy port by Marco Pesenti Gritti <marco@it.gnome.org> * - * This is the spinner (for busy feedback) for the location bar - * * $Id$ */ @@ -270,6 +266,7 @@ ephy_spinner_images_load (GdkScreen *screen, rest_pixbuf = gdk_pixbuf_new_from_file (icon, NULL); gtk_icon_info_free (icon_info); + icon_info = NULL; if (rest_pixbuf == NULL) { @@ -298,6 +295,7 @@ ephy_spinner_images_load (GdkScreen *screen, icon_pixbuf = gdk_pixbuf_new_from_file (icon, NULL); gtk_icon_info_free (icon_info); + icon_info = NULL; if (icon_pixbuf == NULL) { @@ -433,6 +431,7 @@ ephy_spinner_cache_get_images (EphySpinnerCache *cache, if (data == NULL) { data = ephy_spinner_cache_data_new (screen); + /* FIXME: think about what happens when the screen's display is closed later on */ g_hash_table_insert (priv->hash, screen, data); } @@ -545,7 +544,7 @@ struct _EphySpinnerDetails static void ephy_spinner_class_init (EphySpinnerClass *class); static void ephy_spinner_init (EphySpinner *spinner); -static GObjectClass *parent_class = NULL; +static GObjectClass *parent_class; GType ephy_spinner_get_type (void) @@ -567,7 +566,7 @@ ephy_spinner_get_type (void) (GInstanceInitFunc) ephy_spinner_init }; - type = g_type_register_static (GTK_TYPE_EVENT_BOX, + type = g_type_register_static (GTK_TYPE_WIDGET, "EphySpinner", &our_info, 0); } @@ -629,6 +628,8 @@ ephy_spinner_init (EphySpinner *spinner) details = spinner->details = EPHY_SPINNER_GET_PRIVATE (spinner); + GTK_WIDGET_SET_FLAGS (GTK_WIDGET (spinner), GTK_NO_WINDOW); + details->cache = ephy_spinner_cache_ref (); details->size = GTK_ICON_SIZE_DIALOG; details->spinning = FALSE; @@ -1000,7 +1001,5 @@ ephy_spinner_class_init (EphySpinnerClass *class) GtkWidget * ephy_spinner_new (void) { - return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, - "visible-window", FALSE, - NULL)); + return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, NULL)); } |