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/statusbar.c | |
parent | 3375c1878c4c0ebf4f5067d128024ea484208f62 (diff) | |
download | gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.gz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.bz2 gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.lz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.xz gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.tar.zst gsoc2013-epiphany-73a95385f4034998cc78199dc8bb9ee22d90d6aa.zip |
Mega-patch, changelog too long to paste here.
Diffstat (limited to 'src/statusbar.c')
-rwxr-xr-x | src/statusbar.c | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/src/statusbar.c b/src/statusbar.c index 1ea19d57b..ece07ece7 100755 --- a/src/statusbar.c +++ b/src/statusbar.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 "statusbar.h" @@ -34,6 +36,8 @@ static void statusbar_finalize (GObject *object); static GObjectClass *parent_class = NULL; +#define EPHY_STATUSBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object), EPHY_TYPE_STATUSBAR, StatusbarPrivate)) + struct StatusbarPrivate { GtkWidget *security_icon; @@ -79,6 +83,8 @@ statusbar_class_init (StatusbarClass *klass) parent_class = g_type_class_peek_parent (klass); object_class->finalize = statusbar_finalize; + + g_type_class_add_private (object_class, sizeof(StatusbarPrivate)); } static void @@ -120,7 +126,7 @@ create_statusbar_progress (Statusbar *s) static void statusbar_init (Statusbar *t) { - t->priv = g_new0 (StatusbarPrivate, 1); + t->priv = EPHY_STATUSBAR_GET_PRIVATE (t); t->priv->tooltips = gtk_tooltips_new (); g_object_ref (G_OBJECT (t->priv->tooltips)); @@ -135,19 +141,10 @@ statusbar_init (Statusbar *t) static void statusbar_finalize (GObject *object) { - Statusbar *t; - - g_return_if_fail (object != NULL); - g_return_if_fail (IS_STATUSBAR (object)); - - t = STATUSBAR (object); - - g_return_if_fail (t->priv != NULL); + Statusbar *t = EPHY_STATUSBAR (object); g_object_unref (t->priv->tooltips); - g_free (t->priv); - G_OBJECT_CLASS (parent_class)->finalize (object); } @@ -156,7 +153,7 @@ statusbar_new (void) { GtkWidget *t; - t = GTK_WIDGET (g_object_new (STATUSBAR_TYPE, + t = GTK_WIDGET (g_object_new (EPHY_TYPE_STATUSBAR, NULL)); return t; |