[evolution/gnome-3-8] ECalModel: Rename ECalModelClient struct to ClientData.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/gnome-3-8] ECalModel: Rename ECalModelClient struct to ClientData.
- Date: Fri, 12 Apr 2013 23:59:00 +0000 (UTC)
commit 6e6968e1cf83e777366f24fa87fbd28582f54a94
Author: Matthew Barnes <mbarnes redhat com>
Date: Fri Apr 12 11:59:17 2013 -0400
ECalModel: Rename ECalModelClient struct to ClientData.
ECalModelClient looks like a public type name, but it's strictly
internal to ECalModel. Plus all the variable names of that type
are already "client_data".
(cherry picked from commit cf94e5b8097555b43b5fba3bdd44bee39ce47a4a)
calendar/gui/e-cal-model.c | 60 ++++++++++++++++++++++---------------------
1 files changed, 31 insertions(+), 29 deletions(-)
---
diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c
index e60e947..0f70481 100644
--- a/calendar/gui/e-cal-model.c
+++ b/calendar/gui/e-cal-model.c
@@ -39,6 +39,8 @@
#include "itip-utils.h"
#include "misc.h"
+typedef struct _ClientData ClientData;
+
struct _ECalModelComponentPrivate {
GString *categories_str;
};
@@ -51,18 +53,18 @@ struct _ECalModelComponentPrivate {
(G_TYPE_INSTANCE_GET_PRIVATE \
((obj), E_TYPE_CAL_MODEL_COMPONENT, ECalModelComponentPrivate))
-typedef struct {
+struct _ClientData {
ECalClient *client;
ECalClientView *view;
gboolean do_query;
GCancellable *cancellable;
-} ECalModelClient;
+};
struct _ECalModelPrivate {
ESourceRegistry *registry;
- /* Queue of ECalModelClient structs */
+ /* Queue of ClientData structs */
GQueue clients;
/* The default client in the list */
@@ -142,10 +144,10 @@ static gchar *ecm_value_to_string (ETableModel *etm, gint col, gconstpointer val
static const gchar *ecm_get_color_for_component (ECalModel *model, ECalModelComponent *comp_data);
-static ECalModelClient *add_new_client (ECalModel *model, ECalClient *client, gboolean do_query);
-static ECalModelClient *find_client_data (ECalModel *model, ECalClient *client);
-static void remove_client_objects (ECalModel *model, ECalModelClient *client_data);
-static void remove_client (ECalModel *model, ECalModelClient *client_data);
+static ClientData *add_new_client (ECalModel *model, ECalClient *client, gboolean do_query);
+static ClientData *find_client_data (ECalModel *model, ECalClient *client);
+static void remove_client_objects (ECalModel *model, ClientData *client_data);
+static void remove_client (ECalModel *model, ClientData *client_data);
static void redo_queries (ECalModel *model);
enum {
@@ -430,7 +432,7 @@ cal_model_dispose (GObject *object)
}
while (!g_queue_is_empty (&priv->clients)) {
- ECalModelClient *client_data;
+ ClientData *client_data;
client_data = g_queue_pop_head (&priv->clients);
@@ -2106,7 +2108,7 @@ ECalClient *
e_cal_model_get_default_client (ECalModel *model)
{
ECalModelPrivate *priv;
- ECalModelClient *client_data;
+ ClientData *client_data;
g_return_val_if_fail (model != NULL, NULL);
g_return_val_if_fail (E_IS_CAL_MODEL (model), NULL);
@@ -2129,7 +2131,7 @@ e_cal_model_set_default_client (ECalModel *model,
ECalClient *client)
{
ECalModelPrivate *priv;
- ECalModelClient *client_data;
+ ClientData *client_data;
g_return_if_fail (E_IS_CAL_MODEL (model));
@@ -2177,9 +2179,9 @@ e_cal_model_get_client_list (ECalModel *model)
head = g_queue_peek_head_link (&model->priv->clients);
for (link = head; link != NULL; link = g_list_next (link)) {
- ECalModelClient *client_data;
+ ClientData *client_data;
- client_data = (ECalModelClient *) link->data;
+ client_data = (ClientData *) link->data;
g_return_val_if_fail (client_data != NULL, NULL);
/* Exclude the default client if we're not querying it. */
@@ -2211,11 +2213,11 @@ e_cal_model_get_client_for_source (ECalModel *model,
head = g_queue_peek_head_link (&model->priv->clients);
for (link = head; link != NULL; link = g_list_next (link)) {
- ECalModelClient *client_data = link->data;
+ ClientData *client_data = link->data;
ESource *client_source;
EClient *client;
- client_data = (ECalModelClient *) link->data;
+ client_data = (ClientData *) link->data;
g_return_val_if_fail (client_data != NULL, NULL);
client = E_CLIENT (client_data->client);
@@ -2228,7 +2230,7 @@ e_cal_model_get_client_for_source (ECalModel *model,
return NULL;
}
-static ECalModelClient *
+static ClientData *
find_client_data (ECalModel *model,
ECalClient *client)
{
@@ -2237,9 +2239,9 @@ find_client_data (ECalModel *model,
head = g_queue_peek_head_link (&model->priv->clients);
for (link = head; link != NULL; link = g_list_next (link)) {
- ECalModelClient *client_data;
+ ClientData *client_data;
- client_data = (ECalModelClient *) link->data;
+ client_data = (ClientData *) link->data;
g_return_val_if_fail (client_data != NULL, NULL);
if (client_data->client == client)
@@ -2493,7 +2495,7 @@ process_added (ECalClientView *view,
ensure_dates_are_in_default_zone (model, l->data);
if (e_cal_util_component_has_recurrences (l->data) && (priv->flags &
E_CAL_MODEL_FLAGS_EXPAND_RECURRENCES)) {
- ECalModelClient *client_data = find_client_data (model, client);
+ ClientData *client_data = find_client_data (model, client);
if (client_data) {
RecurrenceExpansionData *rdata = g_new0 (RecurrenceExpansionData, 1);
@@ -2819,7 +2821,7 @@ client_view_complete_cb (ECalClientView *view,
struct get_view_data
{
ECalModel *model; /* do not touch this, if cancelled */
- ECalModelClient *client_data; /* do not touch this, if cancelled */
+ ClientData *client_data; /* do not touch this, if cancelled */
GCancellable *cancellable;
guint tries;
};
@@ -2923,7 +2925,7 @@ retry_get_view_timeout_cb (gpointer user_data)
static void
update_e_cal_view_for_client (ECalModel *model,
- ECalModelClient *client_data)
+ ClientData *client_data)
{
ECalModelPrivate *priv;
struct get_view_data *gvd;
@@ -2983,13 +2985,13 @@ backend_died_cb (ECalClient *client,
e_cal_model_remove_client (model, client);
}
-static ECalModelClient *
+static ClientData *
add_new_client (ECalModel *model,
ECalClient *client,
gboolean do_query)
{
ECalModelPrivate *priv;
- ECalModelClient *client_data;
+ ClientData *client_data;
priv = model->priv;
@@ -3009,7 +3011,7 @@ add_new_client (ECalModel *model,
goto load;
}
- client_data = g_new0 (ECalModelClient, 1);
+ client_data = g_new0 (ClientData, 1);
client_data->client = g_object_ref (client);
client_data->view = NULL;
client_data->do_query = do_query;
@@ -3041,7 +3043,7 @@ e_cal_model_add_client (ECalModel *model,
static void
remove_client_objects (ECalModel *model,
- ECalModelClient *client_data)
+ ClientData *client_data)
{
gint i;
@@ -3073,7 +3075,7 @@ remove_client_objects (ECalModel *model,
static void
remove_client (ECalModel *model,
- ECalModelClient *client_data)
+ ClientData *client_data)
{
/* FIXME We might not want to disconnect the open signal for the default client */
g_signal_handlers_disconnect_matched (client_data->client, G_SIGNAL_MATCH_DATA, 0, 0, NULL, NULL,
model);
@@ -3110,7 +3112,7 @@ void
e_cal_model_remove_client (ECalModel *model,
ECalClient *client)
{
- ECalModelClient *client_data;
+ ClientData *client_data;
g_return_if_fail (E_IS_CAL_MODEL (model));
g_return_if_fail (E_IS_CAL_CLIENT (client));
@@ -3129,7 +3131,7 @@ e_cal_model_remove_all_clients (ECalModel *model)
g_return_if_fail (E_IS_CAL_MODEL (model));
while (!g_queue_is_empty (&model->priv->clients)) {
- ECalModelClient *client_data;
+ ClientData *client_data;
client_data = g_queue_pop_head (&model->priv->clients);
remove_client (model, client_data);
@@ -3262,9 +3264,9 @@ redo_queries (ECalModel *model)
head = g_queue_peek_head_link (&priv->clients);
for (link = head; link != NULL; link = g_list_next (link)) {
- ECalModelClient *client_data;
+ ClientData *client_data;
- client_data = (ECalModelClient *) link->data;
+ client_data = (ClientData *) link->data;
g_return_if_fail (client_data != NULL);
update_e_cal_view_for_client (model, client_data);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]