summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-07-26 00:13:02 +0200
committerlukefromdc <[email protected]>2019-07-26 02:10:51 +0000
commit16215ec84a4edd3ef11ca8e6aa61eae0318c6720 (patch)
tree6d27203c78453cd390a9db6139b359b94355defa
parent8e33efb9b934168f8fa2178dde23b146e524601b (diff)
downloadpluma-16215ec84a4edd3ef11ca8e6aa61eae0318c6720.tar.bz2
pluma-16215ec84a4edd3ef11ca8e6aa61eae0318c6720.tar.xz
pluma-statusbar: avoid 'g_type_class_add_private'
-rw-r--r--pluma/pluma-statusbar.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/pluma/pluma-statusbar.c b/pluma/pluma-statusbar.c
index 5d3d435c..d5d68492 100644
--- a/pluma/pluma-statusbar.c
+++ b/pluma/pluma-statusbar.c
@@ -38,10 +38,6 @@
#include "pluma-statusbar.h"
-#define PLUMA_STATUSBAR_GET_PRIVATE(object)(G_TYPE_INSTANCE_GET_PRIVATE ((object),\
- PLUMA_TYPE_STATUSBAR,\
- PlumaStatusbarPrivate))
-
struct _PlumaStatusbarPrivate
{
GtkWidget *overwrite_mode_label;
@@ -61,7 +57,7 @@ struct _PlumaStatusbarPrivate
guint flash_message_id;
};
-G_DEFINE_TYPE(PlumaStatusbar, pluma_statusbar, GTK_TYPE_STATUSBAR)
+G_DEFINE_TYPE_WITH_PRIVATE (PlumaStatusbar, pluma_statusbar, GTK_TYPE_STATUSBAR)
static gchar *
@@ -96,8 +92,6 @@ pluma_statusbar_class_init (PlumaStatusbarClass *klass)
GObjectClass *object_class = G_OBJECT_CLASS (klass);
object_class->dispose = pluma_statusbar_dispose;
-
- g_type_class_add_private (object_class, sizeof (PlumaStatusbarPrivate));
}
#define CURSOR_POSITION_LABEL_WIDTH_CHARS 18
@@ -108,7 +102,7 @@ pluma_statusbar_init (PlumaStatusbar *statusbar)
GtkWidget *hbox;
GtkWidget *error_image;
- statusbar->priv = PLUMA_STATUSBAR_GET_PRIVATE (statusbar);
+ statusbar->priv = pluma_statusbar_get_instance_private (statusbar);
gtk_widget_set_margin_top (GTK_WIDGET (statusbar), 0);
gtk_widget_set_margin_bottom (GTK_WIDGET (statusbar), 0);