aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 11:10:56 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2007-06-03 11:10:56 +0800
commitaf52113f2f8b934664a233a3a5dd1544dd347638 (patch)
tree43beeca5a8b04f9f90e357b8322f4a1379925254
parent2ba6ef0e2b7d01f3e110bdc69950712b8a3e598b (diff)
downloadgsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar.gz
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar.bz2
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar.lz
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar.xz
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.tar.zst
gsoc2013-evolution-af52113f2f8b934664a233a3a5dd1544dd347638.zip
Fix compiler warnings in addressbook folder. (#440272)
svn path=/trunk/; revision=33630
-rw-r--r--addressbook/ChangeLog32
-rw-r--r--addressbook/conduit/address-conduit.c22
-rw-r--r--addressbook/gui/component/addressbook-config.c6
-rw-r--r--addressbook/gui/component/addressbook-migrate.c16
-rw-r--r--addressbook/gui/component/addressbook-view.c4
-rw-r--r--addressbook/gui/contact-editor/e-contact-editor.c8
-rw-r--r--addressbook/gui/contact-editor/e-contact-quick-add.c2
-rw-r--r--addressbook/gui/contact-list-editor/e-contact-list-editor.c6
-rw-r--r--addressbook/gui/merging/eab-contact-merging.c45
-rw-r--r--addressbook/gui/widgets/e-addressbook-view.c16
-rw-r--r--addressbook/gui/widgets/e-minicard-view.c4
-rw-r--r--addressbook/gui/widgets/e-minicard.c2
-rw-r--r--addressbook/gui/widgets/eab-contact-display.c6
-rw-r--r--addressbook/gui/widgets/gal-view-minicard.c16
-rw-r--r--addressbook/printing/e-contact-print.c56
15 files changed, 140 insertions, 101 deletions
diff --git a/addressbook/ChangeLog b/addressbook/ChangeLog
index f14e70fb70..095571766e 100644
--- a/addressbook/ChangeLog
+++ b/addressbook/ChangeLog
@@ -1,3 +1,35 @@
+2007-06-02 Gilles Dartiguelongue <dartigug@esiee.fr>
+
+ reviewed by: <delete if not using a buddy>
+
+ * conduit/address-conduit.c: (local_record_to_pilot_record):
+ * gui/component/addressbook-config.c: (query_for_supported_bases),
+ (eabc_commit):
+ * gui/component/addressbook-migrate.c: (get_integer_child),
+ (migrate_ldap_servers), (migrate_completion_folders):
+ * gui/component/addressbook-view.c:
+ (selector_tree_drag_data_received):
+ * gui/contact-editor/e-contact-editor.c: (fill_in_simple_field),
+ (extract_simple_field):
+ * gui/contact-editor/e-contact-quick-add.c:
+ * gui/contact-list-editor/e-contact-list-editor.c:
+ (table_drag_data_received_cb), (extract_info), (fill_in_info):
+ * gui/merging/eab-contact-merging.c: (dialog_map),
+ (dropdown_changed), (mergeit), (check_if_same), (response),
+ (match_query_callback):
+ * gui/merging/eab-contact-merging.h:
+ * gui/widgets/e-addressbook-view.c: (table_drag_data_get),
+ (make_suboptions), (eab_view_delete_selection), (selection_get),
+ (selection_received):
+ * gui/widgets/e-minicard-view.c: (e_minicard_view_drag_data_get):
+ * gui/widgets/e-minicard.c: (add_email_field):
+ * gui/widgets/eab-contact-display.c: (eab_selection_get),
+ (on_url_requested), (render_contact):
+ * gui/widgets/gal-view-minicard.c: (gal_view_minicard_load),
+ (gal_view_minicard_save), (column_width_changed):
+ * printing/e-contact-print.c: (e_contact_build_style):
+ fixing casts and other compilation warnings
+
2007-05-30 Srinivasa Ragavan <sragavan@novell.com>
** Fix for bug #333858 from Milan Crha
diff --git a/addressbook/conduit/address-conduit.c b/addressbook/conduit/address-conduit.c
index b2a5e3730c..608e149cb9 100644
--- a/addressbook/conduit/address-conduit.c
+++ b/addressbook/conduit/address-conduit.c
@@ -838,7 +838,7 @@ local_record_to_pilot_record (EAddrLocalRecord *local,
pi_buffer_free(buffer);
#else
- p.record = record;
+ p.record = (unsigned char *)record;
p.length = pack_Address (local->addr, p.record, 0xffff);
#endif
return p;
@@ -894,7 +894,7 @@ local_record_from_ecard (EAddrLocalRecord *local, EContact *contact, EAddrCondui
#ifdef PILOT_LINK_0_12
unpack_Address (&addr, record, address_v1);
#else
- unpack_Address (&addr, record, 0xffff);
+ unpack_Address (&addr, (unsigned char *)record, 0xffff);
#endif
for (i = 0; i < 5; i++) {
if (addr.entry[entryPhone1 + i])
@@ -1244,14 +1244,14 @@ addressbook_authenticate (EBook *book,
ESource *source = (ESource *)data;
- auth = e_source_get_property (source, "auth");
- auth_domain = e_source_get_property (source, "auth-domain");
+ auth = (gchar *)e_source_get_property (source, "auth");
+ auth_domain = (gchar *)e_source_get_property (source, "auth-domain");
component_name = auth_domain ? auth_domain : "Addressbook";
if (auth && !strcmp ("plain/password", auth))
- user = e_source_get_property (source, "user");
+ user = (gchar *)e_source_get_property (source, "user");
else
- user = e_source_get_property (source, "email_addr");
+ user = (gchar *)e_source_get_property (source, "email_addr");
if (!user)
user = "";
@@ -1305,7 +1305,7 @@ pre_sync (GnomePilotConduit *conduit,
} else {
ctxt->ebook = e_book_new_default_addressbook (NULL);
}
- auth = e_source_get_property (ctxt->cfg->source, "auth");
+ auth = (gchar *)e_source_get_property (ctxt->cfg->source, "auth");
if (auth) {
LOG (g_message ("contacts needs authentication\n"));
g_signal_connect (ctxt->ebook, "auth_required",
@@ -1491,7 +1491,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_ecard (*local, cards->data, ctxt);
- g_list_prepend (ctxt->locals, *local);
+ ctxt->locals = g_list_prepend (ctxt->locals, *local);
iterator = cards;
} else {
@@ -1506,7 +1506,7 @@ for_each (GnomePilotConduitSyncAbs *conduit,
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_ecard (*local, iterator->data, ctxt);
- g_list_prepend (ctxt->locals, *local);
+ ctxt->locals = g_list_prepend (ctxt->locals, *local);
} else {
LOG (g_message ( "for_each ending" ));
@@ -1545,7 +1545,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_ecard (*local, ebc->contact, ctxt);
- g_list_prepend (ctxt->locals, *local);
+ ctxt->locals = g_list_prepend (ctxt->locals, *local);
} else {
LOG (g_message ( "no events" ));
@@ -1559,7 +1559,7 @@ for_each_modified (GnomePilotConduitSyncAbs *conduit,
*local = g_new0 (EAddrLocalRecord, 1);
local_record_from_ecard (*local, ebc->contact, ctxt);
- g_list_prepend (ctxt->locals, *local);
+ ctxt->locals = g_list_prepend (ctxt->locals, *local);
} else {
LOG (g_message ( "for_each_modified ending" ));
diff --git a/addressbook/gui/component/addressbook-config.c b/addressbook/gui/component/addressbook-config.c
index 133512d2c4..320a17e386 100644
--- a/addressbook/gui/component/addressbook-config.c
+++ b/addressbook/gui/component/addressbook-config.c
@@ -425,8 +425,8 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog)
supported_bases_table = glade_xml_get_widget (gui, "supported-bases-table");
gtk_widget_show_all (supported_bases_table);
- table = g_object_get_data((GObject *)supported_bases_table, "table");
- model = (GtkListStore *)gtk_tree_view_get_model(table);
+ table = g_object_get_data (G_OBJECT (supported_bases_table), "table");
+ model = GTK_LIST_STORE (gtk_tree_view_get_model(table));
selection = gtk_tree_view_get_selection (table);
g_signal_connect (selection, "changed", G_CALLBACK (search_base_selection_model_changed), dialog);
search_base_selection_model_changed (selection, dialog);
@@ -1018,7 +1018,7 @@ eabc_commit(EConfig *ec, GSList *items, void *data)
d(printf("committing addressbook changes\n"));
/* these api's kinda suck */
- xml = xmlNewNode(NULL, "dummy");
+ xml = xmlNewNode(NULL, (const unsigned char *)"dummy");
e_source_dump_to_xml_node(sdialog->source, xml);
e_source_update_from_xml_node(sdialog->original_source, xml->children, NULL);
xmlFreeNode(xml);
diff --git a/addressbook/gui/component/addressbook-migrate.c b/addressbook/gui/component/addressbook-migrate.c
index 18a58a032a..2c9d621bb8 100644
--- a/addressbook/gui/component/addressbook-migrate.c
+++ b/addressbook/gui/component/addressbook-migrate.c
@@ -592,7 +592,7 @@ get_integer_child (xmlNode *node,
return defval;
xml_string = xmlNodeListGetString (node->doc, p, 1);
- retval = atoi (xml_string);
+ retval = atoi ((char *)xml_string);
xmlFree (xml_string);
return retval;
@@ -617,7 +617,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
return FALSE;
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp (root->name, "addressbooks") != 0) {
+ if (root == NULL || strcmp ((const char *)root->name, "addressbooks") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
@@ -625,7 +625,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
/* count the number of servers, so we can give progress */
num_contactservers = 0;
for (child = root->children; child; child = child->next) {
- if (!strcmp (child->name, "contactserver")) {
+ if (!strcmp ((const char *)child->name, "contactserver")) {
num_contactservers++;
}
}
@@ -635,7 +635,7 @@ migrate_ldap_servers (MigrationContext *context, ESourceGroup *on_ldap_servers)
servernum = 0;
for (child = root->children; child; child = child->next) {
- if (!strcmp (child->name, "contactserver")) {
+ if (!strcmp ((const char *)child->name, "contactserver")) {
char *port, *host, *rootdn, *scope, *authmethod, *ssl;
char *emailaddr, *binddn, *limitstr;
int limit;
@@ -749,14 +749,14 @@ migrate_completion_folders (MigrationContext *context)
dialog_set_folder_name (context, _("Autocompletion Settings"));
root = xmlDocGetRootElement (doc);
- if (root == NULL || strcmp (root->name, "EvolutionFolderList") != 0) {
+ if (root == NULL || strcmp ((const char *)root->name, "EvolutionFolderList") != 0) {
xmlFreeDoc (doc);
return FALSE;
}
for (child = root->children; child; child = child->next) {
- if (!strcmp (child->name, "folder")) {
- char *physical_uri = e_xml_get_string_prop_by_name (child, "physical-uri");
+ if (!strcmp ((const char *)child->name, "folder")) {
+ char *physical_uri = e_xml_get_string_prop_by_name (child, (const unsigned char *)"physical-uri");
ESource *source = NULL;
/* if the physical uri is file://...
@@ -782,7 +782,7 @@ migrate_completion_folders (MigrationContext *context)
source = e_source_list_peek_source_by_uid (context->source_list, uid);
}
else {
- char *name = e_xml_get_string_prop_by_name (child, "display-name");
+ char *name = e_xml_get_string_prop_by_name (child, (const unsigned char *)"display-name");
source = get_source_by_name (context->source_list, name);
diff --git a/addressbook/gui/component/addressbook-view.c b/addressbook/gui/component/addressbook-view.c
index 9a399a066f..ebf20e06d6 100644
--- a/addressbook/gui/component/addressbook-view.c
+++ b/addressbook/gui/component/addressbook-view.c
@@ -1171,7 +1171,7 @@ selector_tree_drag_data_received (GtkWidget *widget,
GtkTreeIter iter;
gboolean success = FALSE;
EBook *source_book, *target_book;
- MergeContext *merge_context;
+ MergeContext *merge_context = NULL;
GList *contactlist;
AddressbookView *view;
EABView *v;
@@ -1197,7 +1197,7 @@ selector_tree_drag_data_received (GtkWidget *widget,
}
e_book_open (target_book, FALSE, NULL);
- eab_book_and_contact_list_from_string (data->data, &source_book, &contactlist);
+ eab_book_and_contact_list_from_string ((char *)data->data, &source_book, &contactlist);
view = (AddressbookView *) user_data;
v = get_current_view (view);
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c
index 64965e9590..9f35370fa9 100644
--- a/addressbook/gui/contact-editor/e-contact-editor.c
+++ b/addressbook/gui/contact-editor/e-contact-editor.c
@@ -2191,7 +2191,7 @@ fill_in_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
EContactPhoto *photo = e_contact_get (contact, field_id);
if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) {
e_image_chooser_set_image_data (E_IMAGE_CHOOSER (widget),
- photo->data.inlined.data,
+ (char *)photo->data.inlined.data,
photo->data.inlined.length);
editor->image_set = TRUE;
}
@@ -2247,9 +2247,9 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id)
else if (E_IS_DATE_EDIT (widget)) {
EContactDate date;
if (e_date_edit_get_date (E_DATE_EDIT (widget),
- &date.year,
- &date.month,
- &date.day))
+ (int *)&date.year,
+ (int *)&date.month,
+ (int *)&date.day))
e_contact_set (contact, field_id, &date);
else
e_contact_set (contact, field_id, NULL);
diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c
index ea3e7b6f35..044153a6c3 100644
--- a/addressbook/gui/contact-editor/e-contact-quick-add.c
+++ b/addressbook/gui/contact-editor/e-contact-quick-add.c
@@ -72,6 +72,7 @@ quick_add_new (void)
return qa;
}
+#if 0
static void
quick_add_ref (QuickAdd *qa)
{
@@ -79,6 +80,7 @@ quick_add_ref (QuickAdd *qa)
++qa->refs;
}
}
+#endif
static void
quick_add_unref (QuickAdd *qa)
diff --git a/addressbook/gui/contact-list-editor/e-contact-list-editor.c b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
index 6fb0791de3..36c88be3c0 100644
--- a/addressbook/gui/contact-list-editor/e-contact-list-editor.c
+++ b/addressbook/gui/contact-list-editor/e-contact-list-editor.c
@@ -1072,7 +1072,7 @@ table_drag_data_received_cb (ETable *table, int row, int col,
if (!strcmp (target_type, VCARD_TYPE)) {
- GList *contact_list = eab_contact_list_from_string (selection_data->data);
+ GList *contact_list = eab_contact_list_from_string ((char *)selection_data->data);
GList *c;
if (contact_list)
@@ -1166,7 +1166,7 @@ extract_info(EContactListEditor *editor)
photo.type = E_CONTACT_PHOTO_TYPE_INLINED;
photo.data.inlined.mime_type = NULL;
- photo.data.inlined.data = image_data;
+ photo.data.inlined.data = (unsigned char *)image_data;
photo.data.inlined.length = image_data_len;
e_contact_set (contact, E_CONTACT_LOGO, &photo);
@@ -1256,7 +1256,7 @@ fill_in_info(EContactListEditor *editor)
photo = e_contact_get (editor->contact, E_CONTACT_LOGO);
if (photo && photo->type == E_CONTACT_PHOTO_TYPE_INLINED) {
- e_image_chooser_set_image_data (E_IMAGE_CHOOSER (editor->list_image), photo->data.inlined.data, photo->data.inlined.length);
+ e_image_chooser_set_image_data (E_IMAGE_CHOOSER (editor->list_image), (char *)photo->data.inlined.data, photo->data.inlined.length);
e_contact_photo_free (photo);
}
}
diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c
index 2296647a11..b4fb8f517b 100644
--- a/addressbook/gui/merging/eab-contact-merging.c
+++ b/addressbook/gui/merging/eab-contact-merging.c
@@ -144,7 +144,7 @@ cancelit (EContactMergingLookup *lookup)
}
}
-gboolean
+static void
dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
{
int h, w;
@@ -157,14 +157,15 @@ dialog_map (GtkWidget *window, GdkEvent *event, GtkWidget *table)
w = 400;
if (h > 450)
h = 450;
- gtk_widget_set_usize (window, w, h);
+
+ gtk_widget_set_size_request (window, w, h);
}
static void
dropdown_changed (GtkWidget *dropdown, dropdown_data *data)
{
char *str;
- str = gtk_combo_box_get_active_text (dropdown);
+ str = gtk_combo_box_get_active_text (GTK_COMBO_BOX (dropdown));
if (g_ascii_strcasecmp(str, ""))
e_contact_set (data->match, data->field, str);
@@ -210,8 +211,8 @@ mergeit (EContactMergingLookup *lookup)
/*we match all the string fields of the already existing contact and the new contact.*/
for(field = E_CONTACT_FULL_NAME; field != (E_CONTACT_LAST_SIMPLE_STRING -1) ; field++) {
dropdown_data *data = NULL;
- string = e_contact_get_const (lookup->contact, field);
- string1 = e_contact_get_const (lookup->match, field);
+ string = (char *)e_contact_get_const (lookup->contact, field);
+ string1 = (char *)e_contact_get_const (lookup->match, field);
/*the field must exist in the new as well as the duplicate contact*/
if (string && *string) {
@@ -220,7 +221,7 @@ mergeit (EContactMergingLookup *lookup)
if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) {
row++;
- str = e_contact_get_const (lookup->contact, field);
+ str = (char *)e_contact_get_const (lookup->contact, field);
switch(num_of_email)
{
case 0:
@@ -260,13 +261,13 @@ mergeit (EContactMergingLookup *lookup)
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
dropdown = gtk_combo_box_new_text();
- gtk_combo_box_append_text (dropdown, string);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
data = g_new0 (dropdown_data, 1);
- gtk_combo_box_append_text (dropdown, "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
- gtk_combo_box_set_active (dropdown, 0);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
data->field = field;
data->match = lookup->match;
e_contact_set (lookup->match, field, string);
@@ -301,15 +302,15 @@ mergeit (EContactMergingLookup *lookup)
gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1);
data = g_new0 (dropdown_data, 1);
dropdown = gtk_combo_box_new_text();
- gtk_combo_box_append_text (dropdown, string);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string);
e_contact_set (lookup->match, field, string);
if (string1 && *string1)
- gtk_combo_box_append_text (dropdown, string1);
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), string1);
else
- gtk_combo_box_append_text (dropdown, "");
+ gtk_combo_box_append_text (GTK_COMBO_BOX (dropdown), "");
- gtk_combo_box_set_active (dropdown, 0);
+ gtk_combo_box_set_active (GTK_COMBO_BOX (dropdown), 0);
data->field = field;
data->match = lookup->match;
@@ -345,7 +346,7 @@ mergeit (EContactMergingLookup *lookup)
value = 0;
break;
}
- gtk_widget_destroy (dialog);
+ gtk_widget_destroy (GTK_WIDGET (dialog));
g_list_free (email_attr_list);
return value;
}
@@ -364,7 +365,7 @@ check_if_same (EContact *contact, EContact *match)
if ((field == E_CONTACT_EMAIL_1 || field == E_CONTACT_EMAIL_2
|| field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email<4)) {
- str = e_contact_get_const (contact, field);
+ str = (char *)e_contact_get_const (contact, field);
switch(num_of_email)
{
case 0:
@@ -384,8 +385,8 @@ check_if_same (EContact *contact, EContact *match)
}
}
else {
- string = e_contact_get_const (contact, field);
- string1 = e_contact_get_const (match, field);
+ string = (char *)e_contact_get_const (contact, field);
+ string1 = (char *)e_contact_get_const (match, field);
if ((string && *string) && (string1 && *string1) && (g_ascii_strcasecmp(string1,string)))
return FALSE;
/*if the field entry exist in either of the contacts,we'll have to give the choice and thus merge button should be sensitive*/
@@ -401,6 +402,7 @@ static void
response (GtkWidget *dialog, int response, EContactMergingLookup *lookup)
{
static int merge_response;
+
switch (response) {
case 0:
doit (lookup);
@@ -417,6 +419,7 @@ response (GtkWidget *dialog, int response, EContactMergingLookup *lookup)
cancelit (lookup);
break;
}
+
gtk_widget_destroy (dialog);
}
@@ -442,10 +445,10 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty
"eab-contact-duplicate-detected.glade",
NULL);
ui = glade_xml_new (gladefile, NULL, NULL);
- merge_button = GTK_BUTTON (glade_xml_get_widget (ui, "button5"));
+ merge_button = glade_xml_get_widget (ui, "button5");
/* Merge Button not sensitive when all values are same */
if (flag)
- gtk_widget_set_sensitive ((GtkWidget *)merge_button, FALSE);
+ gtk_widget_set_sensitive (GTK_WIDGET (merge_button), FALSE);
g_free (gladefile);
} else if (lookup->op == E_CONTACT_MERGING_COMMIT) {
gladefile = g_build_filename (EVOLUTION_GLADEDIR,
@@ -481,7 +484,7 @@ match_query_callback (EContact *contact, EContact *match, EABContactMatchType ty
gboolean
eab_merging_book_add_contact (EBook *book,
- EContact *contact,
+ EContact *contact,
EBookIdCallback cb,
gpointer closure)
{
@@ -504,7 +507,7 @@ eab_merging_book_add_contact (EBook *book,
gboolean
eab_merging_book_commit_contact (EBook *book,
- EContact *contact,
+ EContact *contact,
EBookCallback cb,
gpointer closure)
{
diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c
index 758a3af16f..3174e5f21f 100644
--- a/addressbook/gui/widgets/e-addressbook-view.c
+++ b/addressbook/gui/widgets/e-addressbook-view.c
@@ -1148,7 +1148,7 @@ table_drag_data_get (ETable *table,
gtk_selection_data_set (selection_data,
selection_data->target,
8,
- value, strlen (value));
+ (guchar *)value, strlen (value));
g_free (value);
break;
}
@@ -1160,7 +1160,7 @@ table_drag_data_get (ETable *table,
gtk_selection_data_set (selection_data,
selection_data->target,
8,
- value, strlen (value));
+ (guchar *)value, strlen (value));
g_free (value);
break;
}
@@ -1663,7 +1663,7 @@ make_suboptions (EABView *view)
const char *category = g_list_nth_data (master_list, i);
subitems[i+1].search.id = i+1;
subitems[i+1].search.text = g_strdup (category);
- subitems[i+1].image = e_categories_get_icon_file_for (category);
+ subitems[i+1].image = (char *)e_categories_get_icon_file_for (category);
}
subitems[N+1].search.id = -1;
@@ -1861,11 +1861,11 @@ eab_view_delete_selection(EABView *view, gboolean is_delete)
GList *list, *l;
gboolean plural = FALSE, is_list = FALSE;
EContact *contact;
- ETable *etable;
+ ETable *etable = NULL;
EMinicardView *card_view;
- ESelectionModel *selection_model;
+ ESelectionModel *selection_model = NULL;
char *name = NULL;
- gint row, select;
+ gint row = 0, select;
list = get_selected_contacts (view);
contact = list->data;
@@ -1977,7 +1977,7 @@ selection_get (GtkWidget *invisible,
value = eab_contact_list_to_string (view->clipboard_contacts);
gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING,
- 8, value, strlen (value));
+ 8, (guchar *)value, strlen (value));
g_free (value);
}
@@ -2011,7 +2011,7 @@ selection_received (GtkWidget *invisible,
memcpy (str, selection_data->data, selection_data->length);
contact_list = eab_contact_list_from_string (str);
} else
- contact_list = eab_contact_list_from_string (selection_data->data);
+ contact_list = eab_contact_list_from_string ((char *)selection_data->data);
for (l = contact_list; l; l = l->next) {
EContact *contact = l->data;
diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c
index 8ced89cb03..fc999d3f51 100644
--- a/addressbook/gui/widgets/e-minicard-view.c
+++ b/addressbook/gui/widgets/e-minicard-view.c
@@ -94,7 +94,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
8,
- value, strlen (value));
+ (unsigned char *)value, strlen (value));
g_free (value);
break;
}
@@ -108,7 +108,7 @@ e_minicard_view_drag_data_get(GtkWidget *widget,
gtk_selection_data_set (selection_data,
selection_data->target,
8,
- value, strlen (value));
+ (unsigned char *)value, strlen (value));
g_free (value);
break;
}
diff --git a/addressbook/gui/widgets/e-minicard.c b/addressbook/gui/widgets/e-minicard.c
index f7852ca86d..58897f3932 100644
--- a/addressbook/gui/widgets/e-minicard.c
+++ b/addressbook/gui/widgets/e-minicard.c
@@ -838,7 +838,7 @@ add_email_field (EMinicard *e_minicard, GList *email_list, gdouble left_width, i
GnomeCanvasItem *new_item;
GnomeCanvasGroup *group;
EMinicardField *minicard_field;
- const char *name;
+ char *name;
char *string;
GList *l, *le;
int count =0;
diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c
index f5bc9a0f71..c45ac78e7b 100644
--- a/addressbook/gui/widgets/eab-contact-display.c
+++ b/addressbook/gui/widgets/eab-contact-display.c
@@ -154,7 +154,7 @@ eab_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint t
if (p->selection_uri == NULL)
return;
- gtk_selection_data_set(data, data->target, 8, p->selection_uri, strlen(p->selection_uri));
+ gtk_selection_data_set(data, data->target, 8, (guchar *)p->selection_uri, strlen(p->selection_uri));
}
static void
@@ -233,7 +233,7 @@ on_url_requested (GtkHTML *html, const char *url, GtkHTMLStream *handle,
if (!photo)
photo = e_contact_get (display->priv->contact, E_CONTACT_LOGO);
- gtk_html_stream_write (handle, photo->data.inlined.data, photo->data.inlined.length);
+ gtk_html_stream_write (handle, (char *)photo->data.inlined.data, photo->data.inlined.length);
gtk_html_end (html, handle, GTK_HTML_STREAM_OK);
@@ -512,7 +512,7 @@ render_contact (GtkHTMLStream *html_stream, EContact *contact)
for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) {
#ifdef HANDLE_MAILTO_INTERNALLY
char *html = e_text_to_html (l->data, 0);
- char *attr_str = get_email_location ((EVCardAttribute *) al->data);
+ char *attr_str = (char *)get_email_location ((EVCardAttribute *) al->data);
g_string_append_printf (accum, "%s<a href=\"internal-mailto:%d\">%s</a> <font color=" HEADER_COLOR ">(%s)</font>", nl, email_num, html, attr_str?attr_str:"");
email_num ++;
g_free (html);
diff --git a/addressbook/gui/widgets/gal-view-minicard.c b/addressbook/gui/widgets/gal-view-minicard.c
index 6239ead080..dc32f74fc5 100644
--- a/addressbook/gui/widgets/gal-view-minicard.c
+++ b/addressbook/gui/widgets/gal-view-minicard.c
@@ -31,7 +31,7 @@ gal_view_minicard_load (GalView *view,
doc = e_xml_parse_file (filename);
if (doc) {
xmlNode *root = xmlDocGetRootElement(doc);
- GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, "column_width", 150);
+ GAL_VIEW_MINICARD (view)->column_width = e_xml_get_double_prop_by_name_with_default (root, (const unsigned char *)"column_width", 150);
xmlFreeDoc(doc);
}
}
@@ -43,9 +43,9 @@ gal_view_minicard_save (GalView *view,
xmlDoc *doc;
xmlNode *root;
- doc = xmlNewDoc("1.0");
- root = xmlNewNode (NULL, "EMinicardViewState");
- e_xml_set_double_prop_by_name (root, "column_width", GAL_VIEW_MINICARD (view)->column_width);
+ doc = xmlNewDoc((const unsigned char *)"1.0");
+ root = xmlNewNode (NULL, (const unsigned char *)"EMinicardViewState");
+ e_xml_set_double_prop_by_name (root, (const unsigned char *)"column_width", GAL_VIEW_MINICARD (view)->column_width);
xmlDocSetRootElement(doc, root);
e_xml_save_file (filename, doc);
xmlFreeDoc(doc);
@@ -198,10 +198,12 @@ column_width_changed (EMinicardViewWidget *w, double width, EABView *address_vie
gal_view_changed(GAL_VIEW(view));
}
- scrolled_window = GTK_SCROLLED_WINDOW(address_view->widget);
+ scrolled_window = GTK_SCROLLED_WINDOW (address_view->widget);
adj = gtk_scrolled_window_get_hadjustment (scrolled_window);
- adj_new = gtk_adjustment_new(adj->value, adj->lower, adj->upper, adj->page_size, adj->page_increment,adj->page_size);
- gtk_scrolled_window_set_hadjustment(scrolled_window, adj_new);
+ adj_new = GTK_ADJUSTMENT (gtk_adjustment_new (adj->value, adj->lower, adj->upper,
+ adj->page_size, adj->page_increment,
+ adj->page_size));
+ gtk_scrolled_window_set_hadjustment (scrolled_window, adj_new);
}
void
diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c
index 002e284366..58292b41b8 100644
--- a/addressbook/printing/e-contact-print.c
+++ b/addressbook/printing/e-contact-print.c
@@ -436,70 +436,70 @@ e_contact_build_style (EContactPrintStyle *style)
xmlNodePtr stylenode = xmlDocGetRootElement(styledoc);
xmlNodePtr node;
for (node = stylenode->children; node; node = node->next) {
- char *data = xmlNodeGetContent ( node );
- if ( !strcmp( node->name, "title" ) ) {
+ char *data = (char *)xmlNodeGetContent ( node );
+ if ( !strcmp( (char *)node->name, "title" ) ) {
get_string(data, &(style->title));
- } else if ( !strcmp( node->name, "type" ) ) {
+ } else if ( !strcmp( (char *)node->name, "type" ) ) {
if (g_ascii_strcasecmp (data, "cards") == 0)
style->type = E_CONTACT_PRINT_TYPE_CARDS;
else if (g_ascii_strcasecmp (data, "memo_style") == 0)
style->type = E_CONTACT_PRINT_TYPE_MEMO_STYLE;
else if (g_ascii_strcasecmp (data, "phone_list") == 0)
style->type = E_CONTACT_PRINT_TYPE_PHONE_LIST;
- } else if ( !strcmp( node->name, "sections_start_new_page" ) ) {
+ } else if ( !strcmp( (char *)node->name, "sections_start_new_page" ) ) {
style->sections_start_new_page = get_bool(data);
- } else if ( !strcmp( node->name, "num_columns" ) ) {
+ } else if ( !strcmp( (char *)node->name, "num_columns" ) ) {
style->num_columns = get_integer(data);
- } else if ( !strcmp( node->name, "blank_forms" ) ) {
+ } else if ( !strcmp( (char *)node->name, "blank_forms" ) ) {
style->blank_forms = get_integer(data);
- } else if ( !strcmp( node->name, "letter_headings" ) ) {
+ } else if ( !strcmp( (char *)node->name, "letter_headings" ) ) {
style->letter_headings = get_bool(data);
- } else if ( !strcmp( node->name, "headings_font" ) ) {
+ } else if ( !strcmp( (char *)node->name, "headings_font" ) ) {
get_font( data, &(style->headings_font) );
- } else if ( !strcmp( node->name, "body_font" ) ) {
+ } else if ( !strcmp( (char *)node->name, "body_font" ) ) {
get_font( data, &(style->body_font) );
- } else if ( !strcmp( node->name, "print_using_grey" ) ) {
+ } else if ( !strcmp( (char *)node->name, "print_using_grey" ) ) {
style->print_using_grey = get_bool(data);
- } else if ( !strcmp( node->name, "paper_width" ) ) {
+ } else if ( !strcmp( (char *)node->name, "paper_width" ) ) {
style->paper_width = get_float(data);
- } else if ( !strcmp( node->name, "paper_height" ) ) {
+ } else if ( !strcmp( (char *)node->name, "paper_height" ) ) {
style->paper_height = get_float(data);
- } else if ( !strcmp( node->name, "top_margin" ) ) {
+ } else if ( !strcmp( (char *)node->name, "top_margin" ) ) {
style->top_margin = get_float(data);
- } else if ( !strcmp( node->name, "left_margin" ) ) {
+ } else if ( !strcmp( (char *)node->name, "left_margin" ) ) {
style->left_margin = get_float(data);
- } else if ( !strcmp( node->name, "bottom_margin" ) ) {
+ } else if ( !strcmp( (char *)node->name, "bottom_margin" ) ) {
style->bottom_margin = get_float(data);
- } else if ( !strcmp( node->name, "right_margin" ) ) {
+ } else if ( !strcmp( (char *)node->name, "right_margin" ) ) {
style->right_margin = get_float(data);
- } else if ( !strcmp( node->name, "page_width" ) ) {
+ } else if ( !strcmp( (char *)node->name, "page_width" ) ) {
style->page_width = get_float(data);
- } else if ( !strcmp( node->name, "page_height" ) ) {
+ } else if ( !strcmp( (char *)node->name, "page_height" ) ) {
style->page_height = get_float(data);
- } else if ( !strcmp( node->name, "orientation" ) ) {
+ } else if ( !strcmp( (char *)node->name, "orientation" ) ) {
if ( data ) {
style->orientation_portrait =
(g_ascii_strcasecmp (data, "landscape") != 0);
} else {
style->orientation_portrait = TRUE;
}
- } else if ( !strcmp( node->name, "header_font" ) ) {
+ } else if ( !strcmp( (char *)node->name, "header_font" ) ) {
get_font( data, &(style->header_font) );
- } else if ( !strcmp( node->name, "left_header" ) ) {
+ } else if ( !strcmp( (char *)node->name, "left_header" ) ) {
get_string(data, &(style->left_header));
- } else if ( !strcmp( node->name, "center_header" ) ) {
+ } else if ( !strcmp( (char *)node->name, "center_header" ) ) {
get_string(data, &(style->center_header));
- } else if ( !strcmp( node->name, "right_header" ) ) {
+ } else if ( !strcmp( (char *)node->name, "right_header" ) ) {
get_string(data, &(style->right_header));
- } else if ( !strcmp( node->name, "footer_font" ) ) {
+ } else if ( !strcmp( (char *)node->name, "footer_font" ) ) {
get_font( data, &(style->footer_font) );
- } else if ( !strcmp( node->name, "left_footer" ) ) {
+ } else if ( !strcmp( (char *)node->name, "left_footer" ) ) {
get_string(data, &(style->left_footer));
- } else if ( !strcmp( node->name, "center_footer" ) ) {
+ } else if ( !strcmp( (char *)node->name, "center_footer" ) ) {
get_string(data, &(style->center_footer));
- } else if ( !strcmp( node->name, "right_footer" ) ) {
+ } else if ( !strcmp( (char *)node->name, "right_footer" ) ) {
get_string(data, &(style->right_footer));
- } else if ( !strcmp( node->name, "reverse_on_even_pages" ) ) {
+ } else if ( !strcmp( (char *)node->name, "reverse_on_even_pages" ) ) {
style->reverse_on_even_pages = get_bool(data);
}
if ( data )