summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPablo Barciela <[email protected]>2019-08-25 04:28:28 +0200
committerlukefromdc <[email protected]>2019-08-29 20:39:27 +0000
commitae83e2a4e6a5a563602049b8553cdffad83394f3 (patch)
tree49144841786bb0e4c7c1c4e7ed6440e0c64acb29
parentc0cbd749131558ae197b05dac18bfef01fd95e32 (diff)
downloadmate-terminal-ae83e2a4e6a5a563602049b8553cdffad83394f3.tar.bz2
mate-terminal-ae83e2a4e6a5a563602049b8553cdffad83394f3.tar.xz
terminal-info-bar: avoid 'g_type_class_add_private'
-rw-r--r--src/terminal-info-bar.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/terminal-info-bar.c b/src/terminal-info-bar.c
index 9a40c17..82583e9 100644
--- a/src/terminal-info-bar.c
+++ b/src/terminal-info-bar.c
@@ -22,14 +22,12 @@
#include <gtk/gtk.h>
-#define TERMINAL_INFO_BAR_GET_PRIVATE(info_bar)(G_TYPE_INSTANCE_GET_PRIVATE ((info_bar), TERMINAL_TYPE_INFO_BAR, TerminalInfoBarPrivate))
-
struct _TerminalInfoBarPrivate
{
GtkWidget *content_box;
};
-G_DEFINE_TYPE (TerminalInfoBar, terminal_info_bar, GTK_TYPE_INFO_BAR)
+G_DEFINE_TYPE_WITH_PRIVATE (TerminalInfoBar, terminal_info_bar, GTK_TYPE_INFO_BAR)
/* helper functions */
@@ -39,7 +37,7 @@ terminal_info_bar_init (TerminalInfoBar *bar)
GtkInfoBar *info_bar = GTK_INFO_BAR (bar);
TerminalInfoBarPrivate *priv;
- priv = bar->priv = TERMINAL_INFO_BAR_GET_PRIVATE (bar);
+ priv = bar->priv = terminal_info_bar_get_instance_private (bar);
priv->content_box = gtk_box_new (GTK_ORIENTATION_VERTICAL, 6);
gtk_box_pack_start (GTK_BOX (gtk_info_bar_get_content_area (info_bar)),
@@ -49,9 +47,6 @@ terminal_info_bar_init (TerminalInfoBar *bar)
static void
terminal_info_bar_class_init (TerminalInfoBarClass *klass)
{
- GObjectClass *gobject_class = G_OBJECT_CLASS (klass);
-
- g_type_class_add_private (gobject_class, sizeof (TerminalInfoBarPrivate));
}
/* public API */