aboutsummaryrefslogtreecommitdiffstats
path: root/calendar/gui/e-meeting-store.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2010-03-20 08:32:47 +0800
committerMatthew Barnes <mbarnes@redhat.com>2010-03-20 23:49:46 +0800
commit8ffcfb4e106bb0081714455239cfe13a524c365f (patch)
tree4b024139c27a0c44ec915ad531058b834ca6adcb /calendar/gui/e-meeting-store.c
parent7c51d1c1a631a4a8daf26dd44a0aed41eb4726e0 (diff)
downloadgsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar.gz
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar.bz2
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar.lz
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar.xz
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.tar.zst
gsoc2013-evolution-8ffcfb4e106bb0081714455239cfe13a524c365f.zip
Add extensions to configure calender widgets.
Make ECalendarItem, ECalendarView, ECalModel, EDateEdit, EMeetingStore, and EMeetingTimeSelector extensible and register extensions to automatically bind every instance to the appropriate EShellSettings.
Diffstat (limited to 'calendar/gui/e-meeting-store.c')
-rw-r--r--calendar/gui/e-meeting-store.c51
1 files changed, 12 insertions, 39 deletions
diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c
index 8b9f02c5a5..28f171219e 100644
--- a/calendar/gui/e-meeting-store.c
+++ b/calendar/gui/e-meeting-store.c
@@ -31,6 +31,7 @@
#include <libecal/e-cal-util.h>
#include <libecal/e-cal-time-util.h>
#include <libedataserver/e-data-server-util.h>
+#include <e-util/e-extensible.h>
#include "itip-utils.h"
#include "e-meeting-utils.h"
#include "e-meeting-attendee.h"
@@ -87,7 +88,13 @@ enum {
PROP_TIMEZONE
};
-static gpointer parent_class;
+/* Forward Declarations */
+static void ems_tree_model_init (GtkTreeModelIface *iface);
+
+G_DEFINE_TYPE_WITH_CODE (
+ EMeetingStore, e_meeting_store, GTK_TYPE_LIST_STORE,
+ G_IMPLEMENT_INTERFACE (E_TYPE_EXTENSIBLE, NULL)
+ G_IMPLEMENT_INTERFACE (GTK_TYPE_TREE_MODEL, ems_tree_model_init))
static icalparameter_cutype
text_to_type (const gchar *type)
@@ -624,15 +631,14 @@ meeting_store_finalize (GObject *object)
g_mutex_free (priv->mutex);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (parent_class)->finalize (object);
+ G_OBJECT_CLASS (e_meeting_store_parent_class)->finalize (object);
}
static void
-meeting_store_class_init (GObjectClass *class)
+e_meeting_store_class_init (EMeetingStoreClass *class)
{
GObjectClass *object_class;
- parent_class = g_type_class_peek_parent (class);
g_type_class_add_private (class, sizeof (EMeetingStorePrivate));
object_class = G_OBJECT_CLASS (class);
@@ -671,7 +677,7 @@ meeting_store_class_init (GObjectClass *class)
}
static void
-meeting_store_init (EMeetingStore *store)
+e_meeting_store_init (EMeetingStore *store)
{
store->priv = E_MEETING_STORE_GET_PRIVATE (store);
@@ -682,41 +688,8 @@ meeting_store_init (EMeetingStore *store)
store->priv->mutex = g_mutex_new ();
store->priv->num_queries = 0;
-}
-
-GType
-e_meeting_store_get_type (void)
-{
- static GType type = 0;
-
- if (G_UNLIKELY (type == 0)) {
- static const GTypeInfo type_info = {
- sizeof (EMeetingStoreClass),
- (GBaseInitFunc) NULL,
- (GBaseFinalizeFunc) NULL,
- (GClassInitFunc) meeting_store_class_init,
- (GClassFinalizeFunc) NULL,
- NULL, /* class_data */
- sizeof (EMeetingStore),
- 0, /* n_preallocs */
- (GInstanceInitFunc) meeting_store_init,
- NULL /* value_table */
- };
-
- static const GInterfaceInfo tree_model_info = {
- (GInterfaceInitFunc) ems_tree_model_init,
- NULL,
- NULL
- };
-
- type = g_type_register_static (
- GTK_TYPE_LIST_STORE, "EMeetingStore", &type_info, 0);
-
- g_type_add_interface_static (
- type, GTK_TYPE_TREE_MODEL, &tree_model_info);
- }
- return type;
+ e_extensible_load_extensions (E_EXTENSIBLE (store));
}
GObject *