[eog] EogStatusbar: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- From: Felix Riemann <friemann src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [eog] EogStatusbar: Convert to G_DEFINE_TYPE_WITH_PRIVATE
- Date: Fri, 4 Oct 2013 13:27:06 +0000 (UTC)
commit 8e31683d6ece1883e2004d6921ebc056e5683905
Author: Felix Riemann <friemann gnome org>
Date: Fri Oct 4 13:49:16 2013 +0200
EogStatusbar: Convert to G_DEFINE_TYPE_WITH_PRIVATE
src/eog-statusbar.c | 13 ++++---------
1 files changed, 4 insertions(+), 9 deletions(-)
---
diff --git a/src/eog-statusbar.c b/src/eog-statusbar.c
index 35f86bf..29d419d 100644
--- a/src/eog-statusbar.c
+++ b/src/eog-statusbar.c
@@ -30,23 +30,18 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#define EOG_STATUSBAR_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOG_TYPE_STATUSBAR, EogStatusbarPrivate))
-
-G_DEFINE_TYPE (EogStatusbar, eog_statusbar, GTK_TYPE_STATUSBAR)
-
struct _EogStatusbarPrivate
{
GtkWidget *progressbar;
GtkWidget *img_num_label;
};
+G_DEFINE_TYPE_WITH_PRIVATE (EogStatusbar, eog_statusbar, GTK_TYPE_STATUSBAR)
+
static void
eog_statusbar_class_init (EogStatusbarClass *klass)
{
- GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (g_object_class, sizeof (EogStatusbarPrivate));
+ /* empty */
}
static void
@@ -55,7 +50,7 @@ eog_statusbar_init (EogStatusbar *statusbar)
EogStatusbarPrivate *priv;
GtkWidget *vbox;
- statusbar->priv = EOG_STATUSBAR_GET_PRIVATE (statusbar);
+ statusbar->priv = eog_statusbar_get_instance_private (statusbar);
priv = statusbar->priv;
priv->img_num_label = gtk_label_new (NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]