[gnome-calendar/search-improvements] subscriber: renamed to GcalSubscriberView
- From: Georges Basile Stavracas Neto <gbsneto src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-calendar/search-improvements] subscriber: renamed to GcalSubscriberView
- Date: Mon, 5 Jan 2015 22:32:01 +0000 (UTC)
commit 0efc8bcbe15543c016f92cbeac352061a2434b29
Author: Erick PĂ©rez Castellanos <erick red gmail com>
Date: Mon Dec 29 17:03:50 2014 -0500
subscriber: renamed to GcalSubscriberView
This is more of a semantic change than anything else. GcalSubscriber
will gradually take on GcalView interface and that's why I'm adding the
View suffix.
src/gcal-month-view.c | 7 +-
src/gcal-month-view.h | 4 +-
src/gcal-subscriber-view-private.h | 8 +-
src/gcal-subscriber-view.c | 182 ++++++++++++++++++------------------
src/gcal-subscriber-view.h | 36 ++++----
src/gcal-week-view.c | 7 +-
src/gcal-week-view.h | 4 +-
src/gcal-year-view.c | 39 ++++----
src/gcal-year-view.h | 4 +-
9 files changed, 141 insertions(+), 150 deletions(-)
---
diff --git a/src/gcal-month-view.c b/src/gcal-month-view.c
index db93910..5edcb7e 100644
--- a/src/gcal-month-view.c
+++ b/src/gcal-month-view.c
@@ -210,12 +210,9 @@ static gchar* gcal_month_view_get_right_header (GcalView *vie
static GtkWidget* gcal_month_view_get_by_uuid (GcalView *view,
const gchar *uuid);
-G_DEFINE_TYPE_WITH_CODE (GcalMonthView,
- gcal_month_view,
- GCAL_TYPE_SUBSCRIBER,
+G_DEFINE_TYPE_WITH_CODE (GcalMonthView, gcal_month_view,GCAL_TYPE_SUBSCRIBER_VIEW,
G_ADD_PRIVATE (GcalMonthView)
- G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW,
- gcal_view_interface_init));
+ G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init));
static void
diff --git a/src/gcal-month-view.h b/src/gcal-month-view.h
index 4b00883..404e81b 100644
--- a/src/gcal-month-view.h
+++ b/src/gcal-month-view.h
@@ -37,12 +37,12 @@ typedef struct _GcalMonthViewClass GcalMonthViewClass;
struct _GcalMonthView
{
- GcalSubscriber parent;
+ GcalSubscriberView parent;
};
struct _GcalMonthViewClass
{
- GcalSubscriberClass parent_class;
+ GcalSubscriberViewClass parent_class;
/* signals */
void (*new_event) (gint new_day);
diff --git a/src/gcal-subscriber-view-private.h b/src/gcal-subscriber-view-private.h
index 2e0c5eb..0a7754c 100644
--- a/src/gcal-subscriber-view-private.h
+++ b/src/gcal-subscriber-view-private.h
@@ -17,14 +17,14 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GCAL_SUBSCRIBER_PRIVATE_H__
-#define __GCAL_SUBSCRIBER_PRIVATE_H____
+#ifndef __GCAL_SUBSCRIBER_VIEW_PRIVATE_H__
+#define __GCAL_SUBSCRIBER_VIEW_PRIVATE_H____
#include <glib.h>
G_BEGIN_DECLS
-struct _GcalSubscriberPrivate
+struct _GcalSubscriberViewPrivate
{
/**
* Hash to keep children widgets (all of them, parent widgets and its parts if there's any),
@@ -56,4 +56,4 @@ struct _GcalSubscriberPrivate
G_END_DECLS
-#endif /* __GCAL_SUBSCRIBER_H__ */
+#endif /* __GCAL_SUBSCRIBER_VIEW_PRIVATE_H____ */
diff --git a/src/gcal-subscriber-view.c b/src/gcal-subscriber-view.c
index 897b788..1ec6fe4 100644
--- a/src/gcal-subscriber-view.c
+++ b/src/gcal-subscriber-view.c
@@ -24,72 +24,72 @@
#include "gcal-view.h"
#include "gcal-event-widget.h"
-static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface);
+static void gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface
*iface);
-static void gcal_subscriber_finalize (GObject *object);
+static void gcal_subscriber_view_finalize (GObject
*object);
-static void gcal_subscriber_add (GtkContainer *container,
- GtkWidget *widget);
+static void gcal_subscriber_view_add (GtkContainer
*container,
+ GtkWidget
*widget);
-static void gcal_subscriber_remove (GtkContainer *container,
- GtkWidget *widget);
+static void gcal_subscriber_view_remove (GtkContainer
*container,
+ GtkWidget
*widget);
-static void gcal_subscriber_forall (GtkContainer *container,
- gboolean
include_internals,
- GtkCallback callback,
- gpointer
callback_data);
+static void gcal_subscriber_view_forall (GtkContainer
*container,
+ gboolean
include_internals,
+ GtkCallback
callback,
+ gpointer
callback_data);
-static gboolean gcal_subscriber_is_child_multicell (GcalSubscriber
*subscriber,
- GcalEventWidget *child);
+static gboolean gcal_subscriber_view_is_child_multicell (GcalSubscriberView
*subscriber,
+ GcalEventWidget
*child);
-static guint gcal_subscriber_get_child_cell (GcalSubscriber
*subscriber,
- GcalEventWidget *child);
+static guint gcal_subscriber_view_get_child_cell (GcalSubscriberView
*subscriber,
+ GcalEventWidget
*child);
-static void gcal_subscriber_component_added (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- ECalComponent *comp);
+static void gcal_subscriber_view_component_added (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ ECalComponent *comp);
-static void gcal_subscriber_component_modified (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- ECalComponent *comp);
+static void gcal_subscriber_view_component_modified (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ ECalComponent *comp);
-static void gcal_subscriber_component_removed (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- const gchar *uid,
- const gchar *rid);
+static void gcal_subscriber_view_component_removed (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ const gchar *uid,
+ const gchar *rid);
-static void gcal_subscriber_freeze (ECalDataModelSubscriber *subscriber);
+static void gcal_subscriber_view_freeze (ECalDataModelSubscriber *subscriber);
-static void gcal_subscriber_thaw (ECalDataModelSubscriber *subscriber);
+static void gcal_subscriber_view_thaw (ECalDataModelSubscriber *subscriber);
-G_DEFINE_TYPE_WITH_CODE (GcalSubscriber, gcal_subscriber, GTK_TYPE_CONTAINER,
- G_ADD_PRIVATE (GcalSubscriber)
+G_DEFINE_TYPE_WITH_CODE (GcalSubscriberView, gcal_subscriber_view, GTK_TYPE_CONTAINER,
+ G_ADD_PRIVATE (GcalSubscriberView)
G_IMPLEMENT_INTERFACE (E_TYPE_CAL_DATA_MODEL_SUBSCRIBER,
gcal_data_model_subscriber_interface_init));
static void
-gcal_subscriber_class_init (GcalSubscriberClass *klass)
+gcal_subscriber_view_class_init (GcalSubscriberViewClass *klass)
{
GtkContainerClass *container_class;
- klass->is_child_multicell = gcal_subscriber_is_child_multicell;
- klass->get_child_cell = gcal_subscriber_get_child_cell;
+ klass->is_child_multicell = gcal_subscriber_view_is_child_multicell;
+ klass->get_child_cell = gcal_subscriber_view_get_child_cell;
- G_OBJECT_CLASS (klass)->finalize = gcal_subscriber_finalize;
+ G_OBJECT_CLASS (klass)->finalize = gcal_subscriber_view_finalize;
container_class = GTK_CONTAINER_CLASS (klass);
- container_class->add = gcal_subscriber_add;
- container_class->remove = gcal_subscriber_remove;
- container_class->forall = gcal_subscriber_forall;
+ container_class->add = gcal_subscriber_view_add;
+ container_class->remove = gcal_subscriber_view_remove;
+ container_class->forall = gcal_subscriber_view_forall;
}
static void
-gcal_subscriber_init (GcalSubscriber *self)
+gcal_subscriber_view_init (GcalSubscriberView *self)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
- priv = gcal_subscriber_get_instance_private (self);
+ priv = gcal_subscriber_view_get_instance_private (self);
self->priv = priv;
priv->children = g_hash_table_new_full (g_str_hash, g_str_equal, g_free, (GDestroyNotify) g_list_free);
@@ -101,19 +101,19 @@ gcal_subscriber_init (GcalSubscriber *self)
static void
gcal_data_model_subscriber_interface_init (ECalDataModelSubscriberInterface *iface)
{
- iface->component_added = gcal_subscriber_component_added;
- iface->component_modified = gcal_subscriber_component_modified;
- iface->component_removed = gcal_subscriber_component_removed;
- iface->freeze = gcal_subscriber_freeze;
- iface->thaw = gcal_subscriber_thaw;
+ iface->component_added = gcal_subscriber_view_component_added;
+ iface->component_modified = gcal_subscriber_view_component_modified;
+ iface->component_removed = gcal_subscriber_view_component_removed;
+ iface->freeze = gcal_subscriber_view_freeze;
+ iface->thaw = gcal_subscriber_view_thaw;
}
static void
-gcal_subscriber_finalize (GObject *object)
+gcal_subscriber_view_finalize (GObject *object)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (object));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (object));
g_hash_table_destroy (priv->children);
g_hash_table_destroy (priv->single_cell_children);
@@ -124,20 +124,20 @@ gcal_subscriber_finalize (GObject *object)
g_list_free (priv->multi_cell_children);
/* Chain up to parent's finalize() method. */
- G_OBJECT_CLASS (gcal_subscriber_parent_class)->finalize (object);
+ G_OBJECT_CLASS (gcal_subscriber_view_parent_class)->finalize (object);
}
static void
-gcal_subscriber_add (GtkContainer *container,
- GtkWidget *widget)
+gcal_subscriber_view_add (GtkContainer *container,
+ GtkWidget *widget)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
const gchar *uuid;
GList *l = NULL;
g_return_if_fail (GCAL_IS_EVENT_WIDGET (widget));
g_return_if_fail (gtk_widget_get_parent (widget) == NULL);
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (container));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (container));
uuid = gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (widget));
/* inserting in all children hash */
@@ -150,14 +150,14 @@ gcal_subscriber_add (GtkContainer *container,
l = g_list_append (l, widget);
g_hash_table_insert (priv->children, g_strdup (uuid), l);
- if (gcal_subscriber_is_child_multicell (GCAL_SUBSCRIBER (container), GCAL_EVENT_WIDGET (widget)))
+ if (gcal_subscriber_view_is_child_multicell (GCAL_SUBSCRIBER_VIEW (container), GCAL_EVENT_WIDGET (widget)))
{
priv->multi_cell_children = g_list_insert_sorted (priv->multi_cell_children, widget,
(GCompareFunc) gcal_event_widget_compare_by_length);
}
else
{
- guint cell_idx = gcal_subscriber_get_child_cell (GCAL_SUBSCRIBER (container), GCAL_EVENT_WIDGET
(widget));
+ guint cell_idx = gcal_subscriber_view_get_child_cell (GCAL_SUBSCRIBER_VIEW (container),
GCAL_EVENT_WIDGET (widget));
l = g_hash_table_lookup (priv->single_cell_children, GINT_TO_POINTER (cell_idx));
l = g_list_insert_sorted (l, widget, (GCompareFunc) gcal_event_widget_compare_by_start_date);
@@ -174,10 +174,10 @@ gcal_subscriber_add (GtkContainer *container,
}
static void
-gcal_subscriber_remove (GtkContainer *container,
- GtkWidget *widget)
+gcal_subscriber_view_remove (GtkContainer *container,
+ GtkWidget *widget)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
const gchar *uuid;
GList *l, *aux;
@@ -185,7 +185,7 @@ gcal_subscriber_remove (GtkContainer *container,
GtkWidget *master_widget;
g_return_if_fail (gtk_widget_get_parent (widget) == GTK_WIDGET (container));
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (container));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (container));
uuid = gcal_event_widget_peek_uuid (GCAL_EVENT_WIDGET (widget));
@@ -199,7 +199,7 @@ gcal_subscriber_remove (GtkContainer *container,
if (widget == master_widget)
{
- if (gcal_subscriber_is_child_multicell (GCAL_SUBSCRIBER (container), GCAL_EVENT_WIDGET (widget)))
+ if (gcal_subscriber_view_is_child_multicell (GCAL_SUBSCRIBER_VIEW (container), GCAL_EVENT_WIDGET
(widget)))
{
priv->multi_cell_children = g_list_remove (priv->multi_cell_children, widget);
@@ -214,7 +214,7 @@ gcal_subscriber_remove (GtkContainer *container,
}
else
{
- guint cell_idx = gcal_subscriber_get_child_cell (GCAL_SUBSCRIBER (container),
GCAL_EVENT_WIDGET (widget));
+ guint cell_idx = gcal_subscriber_view_get_child_cell (GCAL_SUBSCRIBER_VIEW (container),
GCAL_EVENT_WIDGET (widget));
aux = g_hash_table_lookup (priv->single_cell_children, GINT_TO_POINTER (cell_idx));
aux = g_list_remove (g_list_copy (aux), widget);
@@ -239,15 +239,15 @@ gcal_subscriber_remove (GtkContainer *container,
}
static void
-gcal_subscriber_forall (GtkContainer *container,
- gboolean include_internals,
- GtkCallback callback,
- gpointer callback_data)
+gcal_subscriber_view_forall (GtkContainer *container,
+ gboolean include_internals,
+ GtkCallback callback,
+ gpointer callback_data)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
GList *l, *l2, *aux = NULL;
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (container));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (container));
l2 = g_hash_table_get_values (priv->children);
for (l = l2; l != NULL; l = g_list_next (l))
@@ -266,15 +266,15 @@ gcal_subscriber_forall (GtkContainer *container,
}
static gboolean
-gcal_subscriber_is_child_multicell (GcalSubscriber *subscriber,
- GcalEventWidget *child)
+gcal_subscriber_view_is_child_multicell (GcalSubscriberView *subscriber,
+ GcalEventWidget *child)
{
- GcalSubscriberClass *klass;
+ GcalSubscriberViewClass *klass;
- g_return_val_if_fail (GCAL_IS_SUBSCRIBER (subscriber), FALSE);
+ g_return_val_if_fail (GCAL_IS_SUBSCRIBER_VIEW (subscriber), FALSE);
g_return_val_if_fail (GCAL_IS_EVENT_WIDGET (child), FALSE);
- klass = GCAL_SUBSCRIBER_GET_CLASS (subscriber);
+ klass = GCAL_SUBSCRIBER_VIEW_GET_CLASS (subscriber);
if (klass->is_child_multicell)
return klass->is_child_multicell (subscriber, child);
@@ -283,15 +283,15 @@ gcal_subscriber_is_child_multicell (GcalSubscriber *subscriber,
}
static guint
-gcal_subscriber_get_child_cell (GcalSubscriber *subscriber,
- GcalEventWidget *child)
+gcal_subscriber_view_get_child_cell (GcalSubscriberView *subscriber,
+ GcalEventWidget *child)
{
- GcalSubscriberClass *klass;
+ GcalSubscriberViewClass *klass;
- g_return_val_if_fail (GCAL_IS_SUBSCRIBER (subscriber), 0);
+ g_return_val_if_fail (GCAL_IS_SUBSCRIBER_VIEW (subscriber), 0);
g_return_val_if_fail (GCAL_IS_EVENT_WIDGET (child), 0);
- klass = GCAL_SUBSCRIBER_GET_CLASS (subscriber);
+ klass = GCAL_SUBSCRIBER_VIEW_GET_CLASS (subscriber);
if (klass->get_child_cell)
return klass->get_child_cell (subscriber, child);
@@ -301,9 +301,9 @@ gcal_subscriber_get_child_cell (GcalSubscriber *subscriber,
/* ECalDataModelSubscriber interface API */
static void
-gcal_subscriber_component_added (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- ECalComponent *comp)
+gcal_subscriber_view_component_added (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ ECalComponent *comp)
{
GtkWidget *event;
GcalEventData *data;
@@ -322,16 +322,16 @@ gcal_subscriber_component_added (ECalDataModelSubscriber *subscriber,
}
static void
-gcal_subscriber_component_modified (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- ECalComponent *comp)
+gcal_subscriber_view_component_modified (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ ECalComponent *comp)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
GList *l;
GtkWidget *new_widget;
GcalEventData *data;
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (subscriber));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (subscriber));
data = g_new0 (GcalEventData, 1);
data->source = e_client_get_source (E_CLIENT (client));
data->event_component = e_cal_component_clone (comp);
@@ -356,17 +356,17 @@ gcal_subscriber_component_modified (ECalDataModelSubscriber *subscriber,
}
static void
-gcal_subscriber_component_removed (ECalDataModelSubscriber *subscriber,
- ECalClient *client,
- const gchar *uid,
- const gchar *rid)
+gcal_subscriber_view_component_removed (ECalDataModelSubscriber *subscriber,
+ ECalClient *client,
+ const gchar *uid,
+ const gchar *rid)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
const gchar *sid;
gchar *uuid;
GList *l;
- priv = gcal_subscriber_get_instance_private (GCAL_SUBSCRIBER (subscriber));
+ priv = gcal_subscriber_view_get_instance_private (GCAL_SUBSCRIBER_VIEW (subscriber));
sid = e_source_get_uid (e_client_get_source (E_CLIENT (client)));
if (rid != NULL)
@@ -384,11 +384,11 @@ gcal_subscriber_component_removed (ECalDataModelSubscriber *subscriber,
}
static void
-gcal_subscriber_freeze (ECalDataModelSubscriber *subscriber)
+gcal_subscriber_view_freeze (ECalDataModelSubscriber *subscriber)
{
}
static void
-gcal_subscriber_thaw (ECalDataModelSubscriber *subscriber)
+gcal_subscriber_view_thaw (ECalDataModelSubscriber *subscriber)
{
}
diff --git a/src/gcal-subscriber-view.h b/src/gcal-subscriber-view.h
index 206ce44..05af278 100644
--- a/src/gcal-subscriber-view.h
+++ b/src/gcal-subscriber-view.h
@@ -17,8 +17,8 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifndef __GCAL_SUBSCRIBER_H__
-#define __GCAL_SUBSCRIBER_H__
+#ifndef __GCAL_SUBSCRIBER_VIEW_H__
+#define __GCAL_SUBSCRIBER_VIEW_H__
#include "gcal-manager.h"
#include "gcal-event-widget.h"
@@ -27,35 +27,35 @@
G_BEGIN_DECLS
-#define GCAL_TYPE_SUBSCRIBER (gcal_subscriber_get_type ())
-#define GCAL_SUBSCRIBER(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj), GCAL_TYPE_SUBSCRIBER,
GcalSubscriber))
-#define GCAL_SUBSCRIBER_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass), GCAL_TYPE_SUBSCRIBER,
GcalSubscriberClass))
-#define GCAL_IS_SUBSCRIBER(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj), GCAL_TYPE_SUBSCRIBER))
-#define GCAL_IS_SUBSCRIBER_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass), GCAL_TYPE_SUBSCRIBER))
-#define GCAL_SUBSCRIBER_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj), GCAL_TYPE_SUBSCRIBER,
GcalSubscriberClass))
+#define GCAL_TYPE_SUBSCRIBER_VIEW (gcal_subscriber_view_get_type ())
+#define GCAL_SUBSCRIBER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_CAST((obj),
GCAL_TYPE_SUBSCRIBER_VIEW, GcalSubscriberView))
+#define GCAL_SUBSCRIBER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST((klass),
GCAL_TYPE_SUBSCRIBER_VIEW, GcalSubscriberViewClass))
+#define GCAL_IS_SUBSCRIBER_VIEW(obj) (G_TYPE_CHECK_INSTANCE_TYPE((obj),
GCAL_TYPE_SUBSCRIBER_VIEW))
+#define GCAL_IS_SUBSCRIBER_VIEW_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE((klass),
GCAL_TYPE_SUBSCRIBER_VIEW))
+#define GCAL_SUBSCRIBER_VIEW_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS((obj),
GCAL_TYPE_SUBSCRIBER_VIEW, GcalSubscriberViewClass))
-typedef struct _GcalSubscriber GcalSubscriber;
-typedef struct _GcalSubscriberClass GcalSubscriberClass;
-typedef struct _GcalSubscriberPrivate GcalSubscriberPrivate;
+typedef struct _GcalSubscriberView GcalSubscriberView;
+typedef struct _GcalSubscriberViewClass GcalSubscriberViewClass;
+typedef struct _GcalSubscriberViewPrivate GcalSubscriberViewPrivate;
-struct _GcalSubscriber
+struct _GcalSubscriberView
{
GtkContainer parent;
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
};
-struct _GcalSubscriberClass
+struct _GcalSubscriberViewClass
{
GtkContainerClass parent_class;
/*< public >*/
- gboolean (*is_child_multicell) (GcalSubscriber *subscriber, GcalEventWidget *child);
- guint (*get_child_cell) (GcalSubscriber *subscriber, GcalEventWidget *child);
+ gboolean (*is_child_multicell) (GcalSubscriberView *subscriber, GcalEventWidget *child);
+ guint (*get_child_cell) (GcalSubscriberView *subscriber, GcalEventWidget *child);
};
-GType gcal_subscriber_get_type (void);
+GType gcal_subscriber_view_get_type (void);
G_END_DECLS
-#endif /* __GCAL_SUBSCRIBER_H__ */
+#endif /* __GCAL_SUBSCRIBER_VIEW_H__ */
diff --git a/src/gcal-week-view.c b/src/gcal-week-view.c
index 22e38f7..a3294f3 100644
--- a/src/gcal-week-view.c
+++ b/src/gcal-week-view.c
@@ -163,12 +163,9 @@ static gchar* gcal_week_view_get_right_header (GcalView *view
static GtkWidget* gcal_week_view_get_by_uuid (GcalView *view,
const gchar *uuid);
-G_DEFINE_TYPE_WITH_CODE (GcalWeekView,
- gcal_week_view,
- GCAL_TYPE_SUBSCRIBER,
+G_DEFINE_TYPE_WITH_CODE (GcalWeekView, gcal_week_view, GCAL_TYPE_SUBSCRIBER_VIEW,
G_ADD_PRIVATE (GcalWeekView)
- G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW,
- gcal_view_interface_init));
+ G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW, gcal_view_interface_init));
/**
* get_start_grid_y:
diff --git a/src/gcal-week-view.h b/src/gcal-week-view.h
index 5854114..f28504f 100644
--- a/src/gcal-week-view.h
+++ b/src/gcal-week-view.h
@@ -38,12 +38,12 @@ typedef struct _GcalWeekViewClass GcalWeekViewClass;
struct _GcalWeekView
{
- GcalSubscriber parent;
+ GcalSubscriberView parent;
};
struct _GcalWeekViewClass
{
- GcalSubscriberClass parent_class;
+ GcalSubscriberViewClass parent_class;
};
GType gcal_week_view_get_type (void);
diff --git a/src/gcal-year-view.c b/src/gcal-year-view.c
index 996de9f..d55bde1 100644
--- a/src/gcal-year-view.c
+++ b/src/gcal-year-view.c
@@ -104,11 +104,11 @@ static gboolean gcal_year_view_button_release (GtkWidget
static void gcal_year_view_direction_changed (GtkWidget *widget,
GtkTextDirection previous_direction);
-static gboolean gcal_year_view_is_child_multimonth (GcalSubscriber *subscriber,
- GcalEventWidget *child);
+static gboolean gcal_year_view_is_child_multimonth (GcalSubscriberView *subscriber,
+ GcalEventWidget *child);
-static guint gcal_year_view_get_child_cell (GcalSubscriber *subscriber,
- GcalEventWidget *child);
+static guint gcal_year_view_get_child_cell (GcalSubscriberView *subscriber,
+ GcalEventWidget *child);
static icaltimetype* gcal_year_view_get_initial_date (GcalView *view);
@@ -123,12 +123,9 @@ static gchar* gcal_year_view_get_right_header (GcalView
static GtkWidget* gcal_year_view_get_by_uuid (GcalView *view,
const gchar *uuid);
-G_DEFINE_TYPE_WITH_CODE (GcalYearView,
- gcal_year_view,
- GCAL_TYPE_SUBSCRIBER,
+G_DEFINE_TYPE_WITH_CODE (GcalYearView, gcal_year_view, GCAL_TYPE_SUBSCRIBER_VIEW,
G_ADD_PRIVATE (GcalYearView)
- G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW,
- gcal_view_interface_init));
+ G_IMPLEMENT_INTERFACE (GCAL_TYPE_VIEW,gcal_view_interface_init));
static void
@@ -190,13 +187,13 @@ get_widget_parts (gint first_cell,
static void
gcal_year_view_class_init (GcalYearViewClass *klass)
{
- GcalSubscriberClass *subscriber_class;
+ GcalSubscriberViewClass *subscriber_view_class;
GtkWidgetClass *widget_class;
GObjectClass *object_class;
- subscriber_class = GCAL_SUBSCRIBER_CLASS (klass);
- subscriber_class->is_child_multicell = gcal_year_view_is_child_multimonth;
- subscriber_class->get_child_cell = gcal_year_view_get_child_cell;
+ subscriber_view_class = GCAL_SUBSCRIBER_VIEW_CLASS (klass);
+ subscriber_view_class->is_child_multicell = gcal_year_view_is_child_multimonth;
+ subscriber_view_class->get_child_cell = gcal_year_view_get_child_cell;
widget_class = GTK_WIDGET_CLASS (klass);
widget_class->realize = gcal_year_view_realize;
@@ -425,7 +422,7 @@ gcal_year_view_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GcalYearViewPrivate *priv;
- GcalSubscriberPrivate *ppriv;
+ GcalSubscriberViewPrivate *ppriv;
gint i, j, sw;
gint padding_bottom;
@@ -447,7 +444,7 @@ gcal_year_view_size_allocate (GtkWidget *widget,
gpointer key, value;
priv = gcal_year_view_get_instance_private (GCAL_YEAR_VIEW (widget));
- ppriv = GCAL_SUBSCRIBER (widget)->priv;
+ ppriv = GCAL_SUBSCRIBER_VIEW (widget)->priv;
/* remove every widget' parts, but the master widget */
widgets = g_hash_table_get_values (ppriv->children);
@@ -895,8 +892,8 @@ gcal_year_view_direction_changed (GtkWidget *widget,
}
static gboolean
-gcal_year_view_is_child_multimonth (GcalSubscriber *subscriber,
- GcalEventWidget *child)
+gcal_year_view_is_child_multimonth (GcalSubscriberView *subscriber,
+ GcalEventWidget *child)
{
const icaltimetype *dt_start, *dt_end;
@@ -909,8 +906,8 @@ gcal_year_view_is_child_multimonth (GcalSubscriber *subscriber,
}
static guint
-gcal_year_view_get_child_cell (GcalSubscriber *subscriber,
- GcalEventWidget *child)
+gcal_year_view_get_child_cell (GcalSubscriberView *subscriber,
+ GcalEventWidget *child)
{
const icaltimetype *dt_start = gcal_event_widget_peek_start_date (child);
return dt_start->month;
@@ -1003,10 +1000,10 @@ static GtkWidget*
gcal_year_view_get_by_uuid (GcalView *view,
const gchar *uuid)
{
- GcalSubscriberPrivate *priv;
+ GcalSubscriberViewPrivate *priv;
GList *l;
- priv = GCAL_SUBSCRIBER (view)->priv;
+ priv = GCAL_SUBSCRIBER_VIEW (view)->priv;
l = g_hash_table_lookup (priv->children, uuid);
if (l != NULL)
return (GtkWidget*) l->data;
diff --git a/src/gcal-year-view.h b/src/gcal-year-view.h
index ab5495d..7ff3966 100644
--- a/src/gcal-year-view.h
+++ b/src/gcal-year-view.h
@@ -38,12 +38,12 @@ typedef struct _GcalYearViewClass GcalYearViewClass;
struct _GcalYearView
{
- GcalSubscriber parent;
+ GcalSubscriberView parent;
};
struct _GcalYearViewClass
{
- GcalSubscriberClass parent_class;
+ GcalSubscriberViewClass parent_class;
/* signals */
void (*new_event) (gint new_day);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]