aboutsummaryrefslogtreecommitdiffstats
path: root/plugins/pst-import
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-08-16 23:25:08 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-08-16 23:42:26 +0800
commit672adf12a0923437e90d08ab7925bd9329fcce0d (patch)
tree53c076d56359c111085dad615295ecf0f5be7342 /plugins/pst-import
parentc4716bf2e904a4bcf573ee30841378c1f53092ee (diff)
downloadgsoc2013-evolution-672adf12a0923437e90d08ab7925bd9329fcce0d.tar.gz
gsoc2013-evolution-672adf12a0923437e90d08ab7925bd9329fcce0d.tar.zst
gsoc2013-evolution-672adf12a0923437e90d08ab7925bd9329fcce0d.zip
Fix compiler warnings and deprecated GTK+ API usage.
Diffstat (limited to 'plugins/pst-import')
-rw-r--r--plugins/pst-import/pst-importer.c20
1 files changed, 11 insertions, 9 deletions
diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c
index 5dd164a47f..976eaa408d 100644
--- a/plugins/pst-import/pst-importer.c
+++ b/plugins/pst-import/pst-importer.c
@@ -255,10 +255,11 @@ get_suggested_foldername (EImportTargetURI *target)
}
if (mail_tool_uri_to_folder (foldername->str, 0, NULL) != NULL) {
+ CamelFolder *folder;
+
/* Folder exists - add a number */
gint i, len;
len = foldername->len;
- CamelFolder *folder;
for (i=1; i<10000; i++) {
g_string_truncate (foldername, len);
@@ -350,7 +351,7 @@ pst_import_describe (PstImporter *m, gint complete)
}
static ECal*
-open_ecal (ECalSourceType type, gchar *name)
+open_ecal (ECalSourceType type, const gchar *name)
{
/* Hack - grab the first calendar we can find
TODO - add a selection mechanism in get_widget */
@@ -730,7 +731,7 @@ static CamelMimePart *
attachment_to_part (PstImporter *m, pst_item_attach *attach)
{
CamelMimePart *part;
- gchar *mimetype;
+ const gchar *mimetype;
part = camel_mime_part_new ();
@@ -831,7 +832,7 @@ pst_process_email (PstImporter *m, pst_item *item)
if (item->email->sentto_address.str != NULL) {
addr = camel_internet_address_new ();
- if (camel_address_decode (CAMEL_ADDRESS (addr), item->email->sentto_address.str) > 0);
+ if (camel_address_decode (CAMEL_ADDRESS (addr), item->email->sentto_address.str) > 0)
camel_mime_message_set_recipients (msg, "To", addr);
camel_object_unref (addr);
@@ -840,7 +841,7 @@ pst_process_email (PstImporter *m, pst_item *item)
if (item->email->cc_address.str != NULL) {
addr = camel_internet_address_new ();
- if (camel_address_decode (CAMEL_ADDRESS (addr), item->email->cc_address.str) > 0);
+ if (camel_address_decode (CAMEL_ADDRESS (addr), item->email->cc_address.str) > 0)
camel_mime_message_set_recipients (msg, "CC", addr);
camel_object_unref (addr);
@@ -941,7 +942,7 @@ contact_set_string (EContact *contact, EContactField id, gchar *string)
}
static void
-unknown_field (EContact *contact, GString *notes, gchar *name, gchar *string)
+unknown_field (EContact *contact, GString *notes, const gchar *name, gchar *string)
{
/* Field could not be mapped directly so add to notes field */
if (string != NULL) {
@@ -1010,9 +1011,9 @@ pst_process_contact (PstImporter *m, pst_item *item)
{
pst_item_contact *c;
EContact *ec;
- c = item->contact;
GString *notes;
+ c = item->contact;
notes = g_string_sized_new (2048);
ec = e_contact_new ();
@@ -1274,12 +1275,13 @@ fill_calcomponent (PstImporter *m, pst_item *item, ECalComponent *ec, const gcha
pst_item_appointment *a;
pst_item_email *e;
- a = item->appointment;
- e = item->email;
ECalComponentText text;
struct icaltimetype tt_start, tt_end;
ECalComponentDateTime dt_start, dt_end;
+ a = item->appointment;
+ e = item->email;
+
if (item->create_date) {
struct icaltimetype tt;
tt = get_ical_date (item->create_date, FALSE);