diff options
author | Pablo Barciela <[email protected]> | 2019-08-22 15:51:32 +0200 |
---|---|---|
committer | lukefromdc <[email protected]> | 2019-09-02 23:58:10 +0000 |
commit | b8fd13779a53c8f22699fbe05496f9a2b10c64c1 (patch) | |
tree | 734f1576f8936f1f4586e0f64c9d6c601aa66343 /baobab/src/baobab-cell-renderer-progress.c | |
parent | fb5801049aed8f7633ed4591ee65382e764ba7d5 (diff) | |
download | mate-utils-b8fd13779a53c8f22699fbe05496f9a2b10c64c1.tar.bz2 mate-utils-b8fd13779a53c8f22699fbe05496f9a2b10c64c1.tar.xz |
baobab-cell-renderer-progress: avoid 'g_type_class_add_private'
Diffstat (limited to 'baobab/src/baobab-cell-renderer-progress.c')
-rw-r--r-- | baobab/src/baobab-cell-renderer-progress.c | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/baobab/src/baobab-cell-renderer-progress.c b/baobab/src/baobab-cell-renderer-progress.c index de3f115a..057c7e02 100644 --- a/baobab/src/baobab-cell-renderer-progress.c +++ b/baobab/src/baobab-cell-renderer-progress.c @@ -23,10 +23,6 @@ #include "baobab-cell-renderer-progress.h" -#define BAOBAB_CELL_RENDERER_PROGRESS_GET_PRIVATE(object) (G_TYPE_INSTANCE_GET_PRIVATE ((object), \ - BAOBAB_TYPE_CELL_RENDERER_PROGRESS, \ - BaobabCellRendererProgressPrivate)) - enum { PROP_0, @@ -38,12 +34,12 @@ struct _BaobabCellRendererProgressPrivate double perc; }; -G_DEFINE_TYPE (BaobabCellRendererProgress, baobab_cell_renderer_progress, GTK_TYPE_CELL_RENDERER) +G_DEFINE_TYPE_WITH_PRIVATE (BaobabCellRendererProgress, baobab_cell_renderer_progress, GTK_TYPE_CELL_RENDERER) static void baobab_cell_renderer_progress_init (BaobabCellRendererProgress *cellprogress) { - cellprogress->priv = BAOBAB_CELL_RENDERER_PROGRESS_GET_PRIVATE (cellprogress); + cellprogress->priv = baobab_cell_renderer_progress_get_instance_private (cellprogress); cellprogress->priv->perc = 0; gtk_cell_renderer_set_padding (GTK_CELL_RENDERER (cellprogress), 4, 4); @@ -253,7 +249,4 @@ baobab_cell_renderer_progress_class_init (BaobabCellRendererProgressClass *klass "precentage", -1, 100, 0, G_PARAM_READWRITE)); - - g_type_class_add_private (object_class, - sizeof (BaobabCellRendererProgressPrivate)); } |