diff options
author | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
---|---|---|
committer | Christian Persch <chpe@src.gnome.org> | 2003-09-02 07:20:17 +0800 |
commit | 73a95385f4034998cc78199dc8bb9ee22d90d6aa (patch) | |
tree | 499d78ab52e8937f672e3659105dda083a34c988 /src/ephy-spinner-action.c | |
parent | 3375c1878c4c0ebf4f5067d128024ea484208f62 (diff) | |
download | gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip |
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'src/ephy-spinner-action.c')
-rw-r--r-- | src/ephy-spinner-action.c | 26 |
1 files changed, 9 insertions, 17 deletions
diff --git a/src/ephy-spinner-action.c b/src/ephy-spinner-action.c index 39140fe61..be69ce9b5 100644 --- a/src/ephy-spinner-action.c +++ b/src/ephy-spinner-action.c @@ -14,6 +14,8 @@ * You should have received a copy of the GNU General Public License * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. + * + * $Id$ */ #include "ephy-spinner-action.h" @@ -25,6 +27,8 @@ static void ephy_spinner_action_init (EphySpinnerAction *action); static void ephy_spinner_action_class_init (EphySpinnerActionClass *class); +#define EPHY_SPINNER_ACTION_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_SPINNER_ACTION, EphySpinnerActionPrivate)) + struct EphySpinnerActionPrivate { gboolean throbbing; @@ -184,31 +188,17 @@ ephy_spinner_action_get_property (GObject *object, } static void -ephy_spinner_action_finalize (GObject *object) -{ - EphySpinnerAction *action = EPHY_SPINNER_ACTION (object); - - g_return_if_fail (action->priv != NULL); - - g_free (action->priv); - - G_OBJECT_CLASS (parent_class)->finalize (object); -} - -static void ephy_spinner_action_class_init (EphySpinnerActionClass *class) { - GtkActionClass *action_class; GObjectClass *object_class = G_OBJECT_CLASS (class); + GtkActionClass *action_class = GTK_ACTION_CLASS (class); parent_class = g_type_class_peek_parent (class); - action_class = GTK_ACTION_CLASS (class); - action_class->toolbar_item_type = EPHY_SPINNER_TYPE; + action_class->toolbar_item_type = EPHY_TYPE_SPINNER; action_class->create_tool_item = create_tool_item; action_class->connect_proxy = connect_proxy; - object_class->finalize = ephy_spinner_action_finalize; object_class->set_property = ephy_spinner_action_set_property; object_class->get_property = ephy_spinner_action_get_property; @@ -219,10 +209,12 @@ ephy_spinner_action_class_init (EphySpinnerActionClass *class) "Throbbing", FALSE, G_PARAM_READWRITE)); + + g_type_class_add_private (object_class, sizeof(EphySpinnerActionPrivate)); } static void ephy_spinner_action_init (EphySpinnerAction *action) { - action->priv = g_new0 (EphySpinnerActionPrivate, 1); + action->priv = EPHY_SPINNER_ACTION_GET_PRIVATE (action); } |