aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/exchange-operations/exchange-calendar.c
diff options
context:
space:
mode:
authorPraveen Kumar <kpraveen@novell.com>2005-08-24 17:43:41 +0800
committerPraveen Kumar <kpraveen@src.gnome.org>2005-08-24 17:43:41 +0800
commit748c73de0f477c154d6c120d4d27e676ae887a03 (patch)
tree25a4162d2051e59fe9e96e1e260ef78d05c00107 /plugins/exchange-operations/exchange-calendar.c
parenta45f6f67a7e8569fbe8f2a5a635a35d1836ac1a9 (diff)
downloadgsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar.gz
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar.bz2
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar.lz
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar.xz
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.tar.zst
gsoc2013-evolution-748c73de0f477c154d6c120d4d27e676ae887a03.zip
Removed the warning that are generated when compiled with GCC 4.
2005-08-24 Praveen Kumar <kpraveen@novell.com> * plugins/exchange-operations/exchange-account-setup.c: * plugins/exchange-operations/exchange-calendar.c: * plugins/exchange-operations/exchange-config-listener.c: * plugins/exchange-operations/exchange-contacts.c: * plugins/exchange-operations/exchange-delegates-user.c: * plugins/exchange-operations/exchange-folder-size-display.c: * plugins/exchange-operations/exchange-folder.c: * plugins/exchange-operations/exchange-operations.c: Removed the warning that are generated when compiled with GCC 4. * plugins/exchange-operations/exchange-calendar.c: Fixed a build break due to the modification of the 'source_type' field in the ECalConfigTargetSource class. svn path=/trunk/; revision=30237
Diffstat (limited to 'plugins/exchange-operations/exchange-calendar.c')
-rw-r--r--plugins/exchange-operations/exchange-calendar.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/plugins/exchange-operations/exchange-calendar.c b/plugins/exchange-operations/exchange-calendar.c
index 0ed24770d0..351443d9f8 100644
--- a/plugins/exchange-operations/exchange-calendar.c
+++ b/plugins/exchange-operations/exchange-calendar.c
@@ -47,7 +47,7 @@ enum {
gboolean calendar_src_exists = FALSE;
gchar *calendar_old_source_uri = NULL;
-GPtrArray *e_exchange_calendar_get_calendars (ECalSourceType *ftype);
+GPtrArray *e_exchange_calendar_get_calendars (ECalSourceType ftype);
void e_exchange_calendar_pcalendar_on_change (GtkTreeView *treeview, ESource *source);
GtkWidget *e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data);
gboolean e_exchange_calendar_check (EPlugin *epl, EConfigHookPageCheckData *data);
@@ -55,7 +55,7 @@ void e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target);
/* FIXME: Reconsider the prototype of this function */
GPtrArray *
-e_exchange_calendar_get_calendars (ECalSourceType *ftype)
+e_exchange_calendar_get_calendars (ECalSourceType ftype)
{
ExchangeAccount *account;
GPtrArray *folder_array;
@@ -69,10 +69,10 @@ e_exchange_calendar_get_calendars (ECalSourceType *ftype)
gchar *tstring;
/* FIXME: Compiler warns here; review needed */
- if (GPOINTER_TO_INT (ftype) == E_CAL_SOURCE_TYPE_EVENT) { /* Calendars */
+ if (ftype == E_CAL_SOURCE_TYPE_EVENT) { /* Calendars */
tstring = g_strdup ("calendar");
}
- else if (GPOINTER_TO_INT (ftype) == E_CAL_SOURCE_TYPE_TODO) { /* Tasks */
+ else if (ftype == E_CAL_SOURCE_TYPE_TODO) { /* Tasks */
tstring = g_strdup ("tasks");
}
else {
@@ -194,7 +194,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
account_name = account->account_name;
if (calendar_src_exists) {
- cal_name = e_source_peek_name (source);
+ cal_name = (gchar*) e_source_peek_name (source);
model = exchange_account_folder_size_get_model (account);
if (model)
folder_size = g_strdup_printf ("%s KB", exchange_folder_size_get_val (model, cal_name));
@@ -252,7 +252,7 @@ e_exchange_calendar_pcalendar (EPlugin *epl, EConfigHookItemFactoryData *data)
uri_prefix = g_strconcat (account->account_filename, "/", NULL);
prefix_len = strlen (uri_prefix);
- tmpruri = rel_uri;
+ tmpruri = (gchar*) rel_uri;
if (g_str_has_prefix (tmpruri, uri_prefix)) {
sruri = g_strdup (tmpruri+prefix_len);
@@ -315,10 +315,10 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
g_free (path_prefix);
/* FIXME: Compiler gives a warning here; review needed */
- if (GPOINTER_TO_INT (t->source_type) == E_CAL_SOURCE_TYPE_EVENT) {
+ if (t->source_type == E_CAL_SOURCE_TYPE_EVENT) {
ftype = g_strdup ("calendar");
}
- else if (GPOINTER_TO_INT (t->source_type) == E_CAL_SOURCE_TYPE_TODO) {
+ else if (t->source_type == E_CAL_SOURCE_TYPE_TODO) {
ftype = g_strdup ("tasks");
}
else {
@@ -341,7 +341,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
}
e_source_set_relative_uri (source, ruri);
- path = g_strdup_printf ("/%s", ruri+prefix_len);
+ path = g_build_filename ("/", ruri+prefix_len, NULL);
if (!calendar_src_exists) {
/* Create the new folder */
@@ -349,7 +349,7 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
}
else if (gruri && strcmp (gruri, calendar_old_source_uri)) {
/* Rename the folder */
- oldpath = g_strdup_printf ("/%s", calendar_old_source_uri+prefix_len);
+ oldpath = g_build_filename ("/", calendar_old_source_uri+prefix_len, NULL);
result = exchange_account_xfer_folder (account, oldpath, path, TRUE);
exchange_operations_update_child_esources (source,
calendar_old_source_uri,
@@ -382,6 +382,8 @@ e_exchange_calendar_commit (EPlugin *epl, EConfigTarget *target)
case EXCHANGE_ACCOUNT_FOLDER_GENERIC_ERROR:
e_error_run (NULL, ERROR_DOMAIN ":folder-generic-error", NULL);
break;
+ default:
+ break;
}
g_free (uri_text);