aboutsummaryrefslogtreecommitdiffstats
path: root/e-util
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2013-06-27 08:37:43 +0800
committerMatthew Barnes <mbarnes@redhat.com>2013-07-02 22:34:08 +0800
commit9deb892820f4b9d121b971d6af86116f3e18b6e2 (patch)
tree836cf22783696834e17779fa61bcac3e41881a20 /e-util
parent3c7a8561d4f622b5c4cc3380da97c457190ef52f (diff)
downloadgsoc2013-evolution-9deb892820f4b9d121b971d6af86116f3e18b6e2.tar.gz
gsoc2013-evolution-9deb892820f4b9d121b971d6af86116f3e18b6e2.tar.zst
gsoc2013-evolution-9deb892820f4b9d121b971d6af86116f3e18b6e2.zip
ETableState: Add a private section.
Diffstat (limited to 'e-util')
-rw-r--r--e-util/e-table-state.c28
-rw-r--r--e-util/e-table-state.h2
2 files changed, 28 insertions, 2 deletions
diff --git a/e-util/e-table-state.c b/e-util/e-table-state.c
index 20137f65a9..cbde70b554 100644
--- a/e-util/e-table-state.c
+++ b/e-util/e-table-state.c
@@ -28,8 +28,16 @@
#include "e-xml-utils.h"
+#define E_TABLE_STATE_GET_PRIVATE(obj) \
+ (G_TYPE_INSTANCE_GET_PRIVATE \
+ ((obj), E_TYPE_TABLE_STATE, ETableStatePrivate))
+
#define STATE_VERSION 0.1
+struct _ETableStatePrivate {
+ gint placeholder;
+};
+
G_DEFINE_TYPE (ETableState, e_table_state, G_TYPE_OBJECT)
static void
@@ -56,18 +64,34 @@ table_state_finalize (GObject *object)
}
static void
+table_state_constructed (GObject *object)
+{
+ ETableState *state;
+
+ state = E_TABLE_STATE (object);
+ state->sort_info = e_table_sort_info_new ();
+
+ /* Chain up to parent's constructed() method. */
+ G_OBJECT_CLASS (e_table_state_parent_class)->constructed (object);
+}
+
+static void
e_table_state_class_init (ETableStateClass *class)
{
- GObjectClass *object_class = G_OBJECT_CLASS (class);
+ GObjectClass *object_class;
+ g_type_class_add_private (class, sizeof (ETableStatePrivate));
+
+ object_class = G_OBJECT_CLASS (class);
object_class->dispose = table_state_dispose;
object_class->finalize = table_state_finalize;
+ object_class->constructed = table_state_constructed;
}
static void
e_table_state_init (ETableState *state)
{
- state->sort_info = e_table_sort_info_new ();
+ state->priv = E_TABLE_STATE_GET_PRIVATE (state);
}
ETableState *
diff --git a/e-util/e-table-state.h b/e-util/e-table-state.h
index 2129e2a65c..27bda8440e 100644
--- a/e-util/e-table-state.h
+++ b/e-util/e-table-state.h
@@ -50,9 +50,11 @@ G_BEGIN_DECLS
typedef struct _ETableState ETableState;
typedef struct _ETableStateClass ETableStateClass;
+typedef struct _ETableStatePrivate ETableStatePrivate;
struct _ETableState {
GObject parent;
+ ETableStatePrivate *priv;
ETableSortInfo *sort_info;
gint col_count;