summaryrefslogtreecommitdiff
path: root/src/eom-statusbar.c
diff options
context:
space:
mode:
authorFelix Riemann <[email protected]>2013-10-04 12:07:29 +0200
committerraveit65 <[email protected]>2018-07-17 21:53:38 +0200
commit5a5612ab8ec4fb31464fa35e049a4a3b7cb64393 (patch)
tree0eee4a38e9d5f8f5d39beb5132c57a84c50a0e09 /src/eom-statusbar.c
parenta3c97eb293bfff825c43bd10d5584ae5a20f5495 (diff)
downloadeom-5a5612ab8ec4fb31464fa35e049a4a3b7cb64393.tar.bz2
eom-5a5612ab8ec4fb31464fa35e049a4a3b7cb64393.tar.xz
Convert to G_DEFINE_TYPE_WITH_PRIVATE part 1
origin commits: https://gitlab.gnome.org/GNOME/eog/commit/35c3864 https://gitlab.gnome.org/GNOME/eog/commit/842775b https://gitlab.gnome.org/GNOME/eog/commit/3fe0bd4 https://gitlab.gnome.org/GNOME/eog/commit/2b25632 https://gitlab.gnome.org/GNOME/eog/commit/f0c977d https://gitlab.gnome.org/GNOME/eog/commit/5cdb1b8 https://gitlab.gnome.org/GNOME/eog/commit/dba0bd4 https://gitlab.gnome.org/GNOME/eog/commit/8e31683 https://gitlab.gnome.org/GNOME/eog/commit/3945bb1
Diffstat (limited to 'src/eom-statusbar.c')
-rw-r--r--src/eom-statusbar.c13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/eom-statusbar.c b/src/eom-statusbar.c
index b13ad0b..7ed9412 100644
--- a/src/eom-statusbar.c
+++ b/src/eom-statusbar.c
@@ -30,23 +30,18 @@
#include <glib/gi18n.h>
#include <gtk/gtk.h>
-#define EOM_STATUSBAR_GET_PRIVATE(object) \
- (G_TYPE_INSTANCE_GET_PRIVATE ((object), EOM_TYPE_STATUSBAR, EomStatusbarPrivate))
-
-G_DEFINE_TYPE (EomStatusbar, eom_statusbar, GTK_TYPE_STATUSBAR)
-
struct _EomStatusbarPrivate
{
GtkWidget *progressbar;
GtkWidget *img_num_label;
};
+G_DEFINE_TYPE_WITH_PRIVATE (EomStatusbar, eom_statusbar, GTK_TYPE_STATUSBAR)
+
static void
eom_statusbar_class_init (EomStatusbarClass *klass)
{
- GObjectClass *g_object_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (g_object_class, sizeof (EomStatusbarPrivate));
+ /* empty */
}
static void
@@ -55,7 +50,7 @@ eom_statusbar_init (EomStatusbar *statusbar)
EomStatusbarPrivate *priv;
GtkWidget *vbox;
- statusbar->priv = EOM_STATUSBAR_GET_PRIVATE (statusbar);
+ statusbar->priv = eom_statusbar_get_instance_private (statusbar);
priv = statusbar->priv;
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);