From 099873bb3ced9f2189b87d12641a6e61de9ae5d8 Mon Sep 17 00:00:00 2001 From: Christian Persch Date: Fri, 2 Jul 2004 22:05:59 +0000 Subject: Codestyle and whitespace cleanup --- lib/widgets/ephy-spinner.c | 82 +++++++++++++++++++++++----------------------- lib/widgets/ephy-spinner.h | 37 +++++++++++---------- 2 files changed, 60 insertions(+), 59 deletions(-) (limited to 'lib') diff --git a/lib/widgets/ephy-spinner.c b/lib/widgets/ephy-spinner.c index 0bee4488f..8145e17ae 100644 --- a/lib/widgets/ephy-spinner.c +++ b/lib/widgets/ephy-spinner.c @@ -68,46 +68,29 @@ static GObjectClass *parent_class = NULL; GType ephy_spinner_get_type (void) { - static GType type = 0; - - if (type == 0) - { - static const GTypeInfo our_info = - { - sizeof (EphySpinnerClass), - NULL, /* base_init */ - NULL, /* base_finalize */ - (GClassInitFunc) ephy_spinner_class_init, - NULL, - NULL, /* class_data */ - sizeof (EphySpinner), - 0, /* n_preallocs */ - (GInstanceInitFunc) ephy_spinner_init - }; - - type = g_type_register_static (GTK_TYPE_EVENT_BOX, - "EphySpinner", - &our_info, 0); - } - - return type; -} + static GType type = 0; -/* - * ephy_spinner_new: - * - * Create a new #EphySpinner. The spinner is a widget - * that gives the user feedback about network status with - * an animated image. - * - * Return Value: the spinner #GtkWidget - **/ -GtkWidget * -ephy_spinner_new (void) -{ - return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, - "visible-window", FALSE, - NULL)); + if (type == 0) + { + static const GTypeInfo our_info = + { + sizeof (EphySpinnerClass), + NULL, /* base_init */ + NULL, /* base_finalize */ + (GClassInitFunc) ephy_spinner_class_init, + NULL, + NULL, /* class_data */ + sizeof (EphySpinner), + 0, /* n_preallocs */ + (GInstanceInitFunc) ephy_spinner_init + }; + + type = g_type_register_static (GTK_TYPE_EVENT_BOX, + "EphySpinner", + &our_info, 0); + } + + return type; } static gboolean @@ -459,7 +442,7 @@ ephy_spinner_load_images (EphySpinner *spinner) /* Load the animation */ icon_info = gtk_icon_theme_lookup_icon (spinner->details->icon_theme, - "gnome-spinner", -1, 0); + "gnome-spinner", -1, 0); if (icon_info == NULL) { g_warning ("Throbber animation not found"); @@ -499,7 +482,7 @@ ephy_spinner_load_images (EphySpinner *spinner) /* Load the rest icon */ icon_info = gtk_icon_theme_lookup_icon (spinner->details->icon_theme, - "gnome-spinner-rest", -1, 0); + "gnome-spinner-rest", -1, 0); if (icon_info == NULL) { g_warning ("Throbber rest icon not found"); @@ -595,3 +578,20 @@ ephy_spinner_class_init (EphySpinnerClass *class) g_type_class_add_private (object_class, sizeof (EphySpinnerDetails)); } + +/* + * ephy_spinner_new: + * + * Create a new #EphySpinner. The spinner is a widget + * that gives the user feedback about network status with + * an animated image. + * + * Return Value: the spinner #GtkWidget + **/ +GtkWidget * +ephy_spinner_new (void) +{ + return GTK_WIDGET (g_object_new (EPHY_TYPE_SPINNER, + "visible-window", FALSE, + NULL)); +} diff --git a/lib/widgets/ephy-spinner.h b/lib/widgets/ephy-spinner.h index 98e55dafd..faa0520f0 100644 --- a/lib/widgets/ephy-spinner.h +++ b/lib/widgets/ephy-spinner.h @@ -1,5 +1,4 @@ /* -*- Mode: C; indent-tabs-mode: t; c-basic-offset: 8; tab-width: 8 -*- */ - /* * Nautilus * @@ -34,38 +33,40 @@ G_BEGIN_DECLS -#define EPHY_TYPE_SPINNER (ephy_spinner_get_type ()) -#define EPHY_SPINNER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SPINNER, EphySpinner)) -#define EPHY_SPINNER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SPINNER, EphySpinnerClass)) -#define EPHY_IS_SPINNER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SPINNER)) -#define EPHY_IS_SPINNER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SPINNER)) -#define EPHY_SPINNER_GET_CLASS(o) (G_TYPE_INSTANCE_GET_CLASS ((o), EPHY_TYPE_SPINNER, EphySpinnerClass)) +#define EPHY_TYPE_SPINNER (ephy_spinner_get_type ()) +#define EPHY_SPINNER(o) (G_TYPE_CHECK_INSTANCE_CAST ((o), EPHY_TYPE_SPINNER, EphySpinner)) +#define EPHY_SPINNER_CLASS(k) (G_TYPE_CHECK_CLASS_CAST((k), EPHY_TYPE_SPINNER, EphySpinnerClass)) +#define EPHY_IS_SPINNER(o) (G_TYPE_CHECK_INSTANCE_TYPE ((o), EPHY_TYPE_SPINNER)) +#define EPHY_IS_SPINNER_CLASS(k) (G_TYPE_CHECK_CLASS_TYPE ((k), EPHY_TYPE_SPINNER)) +#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 EphySpinnerDetails EphySpinnerDetails; +typedef struct EphySpinner EphySpinner; +typedef struct EphySpinnerClass EphySpinnerClass; +typedef struct EphySpinnerDetails EphySpinnerDetails; -struct EphySpinner { +struct EphySpinner +{ GtkEventBox parent; /*< private >*/ EphySpinnerDetails *details; }; -struct EphySpinnerClass { +struct EphySpinnerClass +{ GtkEventBoxClass parent_class; }; -GType ephy_spinner_get_type (void); +GType ephy_spinner_get_type (void); -GtkWidget *ephy_spinner_new (void); +GtkWidget *ephy_spinner_new (void); -void ephy_spinner_start (EphySpinner *throbber); +void ephy_spinner_start (EphySpinner *throbber); -void ephy_spinner_stop (EphySpinner *throbber); +void ephy_spinner_stop (EphySpinner *throbber); -void ephy_spinner_set_size (EphySpinner *spinner, - GtkIconSize size); +void ephy_spinner_set_size (EphySpinner *spinner, + GtkIconSize size); G_END_DECLS -- cgit v1.2.3