aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian Persch <chpe@cvs.gnome.org>2006-10-18 04:32:46 +0800
committerChristian Persch <chpe@src.gnome.org>2006-10-18 04:32:46 +0800
commit03d63a3c1d4522010a58e61aff6aad83d28a7db4 (patch)
treee354364730ed010c7dd7667cadb0be6c66fc2e78
parent954a2a7825f65bcb401e28379c553450758c6f62 (diff)
downloadgsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar
gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.gz
gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.bz2
gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.lz
gsoc2013-epiphany-03d63a3c1d4522010a58e61aff6aad83d28a7db4.tar.xz
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.
-rw-r--r--ChangeLog10
-rw-r--r--lib/widgets/ephy-spinner.c19
-rw-r--r--lib/widgets/ephy-spinner.h13
3 files changed, 24 insertions, 18 deletions
diff --git a/ChangeLog b/ChangeLog
index ff54a7602..36fa9ccaa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+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.
+
2006-10-15 Wouter Bolsterlee <wbolster@gnome.org>
* embed/mozilla/ContentHandler.cpp:
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));
}
diff --git a/lib/widgets/ephy-spinner.h b/lib/widgets/ephy-spinner.h
index 433aa8206..5b3fad717 100644
--- a/lib/widgets/ephy-spinner.h
+++ b/lib/widgets/ephy-spinner.h
@@ -1,8 +1,7 @@
/* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */
/*
- * Nautilus
- *
* Copyright © 2000 Eazel, Inc.
+ * 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
@@ -20,15 +19,13 @@
*
* Author: Andy Hertzfeld <andy@eazel.com>
*
- * This is the header file for the throbber on the location bar
- *
* $Id$
*/
#ifndef EPHY_SPINNER_H
#define EPHY_SPINNER_H
-#include <gtk/gtkeventbox.h>
+#include <gtk/gtkwidget.h>
#include <gtk/gtkenums.h>
G_BEGIN_DECLS
@@ -41,12 +38,12 @@ G_BEGIN_DECLS
#define EPHY_SPINNER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SPINNER, EphySpinnerClass))
typedef struct _EphySpinner EphySpinner;
-typedef struct _EphySpinnerClass EphySpinnerClass;
+typedef struct _EphySpinnerClass EphySpinnerClass;
typedef struct _EphySpinnerDetails EphySpinnerDetails;
struct _EphySpinner
{
- GtkEventBox parent;
+ GtkWidget parent;
/*< private >*/
EphySpinnerDetails *details;
@@ -54,7 +51,7 @@ struct _EphySpinner
struct _EphySpinnerClass
{
- GtkEventBoxClass parent_class;
+ GtkWidgetClass parent_class;
};
GType ephy_spinner_get_type (void);