[evolution] ETableState: Add a private section.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution] ETableState: Add a private section.
- Date: Tue, 2 Jul 2013 15:25:01 +0000 (UTC)
commit 9deb892820f4b9d121b971d6af86116f3e18b6e2
Author: Matthew Barnes <mbarnes redhat com>
Date: Wed Jun 26 20:37:43 2013 -0400
ETableState: Add a private section.
.../evolution-util/evolution-util-sections.txt | 2 +
e-util/e-table-state.c | 28 ++++++++++++++++++-
e-util/e-table-state.h | 2 +
3 files changed, 30 insertions(+), 2 deletions(-)
---
diff --git a/doc/reference/evolution-util/evolution-util-sections.txt
b/doc/reference/evolution-util/evolution-util-sections.txt
index af38473..25fada5 100644
--- a/doc/reference/evolution-util/evolution-util-sections.txt
+++ b/doc/reference/evolution-util/evolution-util-sections.txt
@@ -3949,6 +3949,8 @@ E_IS_TABLE_STATE_CLASS
E_TABLE_STATE_GET_CLASS
ETableStateClass
e_table_state_get_type
+<SUBSECTION Private>
+ETableStatePrivate
</SECTION>
<SECTION>
diff --git a/e-util/e-table-state.c b/e-util/e-table-state.c
index 20137f6..cbde70b 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 2129e2a..27bda84 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;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]