Commit 0f6b8d8b authored by Milan Crha's avatar Milan Crha

Stop using deprecated EDS symbols

Also enable EDS_DISABLE_DEPRECATED define when compiling with enabled
maintainer mode, to make sure the EDS deprecated symbols will not
be used again.
parent 88411f7e
......@@ -56,8 +56,6 @@ main (gint argc,
gtk_init (&argc, &argv);
e_gdbus_templates_init_main_thread ();
alarm_notify_service = alarm_notify_new (NULL, &error);
if (error != NULL) {
......
......@@ -1129,19 +1129,19 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
success = e_cal_client_get_object_sync (dest_client, uid, NULL, &icalcomp, cancellable, &local_error);
if (success) {
success = e_cal_client_modify_object_sync (
dest_client, icalcomp_event, CALOBJ_MOD_ALL, cancellable, error);
dest_client, icalcomp_event, E_CAL_OBJ_MOD_ALL, cancellable, error);
icalcomponent_free (icalcomp);
if (!success)
goto exit;
if (!do_copy) {
ECalObjModType mod_type = CALOBJ_MOD_THIS;
ECalObjModType mod_type = E_CAL_OBJ_MOD_THIS;
/* Remove the item from the source calendar. */
if (e_cal_util_component_is_instance (icalcomp_event) ||
e_cal_util_component_has_recurrences (icalcomp_event))
mod_type = CALOBJ_MOD_ALL;
mod_type = E_CAL_OBJ_MOD_ALL;
success = e_cal_client_remove_object_sync (
src_client, uid, NULL, mod_type, cancellable, error);
......@@ -1257,7 +1257,7 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
if (did_add) {
success = e_cal_client_modify_object_sync (
dest_client, subcomp,
CALOBJ_MOD_THIS, cancellable, error);
E_CAL_OBJ_MOD_THIS, cancellable, error);
} else {
/* just in case there are only detached instances and no master object */
did_add = TRUE;
......@@ -1278,12 +1278,12 @@ cal_comp_transfer_item_to_sync (ECalClient *src_client,
goto exit;
if (!do_copy) {
ECalObjModType mod_type = CALOBJ_MOD_THIS;
ECalObjModType mod_type = E_CAL_OBJ_MOD_THIS;
/* Remove the item from the source calendar. */
if (e_cal_util_component_is_instance (icalcomp_event) ||
e_cal_util_component_has_recurrences (icalcomp_event))
mod_type = CALOBJ_MOD_ALL;
mod_type = E_CAL_OBJ_MOD_ALL;
success = e_cal_client_remove_object_sync (src_client, uid, NULL, mod_type, cancellable, error);
if (!success)
......
......@@ -119,7 +119,7 @@ struct _CompEditorPrivate {
gboolean saved;
CalObjModType mod;
ECalObjModType mod;
gboolean existing_org;
gboolean user_org;
......@@ -566,10 +566,10 @@ save_comp (CompEditor *editor)
has_recurrences =
e_cal_component_has_recurrences (priv->comp);
if (has_recurrences && priv->mod == CALOBJ_MOD_ALL)
if (has_recurrences && priv->mod == E_CAL_OBJ_MOD_ALL)
comp_util_sanitize_recurrence_master_sync (priv->comp, priv->cal_client, NULL, NULL);
if (priv->mod == CALOBJ_MOD_THIS) {
if (priv->mod == E_CAL_OBJ_MOD_THIS) {
e_cal_component_set_rdate_list (priv->comp, NULL);
e_cal_component_set_rrule_list (priv->comp, NULL);
e_cal_component_set_exdate_list (priv->comp, NULL);
......@@ -578,7 +578,7 @@ save_comp (CompEditor *editor)
result = e_cal_client_modify_object_sync (
priv->cal_client, icalcomp, priv->mod, NULL, &error);
if (priv->mod == CALOBJ_MOD_THIS) {
if (priv->mod == E_CAL_OBJ_MOD_THIS) {
if (result && ((flags & COMP_EDITOR_DELEGATE) ||
!e_cal_component_has_organizer (clone) ||
itip_organizer_is_user (registry, clone, priv->cal_client) ||
......@@ -644,11 +644,11 @@ save_comp (CompEditor *editor)
e_cal_component_has_recurrences (priv->comp))
e_cal_client_remove_object_sync (
priv->source_client, orig_uid_copy,
NULL, CALOBJ_MOD_ALL, NULL, &error);
NULL, E_CAL_OBJ_MOD_ALL, NULL, &error);
else
e_cal_client_remove_object_sync (
priv->source_client,
orig_uid_copy, NULL, CALOBJ_MOD_THIS, NULL, &error);
orig_uid_copy, NULL, E_CAL_OBJ_MOD_THIS, NULL, &error);
if (error != NULL) {
g_warning (
......@@ -987,7 +987,7 @@ save_and_close_editor (CompEditor *editor,
GTK_WINDOW (editor), delegated))
return;
} else if (e_cal_component_is_instance (priv->comp))
priv->mod = CALOBJ_MOD_THIS;
priv->mod = E_CAL_OBJ_MOD_THIS;
comp = comp_editor_get_current_comp (editor, &correct);
e_cal_component_get_summary (comp, &text);
......@@ -1027,7 +1027,7 @@ save_and_close_editor (CompEditor *editor,
} else
e_cal_client_remove_object_sync (
priv->cal_client, uid, NULL,
CALOBJ_MOD_THIS, NULL, &error);
E_CAL_OBJ_MOD_THIS, NULL, &error);
g_clear_error (&error);
}
......@@ -1086,7 +1086,7 @@ save_and_close_editor (CompEditor *editor,
has_recurrences = e_cal_component_has_recurrences (comp);
if (has_recurrences && priv->mod == CALOBJ_MOD_ALL)
if (has_recurrences && priv->mod == E_CAL_OBJ_MOD_ALL)
comp_util_sanitize_recurrence_master_sync (comp, priv->cal_client, NULL, NULL);
comp_editor_edit_comp (editor, comp);
......@@ -2112,7 +2112,7 @@ comp_editor_init (CompEditor *editor)
priv->pages = NULL;
priv->changed = FALSE;
priv->needs_send = FALSE;
priv->mod = CALOBJ_MOD_ALL;
priv->mod = E_CAL_OBJ_MOD_ALL;
priv->existing_org = FALSE;
priv->user_org = FALSE;
priv->warned = FALSE;
......@@ -3444,7 +3444,7 @@ real_send_comp (CompEditor *editor,
registry = e_shell_get_registry (shell);
if (priv->mod == CALOBJ_MOD_ALL && e_cal_component_is_instance (priv->comp)) {
if (priv->mod == E_CAL_OBJ_MOD_ALL && e_cal_component_is_instance (priv->comp)) {
/* Ensure we send the master object, not the instance only */
icalcomponent *icalcomp = NULL;
const gchar *uid = NULL;
......@@ -3637,11 +3637,11 @@ comp_editor_delete_comp (CompEditor *editor)
e_cal_component_has_recurrences (priv->comp))
e_cal_client_remove_object_sync (
priv->cal_client, uid, NULL,
CALOBJ_MOD_ALL, NULL, NULL);
E_CAL_OBJ_MOD_ALL, NULL, NULL);
else
e_cal_client_remove_object_sync (
priv->cal_client, uid, NULL,
CALOBJ_MOD_THIS, NULL, NULL);
E_CAL_OBJ_MOD_THIS, NULL, NULL);
close_dialog (editor);
}
......
......@@ -1123,7 +1123,12 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
LOCK_PROPS ();
client = e_cal_client_view_get_client (view);
client = e_cal_client_view_ref_client (view);
if (!client) {
UNLOCK_PROPS ();
return;
}
view_data = g_hash_table_lookup (data_model->priv->views, client);
if (view_data) {
view_data_ref (view_data);
......@@ -1132,8 +1137,10 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
UNLOCK_PROPS ();
if (!view_data)
if (!view_data) {
g_clear_object (&client);
return;
}
view_data_lock (view_data);
......@@ -1194,8 +1201,6 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
cal_data_model_thaw_all_subscribers (data_model);
if (to_expand_recurrences) {
ECalClient *client = e_cal_client_view_get_client (view);
view_data_lock (view_data);
view_data->to_expand_recurrences = g_slist_concat (
view_data->to_expand_recurrences, to_expand_recurrences);
......@@ -1209,6 +1214,8 @@ cal_data_model_process_modified_or_added_objects (ECalClientView *view,
view_data_unlock (view_data);
view_data_unref (view_data);
g_clear_object (&client);
}
static void
......@@ -1233,14 +1240,22 @@ cal_data_model_view_objects_removed (ECalClientView *view,
ECalDataModel *data_model)
{
ViewData *view_data;
ECalClient *client;
const GSList *link;
g_return_if_fail (E_IS_CAL_DATA_MODEL (data_model));
LOCK_PROPS ();
view_data = g_hash_table_lookup (data_model->priv->views,
e_cal_client_view_get_client (view));
client = e_cal_client_view_ref_client (view);
if (!client) {
UNLOCK_PROPS ();
return;
}
view_data = g_hash_table_lookup (data_model->priv->views, client);
g_clear_object (&client);
if (view_data) {
view_data_ref (view_data);
......@@ -1345,13 +1360,22 @@ cal_data_model_view_complete (ECalClientView *view,
ECalDataModel *data_model)
{
ViewData *view_data;
ECalClient *client;
g_return_if_fail (E_IS_CAL_DATA_MODEL (data_model));
LOCK_PROPS ();
view_data = g_hash_table_lookup (data_model->priv->views,
e_cal_client_view_get_client (view));
client = e_cal_client_view_ref_client (view);
if (!client) {
UNLOCK_PROPS ();
return;
}
view_data = g_hash_table_lookup (data_model->priv->views, client);
g_clear_object (&client);
if (view_data) {
view_data_ref (view_data);
g_warn_if_fail (view_data->view == view);
......
......@@ -437,7 +437,7 @@ cal_ops_delete_components_thread (EAlertSinkThreadJobData *job_data,
if (!e_cal_client_remove_object_sync (
comp_data->client, icalcomponent_get_uid (comp_data->icalcomp),
rid, CALOBJ_MOD_THIS, cancellable, error)) {
rid, E_CAL_OBJ_MOD_THIS, cancellable, error)) {
ESource *source = e_client_get_source (E_CLIENT (comp_data->client));
e_alert_sink_thread_job_set_alert_arg_0 (job_data, e_source_get_display_name (source));
/* Stop on the first error */
......@@ -1130,7 +1130,7 @@ cal_ops_delete_completed_thread (EAlertSinkThreadJobData *job_data,
uid = icalcomponent_get_uid (icalcomp);
if (!e_cal_client_remove_object_sync (client, uid, NULL, CALOBJ_MOD_THIS, cancellable, error)) {
if (!e_cal_client_remove_object_sync (client, uid, NULL, E_CAL_OBJ_MOD_THIS, cancellable, error)) {
ESource *source = e_client_get_source (E_CLIENT (client));
e_alert_sink_thread_job_set_alert_arg_0 (job_data, e_source_get_display_name (source));
break;
......
......@@ -108,7 +108,7 @@ G_DEFINE_ABSTRACT_TYPE_WITH_CODE (
static void
calendar_view_add_retract_data (ECalComponent *comp,
const gchar *retract_comment,
CalObjModType mod)
ECalObjModType mod)
{
icalcomponent *icalcomp = NULL;
icalproperty *icalprop = NULL;
......@@ -121,7 +121,7 @@ calendar_view_add_retract_data (ECalComponent *comp,
icalproperty_set_x_name (icalprop, "X-EVOLUTION-RETRACT-COMMENT");
icalcomponent_add_property (icalcomp, icalprop);
if (mod == CALOBJ_MOD_ALL)
if (mod == E_CAL_OBJ_MOD_ALL)
icalprop = icalproperty_new_x ("All");
else
icalprop = icalproperty_new_x ("This");
......@@ -189,7 +189,7 @@ calendar_view_delete_event (ECalendarView *cal_view,
if (retract) {
icalcomponent *icalcomp;
calendar_view_add_retract_data (comp, retract_comment, CALOBJ_MOD_ALL);
calendar_view_add_retract_data (comp, retract_comment, E_CAL_OBJ_MOD_ALL);
icalcomp = e_cal_component_get_icalcomponent (comp);
icalcomponent_set_method (icalcomp, ICAL_METHOD_CANCEL);
......
......@@ -96,9 +96,6 @@ AS_COMPILER_FLAGS(WARNING_FLAGS,
-Wredundant-decls -Wundef -Wwrite-strings")
AC_SUBST(WARNING_FLAGS)
dnl Need to stop using e-passwords.h before we can restore
dnl -DEDS_DISABLE_DEPRECATED
dnl Other useful compiler warnings for test builds only.
dnl These may produce warnings we have no control over,
dnl or false positives we don't always want to see.
......@@ -110,6 +107,10 @@ dnl -Wstrict-aliasing=2
AM_CPPFLAGS="$WARNING_FLAGS -fno-strict-aliasing"
if test "x$enable_maintainer_mode" = "xyes" ; then
AM_CPPFLAGS="$AM_CPPFLAGS -DEDS_DISABLE_DEPRECATED"
fi
dnl Warn about API usage that violates our minimum requirements.
AM_CPPFLAGS="$AM_CPPFLAGS -DGLIB_VERSION_MAX_ALLOWED=glib_encoded_version"
AM_CPPFLAGS="$AM_CPPFLAGS -DGDK_VERSION_MAX_ALLOWED=gdk_encoded_version"
......
......@@ -45,6 +45,8 @@
#include <gtk/gtk.h>
#include <glib/gi18n-lib.h>
#include <libsoup/soup.h>
/* XXX Yeah, yeah... */
#define SECRET_API_SUBJECT_TO_CHANGE
......@@ -103,18 +105,18 @@ static GQueue message_queue = G_QUEUE_INIT;
static gint idle_id;
static gint ep_online_state = TRUE;
static EUri *
static SoupURI *
ep_keyring_uri_new (const gchar *string,
GError **error)
{
EUri *uri;
SoupURI *uri;
uri = e_uri_new (string);
uri = soup_uri_new (string);
g_return_val_if_fail (uri != NULL, NULL);
/* LDAP URIs do not have usernames, so use the URI as the username. */
if (uri->user == NULL && uri->protocol != NULL &&
(strcmp (uri->protocol, "ldap") == 0|| strcmp (uri->protocol, "google") == 0))
if (uri->user == NULL && uri->scheme != NULL &&
(strcmp (uri->scheme, "ldap") == 0|| strcmp (uri->scheme, "google") == 0))
uri->user = g_strdelimit (g_strdup (string), "/=", '_');
/* Make sure the URI has the required components. */
......@@ -123,7 +125,7 @@ ep_keyring_uri_new (const gchar *string,
error, G_IO_ERROR,
G_IO_ERROR_INVALID_ARGUMENT,
_("Keyring key is unusable: no user or host name"));
e_uri_free (uri);
soup_uri_free (uri);
uri = NULL;
}
......@@ -212,7 +214,7 @@ static void
ep_remember_password (EPassMsg *msg)
{
gchar *password;
EUri *uri;
SoupURI *uri;
GError *error = NULL;
password = g_hash_table_lookup (password_cache, msg->key);
......@@ -233,7 +235,7 @@ ep_remember_password (EPassMsg *msg)
"application", "Evolution",
"user", uri->user,
"server", uri->host,
"protocol", uri->protocol,
"protocol", uri->scheme,
NULL);
/* Only remove the password from the session hash
......@@ -243,7 +245,7 @@ ep_remember_password (EPassMsg *msg)
else
g_propagate_error (&msg->error, error);
e_uri_free (uri);
soup_uri_free (uri);
exit:
if (!msg->noreply)
......@@ -253,7 +255,7 @@ exit:
static void
ep_forget_password (EPassMsg *msg)
{
EUri *uri;
SoupURI *uri;
GError *error = NULL;
g_hash_table_remove (password_cache, msg->key);
......@@ -280,7 +282,7 @@ ep_forget_password (EPassMsg *msg)
if (error != NULL)
g_propagate_error (&msg->error, error);
e_uri_free (uri);
soup_uri_free (uri);
exit:
if (!msg->noreply)
......@@ -290,7 +292,7 @@ exit:
static void
ep_get_password (EPassMsg *msg)
{
EUri *uri;
SoupURI *uri;
gchar *password;
GError *error = NULL;
......@@ -310,7 +312,7 @@ ep_get_password (EPassMsg *msg)
"application", "Evolution",
"user", uri->user,
"server", uri->host,
"protocol", uri->protocol,
"protocol", uri->scheme,
NULL);
if (msg->password != NULL)
......@@ -335,7 +337,7 @@ done:
if (error != NULL)
g_propagate_error (&msg->error, error);
e_uri_free (uri);
soup_uri_free (uri);
exit:
if (!msg->noreply)
......
......@@ -22,7 +22,7 @@
#error "Only <e-util/e-util.h> should be included directly."
#endif
#ifndef EDS_DISABLE_DEPRECATED
#ifndef EVO_DISABLE_DEPRECATED
#ifndef E_PASSWORDS_H
#define E_PASSWORDS_H
......@@ -68,4 +68,4 @@ G_END_DECLS
#endif /* E_PASSWORDS_H */
#endif /* EDS_DISABLE_DEPRECATED */
#endif /* EVO_DISABLE_DEPRECATED */
/*
* e-html-editor-test.c
* test-html-editor.c
*
* Copyright (C) 2012 Dan Vrátil <dvratil@redhat.com>
*
......@@ -18,6 +18,10 @@
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include <gtk/gtk.h>
#include <e-util/e-util.h>
......
......@@ -116,6 +116,7 @@ cal_base_sahell_content_view_state_changed_cb (ECalDataModel *data_model,
EShellSidebar *shell_sidebar;
ESourceSelector *selector;
ESource *source;
ECalClient *client;
shell_view = e_shell_content_get_shell_view (E_SHELL_CONTENT (cal_base_shell_content));
g_return_if_fail (E_IS_SHELL_VIEW (shell_view));
......@@ -124,7 +125,11 @@ cal_base_sahell_content_view_state_changed_cb (ECalDataModel *data_model,
g_return_if_fail (E_IS_SHELL_SIDEBAR (shell_sidebar));
selector = e_cal_base_shell_sidebar_get_selector (E_CAL_BASE_SHELL_SIDEBAR (shell_sidebar));
source = e_client_get_source (E_CLIENT (e_cal_client_view_get_client (view)));
client = e_cal_client_view_ref_client (view);
g_return_if_fail (client != NULL);
source = e_client_get_source (E_CLIENT (client));
g_clear_object (&client);
if (state == E_CAL_DATA_MODEL_VIEW_STATE_START ||
state == E_CAL_DATA_MODEL_VIEW_STATE_PROGRESS) {
......
......@@ -15,6 +15,10 @@
*
*/
#ifdef HAVE_CONFIG_H
#include <config.h>
#endif
#include "e-composer-autosave.h"
#include <composer/e-msg-composer.h>
......
......@@ -5169,7 +5169,7 @@ update_attendee_status_icalcomp (EMailPartItip *pitip,
e_cal_client_modify_object (
pitip->current_client,
icalcomp, rid ? CALOBJ_MOD_THIS : CALOBJ_MOD_ALL,
icalcomp, rid ? E_CAL_OBJ_MOD_THIS : E_CAL_OBJ_MOD_ALL,
pitip->cancellable,
modify_object_cb,
view);
......
......@@ -468,8 +468,6 @@ main (gint argc,
ical_set_unknown_token_handling_setting (ICAL_DISCARD_TOKEN);
#endif
e_gdbus_templates_init_main_thread ();
#ifdef G_OS_WIN32
if (register_handlers || reinstall || show_icons) {
_e_win32_register_mailer ();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment