[PATCH] Port to newer EvolutionDataServer
Since 3.5.3, evolution-data-server has changed API regarding storage and retrieval of sources, introducing the ESourceRegistry and removing GConf. Adapt to that.
This commit is contained in:
committed by
Erick Pérez Castellanos
parent
004f622d40
commit
970529cb2f
+3
-3
@@ -70,9 +70,9 @@ GLIB_MIN_VERSION=2.30.0
|
|||||||
GTK_MIN_VERSION=3.4.0
|
GTK_MIN_VERSION=3.4.0
|
||||||
CLUTTER_MIN_VERSION=1.10
|
CLUTTER_MIN_VERSION=1.10
|
||||||
CLUTTER_GTK_MIN_VERSION=1.2
|
CLUTTER_GTK_MIN_VERSION=1.2
|
||||||
ECAL_REQUIRED=3.1.5
|
ECAL_REQUIRED=3.5.3
|
||||||
EDATASERVER_REQUIRED=3.1.5
|
EDATASERVER_REQUIRED=3.5.3
|
||||||
EDATASERVERUI_REQUIRED=3.1.5
|
EDATASERVERUI_REQUIRED=3.5.3
|
||||||
|
|
||||||
PKG_CHECK_MODULES(CALENDAR,
|
PKG_CHECK_MODULES(CALENDAR,
|
||||||
glib-2.0 >= $GLIB_MIN_VERSION
|
glib-2.0 >= $GLIB_MIN_VERSION
|
||||||
|
|||||||
+112
-106
@@ -22,10 +22,8 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include <libecal/e-cal-client.h>
|
#include <libecal/libecal.h>
|
||||||
#include <libecal/e-cal-client-view.h>
|
#include <libedataserver/libedataserver.h>
|
||||||
#include <libecal/e-cal-time-util.h>
|
|
||||||
#include <libedataserver/e-data-server-util.h>
|
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
@@ -79,24 +77,21 @@ struct _GcalManagerPrivate
|
|||||||
* Each value is of type GCalStoreUnit
|
* Each value is of type GCalStoreUnit
|
||||||
* And each key is the source uid
|
* And each key is the source uid
|
||||||
*/
|
*/
|
||||||
GHashTable *clients;
|
GHashTable *clients;
|
||||||
|
|
||||||
/**
|
ESourceRegistry *source_registry;
|
||||||
* System sources read from gconf
|
|
||||||
*/
|
|
||||||
ESourceList *system_sources;
|
|
||||||
|
|
||||||
/* The store for keeping easily retrieved data about sources */
|
/* The store for keeping easily retrieved data about sources */
|
||||||
GtkListStore *sources_model;
|
GtkListStore *sources_model;
|
||||||
|
|
||||||
/* The range of dates defining the query */
|
/* The range of dates defining the query */
|
||||||
icaltimetype *initial_date;
|
icaltimetype *initial_date;
|
||||||
icaltimetype *final_date;
|
icaltimetype *final_date;
|
||||||
|
|
||||||
/* The active query */
|
/* The active query */
|
||||||
gchar *query;
|
gchar *query;
|
||||||
|
|
||||||
GCancellable *async_ops;
|
GCancellable *async_ops;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Signal IDs */
|
/* Signal IDs */
|
||||||
@@ -114,6 +109,14 @@ static void gcal_manager_constructed (GObject *obje
|
|||||||
|
|
||||||
static void gcal_manager_finalize (GObject *object);
|
static void gcal_manager_finalize (GObject *object);
|
||||||
|
|
||||||
|
static void gcal_manager_on_source_added (ESourceRegistry *registry,
|
||||||
|
ESource *source,
|
||||||
|
GcalManager *manager);
|
||||||
|
|
||||||
|
static void gcal_manager_on_source_removed (ESourceRegistry *registry,
|
||||||
|
ESource *source,
|
||||||
|
GcalManager *manager);
|
||||||
|
|
||||||
void gcal_manager_free_unit_data (gpointer data);
|
void gcal_manager_free_unit_data (gpointer data);
|
||||||
|
|
||||||
static void gcal_manager_on_client_opened (GObject *source_object,
|
static void gcal_manager_on_client_opened (GObject *source_object,
|
||||||
@@ -124,12 +127,12 @@ static gboolean gcal_manager_retry_open_on_timeout (gpointer user
|
|||||||
|
|
||||||
static void gcal_manager_free_retry_open_data (gpointer user_data);
|
static void gcal_manager_free_retry_open_data (gpointer user_data);
|
||||||
|
|
||||||
void gcal_manager_remove_client (GcalManager *manager,
|
|
||||||
ECalClient *client);
|
|
||||||
|
|
||||||
static void gcal_manager_load_source (GcalManager *manager,
|
static void gcal_manager_load_source (GcalManager *manager,
|
||||||
ESource *source);
|
ESource *source);
|
||||||
|
|
||||||
|
void gcal_manager_remove_source (GcalManager *manager,
|
||||||
|
ESource *source);
|
||||||
|
|
||||||
static void gcal_manager_reload_events (GcalManager *manager);
|
static void gcal_manager_reload_events (GcalManager *manager);
|
||||||
|
|
||||||
static void gcal_manager_reload_view (GcalManager *manager,
|
static void gcal_manager_reload_view (GcalManager *manager,
|
||||||
@@ -243,33 +246,34 @@ gcal_manager_constructed (GObject *object)
|
|||||||
GcalManagerPrivate *priv;
|
GcalManagerPrivate *priv;
|
||||||
|
|
||||||
GError *error;
|
GError *error;
|
||||||
GSList *l_groups;
|
GList *sources;
|
||||||
GSList *l;
|
GList *l;
|
||||||
|
|
||||||
if (G_OBJECT_CLASS (gcal_manager_parent_class)->constructed != NULL)
|
if (G_OBJECT_CLASS (gcal_manager_parent_class)->constructed != NULL)
|
||||||
G_OBJECT_CLASS (gcal_manager_parent_class)->constructed (object);
|
G_OBJECT_CLASS (gcal_manager_parent_class)->constructed (object);
|
||||||
|
|
||||||
priv = GCAL_MANAGER (object)->priv;
|
priv = GCAL_MANAGER (object)->priv;
|
||||||
|
|
||||||
if (!e_cal_client_get_sources (&(priv->system_sources),
|
error = NULL;
|
||||||
E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
|
priv->source_registry = e_source_registry_new_sync (NULL, &error);
|
||||||
&error))
|
if (priv->source_registry == NULL)
|
||||||
{
|
{
|
||||||
//FIXME maybe give more information of what happened
|
g_warning ("Failed to access calendar configuration: %s", error->message);
|
||||||
g_warning ("%s", error->message);
|
g_error_free (error);
|
||||||
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
for (l_groups = e_source_list_peek_groups (priv->system_sources);
|
sources = e_source_registry_list_sources (priv->source_registry,
|
||||||
l_groups != NULL;
|
E_SOURCE_EXTENSION_CALENDAR);
|
||||||
l_groups = l_groups->next)
|
|
||||||
{
|
for (l = sources; l != NULL; l = l->next)
|
||||||
for (l = e_source_group_peek_sources (E_SOURCE_GROUP (l_groups->data));
|
gcal_manager_load_source (GCAL_MANAGER (object), l->data);
|
||||||
l != NULL;
|
|
||||||
l = l->next)
|
g_object_connect (
|
||||||
{
|
priv->source_registry,
|
||||||
gcal_manager_load_source (GCAL_MANAGER (object), l->data);
|
"signal::source-added", gcal_manager_on_source_added, object,
|
||||||
}
|
"signal::source-removed", gcal_manager_on_source_removed, object,
|
||||||
}
|
NULL);
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -283,6 +287,22 @@ gcal_manager_finalize (GObject *object)
|
|||||||
g_clear_object (&(priv->sources_model));
|
g_clear_object (&(priv->sources_model));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_manager_on_source_added (ESourceRegistry *registry,
|
||||||
|
ESource *source,
|
||||||
|
GcalManager *manager)
|
||||||
|
{
|
||||||
|
gcal_manager_load_source (manager, source);
|
||||||
|
}
|
||||||
|
|
||||||
|
static void
|
||||||
|
gcal_manager_on_source_removed (ESourceRegistry *registry,
|
||||||
|
ESource *source,
|
||||||
|
GcalManager *manager)
|
||||||
|
{
|
||||||
|
gcal_manager_remove_source (manager, source);
|
||||||
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gcal_manager_free_unit_data (gpointer data)
|
gcal_manager_free_unit_data (gpointer data)
|
||||||
{
|
{
|
||||||
@@ -318,8 +338,9 @@ gcal_manager_on_client_opened (GObject *source_object,
|
|||||||
/* get_object_list */
|
/* get_object_list */
|
||||||
if (priv->query != NULL)
|
if (priv->query != NULL)
|
||||||
{
|
{
|
||||||
uid = e_source_peek_uid (e_client_get_source (E_CLIENT (client)));
|
uid = e_source_get_uid (e_client_get_source (E_CLIENT (client)));
|
||||||
unit = (GcalManagerUnit*) g_hash_table_lookup (priv->clients, uid);
|
unit = (GcalManagerUnit*) g_hash_table_lookup (priv->clients, uid);
|
||||||
|
unit->enabled = TRUE;
|
||||||
|
|
||||||
/* setting view */
|
/* setting view */
|
||||||
gcal_manager_reload_view (GCAL_MANAGER (user_data), unit);
|
gcal_manager_reload_view (GCAL_MANAGER (user_data), unit);
|
||||||
@@ -362,10 +383,10 @@ gcal_manager_on_client_opened (GObject *source_object,
|
|||||||
|
|
||||||
/* in any other case, remove it*/
|
/* in any other case, remove it*/
|
||||||
source = e_client_get_source (E_CLIENT (client));
|
source = e_client_get_source (E_CLIENT (client));
|
||||||
gcal_manager_remove_client (GCAL_MANAGER (user_data), client);
|
gcal_manager_remove_source (GCAL_MANAGER (user_data), source);
|
||||||
g_warning ("%s: Failed to open '%s': %s",
|
g_warning ("%s: Failed to open '%s': %s",
|
||||||
G_STRFUNC,
|
G_STRFUNC,
|
||||||
e_source_peek_name (source),
|
e_source_get_display_name (source),
|
||||||
error->message);
|
error->message);
|
||||||
|
|
||||||
g_error_free (error);
|
g_error_free (error);
|
||||||
@@ -411,18 +432,17 @@ gcal_manager_free_retry_open_data (gpointer user_data)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
gcal_manager_remove_client (GcalManager *manager,
|
gcal_manager_remove_source (GcalManager *manager,
|
||||||
ECalClient *client)
|
ESource *source)
|
||||||
{
|
{
|
||||||
GcalManagerPrivate *priv;
|
GcalManagerPrivate *priv;
|
||||||
|
|
||||||
g_return_if_fail (GCAL_IS_MANAGER (manager));
|
g_return_if_fail (GCAL_IS_MANAGER (manager));
|
||||||
g_return_if_fail (E_IS_CAL_CLIENT (client));
|
g_return_if_fail (E_IS_SOURCE (source));
|
||||||
|
|
||||||
priv = manager->priv;
|
priv = manager->priv;
|
||||||
g_hash_table_remove (
|
g_hash_table_remove (priv->clients,
|
||||||
priv->clients,
|
e_source_get_uid (source));
|
||||||
e_source_peek_uid (e_client_get_source (E_CLIENT (client))));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
@@ -433,13 +453,17 @@ gcal_manager_load_source (GcalManager *manager,
|
|||||||
ECalClient *new_client;
|
ECalClient *new_client;
|
||||||
GcalManagerUnit *unit;
|
GcalManagerUnit *unit;
|
||||||
GError *error;
|
GError *error;
|
||||||
|
ESourceSelectable *extension;
|
||||||
|
|
||||||
GtkTreeIter iter;
|
GtkTreeIter iter;
|
||||||
GdkColor gdk_color;
|
GdkColor gdk_color;
|
||||||
|
|
||||||
priv = manager->priv;
|
priv = manager->priv;
|
||||||
error = NULL;
|
error = NULL;
|
||||||
new_client = e_cal_client_new (source, E_CAL_CLIENT_SOURCE_TYPE_EVENTS, &error);
|
new_client = e_cal_client_new (source,
|
||||||
|
E_CAL_CLIENT_SOURCE_TYPE_EVENTS,
|
||||||
|
&error);
|
||||||
|
|
||||||
if (error != NULL)
|
if (error != NULL)
|
||||||
{
|
{
|
||||||
g_warning ("Couldn't create ECalClient. Error: %s", error->message);
|
g_warning ("Couldn't create ECalClient. Error: %s", error->message);
|
||||||
@@ -454,26 +478,27 @@ gcal_manager_load_source (GcalManager *manager,
|
|||||||
g_str_equal,
|
g_str_equal,
|
||||||
g_free,
|
g_free,
|
||||||
g_object_unref);
|
g_object_unref);
|
||||||
unit->enabled = TRUE;
|
|
||||||
|
|
||||||
if (g_hash_table_lookup (priv->clients, e_source_peek_uid (source)) == NULL)
|
if (g_hash_table_lookup (priv->clients, e_source_get_uid (source)) == NULL)
|
||||||
{
|
{
|
||||||
g_hash_table_insert (priv->clients,
|
g_hash_table_insert (priv->clients,
|
||||||
g_strdup (e_source_peek_uid (source)),
|
g_strdup (e_source_get_uid (source)),
|
||||||
unit);
|
unit);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
g_warning ("Reinserting source: %s in priv->clients",
|
g_warning ("Reinserting source: %s in priv->clients",
|
||||||
e_source_peek_uid (source));
|
e_source_get_uid (source));
|
||||||
}
|
}
|
||||||
|
|
||||||
/* filling store */
|
/* filling store */
|
||||||
gdk_color_parse (e_source_peek_color_spec (source), &gdk_color);
|
extension = E_SOURCE_SELECTABLE (e_source_get_extension (source,
|
||||||
|
E_SOURCE_EXTENSION_CALENDAR));
|
||||||
|
gdk_color_parse (e_source_selectable_get_color (extension), &gdk_color);
|
||||||
gtk_list_store_append (priv->sources_model, &iter);
|
gtk_list_store_append (priv->sources_model, &iter);
|
||||||
gtk_list_store_set (priv->sources_model, &iter,
|
gtk_list_store_set (priv->sources_model, &iter,
|
||||||
COLUMN_UID, e_source_peek_uid (source),
|
COLUMN_UID, e_source_get_uid (source),
|
||||||
COLUMN_NAME, e_source_peek_name (source),
|
COLUMN_NAME, e_source_get_display_name (source),
|
||||||
COLUMN_ACTIVE, TRUE,
|
COLUMN_ACTIVE, TRUE,
|
||||||
COLUMN_COLOR, &gdk_color,
|
COLUMN_COLOR, &gdk_color,
|
||||||
-1);
|
-1);
|
||||||
@@ -599,7 +624,7 @@ gcal_manager_on_view_objects_added (ECalClientView *view,
|
|||||||
events_data = NULL;
|
events_data = NULL;
|
||||||
|
|
||||||
client = e_cal_client_view_get_client (view);
|
client = e_cal_client_view_get_client (view);
|
||||||
source_uid = e_source_peek_uid (e_client_get_source (E_CLIENT (client)));
|
source_uid = e_source_get_uid (e_client_get_source (E_CLIENT (client)));
|
||||||
unit = (GcalManagerUnit*) g_hash_table_lookup (priv->clients, source_uid);
|
unit = (GcalManagerUnit*) g_hash_table_lookup (priv->clients, source_uid);
|
||||||
|
|
||||||
for (l = objects; l != NULL; l = l->next)
|
for (l = objects; l != NULL; l = l->next)
|
||||||
@@ -665,7 +690,7 @@ gcal_manager_on_view_objects_removed (ECalClientView *view,
|
|||||||
|
|
||||||
events_data = NULL;
|
events_data = NULL;
|
||||||
client = e_cal_client_view_get_client (view);
|
client = e_cal_client_view_get_client (view);
|
||||||
source_uid = e_source_peek_uid (e_client_get_source (E_CLIENT (client)));
|
source_uid = e_source_get_uid (e_client_get_source (E_CLIENT (client)));
|
||||||
|
|
||||||
unit = g_hash_table_lookup (priv->clients, source_uid);
|
unit = g_hash_table_lookup (priv->clients, source_uid);
|
||||||
|
|
||||||
@@ -799,7 +824,7 @@ gcal_manager_send_fake_events_added (GcalManager *manager)
|
|||||||
if (! unit->enabled)
|
if (! unit->enabled)
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
source_uid = e_source_peek_uid (unit->source);
|
source_uid = e_source_get_uid (unit->source);
|
||||||
g_hash_table_iter_init (&e_iter, unit->events);
|
g_hash_table_iter_init (&e_iter, unit->events);
|
||||||
while (g_hash_table_iter_next (&e_iter, &e_key, &e_value))
|
while (g_hash_table_iter_next (&e_iter, &e_key, &e_value))
|
||||||
{
|
{
|
||||||
@@ -830,7 +855,7 @@ gcal_manager_send_fave_events_removed (GcalManager *manager,
|
|||||||
gchar *event_uuid;
|
gchar *event_uuid;
|
||||||
|
|
||||||
events_data = NULL;
|
events_data = NULL;
|
||||||
source_uid = e_source_peek_uid (unit->source);
|
source_uid = e_source_get_uid (unit->source);
|
||||||
g_hash_table_iter_init (&e_iter, unit->events);
|
g_hash_table_iter_init (&e_iter, unit->events);
|
||||||
while (g_hash_table_iter_next (&e_iter, &e_key, &e_value))
|
while (g_hash_table_iter_next (&e_iter, &e_key, &e_value))
|
||||||
{
|
{
|
||||||
@@ -885,61 +910,45 @@ gcal_manager_get_sources_model (GcalManager *manager)
|
|||||||
gchar*
|
gchar*
|
||||||
gcal_manager_add_source (GcalManager *manager,
|
gcal_manager_add_source (GcalManager *manager,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
const gchar *base_uri,
|
const gchar *backend,
|
||||||
const gchar *relative_uri,
|
|
||||||
const gchar *color)
|
const gchar *color)
|
||||||
{
|
{
|
||||||
GcalManagerPrivate *priv;
|
GcalManagerPrivate *priv;
|
||||||
GSList *groups;
|
|
||||||
ESourceGroup *selected_group;
|
|
||||||
GHashTableIter iter;
|
|
||||||
gpointer key;
|
|
||||||
gpointer value;
|
|
||||||
ESource *source;
|
ESource *source;
|
||||||
|
ESourceCalendar *extension;
|
||||||
|
GError *error;
|
||||||
|
|
||||||
g_return_val_if_fail (GCAL_IS_MANAGER (manager), NULL);
|
g_return_val_if_fail (GCAL_IS_MANAGER (manager), NULL);
|
||||||
priv = manager->priv;
|
priv = manager->priv;
|
||||||
g_return_val_if_fail (GCAL_IS_MANAGER (manager), FALSE);
|
g_return_val_if_fail (GCAL_IS_MANAGER (manager), FALSE);
|
||||||
|
|
||||||
selected_group = NULL;
|
source = e_source_new (NULL, NULL, NULL);
|
||||||
for (groups = e_source_list_peek_groups (priv->system_sources);
|
extension = E_SOURCE_CALENDAR (e_source_get_extension (source,
|
||||||
groups != NULL;
|
E_SOURCE_EXTENSION_CALENDAR));
|
||||||
groups = groups->next)
|
|
||||||
|
g_object_set (extension,
|
||||||
|
"backend-name", backend,
|
||||||
|
"color", color,
|
||||||
|
NULL);
|
||||||
|
|
||||||
|
e_source_set_display_name (source, name);
|
||||||
|
|
||||||
|
error = NULL;
|
||||||
|
e_source_registry_commit_source_sync (priv->source_registry,
|
||||||
|
source,
|
||||||
|
NULL,
|
||||||
|
&error);
|
||||||
|
if (error)
|
||||||
{
|
{
|
||||||
if (g_strcmp0 (
|
g_warning ("Failed to store calendar configuration: %s",
|
||||||
base_uri,
|
error->message);
|
||||||
e_source_group_peek_base_uri (E_SOURCE_GROUP (groups->data))) == 0)
|
g_error_free (error);
|
||||||
{
|
g_object_unref (source);
|
||||||
selected_group = (ESourceGroup*) groups->data;
|
return NULL;
|
||||||
|
|
||||||
g_hash_table_iter_init (&iter, priv->clients);
|
|
||||||
while (g_hash_table_iter_next (&iter, &key, &value))
|
|
||||||
{
|
|
||||||
GcalManagerUnit *unit = (GcalManagerUnit*) value;
|
|
||||||
if (g_strcmp0 (
|
|
||||||
e_source_peek_relative_uri (unit->source),
|
|
||||||
relative_uri) == 0)
|
|
||||||
{
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (selected_group == NULL)
|
|
||||||
{
|
|
||||||
selected_group = e_source_group_new (gcal_get_group_name (base_uri),
|
|
||||||
base_uri);
|
|
||||||
e_source_list_add_group (priv->system_sources, selected_group, -1);
|
|
||||||
}
|
|
||||||
|
|
||||||
source = e_source_new (name, relative_uri);
|
|
||||||
e_source_group_add_source (selected_group, source, -1);
|
|
||||||
|
|
||||||
gcal_manager_load_source (manager, source);
|
gcal_manager_load_source (manager, source);
|
||||||
|
return e_source_dup_uid (source);
|
||||||
return g_strdup (e_source_peek_uid (source));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
const gchar*
|
const gchar*
|
||||||
@@ -953,7 +962,7 @@ gcal_manager_get_source_name (GcalManager *manager,
|
|||||||
priv = manager->priv;
|
priv = manager->priv;
|
||||||
|
|
||||||
unit = g_hash_table_lookup (priv->clients, source_uid);
|
unit = g_hash_table_lookup (priv->clients, source_uid);
|
||||||
return e_source_peek_name (unit->source);
|
return e_source_get_display_name (unit->source);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1254,21 +1263,18 @@ gcal_manager_get_event_color (GcalManager *manager,
|
|||||||
{
|
{
|
||||||
GcalManagerPrivate *priv;
|
GcalManagerPrivate *priv;
|
||||||
GcalManagerUnit *unit;
|
GcalManagerUnit *unit;
|
||||||
|
ESourceSelectable *extension;
|
||||||
GdkRGBA *color;
|
GdkRGBA *color;
|
||||||
GdkColor gdk_color;
|
|
||||||
|
|
||||||
g_return_val_if_fail (GCAL_IS_MANAGER (manager), NULL);
|
g_return_val_if_fail (GCAL_IS_MANAGER (manager), NULL);
|
||||||
priv = manager->priv;
|
priv = manager->priv;
|
||||||
color = g_new0 (GdkRGBA, 1);
|
color = g_new0 (GdkRGBA, 1);
|
||||||
|
|
||||||
unit = g_hash_table_lookup (priv->clients, source_uid);
|
unit = g_hash_table_lookup (priv->clients, source_uid);
|
||||||
gdk_color_parse (e_source_peek_color_spec (unit->source), &gdk_color);
|
|
||||||
|
|
||||||
color->red = (gdouble) gdk_color.red / 65535;
|
|
||||||
color->green = (gdouble) gdk_color.green / 65535;
|
|
||||||
color->blue = (gdouble) gdk_color.blue / 65535;
|
|
||||||
color->alpha = 1;
|
|
||||||
|
|
||||||
|
extension = E_SOURCE_SELECTABLE (e_source_get_extension (unit->source,
|
||||||
|
E_SOURCE_EXTENSION_CALENDAR));
|
||||||
|
gdk_rgba_parse (color, e_source_selectable_get_color (extension));
|
||||||
return color;
|
return color;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-2
@@ -65,8 +65,7 @@ GtkListStore* gcal_manager_get_sources_model (GcalManager *manager
|
|||||||
|
|
||||||
gchar* gcal_manager_add_source (GcalManager *manager,
|
gchar* gcal_manager_add_source (GcalManager *manager,
|
||||||
const gchar *name,
|
const gchar *name,
|
||||||
const gchar *base_uri,
|
const gchar *backend,
|
||||||
const gchar *relative_uri,
|
|
||||||
const gchar *color);
|
const gchar *color);
|
||||||
|
|
||||||
const gchar* gcal_manager_get_source_name (GcalManager *manager,
|
const gchar* gcal_manager_get_source_name (GcalManager *manager,
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include <libecal/e-cal-time-util.h>
|
#include <libecal/libecal.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|||||||
+4
-4
@@ -20,12 +20,12 @@
|
|||||||
|
|
||||||
#include "gcal-utils.h"
|
#include "gcal-utils.h"
|
||||||
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include <libedataserver/e-data-server-util.h>
|
#include <string.h>
|
||||||
#include <libedataserverui/e-cell-renderer-color.h>
|
|
||||||
|
#include <libedataserver/libedataserver.h>
|
||||||
|
#include <libedataserverui/libedataserverui.h>
|
||||||
|
|
||||||
G_DEFINE_BOXED_TYPE (icaltimetype, icaltime, gcal_dup_icaltime, g_free)
|
G_DEFINE_BOXED_TYPE (icaltimetype, icaltime, gcal_dup_icaltime, g_free)
|
||||||
|
|
||||||
|
|||||||
@@ -25,7 +25,7 @@
|
|||||||
|
|
||||||
#include <glib/gi18n.h>
|
#include <glib/gi18n.h>
|
||||||
|
|
||||||
#include <libecal/e-cal-time-util.h>
|
#include <libecal/libecal.h>
|
||||||
|
|
||||||
enum
|
enum
|
||||||
{
|
{
|
||||||
|
|||||||
+2
-2
@@ -29,11 +29,11 @@
|
|||||||
#include "gcal-enum-types.h"
|
#include "gcal-enum-types.h"
|
||||||
#include "gtk-notification.h"
|
#include "gtk-notification.h"
|
||||||
|
|
||||||
|
#include <glib/gi18n.h>
|
||||||
#include <clutter/clutter.h>
|
#include <clutter/clutter.h>
|
||||||
#include <clutter-gtk/clutter-gtk.h>
|
#include <clutter-gtk/clutter-gtk.h>
|
||||||
#include <glib/gi18n.h>
|
|
||||||
|
|
||||||
#include <libedataserverui/e-cell-renderer-color.h>
|
#include <libedataserverui/libedataserverui.h>
|
||||||
|
|
||||||
#include <libical/icaltime.h>
|
#include <libical/icaltime.h>
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user