diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:24:42 +0800 |
---|---|---|
committer | Rodrigo Moya <rodrigo@gnome-db.org> | 2011-06-30 00:42:11 +0800 |
commit | 54da4fc09cf226fdb59b9f0c70555e2e57dc1f91 (patch) | |
tree | c62c9ac6d08670dffc400ff00117508512ce4f8b | |
parent | fe20f70779fb486169a0735499d24e001ffa0cab (diff) | |
download | gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.gz gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.tar.zst gsoc2013-evolution-54da4fc09cf226fdb59b9f0c70555e2e57dc1f91.zip |
Coding style cleanups.
209 files changed, 1538 insertions, 1538 deletions
diff --git a/addressbook/gui/contact-editor/e-contact-editor.c b/addressbook/gui/contact-editor/e-contact-editor.c index 1e3e0b5bcc..4b259e098b 100644 --- a/addressbook/gui/contact-editor/e-contact-editor.c +++ b/addressbook/gui/contact-editor/e-contact-editor.c @@ -2393,7 +2393,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), - (gchar *)photo->data.inlined.data, + (gchar *) photo->data.inlined.data, photo->data.inlined.length); editor->image_set = TRUE; } @@ -2494,7 +2494,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) GdkPixbuf *pixbuf, *new; GdkPixbufLoader *loader = gdk_pixbuf_loader_new (); - photo.data.inlined.data = (guchar *)img_buff; + photo.data.inlined.data = (guchar *) img_buff; img_buff = NULL; gdk_pixbuf_loader_write (loader, photo.data.inlined.data, photo.data.inlined.length, NULL); gdk_pixbuf_loader_close (loader, NULL); @@ -2532,7 +2532,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) gdk_pixbuf_save_to_buffer (new, &img_buff, &photo.data.inlined.length, format_name, NULL, NULL); - photo.data.inlined.data = (guchar *)img_buff; + photo.data.inlined.data = (guchar *) img_buff; img_buff = NULL; g_free (format_name); g_object_unref (new); @@ -2563,7 +2563,7 @@ extract_simple_field (EContactEditor *editor, GtkWidget *widget, gint field_id) else if (GTK_IS_TOGGLE_BUTTON (widget)) { gboolean val = gtk_toggle_button_get_active (GTK_TOGGLE_BUTTON (widget)); - e_contact_set (contact, field_id, val?(gpointer)1:NULL); + e_contact_set (contact, field_id, val?(gpointer) 1:NULL); } else { g_warning (G_STRLOC ": Unhandled widget class in mappings!"); @@ -2927,7 +2927,7 @@ categories_response (GtkDialog *dialog, gint response, EContactEditor *editor) if (entry && GTK_IS_ENTRY (entry)) gtk_entry_set_text (GTK_ENTRY (entry), categories); else - e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (gchar *)categories); + e_contact_set (editor->contact, E_CONTACT_CATEGORIES, (gchar *) categories); } gtk_widget_destroy (GTK_WIDGET (dialog)); editor->categories_dialog = NULL; @@ -3087,7 +3087,7 @@ image_clicked (GtkWidget *button, EContactEditor *editor) no_image, GTK_RESPONSE_NO, NULL); preview = GTK_IMAGE (gtk_image_new ()); - gtk_file_chooser_set_preview_widget ((GtkFileChooser *)editor->file_selector, GTK_WIDGET (preview)); + gtk_file_chooser_set_preview_widget ((GtkFileChooser *) editor->file_selector, GTK_WIDGET (preview)); g_signal_connect ( editor->file_selector, "update-preview", G_CALLBACK (update_preview_cb), preview); @@ -3798,7 +3798,7 @@ e_contact_editor_new (EShell *shell, if (book) e_book_get_supported_fields_async ( - book, (EBookEListAsyncCallback)supported_fields_cb, editor); + book, (EBookEListAsyncCallback) supported_fields_cb, editor); return editor; } diff --git a/addressbook/gui/contact-editor/e-contact-quick-add.c b/addressbook/gui/contact-editor/e-contact-quick-add.c index 5de52f30a7..76a7e5f0cb 100644 --- a/addressbook/gui/contact-editor/e-contact-quick-add.c +++ b/addressbook/gui/contact-editor/e-contact-quick-add.c @@ -441,7 +441,7 @@ build_quick_add_dialog (QuickAdd *qa) gtk_table_set_col_spacings (table, 12); label = gtk_label_new_with_mnemonic (_("_Full name")); - gtk_label_set_mnemonic_widget ((GtkLabel*)label, qa->name_entry); + gtk_label_set_mnemonic_widget ((GtkLabel*) label, qa->name_entry); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (table, label, @@ -452,7 +452,7 @@ build_quick_add_dialog (QuickAdd *qa) GTK_EXPAND | GTK_FILL, 0, xpad, ypad); label = gtk_label_new_with_mnemonic (_("E_mail")); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, qa->email_entry); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, qa->email_entry); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (table, label, @@ -463,7 +463,7 @@ build_quick_add_dialog (QuickAdd *qa) GTK_EXPAND | GTK_FILL, 0, xpad, ypad); label = gtk_label_new_with_mnemonic (_("_Select Address Book")); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, qa->combo_box); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, qa->combo_box); gtk_misc_set_alignment (GTK_MISC (label), 0.0, 0.5); gtk_table_attach (table, label, @@ -673,7 +673,7 @@ e_contact_quick_add_vcard (const gchar *vcard, if (emails) { quick_add_set_email (qa, emails->data); - g_list_foreach (emails, (GFunc)g_free, NULL); + g_list_foreach (emails, (GFunc) g_free, NULL); g_list_free (emails); } } else { diff --git a/addressbook/gui/merging/eab-contact-compare.c b/addressbook/gui/merging/eab-contact-compare.c index 398a94832b..82dcf6e8ce 100644 --- a/addressbook/gui/merging/eab-contact-compare.c +++ b/addressbook/gui/merging/eab-contact-compare.c @@ -458,10 +458,10 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2) contact2_email = e_contact_get (contact2, E_CONTACT_EMAIL); if (contact1_email == NULL || contact2_email == NULL) { - g_list_foreach (contact1_email, (GFunc)g_free, NULL); + g_list_foreach (contact1_email, (GFunc) g_free, NULL); g_list_free (contact1_email); - g_list_foreach (contact2_email, (GFunc)g_free, NULL); + g_list_foreach (contact2_email, (GFunc) g_free, NULL); g_list_free (contact2_email); return EAB_CONTACT_MATCH_NOT_APPLICABLE; } @@ -486,10 +486,10 @@ eab_contact_compare_email (EContact *contact1, EContact *contact2) i1 = i1->next; } - g_list_foreach (contact1_email, (GFunc)g_free, NULL); + g_list_foreach (contact1_email, (GFunc) g_free, NULL); g_list_free (contact1_email); - g_list_foreach (contact2_email, (GFunc)g_free, NULL); + g_list_foreach (contact2_email, (GFunc) g_free, NULL); g_list_free (contact2_email); return match; @@ -616,7 +616,7 @@ query_cb (EBook *book, const GError *error, GList *contacts, gpointer closure) for (i = remaining_contacts; i != NULL; i = g_list_next (i)) { EContact *this_contact = E_CONTACT (i->data); EABContactMatchType this_match = eab_contact_compare (info->contact, this_contact); - if ((gint)this_match > (gint)best_match) { + if ((gint) this_match > (gint) best_match) { best_match = this_match; best_contact = this_contact; } @@ -688,7 +688,7 @@ use_common_book (EBook *book, } } } - g_list_foreach (contact_email, (GFunc)g_free, NULL); + g_list_foreach (contact_email, (GFunc) g_free, NULL); g_list_free (contact_email); } diff --git a/addressbook/gui/merging/eab-contact-merging.c b/addressbook/gui/merging/eab-contact-merging.c index 1aababe57a..25a4a47634 100644 --- a/addressbook/gui/merging/eab-contact-merging.c +++ b/addressbook/gui/merging/eab-contact-merging.c @@ -247,8 +247,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 = (gchar *)e_contact_get_const (lookup->contact, field); - string1 = (gchar *)e_contact_get_const (lookup->match, field); + string = (gchar *) e_contact_get_const (lookup->contact, field); + string1 = (gchar *) e_contact_get_const (lookup->match, field); /*the field must exist in the new as well as the duplicate contact*/ if (string && *string) { @@ -258,7 +258,7 @@ mergeit (EContactMergingLookup *lookup) || field == E_CONTACT_EMAIL_3 || field == E_CONTACT_EMAIL_4) && (num_of_email < 4)) { EContactField use_field = field; row++; - str = (gchar *)e_contact_get_const (lookup->contact, use_field); + str = (gchar *) e_contact_get_const (lookup->contact, use_field); switch (num_of_email) { case 0: @@ -294,8 +294,8 @@ mergeit (EContactMergingLookup *lookup) } label = gtk_label_new (_("Email")); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1); dropdown = gtk_combo_box_text_new (); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), string); @@ -311,22 +311,22 @@ mergeit (EContactMergingLookup *lookup) g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1); - gtk_widget_show ((GtkWidget *)dropdown); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) dropdown, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget *) hbox, 1, 2, row, row + 1); + gtk_widget_show ((GtkWidget *) dropdown); continue; } if (((field == E_CONTACT_FULL_NAME) && (!g_ascii_strcasecmp (string, string1)))) { row++; label = gtk_label_new (e_contact_pretty_name (field)); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1); label = gtk_label_new (string); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget*)hbox, 1, 2, row, row + 1); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget*) hbox, 1, 2, row, row + 1); continue; } @@ -335,8 +335,8 @@ mergeit (EContactMergingLookup *lookup) row++; label = gtk_label_new (e_contact_pretty_name (field)); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)label, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 0, 1, row, row + 1); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) label, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget *) hbox, 0, 1, row, row + 1); data = g_new0 (dropdown_data, 1); dropdown = gtk_combo_box_text_new (); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (dropdown), string); @@ -352,13 +352,13 @@ mergeit (EContactMergingLookup *lookup) data->match = lookup->match; if (field == E_CONTACT_NICKNAME || field == E_CONTACT_GIVEN_NAME) - gtk_widget_set_sensitive ((GtkWidget *)dropdown, FALSE); + gtk_widget_set_sensitive ((GtkWidget *) dropdown, FALSE); g_signal_connect (dropdown, "changed", G_CALLBACK(dropdown_changed), data); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*)dropdown, FALSE, FALSE, 0); - gtk_table_attach_defaults (table, (GtkWidget *)hbox, 1, 2, row, row + 1); - gtk_widget_show_all ((GtkWidget *)dropdown); + gtk_box_pack_start (GTK_BOX (hbox), (GtkWidget*) dropdown, FALSE, FALSE, 0); + gtk_table_attach_defaults (table, (GtkWidget *) hbox, 1, 2, row, row + 1); + gtk_widget_show_all ((GtkWidget *) dropdown); } } } @@ -368,7 +368,7 @@ mergeit (EContactMergingLookup *lookup) gtk_box_pack_start (GTK_BOX (content_area), GTK_WIDGET (scrolled_window), TRUE, TRUE, 0); gtk_widget_show (scrolled_window); g_signal_connect (dialog, "map-event", G_CALLBACK (dialog_map), table); - gtk_widget_show_all ((GtkWidget *)table); + gtk_widget_show_all ((GtkWidget *) table); result = gtk_dialog_run (dialog); switch (result) @@ -403,7 +403,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 = (gchar *)e_contact_get_const (contact, field); + str = (gchar *) e_contact_get_const (contact, field); switch (num_of_email) { case 0: @@ -423,8 +423,8 @@ check_if_same (EContact *contact, EContact *match) } } else { - string = (gchar *)e_contact_get_const (contact, field); - string1 = (gchar *)e_contact_get_const (match, field); + string = (gchar *) e_contact_get_const (contact, field); + string1 = (gchar *) 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*/ diff --git a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c index cb1adcfe25..017b14ac19 100644 --- a/addressbook/gui/widgets/e-addressbook-reflow-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-reflow-adapter.c @@ -139,7 +139,7 @@ addressbook_height (EReflowModel *erm, gint i, GnomeCanvasGroup *parent) EContactField field; gint count = 0; gchar *string; - EContact *contact = (EContact*)e_addressbook_model_contact_at (priv->model, i); + EContact *contact = (EContact*) e_addressbook_model_contact_at (priv->model, i); PangoLayout *layout; gint height; @@ -227,8 +227,8 @@ addressbook_compare (EReflowModel *erm, gint n1, gint n2, GHashTable *cmp_cache) return n1-n2; } else { - contact1 = (EContact*)e_addressbook_model_contact_at (priv->model, n1); - contact2 = (EContact*)e_addressbook_model_contact_at (priv->model, n2); + contact1 = (EContact*) e_addressbook_model_contact_at (priv->model, n1); + contact2 = (EContact*) e_addressbook_model_contact_at (priv->model, n2); if (contact1 && contact2) { const gchar *file_as1, *file_as2; diff --git a/addressbook/gui/widgets/e-addressbook-table-adapter.c b/addressbook/gui/widgets/e-addressbook-table-adapter.c index 84224178b5..83f90a0573 100644 --- a/addressbook/gui/widgets/e-addressbook-table-adapter.c +++ b/addressbook/gui/widgets/e-addressbook-table-adapter.c @@ -262,7 +262,7 @@ addressbook_initialize_value (ETableModel *etc, gint col) static gboolean addressbook_value_is_empty (ETableModel *etc, gint col, gconstpointer value) { - return !(value && *(gchar *)value); + return !(value && *(gchar *) value); } static gchar * diff --git a/addressbook/gui/widgets/e-addressbook-view.c b/addressbook/gui/widgets/e-addressbook-view.c index 2ef59d17c0..8deca495be 100644 --- a/addressbook/gui/widgets/e-addressbook-view.c +++ b/addressbook/gui/widgets/e-addressbook-view.c @@ -258,7 +258,7 @@ table_drag_data_get (ETable *table, gtk_selection_data_set ( selection_data, target, 8, - (guchar *)value, strlen (value)); + (guchar *) value, strlen (value)); g_free (value); break; @@ -269,7 +269,7 @@ table_drag_data_get (ETable *table, gtk_selection_data_set ( selection_data, target, 8, - (guchar *)value, strlen (value)); + (guchar *) value, strlen (value)); g_free (value); break; diff --git a/addressbook/gui/widgets/e-minicard-view.c b/addressbook/gui/widgets/e-minicard-view.c index f6ac130a2f..9be446d818 100644 --- a/addressbook/gui/widgets/e-minicard-view.c +++ b/addressbook/gui/widgets/e-minicard-view.c @@ -121,7 +121,7 @@ e_minicard_view_drag_data_get (GtkWidget *widget, static void clear_drag_data (EMinicardView *view) { - g_list_foreach (view->drag_list, (GFunc)g_object_unref, NULL); + g_list_foreach (view->drag_list, (GFunc) g_object_unref, NULL); g_list_free (view->drag_list); view->drag_list = NULL; } @@ -386,7 +386,7 @@ e_minicard_view_event (GnomeCanvasItem *item, GdkEvent *event) switch (event->type) { case GDK_2BUTTON_PRESS: - if (((GdkEventButton *)event)->button == 1) { + if (((GdkEventButton *) event)->button == 1) { gboolean editable; g_object_get(view->adapter, "editable", &editable, NULL); diff --git a/addressbook/gui/widgets/eab-config.c b/addressbook/gui/widgets/eab-config.c index 218ad80685..dbbb8cefc2 100644 --- a/addressbook/gui/widgets/eab-config.c +++ b/addressbook/gui/widgets/eab-config.c @@ -47,7 +47,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t) if (ec->target == t) { switch (t->type) { case EAB_CONFIG_TARGET_SOURCE: { - EABConfigTargetSource *s = (EABConfigTargetSource *)t; + EABConfigTargetSource *s = (EABConfigTargetSource *) t; if (p->source_changed_id) { g_signal_handler_disconnect (s->source, p->source_changed_id); @@ -59,7 +59,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t) switch (t->type) { case EAB_CONFIG_TARGET_SOURCE: { - EABConfigTargetSource *s = (EABConfigTargetSource *)t; + EABConfigTargetSource *s = (EABConfigTargetSource *) t; if (s->source) g_object_unref (s->source); @@ -80,12 +80,12 @@ ecp_set_target (EConfig *ec, EConfigTarget *t) { struct _EABConfigPrivate *p = EAB_CONFIG (ec)->priv; - ((EConfigClass *)ecp_parent_class)->set_target (ec, t); + ((EConfigClass *) ecp_parent_class)->set_target (ec, t); if (t) { switch (t->type) { case EAB_CONFIG_TARGET_SOURCE: { - EABConfigTargetSource *s = (EABConfigTargetSource *)t; + EABConfigTargetSource *s = (EABConfigTargetSource *) t; p->source_changed_id = g_signal_connect ( s->source, "changed", @@ -98,8 +98,8 @@ ecp_set_target (EConfig *ec, EConfigTarget *t) static void ecp_class_init (GObjectClass *klass) { - ((EConfigClass *)klass)->set_target = ecp_set_target; - ((EConfigClass *)klass)->target_free = ecp_target_free; + ((EConfigClass *) klass)->set_target = ecp_set_target; + ((EConfigClass *) klass)->target_free = ecp_target_free; g_type_class_add_private (klass, sizeof (struct _EABConfigPrivate)); } diff --git a/addressbook/gui/widgets/eab-contact-display.c b/addressbook/gui/widgets/eab-contact-display.c index e457486f4c..c970afe968 100644 --- a/addressbook/gui/widgets/eab-contact-display.c +++ b/addressbook/gui/widgets/eab-contact-display.c @@ -460,7 +460,7 @@ render_contact_block (GString *buffer, EContact *contact) for (l = email_list, al=email_attr_list; l && al; l = l->next, al = al->next) { gchar *name = NULL, *mail = NULL; - gchar *attr_str = (gchar *)get_email_location ((EVCardAttribute *) al->data); + gchar *attr_str = (gchar *) get_email_location ((EVCardAttribute *) al->data); if (!eab_parse_qp_email (l->data, &name, &mail)) mail = e_text_to_html (l->data, 0); @@ -479,7 +479,7 @@ render_contact_block (GString *buffer, EContact *contact) g_free (name); g_free (mail); } - g_list_foreach (email_list, (GFunc)g_free, NULL); + g_list_foreach (email_list, (GFunc) g_free, NULL); g_list_free (email_list); if (accum->len) { @@ -771,8 +771,8 @@ eab_contact_display_render_compact (EABContactDisplay *display, max_dimension = calced_height; if (max_dimension > MAX_COMPACT_IMAGE_DIMENSION) { - calced_width *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); - calced_height *= ((gfloat)MAX_COMPACT_IMAGE_DIMENSION / max_dimension); + calced_width *= ((gfloat) MAX_COMPACT_IMAGE_DIMENSION / max_dimension); + calced_height *= ((gfloat) MAX_COMPACT_IMAGE_DIMENSION / max_dimension); } } diff --git a/addressbook/importers/evolution-csv-importer.c b/addressbook/importers/evolution-csv-importer.c index 122a0e40f0..6d3fd002b3 100644 --- a/addressbook/importers/evolution-csv-importer.c +++ b/addressbook/importers/evolution-csv-importer.c @@ -787,7 +787,7 @@ csv_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -924,7 +924,7 @@ csv_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) GtkWidget *preview; GList *contacts = NULL; EContact *contact; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; FILE *file; CSVImporter *gci; diff --git a/addressbook/importers/evolution-ldif-importer.c b/addressbook/importers/evolution-ldif-importer.c index 388d410611..4d5ddcc629 100644 --- a/addressbook/importers/evolution-ldif-importer.c +++ b/addressbook/importers/evolution-ldif-importer.c @@ -255,7 +255,7 @@ parseLine (GHashTable *dn_contact_hash, EContact *contact, return FALSE; } - colon = (gchar *)strchr ( ptr, ':' ); + colon = (gchar *) strchr ( ptr, ':' ); if (colon) { gint i; @@ -588,7 +588,7 @@ ldif_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -648,7 +648,7 @@ ldif_import (EImport *ei, EImportTarget *target, EImportImporter *im) LDIFImporter *gci; ESource *source; FILE *file = NULL; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; filename = g_filename_from_uri (s->uri_src, NULL, NULL); @@ -697,7 +697,7 @@ ldif_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) GtkWidget *preview; GList *contacts = NULL; EContact *contact; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; GHashTable *dn_contact_hash; FILE *file; diff --git a/addressbook/importers/evolution-vcard-importer.c b/addressbook/importers/evolution-vcard-importer.c index c9cc489f2b..38a4a57574 100644 --- a/addressbook/importers/evolution-vcard-importer.c +++ b/addressbook/importers/evolution-vcard-importer.c @@ -132,7 +132,7 @@ vcard_import_contact (VCardImporter *gci, EContact *contact) if (v && v->data) { if (!strncmp ((gchar *)v->data, "<?xml", 5)) { - EDestination *dest = e_destination_import ((gchar *)v->data); + EDestination *dest = e_destination_import ((gchar *) v->data); e_destination_export_to_vcard_attribute (dest, a); @@ -357,8 +357,8 @@ guess_vcard_encoding (const gchar *filename) } fclose (handle); - if (has_bom ((gunichar2*)line)) { - gunichar2 *utf16 = (gunichar2*)line; + if (has_bom ((gunichar2*) line)) { + gunichar2 *utf16 = (gunichar2*) line; /* Check for a BOM to try to detect UTF-16 encoded vcards * (MacOSX address book creates such vcards for example) */ @@ -442,7 +442,7 @@ vcard_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -517,7 +517,7 @@ vcard_import (EImport *ei, EImportTarget *target, EImportImporter *im) { VCardImporter *gci; ESource *source; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; gchar *contents; VCardEncoding encoding; @@ -575,7 +575,7 @@ vcard_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) GList *contacts; gchar *contents; VCardEncoding encoding; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; filename = g_filename_from_uri (s->uri_src, NULL, NULL); diff --git a/addressbook/printing/e-contact-print.c b/addressbook/printing/e-contact-print.c index d45c8c1f92..63508804d7 100644 --- a/addressbook/printing/e-contact-print.c +++ b/addressbook/printing/e-contact-print.c @@ -507,7 +507,7 @@ e_contact_build_style (EContactPrintStyle *style) xmlNodePtr stylenode = xmlDocGetRootElement (styledoc); xmlNodePtr node; for (node = stylenode->children; node; node = node->next) { - gchar *data = (gchar *)xmlNodeGetContent ( node ); + gchar *data = (gchar *) xmlNodeGetContent ( node ); if (!strcmp( (gchar *)node->name, "title" )) { get_string (data, &(style->title)); } else if (!strcmp( (gchar *)node->name, "type" )) { diff --git a/addressbook/tools/evolution-addressbook-export-list-cards.c b/addressbook/tools/evolution-addressbook-export-list-cards.c index ea3eb7a40e..544f2cda9d 100644 --- a/addressbook/tools/evolution-addressbook-export-list-cards.c +++ b/addressbook/tools/evolution-addressbook-export-list-cards.c @@ -783,7 +783,7 @@ action_list_cards_init (ActionContext * p_actctx) action_list_cards (contacts, p_actctx); - g_list_foreach (contacts, (GFunc)g_object_unref, NULL); + g_list_foreach (contacts, (GFunc) g_object_unref, NULL); g_list_free (contacts); return SUCCESS; diff --git a/addressbook/tools/evolution-addressbook-export-list-folders.c b/addressbook/tools/evolution-addressbook-export-list-folders.c index ec98354140..555d49df3d 100644 --- a/addressbook/tools/evolution-addressbook-export-list-folders.c +++ b/addressbook/tools/evolution-addressbook-export-list-folders.c @@ -86,7 +86,7 @@ action_list_folders_init (ActionContext * p_actctx) printf ("\"%s\",\"%s\",%d\n", uri, name, g_list_length (contacts)); g_free (uri); - g_list_foreach (contacts, (GFunc)g_object_unref, NULL); + g_list_foreach (contacts, (GFunc) g_object_unref, NULL); g_list_free (contacts); g_object_unref (book); diff --git a/addressbook/util/eab-book-util.c b/addressbook/util/eab-book-util.c index ffe310d1c6..81f4860976 100644 --- a/addressbook/util/eab-book-util.c +++ b/addressbook/util/eab-book-util.c @@ -193,7 +193,7 @@ eab_contact_list_from_string (const gchar *str) GList *contacts = NULL; GString *gstr = g_string_new (NULL); gchar *str_stripped; - gchar *p = (gchar *)str; + gchar *p = (gchar *) str; gchar *q; if (!p) diff --git a/calendar/gui/alarm-notify/alarm-queue.c b/calendar/gui/alarm-notify/alarm-queue.c index f3421ef31a..fd79d1f80c 100644 --- a/calendar/gui/alarm-notify/alarm-queue.c +++ b/calendar/gui/alarm-notify/alarm-queue.c @@ -1486,7 +1486,7 @@ display_notification (time_t trigger, CompQueuedAlarms *cqa, e_cal_component_get_description_list (comp, &text_list); if (text_list) { - text = *((ECalComponentText *)text_list->data); + text = *((ECalComponentText *) text_list->data); if (text.value) description = text.value; else @@ -2103,14 +2103,14 @@ remove_cqa (ClientAlarms *ca, ECalComponentId *id, CompQueuedAlarms *cqa) static gboolean remove_comp_by_id (gpointer key, gpointer value, gpointer userdata) { - ClientAlarms *ca = (ClientAlarms *)userdata; + ClientAlarms *ca = (ClientAlarms *) userdata; debug (("...")); /* if (!g_hash_table_size (ca->uid_alarms_hash)) */ /* return; */ - remove_cqa (ca, (ECalComponentId *)key, (CompQueuedAlarms *) value); + remove_cqa (ca, (ECalComponentId *) key, (CompQueuedAlarms *) value); return TRUE; } @@ -2121,7 +2121,7 @@ remove_client_alarms (ClientAlarms *ca) { debug (("size %d", g_hash_table_size (ca->uid_alarms_hash))); - g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc)remove_comp_by_id, ca); + g_hash_table_foreach_remove (ca->uid_alarms_hash, (GHRFunc) remove_comp_by_id, ca); /* The hash table should be empty now */ g_return_if_fail (g_hash_table_size (ca->uid_alarms_hash) == 0); diff --git a/calendar/gui/calendar-config.c b/calendar/gui/calendar-config.c index b5f57cebc3..29fdb4b2cb 100644 --- a/calendar/gui/calendar-config.c +++ b/calendar/gui/calendar-config.c @@ -317,7 +317,7 @@ void calendar_config_free_day_second_zones (GSList *zones) { if (zones) { - g_slist_foreach (zones, (GFunc)g_free, NULL); + g_slist_foreach (zones, (GFunc) g_free, NULL); g_slist_free (zones); } } diff --git a/calendar/gui/dialogs/alarm-dialog.c b/calendar/gui/dialogs/alarm-dialog.c index 6d4219c2b4..6b234f6cce 100644 --- a/calendar/gui/dialogs/alarm-dialog.c +++ b/calendar/gui/dialogs/alarm-dialog.c @@ -820,7 +820,7 @@ get_widgets (Dialog *dialog) N_("Send an email") }; - GtkComboBox *combo = (GtkComboBox*)dialog->action_combo; + GtkComboBox *combo = (GtkComboBox*) dialog->action_combo; GtkCellRenderer *cell; GtkListStore *store; gint i; diff --git a/calendar/gui/dialogs/alarm-list-dialog.c b/calendar/gui/dialogs/alarm-list-dialog.c index 0dbf9f81d0..4476bc4c62 100644 --- a/calendar/gui/dialogs/alarm-list-dialog.c +++ b/calendar/gui/dialogs/alarm-list-dialog.c @@ -162,7 +162,7 @@ edit_clicked_cb (GtkButton *button, gpointer data) return; } - alarm = (ECalComponentAlarm *)e_alarm_list_get_alarm (dialog->list_store, &iter); + alarm = (ECalComponentAlarm *) e_alarm_list_get_alarm (dialog->list_store, &iter); path = gtk_tree_model_get_path (GTK_TREE_MODEL (dialog->list_store), &iter); if (alarm_dialog_run (dialog->toplevel, dialog->ecal, alarm)) { @@ -308,7 +308,7 @@ alarm_list_dialog_peek (ECal *ecal, EAlarmList *list_store) { Dialog *dialog; - dialog = (Dialog *)g_new (Dialog, 1); + dialog = (Dialog *) g_new (Dialog, 1); dialog->ecal = ecal; dialog->list_store = list_store; diff --git a/calendar/gui/dialogs/calendar-setup.c b/calendar/gui/dialogs/calendar-setup.c index c03e53fd2f..5981076ee6 100644 --- a/calendar/gui/dialogs/calendar-setup.c +++ b/calendar/gui/dialogs/calendar-setup.c @@ -423,12 +423,12 @@ cs_load_sources (CalendarSourceDialog *sdialog, const gchar *conf_key, ESourceGr gconf = gconf_client_get_default (); sdialog->source_list = e_source_list_new_for_gconf (gconf, conf_key); sdialog->menu_source_groups = g_slist_copy (e_source_list_peek_groups (sdialog->source_list)); - sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data; + sdialog->source_group = (ESourceGroup *) sdialog->menu_source_groups->data; g_object_unref (gconf); if (group) - sdialog->source_group = (ESourceGroup *)group; + sdialog->source_group = (ESourceGroup *) group; } /** @@ -484,7 +484,7 @@ calendar_setup_edit_calendar (GtkWindow *parent, ESource *source, ESourceGroup * /* forces initial validation */ if (!sdialog->original_source) - e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *) ec, E_CONFIG_TARGET_CHANGED_STATE); return; } @@ -540,7 +540,7 @@ calendar_setup_edit_task_list (GtkWindow *parent, ESource *source) /* forces initial validation */ if (!sdialog->original_source) - e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *) ec, E_CONFIG_TARGET_CHANGED_STATE); return; } @@ -596,7 +596,7 @@ calendar_setup_edit_memo_list (GtkWindow *parent, ESource *source) /* forces initial validation */ if (!sdialog->original_source) - e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *) ec, E_CONFIG_TARGET_CHANGED_STATE); return; } diff --git a/calendar/gui/dialogs/comp-editor.c b/calendar/gui/dialogs/comp-editor.c index 1d4c74e43c..983b42cdee 100644 --- a/calendar/gui/dialogs/comp-editor.c +++ b/calendar/gui/dialogs/comp-editor.c @@ -841,12 +841,12 @@ action_save_cb (GtkAction *action, ECalComponentVType vtype = e_cal_component_get_vtype (editor->priv->comp); if (vtype == E_CAL_COMPONENT_EVENT) - response = em_utils_prompt_user ((GtkWindow *)widget, + response = em_utils_prompt_user ((GtkWindow *) widget, NULL, "calendar:ask-send-event-pending-download", NULL); else - response = em_utils_prompt_user ((GtkWindow *)widget, + response = em_utils_prompt_user ((GtkWindow *) widget, NULL, "calendar:ask-send-task-pending-download", NULL); @@ -2959,7 +2959,7 @@ fill_widgets (CompEditor *editor) g_signal_handlers_unblock_by_func ( store, G_CALLBACK (attachment_store_changed_cb), editor); - g_slist_foreach (attachment_list, (GFunc)g_free, NULL); + g_slist_foreach (attachment_list, (GFunc) g_free, NULL); g_slist_free (attachment_list); } @@ -3369,7 +3369,7 @@ comp_editor_get_mime_attach_list (CompEditor *editor) camel_mime_part_set_content_id (mime_part, NULL); - cal_mime_attach->encoded_data = (gchar *)buffer; + cal_mime_attach->encoded_data = (gchar *) buffer; cal_mime_attach->length = byte_array->len; cal_mime_attach->filename = g_strdup (camel_mime_part_get_filename (mime_part)); diff --git a/calendar/gui/dialogs/delete-comp.c b/calendar/gui/dialogs/delete-comp.c index 850728449e..f5ac9c9ce4 100644 --- a/calendar/gui/dialogs/delete-comp.c +++ b/calendar/gui/dialogs/delete-comp.c @@ -216,19 +216,19 @@ prompt_retract_dialog (ECalComponent *comp, gchar **retract_text, GtkWidget *par gtk_frame_set_label_widget ((GtkFrame *) frame, label); gtk_frame_set_label_align ((GtkFrame *) frame, 0, 0); gtk_container_add (GTK_CONTAINER (vbox), frame); - gtk_frame_set_shadow_type ((GtkFrame *)frame, GTK_SHADOW_NONE); + gtk_frame_set_shadow_type ((GtkFrame *) frame, GTK_SHADOW_NONE); sw = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ((GtkScrolledWindow *)sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_policy ((GtkScrolledWindow *) sw, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); entry = gtk_text_view_new (); - gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)sw, entry); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, entry); + gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) sw, entry); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, entry); gtk_container_add (GTK_CONTAINER (frame), sw); g_signal_connect ((GtkToggleButton *)cb, "toggled", G_CALLBACK (cb_toggled_cb), entry); - gtk_widget_show_all ((GtkWidget *)dialog); + gtk_widget_show_all ((GtkWidget *) dialog); ret_val = (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_OK); diff --git a/calendar/gui/dialogs/event-page.c b/calendar/gui/dialogs/event-page.c index d2fc4ae091..0953e3a9cf 100644 --- a/calendar/gui/dialogs/event-page.c +++ b/calendar/gui/dialogs/event-page.c @@ -495,7 +495,7 @@ is_custom_alarm_store (EAlarmList *alarm_list_store, return FALSE; alarm = e_alarm_list_get_alarm (alarm_list_store, &iter); - if (is_custom_alarm ((ECalComponentAlarm *)alarm, old_summary, user_units, user_interval, alarm_type)) + if (is_custom_alarm ((ECalComponentAlarm *) alarm, old_summary, user_units, user_interval, alarm_type)) return TRUE; valid_iter = gtk_tree_model_iter_next (model, &iter); @@ -646,7 +646,7 @@ sensitize_widgets (EventPage *epage) if (alarm && !priv->alarm_icon) { priv->alarm_icon = create_alarm_image_button ("stock_bell", _("This event has alarms"), epage); - gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6); } /* The list of organizers is set to be non-editable. Otherwise any @@ -2867,7 +2867,7 @@ alarm_changed_cb (GtkWidget *widget, } if (!priv->alarm_icon) { priv->alarm_icon = create_alarm_image_button ("stock_bell", _("This event has alarms"), epage); - gtk_box_pack_start ((GtkBox *)priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) priv->status_icons, priv->alarm_icon, FALSE, FALSE, 6); } } else { e_alarm_list_clear (priv->alarm_list_store); @@ -3401,7 +3401,7 @@ event_page_get_alarm_page (EventPage *epage) tmp = GW("dialog-vbox1"); alarm_page = GW("vbox2"); g_object_ref (alarm_page); - gtk_container_remove ((GtkContainer *)tmp, alarm_page); + gtk_container_remove ((GtkContainer *) tmp, alarm_page); return alarm_page; } @@ -3419,7 +3419,7 @@ event_page_get_attendee_page (EventPage *epage) apage = priv->list_box; g_object_ref (apage); - gtk_container_remove ((GtkContainer *)gtk_widget_get_parent (apage), apage); + gtk_container_remove ((GtkContainer *) gtk_widget_get_parent (apage), apage); gtk_widget_hide (priv->attendee_box); return apage; diff --git a/calendar/gui/dialogs/memo-page.c b/calendar/gui/dialogs/memo-page.c index e708cefc0c..e055072959 100644 --- a/calendar/gui/dialogs/memo-page.c +++ b/calendar/gui/dialogs/memo-page.c @@ -1188,7 +1188,7 @@ memo_page_construct (MemoPage *mpage) priv->name_selector = e_name_selector_new (); priv->to_entry = get_to_entry (priv->name_selector); - gtk_container_add ((GtkContainer *)priv->to_hbox, priv->to_entry); + gtk_container_add ((GtkContainer *) priv->to_hbox, priv->to_entry); gtk_widget_show (priv->to_hbox); gtk_widget_show (priv->to_entry); gtk_widget_show (priv->to_button); diff --git a/calendar/gui/dialogs/recurrence-page.c b/calendar/gui/dialogs/recurrence-page.c index e602157660..8d2701fab2 100644 --- a/calendar/gui/dialogs/recurrence-page.c +++ b/calendar/gui/dialogs/recurrence-page.c @@ -1412,7 +1412,7 @@ make_ending_count_special (RecurrencePage *rpage) adj = GTK_ADJUSTMENT (gtk_adjustment_new (1, 1, 10000, 1, 10, 0)); priv->ending_count_spin = gtk_spin_button_new (adj, 1, 0); - gtk_spin_button_set_numeric ((GtkSpinButton *)priv->ending_count_spin, TRUE); + gtk_spin_button_set_numeric ((GtkSpinButton *) priv->ending_count_spin, TRUE); gtk_box_pack_start (GTK_BOX (hbox), priv->ending_count_spin, FALSE, FALSE, 6); diff --git a/calendar/gui/dialogs/send-comp.c b/calendar/gui/dialogs/send-comp.c index eab2c2c818..070fb6b735 100644 --- a/calendar/gui/dialogs/send-comp.c +++ b/calendar/gui/dialogs/send-comp.c @@ -86,7 +86,7 @@ have_nonprocedural_alarm (ECalComponent *comp) ECalComponentAlarm *alarm; ECalComponentAlarmAction action = E_CAL_COMPONENT_ALARM_UNKNOWN; - alarm = e_cal_component_get_alarm (comp, (const gchar *)l->data); + alarm = e_cal_component_get_alarm (comp, (const gchar *) l->data); if (alarm) { e_cal_component_alarm_get_action (alarm, &action); e_cal_component_alarm_free (alarm); diff --git a/calendar/gui/e-cal-config.c b/calendar/gui/e-cal-config.c index 980701e9be..e1204f39b7 100644 --- a/calendar/gui/e-cal-config.c +++ b/calendar/gui/e-cal-config.c @@ -48,7 +48,7 @@ ecp_target_free (EConfig *ec, EConfigTarget *t) if (ec->target == t) { switch (t->type) { case EC_CONFIG_TARGET_SOURCE: { - ECalConfigTargetSource *s = (ECalConfigTargetSource *)t; + ECalConfigTargetSource *s = (ECalConfigTargetSource *) t; if (p->source_changed_id) { g_signal_handler_disconnect (s->source, p->source_changed_id); @@ -62,12 +62,12 @@ ecp_target_free (EConfig *ec, EConfigTarget *t) switch (t->type) { case EC_CONFIG_TARGET_SOURCE: { - ECalConfigTargetSource *s = (ECalConfigTargetSource *)t; + ECalConfigTargetSource *s = (ECalConfigTargetSource *) t; if (s->source) g_object_unref (s->source); break; } case EC_CONFIG_TARGET_PREFS: { - ECalConfigTargetPrefs *s = (ECalConfigTargetPrefs *)t; + ECalConfigTargetPrefs *s = (ECalConfigTargetPrefs *) t; if (s->gconf) g_object_unref (s->gconf); break; } @@ -87,12 +87,12 @@ ecp_set_target (EConfig *ec, EConfigTarget *t) { struct _ECalConfigPrivate *p = E_CAL_CONFIG (ec)->priv; - ((EConfigClass *)ecp_parent_class)->set_target (ec, t); + ((EConfigClass *) ecp_parent_class)->set_target (ec, t); if (t) { switch (t->type) { case EC_CONFIG_TARGET_SOURCE: { - ECalConfigTargetSource *s = (ECalConfigTargetSource *)t; + ECalConfigTargetSource *s = (ECalConfigTargetSource *) t; p->source_changed_id = g_signal_connect (s->source, "changed", G_CALLBACK (ecp_source_changed), ec); break; } @@ -106,8 +106,8 @@ ecp_set_target (EConfig *ec, EConfigTarget *t) static void ecp_class_init (GObjectClass *klass) { - ((EConfigClass *)klass)->set_target = ecp_set_target; - ((EConfigClass *)klass)->target_free = ecp_target_free; + ((EConfigClass *) klass)->set_target = ecp_set_target; + ((EConfigClass *) klass)->target_free = ecp_target_free; g_type_class_add_private (klass, sizeof (struct _ECalConfigPrivate)); } diff --git a/calendar/gui/e-cal-event.c b/calendar/gui/e-cal-event.c index 7d0a9d196d..813b0b799f 100644 --- a/calendar/gui/e-cal-event.c +++ b/calendar/gui/e-cal-event.c @@ -52,14 +52,14 @@ ece_target_free (EEvent *ev, EEventTarget *t) break; } } - ((EEventClass *)ece_parent)->target_free (ev, t); + ((EEventClass *) ece_parent)->target_free (ev, t); } static void ece_class_init (GObjectClass *klass) { klass->finalize = ece_finalize; - ((EEventClass *)klass)->target_free = ece_target_free; + ((EEventClass *) klass)->target_free = ece_target_free; } GType diff --git a/calendar/gui/e-cal-model-calendar.c b/calendar/gui/e-cal-model-calendar.c index 723f5e753b..4ac73089bb 100644 --- a/calendar/gui/e-cal-model-calendar.c +++ b/calendar/gui/e-cal-model-calendar.c @@ -325,7 +325,7 @@ ecmc_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer value) switch (col) { case E_CAL_MODEL_CALENDAR_FIELD_DTEND : - set_dtend ((ECalModel *)model, comp_data, value); + set_dtend ((ECalModel *) model, comp_data, value); break; case E_CAL_MODEL_CALENDAR_FIELD_LOCATION : set_location (comp_data, value); diff --git a/calendar/gui/e-cal-model.c b/calendar/gui/e-cal-model.c index 34408b0151..c5ae9f7ce8 100644 --- a/calendar/gui/e-cal-model.c +++ b/calendar/gui/e-cal-model.c @@ -2816,7 +2816,7 @@ cleanup_content_cb (gpointer user_data) e_table_model_rows_deleted (E_TABLE_MODEL (model), 0, len); - g_slist_foreach (slist, (GFunc)g_object_unref, NULL); + g_slist_foreach (slist, (GFunc) g_object_unref, NULL); g_slist_free (slist); e_flag_set (data->eflag); diff --git a/calendar/gui/e-calendar-view.c b/calendar/gui/e-calendar-view.c index d2548f28b7..d9b7e91ce4 100644 --- a/calendar/gui/e-calendar-view.c +++ b/calendar/gui/e-calendar-view.c @@ -1897,22 +1897,22 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data) tmp = g_markup_printf_escaped ("<b>%s</b>", str); label = gtk_label_new (NULL); - gtk_label_set_line_wrap ((GtkLabel *)label, TRUE); - gtk_label_set_markup ((GtkLabel *)label, tmp); + gtk_label_set_line_wrap ((GtkLabel *) label, TRUE); + gtk_label_set_markup ((GtkLabel *) label, tmp); if (free_text) { - g_free ((gchar *)str); + g_free ((gchar *) str); str = NULL; } hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 0); ebox = gtk_event_box_new (); - gtk_container_add ((GtkContainer *)ebox, hbox); + gtk_container_add ((GtkContainer *) ebox, hbox); gtk_widget_modify_bg (ebox, GTK_STATE_NORMAL, &(style->bg[GTK_STATE_SELECTED])); gtk_widget_modify_fg (label, GTK_STATE_NORMAL, &(style->text[GTK_STATE_SELECTED])); - gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, ebox, FALSE, FALSE, 0); g_free (tmp); e_cal_component_get_organizer (newcomp, &organiser); @@ -1931,10 +1931,10 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data) label = gtk_label_new (tmp); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 0); ebox = gtk_event_box_new (); - gtk_container_add ((GtkContainer *)ebox, hbox); - gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) ebox, hbox); + gtk_box_pack_start ((GtkBox *) box, ebox, FALSE, FALSE, 0); g_free (tmp); } @@ -1945,12 +1945,12 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data) /* To Translators: It will display "Location: PlaceOfTheMeeting" */ tmp = g_markup_printf_escaped (_("Location: %s"), str); label = gtk_label_new (NULL); - gtk_label_set_markup ((GtkLabel *)label, tmp); + gtk_label_set_markup ((GtkLabel *) label, tmp); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 0); ebox = gtk_event_box_new (); - gtk_container_add ((GtkContainer *)ebox, hbox); - gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) ebox, hbox); + gtk_box_pack_start ((GtkBox *) box, ebox, FALSE, FALSE, 0); g_free (tmp); } e_cal_component_get_dtstart (newcomp, &dtstart); @@ -1991,10 +1991,10 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data) e_cal_component_free_datetime (&dtend); hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)hbox, gtk_label_new_with_mnemonic (tmp), FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new_with_mnemonic (tmp), FALSE, FALSE, 0); ebox = gtk_event_box_new (); - gtk_container_add ((GtkContainer *)ebox, hbox); - gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) ebox, hbox); + gtk_box_pack_start ((GtkBox *) box, ebox, FALSE, FALSE, 0); g_free (tmp); g_free (tmp2); @@ -2003,22 +2003,22 @@ e_calendar_view_get_tooltips (const ECalendarViewEventData *data) tmp = e_calendar_view_get_attendees_status_info (newcomp, pevent->comp_data->client); if (tmp) { hbox = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)hbox, gtk_label_new (tmp), FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, gtk_label_new (tmp), FALSE, FALSE, 0); ebox = gtk_event_box_new (); - gtk_container_add ((GtkContainer *)ebox, hbox); - gtk_box_pack_start ((GtkBox *)box, ebox, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) ebox, hbox); + gtk_box_pack_start ((GtkBox *) box, ebox, FALSE, FALSE, 0); g_free (tmp); } pevent->tooltip = gtk_window_new (GTK_WINDOW_POPUP); frame = gtk_frame_new (NULL); - gtk_frame_set_shadow_type ((GtkFrame *)frame, GTK_SHADOW_IN); + gtk_frame_set_shadow_type ((GtkFrame *) frame, GTK_SHADOW_IN); gtk_window_set_type_hint (GTK_WINDOW (pevent->tooltip), GDK_WINDOW_TYPE_HINT_TOOLTIP); - gtk_window_move ((GtkWindow *)pevent->tooltip, pevent->x +16, pevent->y+16); - gtk_container_add ((GtkContainer *)frame, box); - gtk_container_add ((GtkContainer *)pevent->tooltip, frame); + gtk_window_move ((GtkWindow *) pevent->tooltip, pevent->x +16, pevent->y+16); + gtk_container_add ((GtkContainer *) frame, box); + gtk_container_add ((GtkContainer *) pevent->tooltip, frame); gtk_widget_show_all (pevent->tooltip); diff --git a/calendar/gui/e-date-time-list.c b/calendar/gui/e-date-time-list.c index bb089f1dd9..37353381bd 100644 --- a/calendar/gui/e-date-time-list.c +++ b/calendar/gui/e-date-time-list.c @@ -529,7 +529,7 @@ e_date_time_list_append (EDateTimeList *date_time_list, GtkTreeIter *iter, if (g_list_find_custom ( date_time_list->list, datetime, - (GCompareFunc)compare_datetime) == NULL) { + (GCompareFunc) compare_datetime) == NULL) { date_time_list->list = g_list_append ( date_time_list->list, copy_datetime (datetime)); row_added (date_time_list, g_list_length (date_time_list->list) - 1); diff --git a/calendar/gui/e-day-view-main-item.c b/calendar/gui/e-day-view-main-item.c index 5e247a2932..5f8ef0d61b 100644 --- a/calendar/gui/e-day-view-main-item.c +++ b/calendar/gui/e-day-view-main-item.c @@ -702,7 +702,7 @@ day_view_main_item_draw_day_event (EDayViewMainItem *main_item, } /* free memory */ - g_slist_foreach (categories_pixbufs, (GFunc)g_object_unref, NULL); + g_slist_foreach (categories_pixbufs, (GFunc) g_object_unref, NULL); g_slist_free (categories_pixbufs); } diff --git a/calendar/gui/e-day-view.c b/calendar/gui/e-day-view.c index b0a2683ce2..b5bd081839 100644 --- a/calendar/gui/e-day-view.c +++ b/calendar/gui/e-day-view.c @@ -2170,7 +2170,7 @@ e_day_view_update_long_event_label (EDayView *day_view, NULL); if (free_text) - g_free ((gchar *)summary); + g_free ((gchar *) summary); if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) @@ -3381,7 +3381,7 @@ e_day_view_on_long_event_click (EDayView *day_view, /* Ignore clicks on the EText while editing. */ if (pos == E_CALENDAR_VIEW_POS_EVENT && E_TEXT (event->canvas_item)->editing) { - GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)bevent); + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) bevent); return; } @@ -3467,7 +3467,7 @@ e_day_view_on_event_click (EDayView *day_view, /* Ignore clicks on the EText while editing. */ if (pos == E_CALENDAR_VIEW_POS_EVENT && E_TEXT (event->canvas_item)->editing) { - GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)bevent); + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) bevent); return; } @@ -3553,7 +3553,7 @@ e_day_view_on_event_double_click (EDayView *day_view, if (!is_comp_data_valid (event)) return; - e_calendar_view_edit_appointment ((ECalendarView *)day_view, event->comp_data->client, event->comp_data->icalcomp, EDIT_EVENT_AUTODETECT); + e_calendar_view_edit_appointment ((ECalendarView *) day_view, event->comp_data->client, event->comp_data->icalcomp, EDIT_EVENT_AUTODETECT); } static void @@ -3820,7 +3820,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget, e_target_list_add_calendar_targets (target_list, 0); gtk_drag_begin (widget, target_list, GDK_ACTION_COPY | GDK_ACTION_MOVE, - 1, (GdkEvent*)mevent); + 1, (GdkEvent*) mevent); gtk_target_list_unref (target_list); } } else { @@ -3849,7 +3849,7 @@ e_day_view_on_top_canvas_motion (GtkWidget *widget, } if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) { - GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)mevent); + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) mevent); } } @@ -3932,7 +3932,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget, e_target_list_add_calendar_targets (target_list, 0); gtk_drag_begin (widget, target_list, GDK_ACTION_COPY | GDK_ACTION_MOVE, - 1, (GdkEvent*)mevent); + 1, (GdkEvent*) mevent); gtk_target_list_unref (target_list); } } else { @@ -3966,7 +3966,7 @@ e_day_view_on_main_canvas_motion (GtkWidget *widget, } if (event && E_IS_TEXT (event->canvas_item) && E_TEXT (event->canvas_item)->editing) { - GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*)mevent); + GNOME_CANVAS_ITEM_GET_CLASS (event->canvas_item)->event (event->canvas_item, (GdkEvent*) mevent); } } @@ -4748,7 +4748,7 @@ e_day_view_reshape_long_event (EDayView *day_view, GtkWidget *widget; GdkColor color; - widget = (GtkWidget *)day_view; + widget = (GtkWidget *) day_view; color = e_day_view_get_text_color (day_view, event, widget); @@ -4934,7 +4934,7 @@ e_day_view_reshape_day_event (EDayView *day_view, GtkWidget *widget; GdkColor color; - widget = (GtkWidget *)day_view; + widget = (GtkWidget *) day_view; color = e_day_view_get_text_color (day_view, event, widget); @@ -6280,17 +6280,17 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item, g_object_set_data (G_OBJECT (item), "event-day", GINT_TO_POINTER (day)); data = g_malloc (sizeof (ECalendarViewEventData)); - pevent->x = ((GdkEventCrossing *)event)->x_root; - pevent->y = ((GdkEventCrossing *)event)->y_root; + pevent->x = ((GdkEventCrossing *) event)->x_root; + pevent->y = ((GdkEventCrossing *) event)->y_root; pevent->tooltip = NULL; - data->cal_view = (ECalendarView *)day_view; + data->cal_view = (ECalendarView *) day_view; data->day = day; data->event_num = event_num; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; pevent->timeout = g_timeout_add_full ( G_PRIORITY_DEFAULT, 500, - (GSourceFunc)e_calendar_view_get_tooltips, + (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); return TRUE; @@ -6306,8 +6306,8 @@ e_day_view_on_text_item_event (GnomeCanvasItem *item, pevent = tooltip_get_view_event (day_view, day, event_num); - pevent->x = ((GdkEventMotion *)event)->x_root; - pevent->y = ((GdkEventMotion *)event)->y_root; + pevent->x = ((GdkEventMotion *) event)->x_root; + pevent->y = ((GdkEventMotion *) event)->y_root; pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (day_view), "tooltip-window"); if (pevent->tooltip) { diff --git a/calendar/gui/e-meeting-list-view.c b/calendar/gui/e-meeting-list-view.c index 532a06138a..c702bdfd77 100644 --- a/calendar/gui/e-meeting-list-view.c +++ b/calendar/gui/e-meeting-list-view.c @@ -280,7 +280,7 @@ e_meeting_list_view_remove_attendee_from_name_selector (EMeetingListView *view, if (e_destination_is_evolution_list (des)) { GList *l, *dl; - dl = (GList *)e_destination_list_get_dests (des); + dl = (GList *) e_destination_list_get_dests (des); for (l = dl; l; l = l->next) { attendee = e_destination_get_email (l->data); @@ -330,7 +330,7 @@ e_meeting_list_view_remove_all_attendees_from_name_selector (EMeetingListView *v if (e_destination_is_evolution_list (des)) { GList *m, *dl; - dl = (GList *)e_destination_list_get_dests (des); + dl = (GList *) e_destination_list_get_dests (des); for (m = dl; m; m = m->next) { g_object_unref (m->data); @@ -381,7 +381,7 @@ attendee_edited_cb (GtkCellRenderer *renderer, const gchar *path, GList *address e_meeting_attendee_set_role (attendee, e_meeting_attendee_get_role (existing_attendee)); e_meeting_attendee_set_rsvp (attendee, e_meeting_attendee_get_rsvp (existing_attendee)); e_meeting_attendee_set_status (attendee, ICAL_PARTSTAT_NEEDSACTION); - e_meeting_attendee_set_delfrom (attendee, (gchar *)e_meeting_attendee_get_delfrom (existing_attendee)); + e_meeting_attendee_set_delfrom (attendee, (gchar *) e_meeting_attendee_get_delfrom (existing_attendee)); } e_meeting_list_view_add_attendee_to_name_selector (E_MEETING_LIST_VIEW (view), attendee); g_signal_emit_by_name (G_OBJECT (view), "attendee_added", (gpointer) attendee); @@ -506,7 +506,7 @@ status_edited_cb (GtkCellRenderer *renderer, const gchar *path, const gchar *tex static void ense_update (GtkWidget *w, gpointer data1, gpointer user_data) { - gtk_cell_editable_editing_done ((GtkCellEditable *)w); + gtk_cell_editable_editing_done ((GtkCellEditable *) w); } static void @@ -906,7 +906,7 @@ name_selector_dialog_close_cb (ENameSelectorDialog *dialog, gint response, gpoin attendees = e_meeting_store_get_attendees (store); /* get all the email ids of the attendees */ - g_ptr_array_foreach ((GPtrArray *)attendees, (GFunc) add_to_list, &la); + g_ptr_array_foreach ((GPtrArray *) attendees, (GFunc) add_to_list, &la); for (i = 0; sections[i] != NULL; i++) { EDestinationStore *destination_store; diff --git a/calendar/gui/e-meeting-store.c b/calendar/gui/e-meeting-store.c index c02eec9ecb..9054f92f77 100644 --- a/calendar/gui/e-meeting-store.c +++ b/calendar/gui/e-meeting-store.c @@ -509,7 +509,7 @@ e_meeting_store_set_value (EMeetingStore *store, gint row, gint col, const gchar switch (col) { case E_MEETING_STORE_ADDRESS_COL: - if (val != NULL && *((gchar *)val)) + if (val != NULL && *((gchar *) val)) e_meeting_attendee_set_address ( attendee, g_strdup_printf ( "MAILTO:%s", (gchar *) val)); @@ -1484,7 +1484,7 @@ freebusy_async (gpointer data) priv->num_queries--; g_static_mutex_unlock (&mutex); - g_list_foreach (fbd->users, (GFunc)g_free, NULL); + g_list_foreach (fbd->users, (GFunc) g_free, NULL); g_list_free (fbd->users); if (fbd->fb_data != NULL) { @@ -1627,7 +1627,7 @@ refresh_busy_periods (gpointer data) thread = g_thread_create ((GThreadFunc) freebusy_async, fbd, FALSE, &error); if (!thread) { /* do clean up stuff here */ - g_list_foreach (fbd->users, (GFunc)g_free, NULL); + g_list_foreach (fbd->users, (GFunc) g_free, NULL); g_list_free (fbd->users); g_free (fbd->email); priv->refresh_idle_id = 0; diff --git a/calendar/gui/e-memo-table.c b/calendar/gui/e-memo-table.c index 2d6195099e..ab0ce1253d 100644 --- a/calendar/gui/e-memo-table.c +++ b/calendar/gui/e-memo-table.c @@ -495,7 +495,7 @@ memo_table_query_tooltip (GtkWidget *widget, comp_data->client, comp_data->icalcomp, &free_text); if (!(str && *str)) { if (free_text) - g_free ((gchar *)str); + g_free ((gchar *) str); free_text = FALSE; str = _("* No Summary *"); } @@ -514,7 +514,7 @@ memo_table_query_tooltip (GtkWidget *widget, g_free (tmp); if (free_text) - g_free ((gchar *)str); + g_free ((gchar *) str); free_text = FALSE; w = gtk_event_box_new (); diff --git a/calendar/gui/e-select-names-renderer.c b/calendar/gui/e-select-names-renderer.c index 27a08f7ada..a2e4ec68ca 100644 --- a/calendar/gui/e-select-names-renderer.c +++ b/calendar/gui/e-select-names-renderer.c @@ -87,8 +87,8 @@ e_select_names_renderer_editing_done (GtkCellEditable *editable, ESelectNamesRen g_signal_emit (cell, signals[CELL_EDITED], 0, cell->priv->path, addresses, names); - g_list_foreach (addresses, (GFunc)g_free, NULL); - g_list_foreach (names, (GFunc)g_free, NULL); + g_list_foreach (addresses, (GFunc) g_free, NULL); + g_list_foreach (names, (GFunc) g_free, NULL); g_list_free (addresses); g_list_free (names); diff --git a/calendar/gui/e-task-table.c b/calendar/gui/e-task-table.c index e8ba961d7e..b68dbea737 100644 --- a/calendar/gui/e-task-table.c +++ b/calendar/gui/e-task-table.c @@ -718,7 +718,7 @@ task_table_query_tooltip (GtkWidget *widget, comp_data->client, comp_data->icalcomp, &free_text); if (!(str && *str)) { if (free_text) - g_free ((gchar *)str); + g_free ((gchar *) str); free_text = FALSE; str = _("* No Summary *"); } @@ -737,7 +737,7 @@ task_table_query_tooltip (GtkWidget *widget, g_free (tmp); if (free_text) - g_free ((gchar *)str); + g_free ((gchar *) str); free_text = FALSE; w = gtk_event_box_new (); diff --git a/calendar/gui/e-week-view-event-item.c b/calendar/gui/e-week-view-event-item.c index 3b1b21849f..998e0b2643 100644 --- a/calendar/gui/e-week-view-event-item.c +++ b/calendar/gui/e-week-view-event-item.c @@ -492,7 +492,7 @@ week_view_event_item_draw_icons (EWeekViewEventItem *event_item, #undef draw_pixbuf - g_slist_foreach (categories_pixbufs, (GFunc)g_object_unref, NULL); + g_slist_foreach (categories_pixbufs, (GFunc) g_object_unref, NULL); g_slist_free (categories_pixbufs); g_object_unref (comp); diff --git a/calendar/gui/e-week-view.c b/calendar/gui/e-week-view.c index 07b94ca200..9fd9abcfcc 100644 --- a/calendar/gui/e-week-view.c +++ b/calendar/gui/e-week-view.c @@ -2398,7 +2398,7 @@ e_week_view_on_button_press (GtkWidget *widget, if (day == -1) return FALSE; - if (ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)event)) + if (ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *) event)) return TRUE; /* If an event is pressed just return. */ @@ -2472,7 +2472,7 @@ e_week_view_on_button_release (GtkWidget *widget, week_view->selection_drag_pos = E_WEEK_VIEW_DRAG_NONE; gdk_pointer_ungrab (event->time); } else { - ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)event); + ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *) event); } return FALSE; @@ -2554,7 +2554,7 @@ e_week_view_on_motion (GtkWidget *widget, return TRUE; } - ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *)mevent); + ewv_pass_gdkevent_to_etext (week_view, (GdkEvent *) mevent); return FALSE; } @@ -2980,17 +2980,17 @@ tooltip_event_cb (GnomeCanvasItem *item, data = g_malloc (sizeof (ECalendarViewEventData)); - pevent->x = ((GdkEventCrossing *)event)->x_root; - pevent->y = ((GdkEventCrossing *)event)->y_root; + pevent->x = ((GdkEventCrossing *) event)->x_root; + pevent->y = ((GdkEventCrossing *) event)->y_root; pevent->tooltip = NULL; - data->cal_view = (ECalendarView *)view; + data->cal_view = (ECalendarView *) view; data->day = -1; data->event_num = event_num; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; pevent->timeout = g_timeout_add_full ( G_PRIORITY_DEFAULT, 500, - (GSourceFunc)e_calendar_view_get_tooltips, + (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); g_object_set_data ((GObject *)view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout)); @@ -2999,8 +2999,8 @@ tooltip_event_cb (GnomeCanvasItem *item, return FALSE; } case GDK_MOTION_NOTIFY: - pevent->x = ((GdkEventMotion *)event)->x_root; - pevent->y = ((GdkEventMotion *)event)->y_root; + pevent->x = ((GdkEventMotion *) event)->x_root; + pevent->y = ((GdkEventMotion *) event)->y_root; pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (view), "tooltip-window"); if (pevent->tooltip) { @@ -3152,7 +3152,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, GdkColor color; gboolean free_text = FALSE; - widget = (GtkWidget *)week_view; + widget = (GtkWidget *) week_view; color = e_week_view_get_text_color (week_view, event, widget); summary = get_comp_summary (event->comp_data->client, event->comp_data->icalcomp, &free_text); @@ -3170,7 +3170,7 @@ e_week_view_reshape_event_span (EWeekView *week_view, NULL); if (free_text) - g_free ((gchar *)summary); + g_free ((gchar *) summary); if (e_cal_get_static_capability (event->comp_data->client, CAL_STATIC_CAPABILITY_HAS_UNACCEPTED_MEETING) && e_cal_util_component_has_attendee (event->comp_data->icalcomp)) { @@ -3630,17 +3630,17 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, data = g_malloc (sizeof (ECalendarViewEventData)); - pevent->x = ((GdkEventCrossing *)gdkevent)->x_root; - pevent->y = ((GdkEventCrossing *)gdkevent)->y_root; + pevent->x = ((GdkEventCrossing *) gdkevent)->x_root; + pevent->y = ((GdkEventCrossing *) gdkevent)->y_root; pevent->tooltip = NULL; - data->cal_view = (ECalendarView *)week_view; + data->cal_view = (ECalendarView *) week_view; data->day = -1; data->event_num = nevent; data->get_view_event = (ECalendarViewEvent * (*)(ECalendarView *, int, gint)) tooltip_get_view_event; pevent->timeout = g_timeout_add_full ( G_PRIORITY_DEFAULT, 500, - (GSourceFunc)e_calendar_view_get_tooltips, + (GSourceFunc) e_calendar_view_get_tooltips, data, (GDestroyNotify) g_free); g_object_set_data ((GObject *)week_view, "tooltip-timeout", GUINT_TO_POINTER (pevent->timeout)); @@ -3651,8 +3651,8 @@ e_week_view_on_text_item_event (GnomeCanvasItem *item, return FALSE; case GDK_MOTION_NOTIFY: - pevent->x = ((GdkEventMotion *)gdkevent)->x_root; - pevent->y = ((GdkEventMotion *)gdkevent)->y_root; + pevent->x = ((GdkEventMotion *) gdkevent)->x_root; + pevent->y = ((GdkEventMotion *) gdkevent)->y_root; pevent->tooltip = (GtkWidget *)g_object_get_data (G_OBJECT (week_view), "tooltip-window"); if (pevent->tooltip) { @@ -4559,7 +4559,7 @@ e_week_view_on_jump_button_event (GnomeCanvasItem *item, } } else if (event->type == GDK_FOCUS_CHANGE) { - GdkEventFocus *focus_event = (GdkEventFocus *)event; + GdkEventFocus *focus_event = (GdkEventFocus *) event; GdkPixbuf *pixbuf = NULL; for (day = 0; day < E_WEEK_VIEW_MAX_WEEKS * 7; day++) { diff --git a/calendar/gui/ea-cal-view-event.c b/calendar/gui/ea-cal-view-event.c index 84159bb53d..fd26c76ba6 100644 --- a/calendar/gui/ea-cal-view-event.c +++ b/calendar/gui/ea-cal-view-event.c @@ -307,7 +307,7 @@ ea_cal_view_event_get_name (AtkObject *accessible) ATK_OBJECT_CLASS (parent_class)->set_name (accessible, name_string); #ifdef ACC_DEBUG printf("EvoAcc: name for event accobj=%p, is %s\n", - (gpointer)accessible, new_name); + (gpointer) accessible, new_name); #endif g_free (name_string); return accessible->name; @@ -380,7 +380,7 @@ ea_cal_view_event_get_index_in_parent (AtkObject *accessible) --event_num) { day_view_event = &g_array_index (day_view->long_events, EDayViewEvent, event_num); - if (cal_view_event == (ECalendarViewEvent*)day_view_event) + if (cal_view_event == (ECalendarViewEvent*) day_view_event) return event_num; } @@ -391,7 +391,7 @@ ea_cal_view_event_get_index_in_parent (AtkObject *accessible) --event_num) { day_view_event = &g_array_index (day_view->events[day], EDayViewEvent, event_num); - if (cal_view_event == (ECalendarViewEvent*)day_view_event) + if (cal_view_event == (ECalendarViewEvent*) day_view_event) return num_before + event_num; } num_before += day_view->events[day]->len; @@ -570,7 +570,7 @@ ea_cal_view_event_do_action (AtkAction *action, gint i) atk_gobj = ATK_GOBJECT_ACCESSIBLE (action); if (i == 0) { - atk_comp = (AtkComponent *)atk_gobj; + atk_comp = (AtkComponent *) atk_gobj; return atk_component_grab_focus (atk_comp); } diff --git a/calendar/gui/ea-cal-view.c b/calendar/gui/ea-cal-view.c index 71b1c52be0..1c49d2896b 100644 --- a/calendar/gui/ea-cal-view.c +++ b/calendar/gui/ea-cal-view.c @@ -205,7 +205,7 @@ ea_cal_view_event_changed_cb (ECalendarView *cal_view, ECalendarViewEvent *event } else if ((E_IS_WEEK_VIEW (cal_view)) && event) { EWeekViewEventSpan *span; - EWeekViewEvent *week_view_event = (EWeekViewEvent *)event; + EWeekViewEvent *week_view_event = (EWeekViewEvent *) event; EWeekView *week_view = E_WEEK_VIEW (cal_view); /* get the first span of the event */ span = &g_array_index (week_view->spans, EWeekViewEventSpan, @@ -243,7 +243,7 @@ ea_cal_view_event_added_cb (ECalendarView *cal_view, ECalendarViewEvent *event, } else if ((E_IS_WEEK_VIEW (cal_view)) && event) { EWeekViewEventSpan *span; - EWeekViewEvent *week_view_event = (EWeekViewEvent *)event; + EWeekViewEvent *week_view_event = (EWeekViewEvent *) event; EWeekView *week_view = E_WEEK_VIEW (cal_view); /* get the first span of the event */ span = &g_array_index (week_view->spans, EWeekViewEventSpan, diff --git a/calendar/gui/ea-calendar-helpers.c b/calendar/gui/ea-calendar-helpers.c index 74d0d7307b..38ebf75113 100644 --- a/calendar/gui/ea-calendar-helpers.c +++ b/calendar/gui/ea-calendar-helpers.c @@ -149,7 +149,7 @@ ea_calendar_helpers_get_cal_view_event_from (GnomeCanvasItem *canvas_item) week_view_event = &g_array_index (week_view->events, EWeekViewEvent, event_num); - cal_view_event = (ECalendarViewEvent *)week_view_event; + cal_view_event = (ECalendarViewEvent *) week_view_event; } else { g_return_val_if_reached (NULL); diff --git a/calendar/gui/ea-week-view.c b/calendar/gui/ea-week-view.c index 456327bd39..7f60009b32 100644 --- a/calendar/gui/ea-week-view.c +++ b/calendar/gui/ea-week-view.c @@ -330,7 +330,7 @@ ea_week_view_ref_child (AtkObject *accessible, gint index) #ifdef ACC_DEBUG printf ("EvoAcc: ea_week_view_ref_child [%d]=%p\n", - index, (gpointer)atk_object); + index, (gpointer) atk_object); #endif return atk_object; } diff --git a/calendar/gui/itip-utils.c b/calendar/gui/itip-utils.c index 8c7c72f2f6..cfc177c07d 100644 --- a/calendar/gui/itip-utils.c +++ b/calendar/gui/itip-utils.c @@ -317,7 +317,7 @@ itip_get_comp_attendee (ECalComponent *comp, address = NULL; } - for (it = e_list_get_iterator ((EList *)al); + for (it = e_list_get_iterator ((EList *) al); e_iterator_is_valid (it); e_iterator_next (it)) { a = (EAccount *) e_iterator_get (it); @@ -420,7 +420,7 @@ foreach_tzid_callback (icalparameter *param, gpointer data) icalcomponent_add_component ( tz_data->icomp, icalcomponent_new_clone (vtimezone_comp)); - g_hash_table_insert (tz_data->tzids, (gchar *)tzid, (gchar *)tzid); + g_hash_table_insert (tz_data->tzids, (gchar *) tzid, (gchar *) tzid); } static icalcomponent * @@ -1088,10 +1088,10 @@ comp_sentby (ECalComponent *comp, ECal *client) e_cal_component_set_organizer (comp, &organizer); - g_free ((gchar *)organizer.value); - g_free ((gchar *)organizer.sentby); - g_free ((gchar *)organizer.cn); - g_free ((gchar *)organizer.language); + g_free ((gchar *) organizer.value); + g_free ((gchar *) organizer.sentby); + g_free ((gchar *) organizer.cn); + g_free ((gchar *) organizer.language); } } static ECalComponent * @@ -1277,13 +1277,13 @@ comp_compliant (ECalComponentItipMethod method, ECalComponentAlarm *alarm; ECalComponentAlarmAction action = E_CAL_COMPONENT_ALARM_UNKNOWN; - alarm = e_cal_component_get_alarm (clone, (const gchar *)l->data); + alarm = e_cal_component_get_alarm (clone, (const gchar *) l->data); if (alarm) { e_cal_component_alarm_get_action (alarm, &action); e_cal_component_alarm_free (alarm); if (action == E_CAL_COMPONENT_ALARM_PROCEDURE) - e_cal_component_remove_alarm (clone, (const gchar *)l->data); + e_cal_component_remove_alarm (clone, (const gchar *) l->data); } } @@ -1390,10 +1390,10 @@ find_enabled_account (EAccountList *accounts, if (!id_address) return NULL; - for (it = e_list_get_iterator ((EList *)accounts); + for (it = e_list_get_iterator ((EList *) accounts); e_iterator_is_valid (it); e_iterator_next (it)) { - account = (EAccount *)e_iterator_get (it); + account = (EAccount *) e_iterator_get (it); if (account && account->enabled @@ -1666,7 +1666,7 @@ reply_to_calendar_comp (ECalComponentItipMethod method, e_cal_component_get_description_list (comp, &text_list); if (text_list) { - ECalComponentText text = *((ECalComponentText *)text_list->data); + ECalComponentText text = *((ECalComponentText *) text_list->data); if (text.value) description = text.value; else diff --git a/calendar/gui/print.c b/calendar/gui/print.c index d3b6068ca9..a63285465a 100644 --- a/calendar/gui/print.c +++ b/calendar/gui/print.c @@ -1466,12 +1466,12 @@ print_day_details (GtkPrintContext *context, GnomeCalendar *gcal, time_t whence, gint x, y; if (!pixbuf) { - const gchar **xpm = (const gchar **)jump_xpm; + const gchar **xpm = (const gchar **) jump_xpm; /* this ugly thing is here only to get rid of compiler warning about unused 'jump_xpm_focused' */ if (pixbuf) - xpm = (const gchar **)jump_xpm_focused; + xpm = (const gchar **) jump_xpm_focused; pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); } @@ -1779,12 +1779,12 @@ print_week_event (GtkPrintContext *context, PangoFontDescription *font, } if (!pixbuf) { - const gchar **xpm = (const gchar **)jump_xpm; + const gchar **xpm = (const gchar **) jump_xpm; /* this ugly thing is here only to get rid of compiler warning about unused 'jump_xpm_focused' */ if (pixbuf) - xpm = (const gchar **)jump_xpm_focused; + xpm = (const gchar **) jump_xpm_focused; pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); } @@ -2551,12 +2551,12 @@ print_work_week_day_details (GtkPrintContext *context, GnomeCalendar *gcal, gint x, y; if (!pixbuf) { - const gchar **xpm = (const gchar **)jump_xpm; + const gchar **xpm = (const gchar **) jump_xpm; /* this ugly thing is here only to get rid of compiler warning about unused 'jump_xpm_focused' */ if (pixbuf) - xpm = (const gchar **)jump_xpm_focused; + xpm = (const gchar **) jump_xpm_focused; pixbuf = gdk_pixbuf_new_from_xpm_data (xpm); } @@ -3104,7 +3104,7 @@ print_calendar (GnomeCalendar *gcal, } } - pcali.gcal = (GnomeCalendar *)gcal; + pcali.gcal = (GnomeCalendar *) gcal; pcali.start = start; operation = e_print_operation_new (); diff --git a/calendar/importers/icalendar-importer.c b/calendar/importers/icalendar-importer.c index ea7f7d5015..38c1fc8251 100644 --- a/calendar/importers/icalendar-importer.c +++ b/calendar/importers/icalendar-importer.c @@ -206,10 +206,10 @@ static void button_toggled_cb (GtkWidget *widget, struct _selector_data *sd) { g_datalist_set_data_full(&sd->target->data, "primary-source", - g_object_ref (e_source_selector_get_primary_selection ((ESourceSelector *)sd->selector)), + g_object_ref (e_source_selector_get_primary_selection ((ESourceSelector *) sd->selector)), g_object_unref); g_datalist_set_data(&sd->target->data, "primary-type", GINT_TO_POINTER(import_type_map[sd->page])); - gtk_notebook_set_current_page ((GtkNotebook *)sd->notebook, sd->page); + gtk_notebook_set_current_page ((GtkNotebook *) sd->notebook, sd->page); } static void @@ -252,8 +252,8 @@ ivcal_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) selector = e_source_selector_new (source_list); e_source_selector_show_selection (E_SOURCE_SELECTOR (selector), FALSE); scrolled = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ((GtkScrolledWindow *)scrolled, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); - gtk_container_add ((GtkContainer *)scrolled, selector); + gtk_scrolled_window_set_policy ((GtkScrolledWindow *) scrolled, GTK_POLICY_AUTOMATIC, GTK_POLICY_ALWAYS); + gtk_container_add ((GtkContainer *) scrolled, selector); gtk_notebook_append_page (GTK_NOTEBOOK (nb), scrolled, NULL); /* FIXME What if no sources? */ @@ -283,7 +283,7 @@ ivcal_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) g_object_unref (source_list); } if (first) - gtk_toggle_button_set_active ((GtkToggleButton *)first, TRUE); + gtk_toggle_button_set_active ((GtkToggleButton *) first, TRUE); gtk_widget_show_all (vbox); @@ -382,7 +382,7 @@ ical_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -419,7 +419,7 @@ ical_import (EImport *ei, EImportTarget *target, EImportImporter *im) gchar *filename; gchar *contents; icalcomponent *icalcomp; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; filename = g_filename_from_uri (s->uri_src, NULL, NULL); if (!filename) { @@ -447,7 +447,7 @@ static GtkWidget * ivcal_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) { GtkWidget *preview; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; icalcomponent *icalcomp; gchar *contents; @@ -512,7 +512,7 @@ vcal_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -603,7 +603,7 @@ vcal_import (EImport *ei, EImportTarget *target, EImportImporter *im) { gchar *filename; icalcomponent *icalcomp; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; filename = g_filename_from_uri (s->uri_src, NULL, NULL); if (!filename) { @@ -623,7 +623,7 @@ static GtkWidget * vcal_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) { GtkWidget *preview; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; icalcomponent *icalcomp; @@ -821,12 +821,12 @@ gnome_calendar_getwidget (EImport *ei, EImportTarget *target, EImportImporter *i hbox = gtk_hbox_new (FALSE, 2); w = gtk_check_button_new_with_label (_("Calendar Events")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_cal); + gtk_toggle_button_set_active ((GtkToggleButton *) w, !done_cal); g_signal_connect (w, "toggled", G_CALLBACK (calendar_toggle_cb), target); gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); w = gtk_check_button_new_with_label (_("Tasks")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_tasks); + gtk_toggle_button_set_active ((GtkToggleButton *) w, !done_tasks); g_signal_connect (w, "toggled", G_CALLBACK (tasks_toggle_cb), target); gtk_box_pack_start (GTK_BOX (hbox), w, FALSE, FALSE, 0); diff --git a/capplet/settings/anjal-mail-view.c b/capplet/settings/anjal-mail-view.c index 6779e2e444..21a8f0a437 100644 --- a/capplet/settings/anjal-mail-view.c +++ b/capplet/settings/anjal-mail-view.c @@ -48,7 +48,7 @@ anjal_mail_view_init (AnjalMailView *shell) static void anjal_mail_view_finalize (GObject *object) { - AnjalMailView *shell = (AnjalMailView *)object; + AnjalMailView *shell = (AnjalMailView *) object; AnjalMailViewPrivate *priv = shell->priv; g_free (priv); diff --git a/capplet/settings/mail-account-view.c b/capplet/settings/mail-account-view.c index cb5ded6b17..128e541f91 100644 --- a/capplet/settings/mail-account-view.c +++ b/capplet/settings/mail-account-view.c @@ -94,7 +94,7 @@ mail_account_view_init (MailAccountView *shell) static void mail_account_view_finalize (GObject *object) { - MailAccountView *shell = (MailAccountView *)object; + MailAccountView *shell = (MailAccountView *) object; g_free (shell->priv->username); @@ -160,10 +160,10 @@ save_identity (MailAccountView *view) static gint validate_identity (MailAccountView *view) { - gchar *user = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME); - gchar *email = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS); + gchar *user = (gchar *) e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME); + gchar *email = (gchar *) e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS); gchar *tmp; - const gchar *pwd = gtk_entry_get_text ((GtkEntry *)view->password); + const gchar *pwd = gtk_entry_get_text ((GtkEntry *) view->password); if (!user || !*user) return ERROR_NO_FULLNAME; @@ -242,8 +242,8 @@ setup_yahoo_account (MailAccountView *mav) { GConfClient *gconf = gconf_client_get_default (); - mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts); - mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar); + mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *) mav->priv->gcontacts); + mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *) mav->priv->calendar); if (mav->priv->do_calendar) { ESourceList *slist; @@ -277,10 +277,10 @@ setup_yahoo_account (MailAccountView *mav) sanitize_uname = sanitize_user_mail (email); abs_uri = g_strdup_printf ("caldav://%s@caldav.calendar.yahoo.com/dav/%s/Calendar/%s/", sanitize_uname, email, gtk_entry_get_text((GtkEntry *)mav->priv->yahoo_cal_entry)); - e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); + e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *) mav->password)); e_passwords_remember_password ("Calendar", abs_uri); - rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text ((GtkEntry *)mav->priv->yahoo_cal_entry)); + rel_uri = g_strdup_printf (YAHOO_CALENDAR_LOCATION, sanitize_uname, email, gtk_entry_get_text ((GtkEntry *) mav->priv->yahoo_cal_entry)); e_source_set_relative_uri (calendar, rel_uri); e_source_group_add_source (sgrp, calendar, -1); @@ -327,7 +327,7 @@ setup_yahoo_account (MailAccountView *mav) e_source_set_relative_uri (abook, mav->priv->username); rel_uri = g_strdup_printf("google://%s/", mav->priv->username); - e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); + e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *) mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); e_source_group_add_source (sgrp, abook, -1); e_source_list_sync (slist, NULL); @@ -347,8 +347,8 @@ setup_google_accounts (MailAccountView *mav) { GConfClient *gconf = gconf_client_get_default (); - mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->gcontacts); - mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *)mav->priv->calendar); + mav->priv->do_gcontacts = gtk_toggle_button_get_active ((GtkToggleButton *) mav->priv->gcontacts); + mav->priv->do_calendar = gtk_toggle_button_get_active ((GtkToggleButton *) mav->priv->calendar); if (mav->priv->do_calendar) { ESourceList *slist; @@ -378,7 +378,7 @@ setup_google_accounts (MailAccountView *mav) abs_uri = g_strdup_printf (CALENDAR_CALDAV_URI, sanitize_uname, mav->priv->username); e_source_set_absolute_uri (calendar, abs_uri); - e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); + e_passwords_add_password (abs_uri, gtk_entry_get_text ((GtkEntry *) mav->password)); e_passwords_remember_password ("Calendar", abs_uri); rel_uri = g_strconcat ("https", GMAIL_CALENDAR_LOCATION, sanitize_uname, CALENDAR_DEFAULT_PATH, NULL); e_source_set_relative_uri (calendar, rel_uri); @@ -428,7 +428,7 @@ setup_google_accounts (MailAccountView *mav) e_source_set_relative_uri (abook, mav->priv->username); rel_uri = g_strdup_printf("google://%s/", mav->priv->username); - e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *)mav->password)); + e_passwords_add_password (rel_uri, gtk_entry_get_text ((GtkEntry *) mav->password)); e_passwords_remember_password ("Addressbook", rel_uri); e_source_list_sync (slist, NULL); @@ -452,91 +452,91 @@ create_review (MailAccountView *view) CamelURL *url; gchar *buff; - uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_URL); + uri = (gchar *) e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_SOURCE_URL); if (!uri || (url = camel_url_new (uri, NULL)) == NULL) return NULL; table = gtk_table_new (4,2, FALSE); - gtk_table_set_row_spacings ((GtkTable *)table, 4); + gtk_table_set_row_spacings ((GtkTable *) table, 4); label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Personal details:")); - gtk_label_set_markup ((GtkLabel *)label, buff); + gtk_label_set_markup ((GtkLabel *) label, buff); g_free (buff); gtk_widget_show (label); PACK_BOXF (label) - gtk_table_attach ((GtkTable *)table, box, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 0, 1, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Name:")); gtk_widget_show (label); PACK_BOX (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_NAME)); gtk_widget_show (entry); PACK_BOX (entry) - gtk_table_attach ((GtkTable *)table, box, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 1, 2, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Email address:")); gtk_widget_show (label); PACK_BOX (label) - gtk_table_attach ((GtkTable *)table, box, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (e_account_get_string (em_account_editor_get_modified_account (view->edit), E_ACCOUNT_ID_ADDRESS)); gtk_widget_show (entry); PACK_BOX (entry) - gtk_table_attach ((GtkTable *)table, box, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 2, 3, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Details:")); - gtk_label_set_markup ((GtkLabel *)label, buff); + gtk_label_set_markup ((GtkLabel *) label, buff); g_free (buff); gtk_widget_show (label); PACK_BOXF (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Receiving")); - gtk_label_set_markup ((GtkLabel *)label, buff); + gtk_label_set_markup ((GtkLabel *) label, buff); g_free (buff); gtk_widget_show (label); PACK_BOXF (label); - gtk_table_attach ((GtkTable *)table, box, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Server type:")); gtk_widget_show (label); PACK_BOX (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->protocol); gtk_widget_show (entry); PACK_BOX (entry) - gtk_table_attach ((GtkTable *)table, box, 1, 2, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Server address:")); gtk_widget_show (label); PACK_BOX (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->host); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 1, 2, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Username:")); gtk_widget_show (label); PACK_BOX (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->user); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 1, 2, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); label = gtk_label_new (_("Use encryption:")); gtk_widget_show (label); PACK_BOX (label); - gtk_table_attach ((GtkTable *)table, box, 0, 1, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 0, 1, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); enc = (gchar *)camel_url_get_param(url, "use_ssl"); entry = gtk_label_new (enc ? enc : _("never")); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 1, 2, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 1, 2, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); view->priv->username = g_strdup (url->user); camel_url_free (url); @@ -546,32 +546,32 @@ create_review (MailAccountView *view) label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Sending")); - gtk_label_set_markup ((GtkLabel *)label, buff); + gtk_label_set_markup ((GtkLabel *) label, buff); g_free (buff); gtk_widget_show (label); PACK_BOXF (label); - gtk_table_attach ((GtkTable *)table, box, 2, 3, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 2, 3, 3, 4, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->protocol); gtk_widget_show (entry); PACK_BOX (entry) - gtk_table_attach ((GtkTable *)table, box, 2, 3, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 2, 3, 4, 5, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->host); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 2, 3, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 2, 3, 5, 6, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); entry = gtk_label_new (url->user); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 2, 3, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 2, 3, 6, 7, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); enc = (gchar *)camel_url_get_param(url, "use_ssl"); entry = gtk_label_new (enc ? enc : _("never")); gtk_widget_show (entry); PACK_BOX (entry); - gtk_table_attach ((GtkTable *)table, box, 2, 3, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); + gtk_table_attach ((GtkTable *) table, box, 2, 3, 7, 8, GTK_EXPAND|GTK_FILL, GTK_SHRINK, INDENTATION, 0); /* label = gtk_label_new (_("Organization:")); @@ -627,7 +627,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) gint ret = (*mail_account_pages[mav->current_page].validate_page) (mav); MAVPage *page = mav->pages[mav->current_page]; if (ret) { - gtk_label_set_text ((GtkLabel *)page->error_label, _(dialog_errors[ret-1].detail)); + gtk_label_set_text ((GtkLabel *) page->error_label, _(dialog_errors[ret-1].detail)); gtk_widget_show (page->error); return; } @@ -639,7 +639,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) } if (mav->current_page == MAV_LAST - 1) { - gchar *uri = (gchar *)e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL); + gchar *uri = (gchar *) e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_SOURCE_URL); CamelURL *url; e_account_set_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_NAME, e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_ADDRESS)); @@ -667,7 +667,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) /* Save the password ahead of time */ aurl = camel_url_new (account->source->url, NULL); surl = camel_url_to_string (aurl, CAMEL_URL_HIDE_ALL); - e_passwords_add_password (surl, gtk_entry_get_text ((GtkEntry *)mav->password)); + e_passwords_add_password (surl, gtk_entry_get_text ((GtkEntry *) mav->password)); e_passwords_remember_password ("Mail", surl); camel_url_free (aurl); g_free (surl); @@ -701,9 +701,9 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) tmp = mail_account_pages[mav->current_page].create_page (mav); page->main = gtk_hbox_new (FALSE, 0); gtk_widget_show (page->main); - gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) page->main, tmp, FALSE, FALSE, 0); gtk_widget_show (tmp); - gtk_box_pack_start ((GtkBox *)page->box, page->main, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *) page->box, page->main, FALSE, FALSE, 3); if (mav->priv->is_gmail) { gtk_widget_destroy (mav->priv->gcontacts); @@ -740,11 +740,11 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) mav->priv->gcontacts = gtk_check_button_new_with_label (_("Setup Google contacts with Evolution")); mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Google calendar with Evolution")); - gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->gcontacts, TRUE); - gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE); + gtk_toggle_button_set_active ((GtkToggleButton *) mav->priv->gcontacts, TRUE); + gtk_toggle_button_set_active ((GtkToggleButton *) mav->priv->calendar, TRUE); mav->priv->gmail_info_label = gtk_label_new (_("You may need to enable IMAP access.")); - gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE); + gtk_label_set_selectable ((GtkLabel *) mav->priv->gmail_info_label, TRUE); gtk_widget_show (mav->priv->gcontacts); gtk_widget_show (mav->priv->calendar); @@ -752,7 +752,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) mav->priv->account_label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Google account settings:")); - gtk_label_set_markup ((GtkLabel *)mav->priv->account_label, buff); + gtk_label_set_markup ((GtkLabel *) mav->priv->account_label, buff); g_free (buff); gtk_widget_show (mav->priv->account_label); @@ -779,19 +779,19 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) printf("Google account: %s\n", account->source->url); mav->priv->calendar = gtk_check_button_new_with_label (_("Setup Yahoo calendar with Evolution")); - gtk_toggle_button_set_active ((GtkToggleButton *)mav->priv->calendar, TRUE); + gtk_toggle_button_set_active ((GtkToggleButton *) mav->priv->calendar, TRUE); mav->priv->gmail_info_label = gtk_label_new (_("Yahoo calendars are named as firstname_lastname. We have tried to form the calendar name. So please confirm and re-enter the calendar name if it is not correct.")); - gtk_label_set_line_wrap ((GtkLabel *)mav->priv->gmail_info_label, TRUE); - gtk_label_set_line_wrap_mode ((GtkLabel *)mav->priv->gmail_info_label, PANGO_WRAP_WORD); - gtk_label_set_selectable ((GtkLabel *)mav->priv->gmail_info_label, TRUE); + gtk_label_set_line_wrap ((GtkLabel *) mav->priv->gmail_info_label, TRUE); + gtk_label_set_line_wrap_mode ((GtkLabel *) mav->priv->gmail_info_label, PANGO_WRAP_WORD); + gtk_label_set_selectable ((GtkLabel *) mav->priv->gmail_info_label, TRUE); gtk_widget_show (mav->priv->calendar); gtk_widget_show (mav->priv->gmail_info_label); mav->priv->account_label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Yahoo account settings:")); - gtk_label_set_markup ((GtkLabel *)mav->priv->account_label, buff); + gtk_label_set_markup ((GtkLabel *) mav->priv->account_label, buff); g_free (buff); gtk_widget_show (mav->priv->account_label); @@ -808,7 +808,7 @@ mav_next_pressed (GtkButton *button, MailAccountView *mav) PACK_IN_BOX (page->box, mav->priv->yahoo_cal_box, 24); cal_name = g_strdup (e_account_get_string (em_account_editor_get_modified_account (mav->edit), E_ACCOUNT_ID_NAME)); cal_name = g_strdelimit(cal_name, " ", '_'); - gtk_entry_set_text ((GtkEntry *)mav->priv->yahoo_cal_entry, cal_name); + gtk_entry_set_text ((GtkEntry *) mav->priv->yahoo_cal_entry, cal_name); g_free (cal_name); #undef PACK_IN_BOX } else { @@ -859,8 +859,8 @@ mav_construct_page (MailAccountView *view, MAVPageType type) error_box = gtk_hbox_new (FALSE, 2); page->error_label = gtk_label_new (""); tmp = gtk_image_new_from_stock (GTK_STOCK_DIALOG_WARNING, GTK_ICON_SIZE_MENU); - gtk_box_pack_start ((GtkBox *)error_box, tmp, FALSE, FALSE, 2); - gtk_box_pack_start ((GtkBox *)error_box, page->error_label, FALSE, FALSE, 2); + gtk_box_pack_start ((GtkBox *) error_box, tmp, FALSE, FALSE, 2); + gtk_box_pack_start ((GtkBox *) error_box, page->error_label, FALSE, FALSE, 2); gtk_widget_hide (tmp); gtk_widget_show (page->error_label); page->error = tmp; @@ -868,31 +868,31 @@ mav_construct_page (MailAccountView *view, MAVPageType type) box = gtk_hbox_new (FALSE, 12); gtk_widget_show (box); - gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) page->box, box, FALSE, FALSE, 12); tmp = gtk_label_new (NULL); str = g_strdup_printf("<span size=\"xx-large\" weight=\"heavy\">%s</span>", _(mail_account_pages[type].head)); - gtk_label_set_markup ((GtkLabel *)tmp, str); + gtk_label_set_markup ((GtkLabel *) tmp, str); g_free (str); gtk_widget_show (tmp); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 12); box = gtk_hbox_new (FALSE, 12); gtk_widget_show (box); - gtk_box_pack_start ((GtkBox *)page->box, box, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) page->box, box, FALSE, FALSE, 12); tmp = gtk_label_new (_(mail_account_pages[type].detail)); gtk_widget_set_size_request (tmp, 600, -1); - gtk_label_set_line_wrap ((GtkLabel *)tmp, TRUE); - gtk_label_set_line_wrap_mode ((GtkLabel *)tmp, PANGO_WRAP_WORD); + gtk_label_set_line_wrap ((GtkLabel *) tmp, TRUE); + gtk_label_set_line_wrap_mode ((GtkLabel *) tmp, PANGO_WRAP_WORD); gtk_widget_show (tmp); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 12); page->main = NULL; if (mail_account_pages[type].create_page && mail_account_pages[type].path) { tmp = (*mail_account_pages[type].create_page) (view); - gtk_box_pack_start ((GtkBox *)page->box, tmp, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *) page->box, tmp, FALSE, FALSE, 3); page->main = gtk_hbox_new (FALSE, 0); gtk_widget_show (page->main); - gtk_box_pack_start ((GtkBox *)page->main, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) page->main, tmp, FALSE, FALSE, 0); } if (mail_account_pages[type].fill_page) { @@ -903,12 +903,12 @@ mav_construct_page (MailAccountView *view, MAVPageType type) box = gtk_hbox_new (FALSE, 0); if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-previous", GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 0); } tmp = gtk_label_new (_(view->original ? mail_account_pages[type].prev_edit : mail_account_pages[type].prev)); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 3); page->prev = gtk_button_new (); - gtk_container_add ((GtkContainer *)page->prev, box); + gtk_container_add ((GtkContainer *) page->prev, box); gtk_widget_show_all (page->prev); g_signal_connect(page->prev, "clicked", G_CALLBACK(mav_prev_pressed), view); } @@ -916,30 +916,30 @@ mav_construct_page (MailAccountView *view, MAVPageType type) if ((view->original && mail_account_pages[type].next_edit) || mail_account_pages[type].next) { box = gtk_hbox_new (FALSE, 0); tmp = gtk_label_new (_(view->original ? mail_account_pages[type].next_edit : mail_account_pages[type].next)); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 3); if (FALSE) { tmp = gtk_image_new_from_icon_name ("go-next", GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start ((GtkBox *)box, tmp, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, tmp, FALSE, FALSE, 0); } page->next = gtk_button_new (); gtk_widget_set_can_default (page->next, TRUE); g_signal_connect (page->next, "hierarchy-changed", G_CALLBACK (gtk_widget_grab_default), NULL); - gtk_container_add ((GtkContainer *)page->next, box); + gtk_container_add ((GtkContainer *) page->next, box); gtk_widget_show_all (page->next); g_signal_connect(page->next, "clicked", G_CALLBACK(mav_next_pressed), view); } box = gtk_hbox_new (FALSE, 0); if (page->prev) - gtk_box_pack_start ((GtkBox *)box, page->prev, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) box, page->prev, FALSE, FALSE, 12); if (page->next) - gtk_box_pack_end ((GtkBox *)box, page->next, FALSE, FALSE, 12); + gtk_box_pack_end ((GtkBox *) box, page->next, FALSE, FALSE, 12); gtk_widget_show (box); - gtk_box_pack_end ((GtkBox *)page->box, box, FALSE, FALSE, 6); + gtk_box_pack_end ((GtkBox *) page->box, box, FALSE, FALSE, 6); gtk_widget_show (page->box); - gtk_box_pack_end ((GtkBox *)page->box, error_box, FALSE, FALSE, 2); - return (GtkWidget *)page; + gtk_box_pack_end ((GtkBox *) page->box, error_box, FALSE, FALSE, 2); + return (GtkWidget *) page; } static ServerData * @@ -951,13 +951,13 @@ emae_check_servers (const gchar *email) gchar *tmp; /* FIXME: Find a way to free the provider once given to account settings. */ - provider->email = (gchar *)email; + provider->email = (gchar *) email; tmp = strchr (email, '@'); tmp++; provider->domain = tmp; tmp = strchr (dupe, '@'); *tmp = 0; - provider->username = (gchar *)g_quark_to_string (g_quark_from_string (dupe)); + provider->username = (gchar *) g_quark_to_string (g_quark_from_string (dupe)); g_free (dupe); if (!mail_guess_servers (provider)) { @@ -1041,22 +1041,22 @@ mail_account_view_construct (MailAccountView *view, EShell *shell; view->scroll = gtk_scrolled_window_new (NULL, NULL); - gtk_scrolled_window_set_policy ((GtkScrolledWindow *)view->scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); - gtk_scrolled_window_set_shadow_type ((GtkScrolledWindow *)view->scroll, GTK_SHADOW_NONE); + gtk_scrolled_window_set_policy ((GtkScrolledWindow *) view->scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_scrolled_window_set_shadow_type ((GtkScrolledWindow *) view->scroll, GTK_SHADOW_NONE); view->page_widget = gtk_vbox_new (FALSE, 3); - gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)view->scroll, view->page_widget); + gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) view->scroll, view->page_widget); gtk_widget_show_all (view->scroll); - gtk_widget_set_size_request ((GtkWidget *)view, -1, 300); + gtk_widget_set_size_request ((GtkWidget *) view, -1, 300); for (i=0; i<MAV_LAST; i++) { - view->pages[i] = (MAVPage *)mav_construct_page (view, i); + view->pages[i] = (MAVPage *) mav_construct_page (view, i); view->pages[i]->done = FALSE; view->wpages[i] = view->pages[i]->box; - gtk_box_pack_start ((GtkBox *)view->page_widget, view->pages[i]->box, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) view->page_widget, view->pages[i]->box, TRUE, TRUE, 0); gtk_widget_hide (view->pages[i]->box); } gtk_widget_show (view->pages[0]->box); view->current_page = 0; - gtk_box_pack_start ((GtkBox *)view, view->scroll, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) view, view->scroll, TRUE, TRUE, 0); view->edit = em_account_editor_new_for_pages ( view->original, EMAE_PAGES, session, "org.gnome.evolution.mail.config.accountWizard", view->wpages); @@ -1078,13 +1078,13 @@ mail_account_view_construct (MailAccountView *view, if (!view->original) { label = gtk_label_new (_("Password:")); pwd = gtk_entry_new (); - gtk_entry_set_visibility ((GtkEntry *)pwd, FALSE); + gtk_entry_set_visibility ((GtkEntry *) pwd, FALSE); /* gtk_entry_set_activates_default ((GtkEntry *)pwd, TRUE); */ g_signal_connect (pwd, "activate", G_CALLBACK (next_page), view); gtk_widget_show (label); gtk_widget_show (pwd); - gtk_table_attach ((GtkTable *)table, label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); - gtk_table_attach ((GtkTable *)table, pwd, 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, 0, 0, 0); + gtk_table_attach ((GtkTable *) table, label, 0, 1, 2, 3, GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) table, pwd, 1, 2, 2, 3, GTK_FILL|GTK_EXPAND, 0, 0, 0); view->password = pwd; } @@ -1122,25 +1122,25 @@ mail_account_view_get_tab_widget (MailAccountView *mcv) gint w=-1, h=-1; GtkWidget *tab_label; - img = (GtkWidget *)gtk_image_new_from_pixbuf (pbuf); + img = (GtkWidget *) gtk_image_new_from_pixbuf (pbuf); tool = gtk_button_new (); - gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE); - gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE); + gtk_button_set_relief ((GtkButton *) tool, GTK_RELIEF_NONE); + gtk_button_set_focus_on_click ((GtkButton *) tool, FALSE); gtk_widget_set_tooltip_text (tool, _("Close Tab")); g_signal_connect (tool, "clicked", G_CALLBACK(mav_close), mcv); box = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0); - gtk_container_add ((GtkContainer *)tool, box); + gtk_box_pack_start ((GtkBox *) box, img, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) tool, box); gtk_widget_show_all (tool); gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h); gtk_widget_set_size_request (tool, w+2, h+2); box = gtk_label_new (_("Account Wizard")); tab_label = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)tab_label, box, FALSE, FALSE, 2); - gtk_box_pack_start ((GtkBox *)tab_label, tool, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) tab_label, box, FALSE, FALSE, 2); + gtk_box_pack_start ((GtkBox *) tab_label, tool, FALSE, FALSE, 0); gtk_widget_show_all (tab_label); return tab_label; diff --git a/capplet/settings/mail-capplet-shell.c b/capplet/settings/mail-capplet-shell.c index cb5c7ec0e4..fecc0a67ad 100644 --- a/capplet/settings/mail-capplet-shell.c +++ b/capplet/settings/mail-capplet-shell.c @@ -104,7 +104,7 @@ mail_capplet_shell_finalize (GObject *object) static void ms_ctrl_w_pressed (MailCappletShell *shell) { - mail_view_close_view ((MailView *)shell->view); + mail_view_close_view ((MailView *) shell->view); } static void @@ -177,7 +177,7 @@ mail_capplet_shell_quit (MailCappletShell *shell) if (priv->main_loop) gtk_main_quit (); else - gtk_widget_hide ((GtkWidget *)shell); + gtk_widget_hide ((GtkWidget *) shell); } static void @@ -208,28 +208,28 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean gtk_window_set_title ((GtkWindow *)shell, _("Evolution account assistant")); ms_init_style (style); g_signal_connect ((GObject *)shell, "delete-event", G_CALLBACK (ms_delete_event), NULL); - gtk_window_set_type_hint ((GtkWindow *)shell, GDK_WINDOW_TYPE_HINT_NORMAL); + gtk_window_set_type_hint ((GtkWindow *) shell, GDK_WINDOW_TYPE_HINT_NORMAL); if (g_getenv("ANJAL_NO_MAX") == NULL && FALSE) { - GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *)shell); - gtk_window_set_default_size ((GtkWindow *)shell, gdk_screen_get_width (scr), gdk_screen_get_height (scr)); - gtk_window_set_decorated ((GtkWindow *)shell, FALSE); + GdkScreen *scr = gtk_widget_get_screen ((GtkWidget *) shell); + gtk_window_set_default_size ((GtkWindow *) shell, gdk_screen_get_width (scr), gdk_screen_get_height (scr)); + gtk_window_set_decorated ((GtkWindow *) shell, FALSE); } else { - gtk_window_set_default_size ((GtkWindow *)shell, 1024, 500); + gtk_window_set_default_size ((GtkWindow *) shell, 1024, 500); } priv->main_loop = main_loop; priv->box = (GtkWidget *) gtk_vbox_new (FALSE, 0); - gtk_widget_show ((GtkWidget *)priv->box); + gtk_widget_show ((GtkWidget *) priv->box); if (!socket_id) { - gtk_container_add ((GtkContainer *)shell, priv->box); + gtk_container_add ((GtkContainer *) shell, priv->box); } else { GtkWidget *plug = gtk_plug_new (socket_id); - gtk_container_add ((GtkContainer *)plug, priv->box); + gtk_container_add ((GtkContainer *) plug, priv->box); g_signal_connect (plug, "destroy", G_CALLBACK (gtk_main_quit), NULL); gtk_widget_show (plug); - gtk_widget_hide ((GtkWidget *)shell); + gtk_widget_hide ((GtkWidget *) shell); } @@ -242,8 +242,8 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean shell->view = mail_view_new (); shell->view->session = shell->priv->session; - gtk_widget_show ((GtkWidget *)shell->view); - gtk_box_pack_end ((GtkBox *)priv->box, (GtkWidget *)shell->view, TRUE, TRUE, 2); + gtk_widget_show ((GtkWidget *) shell->view); + gtk_box_pack_end ((GtkBox *) priv->box, (GtkWidget *) shell->view, TRUE, TRUE, 2); mail_config_init (shell->priv->session); mail_msg_init (); @@ -254,12 +254,12 @@ mail_capplet_shell_construct (MailCappletShell *shell, gint socket_id, gboolean if (just_druid) { MailViewChild *mc; - gtk_notebook_set_show_tabs ((GtkNotebook *)shell->view, FALSE); - mc = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_ACCOUNT, NULL); + gtk_notebook_set_show_tabs ((GtkNotebook *) shell->view, FALSE); + mc = mail_view_add_page ((MailView *) shell->view, MAIL_VIEW_ACCOUNT, NULL); g_signal_connect (mc, "view-close", G_CALLBACK(ms_show_post_druid), shell); setup_abooks (); } else - shell->priv->settings_view = mail_view_add_page ((MailView *)shell->view, MAIL_VIEW_SETTINGS, NULL); + shell->priv->settings_view = mail_view_add_page ((MailView *) shell->view, MAIL_VIEW_SETTINGS, NULL); } diff --git a/capplet/settings/mail-settings-view.c b/capplet/settings/mail-settings-view.c index 596e7222a1..01a984d4ba 100644 --- a/capplet/settings/mail-settings-view.c +++ b/capplet/settings/mail-settings-view.c @@ -138,7 +138,7 @@ build_account_button (MailSettingsView *acview, EAccount *account) if (FALSE) { tlabel = (GtkWidget *)gtk_image_new_from_stock (account ? "gtk-edit" : "gtk-new", GTK_ICON_SIZE_BUTTON); gtk_widget_show (tlabel); - gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) tbox, tlabel, FALSE, FALSE, 6); } if (account) @@ -149,17 +149,17 @@ build_account_button (MailSettingsView *acview, EAccount *account) if (account) g_free (tmp); gtk_widget_show (tlabel); - gtk_box_pack_start ((GtkBox *)tbox, tlabel, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) tbox, tlabel, FALSE, FALSE, 0); gtk_widget_show (tbox); - gtk_container_add ((GtkContainer *)label, tbox); + gtk_container_add ((GtkContainer *) label, tbox); g_object_set_data ((GObject *)label, "account", account); g_signal_connect(label, "clicked", G_CALLBACK(msv_edit_account), acview); - gtk_box_pack_start ((GtkBox *)box1, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box1, label, FALSE, FALSE, 0); gtk_widget_show (label); if (account) { tlabel = gtk_button_new_from_stock ("gtk-delete"); - gtk_box_pack_start ((GtkBox *)box1, tlabel, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) box1, tlabel, FALSE, FALSE, 12); gtk_widget_show (tlabel); g_object_set_data ((GObject *)tlabel, "account", account); g_signal_connect (tlabel, "clicked", G_CALLBACK(msv_delete_account), acview); @@ -177,11 +177,11 @@ msv_regen_view (MailSettingsView *acview) GtkWidget *box, *label; gchar *buff; - gtk_container_foreach ((GtkContainer *)acview->priv->box, (GtkCallback)gtk_widget_destroy, NULL); + gtk_container_foreach ((GtkContainer *) acview->priv->box, (GtkCallback) gtk_widget_destroy, NULL); label = gtk_label_new (NULL); buff = g_markup_printf_escaped ("<span size=\"large\" weight=\"bold\">%s</span>", _("Account management")); - gtk_label_set_markup ((GtkLabel *)label, buff); + gtk_label_set_markup ((GtkLabel *) label, buff); g_free (buff); PACK_BOX (label,12); @@ -200,16 +200,16 @@ mail_settings_view_construct (MailSettingsView *acview) { acview->priv->scroll = gtk_scrolled_window_new (NULL, NULL); gtk_widget_show (acview->priv->scroll); - gtk_container_add ((GtkContainer *)acview, acview->priv->scroll); - gtk_scrolled_window_set_policy ((GtkScrolledWindow *)acview->priv->scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); + gtk_container_add ((GtkContainer *) acview, acview->priv->scroll); + gtk_scrolled_window_set_policy ((GtkScrolledWindow *) acview->priv->scroll, GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC); acview->priv->box = gtk_vbox_new (FALSE, 0); gtk_widget_show (acview->priv->box); - gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *)acview->priv->scroll, acview->priv->box); + gtk_scrolled_window_add_with_viewport ((GtkScrolledWindow *) acview->priv->scroll, acview->priv->box); acview->priv->accounts = e_get_account_list (); g_signal_connect (acview->priv->accounts, "account-added", G_CALLBACK(msv_account_added), acview); msv_regen_view (acview); - gtk_widget_show ((GtkWidget *)acview); + gtk_widget_show ((GtkWidget *) acview); } @@ -243,23 +243,23 @@ mail_settings_view_get_tab_widget (MailSettingsView *mcv) img = gtk_image_new_from_pixbuf (pbuf); tool = gtk_button_new (); - gtk_button_set_relief ((GtkButton *)tool, GTK_RELIEF_NONE); - gtk_button_set_focus_on_click ((GtkButton *)tool, FALSE); + gtk_button_set_relief ((GtkButton *) tool, GTK_RELIEF_NONE); + gtk_button_set_focus_on_click ((GtkButton *) tool, FALSE); gtk_widget_set_tooltip_text (tool, _("Close Tab")); g_signal_connect (tool, "clicked", G_CALLBACK(msv_close), mcv); box = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)box, img, FALSE, FALSE, 0); - gtk_container_add ((GtkContainer *)tool, box); + gtk_box_pack_start ((GtkBox *) box, img, FALSE, FALSE, 0); + gtk_container_add ((GtkContainer *) tool, box); gtk_widget_show_all (tool); gtk_icon_size_lookup_for_settings (gtk_widget_get_settings (tool) , GTK_ICON_SIZE_MENU, &w, &h); gtk_widget_set_size_request (tool, w+2, h+2); box = gtk_label_new (_("Settings")); tab_label = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)tab_label, box, FALSE, FALSE, 2); + gtk_box_pack_start ((GtkBox *) tab_label, box, FALSE, FALSE, 2); #ifndef ANJAL_SETTINGS - gtk_box_pack_start ((GtkBox *)tab_label, tool, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) tab_label, tool, FALSE, FALSE, 0); #endif gtk_widget_show_all (tab_label); diff --git a/capplet/settings/mail-view.c b/capplet/settings/mail-view.c index 4c7c9ddd05..71fdf07dc3 100644 --- a/capplet/settings/mail-view.c +++ b/capplet/settings/mail-view.c @@ -84,7 +84,7 @@ mail_view_init (MailView *shell) static void mail_view_finalize (GObject *object) { - MailView *shell = (MailView *)object; + MailView *shell = (MailView *) object; MailViewPrivate *priv = shell->priv; g_list_free (priv->children); @@ -97,20 +97,20 @@ static void mv_set_folder_uri (AnjalMailView *mv, const gchar *uri) { #ifndef ANJAL_SETTINGS - mail_view_set_folder_uri ((MailView *)mv, uri); + mail_view_set_folder_uri ((MailView *) mv, uri); #endif } static void set_folder_tree (AnjalMailView *mv, EMFolderTree *tree) { - mail_view_set_folder_tree ((MailView *)mv, (GtkWidget *)tree); + mail_view_set_folder_tree ((MailView *) mv, (GtkWidget *) tree); } static void set_search (AnjalMailView *mv, const gchar *search) { #ifndef ANJAL_SETTINGS - mail_view_set_search ((MailView *)mv, search); + mail_view_set_search ((MailView *) mv, search); #endif } @@ -128,9 +128,9 @@ mail_view_class_init (MailViewClass *klass) G_TYPE_NONE, 0); mail_view_parent_class = g_type_class_peek_parent (klass); - ((AnjalMailViewClass *)klass)->set_folder_uri = mv_set_folder_uri; - ((AnjalMailViewClass *)klass)->set_folder_tree = set_folder_tree; - ((AnjalMailViewClass *)klass)->set_search = set_search; + ((AnjalMailViewClass *) klass)->set_folder_uri = mv_set_folder_uri; + ((AnjalMailViewClass *) klass)->set_folder_tree = set_folder_tree; + ((AnjalMailViewClass *) klass)->set_search = set_search; object_class->finalize = mail_view_finalize; @@ -139,7 +139,7 @@ mail_view_class_init (MailViewClass *klass) static void mv_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user_data) { - MailView *shell = (MailView *)notebook; + MailView *shell = (MailView *) notebook; MailViewPrivate *priv = shell->priv; MailViewChild *curr = priv->current_view; MailViewChild *child; @@ -147,37 +147,37 @@ mv_switch (GtkNotebook *notebook, GtkWidget *page, guint page_num, gpointer user curr->flags &= ~MAIL_VIEW_HOLD_FOCUS; - child = (MailViewChild *)gtk_notebook_get_nth_page (notebook, current_child); + child = (MailViewChild *) gtk_notebook_get_nth_page (notebook, current_child); priv->current_view = child; REALIGN_NODES (shell->priv->children,child); #ifndef ANJAL_SETTINGS if (child->type == MAIL_VIEW_COMPOSER) - mail_composer_view_activate ((MailComposerView *)child, shell->folder_tree, shell->check_mail, shell->sort_by, TRUE); + mail_composer_view_activate ((MailComposerView *) child, shell->folder_tree, shell->check_mail, shell->sort_by, TRUE); else if (child->type == MAIL_VIEW_MESSAGE) - mail_conv_view_activate ((MailConvView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); + mail_conv_view_activate ((MailConvView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); else if (child->type == MAIL_VIEW_FOLDER) { - mail_folder_view_activate ((MailFolderView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, TRUE); + mail_folder_view_activate ((MailFolderView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, TRUE); anjal_shell_view_restore_state (shell->shell_view, child->uri); } else if (child->type == MAIL_VIEW_ACCOUNT) - mail_account_view_activate ((MailAccountView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); + mail_account_view_activate ((MailAccountView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); else if (child->type == MAIL_VIEW_SETTINGS) - mail_settings_view_activate ((MailSettingsView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE); + mail_settings_view_activate ((MailSettingsView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE); #else if (child->type == MAIL_VIEW_ACCOUNT) - mail_account_view_activate ((MailAccountView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); + mail_account_view_activate ((MailAccountView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, FALSE); else if (child->type == MAIL_VIEW_SETTINGS) - mail_settings_view_activate ((MailSettingsView *)child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE); + mail_settings_view_activate ((MailSettingsView *) child, shell->tree, shell->folder_tree, shell->check_mail, shell->sort_by, shell->slider, FALSE); #endif } static void mail_view_construct (MailView *shell) { - gtk_notebook_set_show_tabs ((GtkNotebook *)shell, TRUE); - gtk_notebook_set_scrollable ((GtkNotebook *)shell, TRUE); - gtk_notebook_popup_disable ((GtkNotebook *)shell); + gtk_notebook_set_show_tabs ((GtkNotebook *) shell, TRUE); + gtk_notebook_set_scrollable ((GtkNotebook *) shell, TRUE); + gtk_notebook_popup_disable ((GtkNotebook *) shell); g_signal_connect_after (shell, "switch-page", G_CALLBACK(mv_switch), shell); } @@ -207,8 +207,8 @@ mv_get_page_number (GtkNotebook *note, GtkWidget *widget) static void mv_close_mcv (MailViewChild *mfv, MailView *mv) { - gint n = mv_get_page_number ((GtkNotebook *)mv, (GtkWidget *)mfv); - gint pos = gtk_notebook_get_current_page ((GtkNotebook *)mv); + gint n = mv_get_page_number ((GtkNotebook *) mv, (GtkWidget *) mfv); + gint pos = gtk_notebook_get_current_page ((GtkNotebook *) mv); MailViewChild *child; gboolean removing_viewed = FALSE; @@ -222,7 +222,7 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) gboolean found = FALSE; while (!found && tmp) { - MailViewChild *tchild = (MailViewChild *)tmp->data; + MailViewChild *tchild = (MailViewChild *) tmp->data; if (tchild && tchild != mfv && tchild->type == MAIL_VIEW_FOLDER) found = true; @@ -234,13 +234,13 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) } if (mfv->type == MAIL_VIEW_COMPOSER) { - if (!mail_composer_view_can_quit ((MailComposerView *)mfv)) + if (!mail_composer_view_can_quit ((MailComposerView *) mfv)) return; } #endif g_signal_handlers_block_by_func (mv, mv_switch, mv); - gtk_notebook_remove_page ((GtkNotebook *)mv, n); + gtk_notebook_remove_page ((GtkNotebook *) mv, n); g_signal_handlers_unblock_by_func (mv, mv_switch, mv); if (mfv == mv->priv->children->data) @@ -250,28 +250,28 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) if (!removing_viewed) return; - child = (MailViewChild *)mv->priv->children->data; + child = (MailViewChild *) mv->priv->children->data; mv->priv->current_view = child; - pos = mv_get_page_number ((GtkNotebook *)mv, (GtkWidget *)child); - gtk_notebook_set_current_page ((GtkNotebook *)mv, pos); + pos = mv_get_page_number ((GtkNotebook *) mv, (GtkWidget *) child); + gtk_notebook_set_current_page ((GtkNotebook *) mv, pos); #ifndef ANJAL_SETTINGS if (child->type == MAIL_VIEW_COMPOSER) - mail_composer_view_activate ((MailComposerView *)child, mv->folder_tree, mv->check_mail, mv->sort_by, TRUE); + mail_composer_view_activate ((MailComposerView *) child, mv->folder_tree, mv->check_mail, mv->sort_by, TRUE); else if (child->type == MAIL_VIEW_MESSAGE) - mail_conv_view_activate ((MailConvView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); + mail_conv_view_activate ((MailConvView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); else if (child->type == MAIL_VIEW_FOLDER) { - mail_folder_view_activate ((MailFolderView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, TRUE); - anjal_shell_view_restore_state ((EShellView *)mv->shell_view, child->uri); + mail_folder_view_activate ((MailFolderView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, TRUE); + anjal_shell_view_restore_state ((EShellView *) mv->shell_view, child->uri); } else if (child->type == MAIL_VIEW_ACCOUNT) - mail_account_view_activate ((MailAccountView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); + mail_account_view_activate ((MailAccountView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); else if (child->type == MAIL_VIEW_SETTINGS) - mail_settings_view_activate ((MailSettingsView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); + mail_settings_view_activate ((MailSettingsView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); #else if (child->type == MAIL_VIEW_ACCOUNT) - mail_account_view_activate ((MailAccountView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); + mail_account_view_activate ((MailAccountView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); else if (child->type == MAIL_VIEW_SETTINGS) - mail_settings_view_activate ((MailSettingsView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); + mail_settings_view_activate ((MailSettingsView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); #endif } @@ -280,7 +280,7 @@ mv_close_mcv (MailViewChild *mfv, MailView *mv) static void mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv) { - MailConvView *conv = (MailConvView *)mv_switch_message_view (mv, umid); + MailConvView *conv = (MailConvView *) mv_switch_message_view (mv, umid); *(MailConvView **)data = conv; if (conv) @@ -292,7 +292,7 @@ mv_message_new (MailFolderView *mfv, gpointer data, gchar *umid, MailView *mv) static void mv_search_set (MailFolderView *mfv, MailView *mv) { - anjal_shell_view_restore_state (mv->shell_view, ((MailViewChild *)mfv)->uri); + anjal_shell_view_restore_state (mv->shell_view, ((MailViewChild *) mfv)->uri); } static void @@ -309,15 +309,15 @@ mail_view_add_folder (MailView *mv, gpointer data, gboolean block) gint position = 0; mail_folder_view_set_folder_pane (mfv, mv->folder_tree); if (!block) - mv->priv->current_view = (MailViewChild *)mfv; + mv->priv->current_view = (MailViewChild *) mfv; mv->priv->children = block ? g_list_append (mv->priv->children, mfv) : g_list_prepend (mv->priv->children, mfv); - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mfv, mfv->tab_label); - gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, TRUE); - gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mfv, FALSE); + position = gtk_notebook_append_page ((GtkNotebook *) mv, (GtkWidget *) mfv, mfv->tab_label); + gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) mfv, TRUE); + gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) mfv, FALSE); g_signal_connect (mfv, "view-close", G_CALLBACK(mv_close_mcv), mv); if (!block) - gtk_notebook_set_current_page ((GtkNotebook *)mv, position); + gtk_notebook_set_current_page ((GtkNotebook *) mv, position); g_signal_connect (mfv, "message-shown", G_CALLBACK(mv_message_shown), mv); g_signal_connect (mfv, "message-new", G_CALLBACK(mv_message_new), mv); g_signal_connect (mfv, "search-set", G_CALLBACK(mv_search_set), mv); @@ -325,7 +325,7 @@ mail_view_add_folder (MailView *mv, gpointer data, gboolean block) if (!block) mail_folder_view_activate (mfv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, TRUE); - return (MailViewChild *)mfv; + return (MailViewChild *) mfv; } static MailViewChild * @@ -341,29 +341,29 @@ mail_view_add_composer (MailView *mv, gpointer data, gboolean block) special = TRUE; data = NULL; } else - mcv = mail_composer_view_new_with_composer ((GtkWidget *)data); + mcv = mail_composer_view_new_with_composer ((GtkWidget *) data); if (!block) - mv->priv->current_view = (MailViewChild *)mcv; + mv->priv->current_view = (MailViewChild *) mcv; mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv); if (!special) - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mcv->tab_label); + position = gtk_notebook_append_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mcv->tab_label); else { - gint position = gtk_notebook_get_current_page ((GtkNotebook *)mv); - gtk_notebook_insert_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mcv->tab_label, position+1); + gint position = gtk_notebook_get_current_page ((GtkNotebook *) mv); + gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mcv->tab_label, position+1); } - gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, TRUE); - gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE); + gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, TRUE); + gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, FALSE); if (!block) - gtk_notebook_set_current_page ((GtkNotebook *)mv, position); + gtk_notebook_set_current_page ((GtkNotebook *) mv, position); if (!block) mail_composer_view_activate (mcv, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); g_signal_connect (mcv, "view-close", G_CALLBACK(mv_close_mcv), mv); g_signal_connect (mcv, "message-shown", G_CALLBACK(mv_message_shown), mv); - return (MailViewChild *)mcv; + return (MailViewChild *) mcv; } static MailViewChild * @@ -372,25 +372,25 @@ mail_view_add_message (MailView *mv, gpointer data, gboolean block) MailConvView *mcv = mail_conv_view_new (); gint position = 0; - gtk_widget_show ((GtkWidget *)mcv); + gtk_widget_show ((GtkWidget *) mcv); mcv->type = MAIL_VIEW_MESSAGE; if (!block) - mv->priv->current_view = (MailViewChild *)mcv; + mv->priv->current_view = (MailViewChild *) mcv; mv->priv->children = block ? g_list_append (mv->priv->children, mcv) : g_list_prepend (mv->priv->children, mcv); - position = gtk_notebook_get_current_page ((GtkNotebook *)mv); - gtk_notebook_insert_page ((GtkNotebook *)mv, (GtkWidget *)mcv, mail_conv_view_get_tab_widget (mcv), position+1); - gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, TRUE); - gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)mcv, FALSE); + position = gtk_notebook_get_current_page ((GtkNotebook *) mv); + gtk_notebook_insert_page ((GtkNotebook *) mv, (GtkWidget *) mcv, mail_conv_view_get_tab_widget (mcv), position+1); + gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, TRUE); + gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) mcv, FALSE); if (!block) - gtk_notebook_set_current_page ((GtkNotebook *)mv, position+1); + gtk_notebook_set_current_page ((GtkNotebook *) mv, position+1); if (!block) mail_conv_view_activate (mcv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); g_signal_connect (mcv, "view-close", G_CALLBACK(mv_close_mcv), mv); g_signal_connect (mcv, "message-shown", G_CALLBACK(mv_message_shown), mv); - return (MailViewChild *)mcv; + return (MailViewChild *) mcv; } #endif @@ -407,22 +407,22 @@ mail_view_add_settings (MailView *mv, gpointer data, gboolean block) MailSettingsView *msv = mail_settings_view_new (); gint position = 0; - gtk_widget_show ((GtkWidget *)msv); + gtk_widget_show ((GtkWidget *) msv); if (!block) - mv->priv->current_view = (MailViewChild *)msv; + mv->priv->current_view = (MailViewChild *) msv; mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_settings_view_get_tab_widget (msv)); + position = gtk_notebook_append_page ((GtkNotebook *) mv, (GtkWidget *) msv, mail_settings_view_get_tab_widget (msv)); g_signal_connect (msv, "view-close", G_CALLBACK(mv_close_mcv), mv); g_signal_connect (msv, "show-account", G_CALLBACK(mv_show_acc_mcv), mv); - gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE); - gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE); + gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) msv, TRUE); + gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) msv, FALSE); if (!block) - gtk_notebook_set_current_page ((GtkNotebook *)mv, position); + gtk_notebook_set_current_page ((GtkNotebook *) mv, position); if (!block) mail_settings_view_activate (msv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, mv->slider, FALSE); - return (MailViewChild *)msv; + return (MailViewChild *) msv; } static MailViewChild * @@ -434,20 +434,20 @@ mail_view_add_account (MailView *mv, gint position = 0; msv = mail_account_view_new (data, mv->session); - gtk_widget_show ((GtkWidget *)msv); + gtk_widget_show ((GtkWidget *) msv); if (!block) - mv->priv->current_view = (MailViewChild *)msv; + mv->priv->current_view = (MailViewChild *) msv; mv->priv->children = block ? g_list_append (mv->priv->children, msv) : g_list_prepend (mv->priv->children, msv); - position = gtk_notebook_append_page ((GtkNotebook *)mv, (GtkWidget *)msv, mail_account_view_get_tab_widget (msv)); + position = gtk_notebook_append_page ((GtkNotebook *) mv, (GtkWidget *) msv, mail_account_view_get_tab_widget (msv)); g_signal_connect_after (msv, "view-close", G_CALLBACK(mv_close_mcv), mv); - gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, TRUE); - gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *)msv, FALSE); + gtk_notebook_set_tab_reorderable (GTK_NOTEBOOK (mv), (GtkWidget *) msv, TRUE); + gtk_notebook_set_tab_detachable (GTK_NOTEBOOK (mv), (GtkWidget *) msv, FALSE); if (!block) - gtk_notebook_set_current_page ((GtkNotebook *)mv, position); + gtk_notebook_set_current_page ((GtkNotebook *) mv, position); if (!block) mail_account_view_activate (msv, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); - return (MailViewChild *)msv; + return (MailViewChild *) msv; } MailViewChild * @@ -481,7 +481,7 @@ mail_view_add_page (MailView *mv, guint16 type, gpointer data) child = mail_view_add_account (mv, data, block); break; } - gtk_widget_grab_focus ((GtkWidget *)child); + gtk_widget_grab_focus ((GtkWidget *) child); child->type = type; g_signal_handlers_unblock_by_func (mv, mv_switch, mv); @@ -497,11 +497,11 @@ mv_switch_folder_view (MailView *mv, const gchar *uri) gint i=0, len = g_list_length (mv->priv->children); GList *tmp = mv->priv->children; while (i<len) { - MailViewChild *child = (MailViewChild *)gtk_notebook_get_nth_page ((GtkNotebook *)mv, i); + MailViewChild *child = (MailViewChild *) gtk_notebook_get_nth_page ((GtkNotebook *) mv, i); if (child->type == MAIL_VIEW_FOLDER && !strcmp (uri, child->uri)) { if (child != mv->priv->current_view) { - gtk_notebook_set_current_page ((GtkNotebook *)mv, i); + gtk_notebook_set_current_page ((GtkNotebook *) mv, i); } return; } @@ -510,7 +510,7 @@ mv_switch_folder_view (MailView *mv, const gchar *uri) } mail_view_add_page (mv, MAIL_VIEW_FOLDER, NULL); - mail_folder_view_set_folder_uri ((MailFolderView *)mv->priv->current_view, uri); + mail_folder_view_set_folder_uri ((MailFolderView *) mv->priv->current_view, uri); } static MailConvView * @@ -521,8 +521,8 @@ mv_switch_message_view (MailView *mv, const gchar *uri) while (tmp) { MailViewChild *child = tmp->data; if (child->type == MAIL_VIEW_MESSAGE && !strcmp (uri, child->uri)) { - gtk_notebook_set_current_page ((GtkNotebook *)mv, i); - mail_conv_view_activate ((MailConvView *)child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); + gtk_notebook_set_current_page ((GtkNotebook *) mv, i); + mail_conv_view_activate ((MailConvView *) child, mv->tree, mv->folder_tree, mv->check_mail, mv->sort_by, FALSE); REALIGN_NODES (mv->priv->children,child); return NULL; } @@ -530,7 +530,7 @@ mv_switch_message_view (MailView *mv, const gchar *uri) tmp = tmp->next; } - return (MailConvView *)mail_view_add_page (mv, MAIL_VIEW_MESSAGE, NULL); + return (MailConvView *) mail_view_add_page (mv, MAIL_VIEW_MESSAGE, NULL); } void @@ -544,7 +544,7 @@ mail_view_set_folder_uri (MailView *mv, const gchar *uri) void mail_view_close_view (MailView *mv) { - MailViewChild *child = (MailViewChild *)mv->priv->current_view; + MailViewChild *child = (MailViewChild *) mv->priv->current_view; mv_close_mcv (child, mv); } @@ -559,19 +559,19 @@ mail_view_set_folder_tree (MailView *mv, GtkWidget *tree) static void mv_spinner_done (CamelFolder *f, gpointer data) { - MailView *mv = (MailView *)data; + MailView *mv = (MailView *) data; mv_spinner_show (mv, FALSE); } void mail_view_set_search (MailView *mv, const gchar *search) { - MailViewChild *child = (MailViewChild *)mv->priv->current_view; + MailViewChild *child = (MailViewChild *) mv->priv->current_view; if (child && child->type == MAIL_VIEW_FOLDER) { - MailFolderView *mfv = (MailFolderView *)child; + MailFolderView *mfv = (MailFolderView *) child; - mail_folder_view_set_search (mfv, search, e_shell_searchbar_get_search_text ((EShellSearchbar *)mv->priv->search_entry)); + mail_folder_view_set_search (mfv, search, e_shell_searchbar_get_search_text ((EShellSearchbar *) mv->priv->search_entry)); } } #endif diff --git a/composer/e-composer-private.c b/composer/e-composer-private.c index cb926b93ee..46206a4cca 100644 --- a/composer/e-composer-private.c +++ b/composer/e-composer-private.c @@ -343,41 +343,41 @@ e_composer_private_constructed (EMsgComposer *composer) tmp = gtk_hbox_new (FALSE, 0); tmp1 = gtk_image_new_from_icon_name ( "mail-send", GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 0); tmp1 = gtk_label_new_with_mnemonic (_("S_end")); - gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 6); gtk_widget_show_all (tmp); gtk_widget_reparent (send_widget, tmp_box); gtk_box_set_child_packing ( GTK_BOX (tmp_box), send_widget, FALSE, FALSE, 6, GTK_PACK_END); gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE); - send_widget = gtk_bin_get_child ((GtkBin *)send_widget); + send_widget = gtk_bin_get_child ((GtkBin *) send_widget); gtk_container_remove ( GTK_CONTAINER (send_widget), gtk_bin_get_child (GTK_BIN (send_widget))); - gtk_container_add ((GtkContainer *)send_widget, tmp); - gtk_button_set_relief ((GtkButton *)send_widget, GTK_RELIEF_NORMAL); + gtk_container_add ((GtkContainer *) send_widget, tmp); + gtk_button_set_relief ((GtkButton *) send_widget, GTK_RELIEF_NORMAL); path = "/main-toolbar/pre-main-toolbar/save-draft"; send_widget = gtk_ui_manager_get_widget (ui_manager, path); tmp = gtk_hbox_new (FALSE, 0); tmp1 = gtk_image_new_from_stock ( GTK_STOCK_SAVE, GTK_ICON_SIZE_BUTTON); - gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 0); tmp1 = gtk_label_new_with_mnemonic (_("Save draft")); - gtk_box_pack_start ((GtkBox *)tmp, tmp1, FALSE, FALSE, 3); + gtk_box_pack_start ((GtkBox *) tmp, tmp1, FALSE, FALSE, 3); gtk_widget_show_all (tmp); gtk_widget_reparent (send_widget, tmp_box); gtk_box_set_child_packing ( GTK_BOX (tmp_box), send_widget, FALSE, FALSE, 6, GTK_PACK_END); gtk_tool_item_set_is_important (GTK_TOOL_ITEM (send_widget), TRUE); - send_widget = gtk_bin_get_child ((GtkBin *)send_widget); + send_widget = gtk_bin_get_child ((GtkBin *) send_widget); gtk_container_remove ( GTK_CONTAINER (send_widget), gtk_bin_get_child (GTK_BIN (send_widget))); - gtk_container_add ((GtkContainer *)send_widget, tmp); - gtk_button_set_relief ((GtkButton *)send_widget, GTK_RELIEF_NORMAL); + gtk_container_add ((GtkContainer *) send_widget, tmp); + gtk_button_set_relief ((GtkButton *) send_widget, GTK_RELIEF_NORMAL); gtk_widget_show (tmp_box); gtk_box_pack_end (GTK_BOX (container), tmp_box, FALSE, FALSE, 3); diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c index a27ee9528d..98d1e6f295 100644 --- a/composer/e-msg-composer.c +++ b/composer/e-msg-composer.c @@ -192,7 +192,7 @@ emcu_part_to_html (CamelMimePart *part, mem = (CamelStreamMem *) camel_stream_mem_new (); camel_stream_mem_set_byte_array (mem, buf); - emfq = em_format_quote_new (NULL, (CamelStream *)mem, EM_FORMAT_QUOTE_KEEP_SIG); + emfq = em_format_quote_new (NULL, (CamelStream *) mem, EM_FORMAT_QUOTE_KEEP_SIG); ((EMFormat *) emfq)->composer = TRUE; if (source) { /* Copy over things we can, other things are internal. @@ -211,7 +211,7 @@ emcu_part_to_html (CamelMimePart *part, camel_stream_write((CamelStream *) mem, "", 1, cancellable, NULL); g_object_unref (mem); - text = (gchar *)buf->data; + text = (gchar *) buf->data; if (len) *len = buf->len-1; g_byte_array_free (buf, FALSE); @@ -225,12 +225,12 @@ emcu_remove_xevolution_headers (CamelMimeMessage *message) { struct _camel_header_raw *scan, *list = NULL; - for (scan = ((CamelMimePart *)message)->headers;scan;scan=scan->next) + for (scan = ((CamelMimePart *) message)->headers;scan;scan=scan->next) if (!strncmp(scan->name, "X-Evolution", 11)) camel_header_raw_append (&list, scan->name, scan->value, scan->offset); for (scan=list;scan;scan=scan->next) - camel_medium_remove_header ((CamelMedium *)message, scan->name); + camel_medium_remove_header ((CamelMedium *) message, scan->name); return list; } @@ -355,7 +355,7 @@ best_charset (GByteArray *buf, return charset; /* Try to find something that will work */ - if (!(charset = (gchar *) camel_charset_best ((const gchar *)buf->data, buf->len))) { + if (!(charset = (gchar *) camel_charset_best ((const gchar *) buf->data, buf->len))) { *encoding = CAMEL_TRANSFER_ENCODING_7BIT; return NULL; } @@ -3154,7 +3154,7 @@ e_msg_composer_new_with_message (EShell *shell, if (postto) { e_composer_header_table_set_post_to_list (table, postto); - g_list_foreach (postto, (GFunc)g_free, NULL); + g_list_foreach (postto, (GFunc) g_free, NULL); g_list_free (postto); postto = NULL; } diff --git a/e-util/e-alert.c b/e-util/e-alert.c index 12a92565a9..1858e338f8 100644 --- a/e-util/e-alert.c +++ b/e-util/e-alert.c @@ -234,12 +234,12 @@ e_alert_load (const gchar *path) for (scan = error->children;scan;scan=scan->next) { if (!strcmp((gchar *)scan->name, "primary")) { - if ((tmp = (gchar *)xmlNodeGetContent (scan))) { + if ((tmp = (gchar *) xmlNodeGetContent (scan))) { e->primary_text = g_strdup (dgettext (table->translation_domain, tmp)); xmlFree (tmp); } } else if (!strcmp((gchar *)scan->name, "secondary")) { - if ((tmp = (gchar *)xmlNodeGetContent (scan))) { + if ((tmp = (gchar *) xmlNodeGetContent (scan))) { e->secondary_text = g_strdup (dgettext (table->translation_domain, tmp)); xmlFree (tmp); } diff --git a/e-util/e-config.c b/e-util/e-config.c index 14765f853b..0f2a13f00b 100644 --- a/e-util/e-config.c +++ b/e-util/e-config.c @@ -93,7 +93,7 @@ G_DEFINE_TYPE ( static void config_finalize (GObject *object) { - EConfig *emp = (EConfig *)object; + EConfig *emp = (EConfig *) object; EConfigPrivate *p = emp->priv; GList *link; @@ -344,8 +344,8 @@ ec_add_static_items (EConfig *config) static gint ep_cmp (gconstpointer ap, gconstpointer bp) { - struct _widget_node *a = *((gpointer *)ap); - struct _widget_node *b = *((gpointer *)bp); + struct _widget_node *a = *((gpointer *) ap); + struct _widget_node *b = *((gpointer *) bp); return strcmp (a->item->path, b->item->path); } @@ -759,7 +759,7 @@ ec_rebuild (EConfig *emp) } else { wn->frame = page; if (page) - gtk_notebook_reorder_child ((GtkNotebook *)book, page, pageno); + gtk_notebook_reorder_child ((GtkNotebook *) book, page, pageno); } if (page) sectionno = 1; @@ -784,9 +784,9 @@ ec_rebuild (EConfig *emp) w = gtk_label_new_with_mnemonic (translated_label); gtk_widget_show (w); page = gtk_vbox_new (FALSE, 12); - gtk_container_set_border_width ((GtkContainer *)page, 12); + gtk_container_set_border_width ((GtkContainer *) page, 12); gtk_widget_show (page); - gtk_notebook_insert_page ((GtkNotebook *)book, page, w, pageno); + gtk_notebook_insert_page ((GtkNotebook *) book, page, w, pageno); gtk_container_child_set (GTK_CONTAINER (book), page, "tab-fill", FALSE, "tab-expand", FALSE, NULL); wn->frame = page; } @@ -879,8 +879,8 @@ ec_rebuild (EConfig *emp) section = gtk_vbox_new (FALSE, 6); else { section = gtk_table_new (1, 1, FALSE); - gtk_table_set_col_spacings ((GtkTable *)section, 6); - gtk_table_set_row_spacings ((GtkTable *)section, 6); + gtk_table_set_col_spacings ((GtkTable *) section, 6); + gtk_table_set_row_spacings ((GtkTable *) section, 6); } frame = g_object_new (gtk_frame_get_type (), @@ -892,7 +892,7 @@ ec_rebuild (EConfig *emp) "child", section, NULL), NULL); gtk_widget_show_all (frame); - gtk_box_pack_start ((GtkBox *)page, frame, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) page, frame, FALSE, FALSE, 0); wn->frame = frame; } nopage: @@ -986,9 +986,9 @@ ec_rebuild (EConfig *emp) if (book) { /* make this depend on flags?? */ - if (gtk_notebook_get_n_pages ((GtkNotebook *)book) == 1) { - gtk_notebook_set_show_tabs ((GtkNotebook *)book, FALSE); - gtk_notebook_set_show_border ((GtkNotebook *)book, FALSE); + if (gtk_notebook_get_n_pages ((GtkNotebook *) book) == 1) { + gtk_notebook_set_show_tabs ((GtkNotebook *) book, FALSE); + gtk_notebook_set_show_border ((GtkNotebook *) book, FALSE); } } @@ -1019,7 +1019,7 @@ void e_config_set_target (EConfig *emp, EConfigTarget *target) { if (emp->target != target) - ((EConfigClass *)G_OBJECT_GET_CLASS (emp))->set_target (emp, target); + ((EConfigClass *) G_OBJECT_GET_CLASS (emp))->set_target (emp, target); } static void @@ -1095,7 +1095,7 @@ e_config_create_widget (EConfig *emp) /* FIXME: for some reason ec_rebuild puts the widget on page 1, this is just to override that */ if (emp->type == E_CONFIG_BOOK) - gtk_notebook_set_current_page ((GtkNotebook *)emp->widget, 0); + gtk_notebook_set_current_page ((GtkNotebook *) emp->widget, 0); else { gtk_window_set_position (GTK_WINDOW (emp->widget), GTK_WIN_POS_CENTER); gtk_widget_show (emp->widget); @@ -1151,11 +1151,11 @@ e_config_create_window (EConfig *emp, GtkWindow *parent, const gchar *title) gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_content_area (GTK_DIALOG (w))), 0); gtk_container_set_border_width (GTK_CONTAINER (gtk_dialog_get_action_area (GTK_DIALOG (w))), 12); - gtk_box_pack_start ((GtkBox *)gtk_dialog_get_content_area (((GtkDialog *)w)), emp->widget, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) gtk_dialog_get_content_area (((GtkDialog *) w)), emp->widget, TRUE, TRUE, 0); } else { /* response is handled directly by the assistant stuff */ w = emp->widget; - gtk_window_set_title ((GtkWindow *)w, title); + gtk_window_set_title ((GtkWindow *) w, title); } emp->window = w; @@ -1172,9 +1172,9 @@ ec_call_page_check (EConfig *emp) } else { if (emp->window) { if (e_config_page_check (emp, NULL)) { - gtk_dialog_set_response_sensitive ((GtkDialog *)emp->window, GTK_RESPONSE_OK, TRUE); + gtk_dialog_set_response_sensitive ((GtkDialog *) emp->window, GTK_RESPONSE_OK, TRUE); } else { - gtk_dialog_set_response_sensitive ((GtkDialog *)emp->window, GTK_RESPONSE_OK, FALSE); + gtk_dialog_set_response_sensitive ((GtkDialog *) emp->window, GTK_RESPONSE_OK, FALSE); } } } @@ -1519,7 +1519,7 @@ e_config_target_free (EConfig *ep, gpointer o) { EConfigTarget *t = o; - ((EConfigClass *)G_OBJECT_GET_CLASS (ep))->target_free (ep, t); + ((EConfigClass *) G_OBJECT_GET_CLASS (ep))->target_free (ep, t); } /* ********************************************************************** */ @@ -1634,7 +1634,7 @@ emph_free_item (struct _EConfigItem *item) static void emph_free_group (struct _EConfigHookGroup *group) { - g_slist_foreach (group->items, (GFunc)emph_free_item, NULL); + g_slist_foreach (group->items, (GFunc) emph_free_item, NULL); g_slist_free (group->items); g_free (group->id); @@ -1774,7 +1774,7 @@ emph_construct_menu (EPluginHook *eph, xmlNodePtr root) struct _EConfigHookGroup *menu; xmlNodePtr node; EConfigHookTargetMap *map; - EConfigHookClass *class = (EConfigHookClass *)G_OBJECT_GET_CLASS (eph); + EConfigHookClass *class = (EConfigHookClass *) G_OBJECT_GET_CLASS (eph); gchar *tmp; d(printf(" loading menu\n")); @@ -1792,13 +1792,13 @@ emph_construct_menu (EPluginHook *eph, xmlNodePtr root) menu->id = e_plugin_xml_prop(root, "id"); if (menu->id == NULL) { g_warning("Plugin '%s' missing 'id' field in group for '%s'\n", eph->plugin->name, - ((EPluginHookClass *)G_OBJECT_GET_CLASS (eph))->id); + ((EPluginHookClass *) G_OBJECT_GET_CLASS (eph))->id); goto error; } menu->check = e_plugin_xml_prop(root, "check"); menu->commit = e_plugin_xml_prop(root, "commit"); menu->abort = e_plugin_xml_prop(root, "abort"); - menu->hook = (EConfigHook *)eph; + menu->hook = (EConfigHook *) eph; node = root->children; while (node) { if (0 == strcmp((gchar *)node->name, "item")) { @@ -1825,10 +1825,10 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) d(printf("loading config hook\n")); - if (((EPluginHookClass *)e_config_hook_parent_class)->construct (eph, ep, root) == -1) + if (((EPluginHookClass *) e_config_hook_parent_class)->construct (eph, ep, root) == -1) return -1; - class = ((EConfigHookClass *)G_OBJECT_GET_CLASS (eph))->config_class; + class = ((EConfigHookClass *) G_OBJECT_GET_CLASS (eph))->config_class; node = root->children; while (node) { @@ -1852,12 +1852,12 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) static void emph_finalize (GObject *o) { - EPluginHook *eph = (EPluginHook *)o; + EPluginHook *eph = (EPluginHook *) o; - g_slist_foreach (emph->groups, (GFunc)emph_free_group, NULL); + g_slist_foreach (emph->groups, (GFunc) emph_free_group, NULL); g_slist_free (emph->groups); - ((GObjectClass *)e_config_hook_parent_class)->finalize (o); + ((GObjectClass *) e_config_hook_parent_class)->finalize (o); } static void @@ -1899,5 +1899,5 @@ void e_config_hook_class_add_target_map (EConfigHookClass *class, const EConfigHookTargetMap *map) { - g_hash_table_insert (class->target_map, (gpointer)map->type, (gpointer)map); + g_hash_table_insert (class->target_map, (gpointer) map->type, (gpointer) map); } diff --git a/e-util/e-datetime-format.c b/e-util/e-datetime-format.c index df6ee06ea0..3748a470e0 100644 --- a/e-util/e-datetime-format.c +++ b/e-util/e-datetime-format.c @@ -560,7 +560,7 @@ e_datetime_format_add_setup_widget (GtkWidget *table, gint row, const gchar *com g_object_unref (store); fill_combo_formats (combo, key, kind); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, combo); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, combo); align = gtk_alignment_new (0.0, 0.5, 0.0, 0.0); gtk_container_add (GTK_CONTAINER (align), combo); diff --git a/e-util/e-event.c b/e-util/e-event.c index 10ea83b30b..4611995c91 100644 --- a/e-util/e-event.c +++ b/e-util/e-event.c @@ -59,7 +59,7 @@ G_DEFINE_TYPE ( static void event_finalize (GObject *object) { - EEvent *event = (EEvent *)object; + EEvent *event = (EEvent *) object; EEventPrivate *p = event->priv; if (event->target) @@ -78,7 +78,7 @@ event_finalize (GObject *object) g_free (node); } - g_slist_foreach (p->sorted, (GFunc)g_free, NULL); + g_slist_foreach (p->sorted, (GFunc) g_free, NULL); g_slist_free (p->sorted); /* Chain up to parent's finalize() method. */ @@ -158,12 +158,12 @@ e_event_add_items (EEvent *event, g_queue_push_tail (&event->priv->events, node); if (event->priv->sorted) { - g_slist_foreach (event->priv->sorted, (GFunc)g_free, NULL); + g_slist_foreach (event->priv->sorted, (GFunc) g_free, NULL); g_slist_free (event->priv->sorted); event->priv->sorted = NULL; } - return (gpointer)node; + return (gpointer) node; } /** @@ -186,7 +186,7 @@ e_event_remove_items (EEvent *event, gpointer handle) g_free (node); if (event->priv->sorted) { - g_slist_foreach (event->priv->sorted, (GFunc)g_free, NULL); + g_slist_foreach (event->priv->sorted, (GFunc) g_free, NULL); g_slist_free (event->priv->sorted); event->priv->sorted = NULL; } @@ -195,8 +195,8 @@ e_event_remove_items (EEvent *event, gpointer handle) static gint ee_cmp (gconstpointer ap, gconstpointer bp) { - gint a = ((struct _event_info **)ap)[0]->item->priority; - gint b = ((struct _event_info **)bp)[0]->item->priority; + gint a = ((struct _event_info **) ap)[0]->item->priority; + gint b = ((struct _event_info **) bp)[0]->item->priority; if (a < b) return 1; @@ -387,13 +387,13 @@ emph_event_handle (EEvent *ee, EEventItem *item, gpointer data) return; e_plugin_invoke ( - hook->hook.plugin, (gchar *)item->user_data, ee->target); + hook->hook.plugin, (gchar *) item->user_data, ee->target); } static void emph_free_item (EEventItem *item) { - g_free ((gchar *)item->id); + g_free ((gchar *) item->id); g_free (item->user_data); g_free (item); } @@ -403,7 +403,7 @@ emph_free_items (EEvent *ee, GSList *items, gpointer data) { /*EPluginHook *eph = data;*/ - g_slist_foreach (items, (GFunc)emph_free_item, NULL); + g_slist_foreach (items, (GFunc) emph_free_item, NULL); g_slist_free (items); } @@ -452,7 +452,7 @@ emph_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) d(printf("loading event hook\n")); - if (((EPluginHookClass *)e_event_hook_parent_class)-> + if (((EPluginHookClass *) e_event_hook_parent_class)-> construct (eph, ep, root) == -1) return -1; @@ -510,5 +510,5 @@ void e_event_hook_class_add_target_map (EEventHookClass *class, const EEventHookTargetMap *map) { g_hash_table_insert ( - class->target_map, (gpointer)map->type, (gpointer)map); + class->target_map, (gpointer) map->type, (gpointer) map); } diff --git a/e-util/e-html-utils.c b/e-util/e-html-utils.c index 087ac7a162..ceac32ffc6 100644 --- a/e-util/e-html-utils.c +++ b/e-util/e-html-utils.c @@ -130,7 +130,7 @@ email_address_extract (const guchar **cur, gchar **out, const guchar *linestart) if (dot > end) return NULL; - addr = g_strndup ((gchar *)start, end - start); + addr = g_strndup ((gchar *) start, end - start); *out -= *cur - start; *cur = end; @@ -158,7 +158,7 @@ is_citation (const guchar *c, gboolean saw_citation) return TRUE; /* Same if the next line is */ - p = (const guchar *)strchr ((const gchar *)c, '\n'); + p = (const guchar *) strchr ((const gchar *) c, '\n'); if (p && *++p == '>') return TRUE; @@ -233,7 +233,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) col = 0; - for (cur = linestart = (const guchar *)input; cur && *cur; cur = next) { + for (cur = linestart = (const guchar *) input; cur && *cur; cur = next) { gunichar u; if (flags & E_TEXT_TO_HTML_MARK_CITATION && col == 0) { @@ -264,7 +264,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) out += sprintf (out, "> "); } - u = g_utf8_get_char ((gchar *)cur); + u = g_utf8_get_char ((gchar *) cur); if (g_unichar_isalpha (u) && (flags & E_TEXT_TO_HTML_CONVERT_URLS)) { gchar *tmpurl = NULL, *refurl = NULL, *dispurl = NULL; @@ -310,7 +310,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) if (!*cur) break; - u = g_utf8_get_char ((gchar *)cur); + u = g_utf8_get_char ((gchar *) cur); } if (u == '@' && (flags & E_TEXT_TO_HTML_CONVERT_ADDRESSES)) { @@ -330,7 +330,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) if (!*cur) break; - u = g_utf8_get_char ((gchar *)cur); + u = g_utf8_get_char ((gchar *) cur); } } @@ -341,7 +341,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) u = *cur; next = cur + 1; } else - next = (const guchar *)g_utf8_next_char (cur); + next = (const guchar *) g_utf8_next_char (cur); out = check_size (&buffer, &buffer_size, out, 10); @@ -396,7 +396,7 @@ e_text_to_html_full (const gchar *input, guint flags, guint32 color) case ' ': if (flags & E_TEXT_TO_HTML_CONVERT_SPACES) { - if (cur == (const guchar *)input || + if (cur == (const guchar *) input || *(cur + 1) == ' ' || *(cur + 1) == '\t' || *(cur - 1) == '\n') { strcpy (out, " "); diff --git a/e-util/e-import.c b/e-util/e-import.c index ac41024e73..b5fbe27f68 100644 --- a/e-util/e-import.c +++ b/e-util/e-import.c @@ -355,7 +355,7 @@ e_import_target_free (EImport *ep, gpointer o) { EImportTarget *t = o; - ((EImportClass *)G_OBJECT_GET_CLASS (ep))->target_free (ep, t); + ((EImportClass *) G_OBJECT_GET_CLASS (ep))->target_free (ep, t); } EImportTargetURI * @@ -428,7 +428,7 @@ eih_supported (EImport *ei, EImportTarget *target, EImportImporter *im) { - struct _EImportHookImporter *ihook = (EImportHookImporter *)im; + struct _EImportHookImporter *ihook = (EImportHookImporter *) im; EImportHook *hook = im->user_data; return e_plugin_invoke (hook->hook.plugin, ihook->supported, target) != NULL; @@ -439,7 +439,7 @@ eih_get_widget (EImport *ei, EImportTarget *target, EImportImporter *im) { - struct _EImportHookImporter *ihook = (EImportHookImporter *)im; + struct _EImportHookImporter *ihook = (EImportHookImporter *) im; EImportHook *hook = im->user_data; return e_plugin_invoke (hook->hook.plugin, ihook->get_widget, target); @@ -450,7 +450,7 @@ eih_import (EImport *ei, EImportTarget *target, EImportImporter *im) { - struct _EImportHookImporter *ihook = (EImportHookImporter *)im; + struct _EImportHookImporter *ihook = (EImportHookImporter *) im; EImportHook *hook = im->user_data; e_plugin_invoke (hook->hook.plugin, ihook->import, target); @@ -461,7 +461,7 @@ eih_cancel (EImport *ei, EImportTarget *target, EImportImporter *im) { - struct _EImportHookImporter *ihook = (EImportHookImporter *)im; + struct _EImportHookImporter *ihook = (EImportHookImporter *) im; EImportHook *hook = im->user_data; e_plugin_invoke (hook->hook.plugin, ihook->cancel, target); @@ -470,7 +470,7 @@ eih_cancel (EImport *ei, static void eih_free_importer (EImportImporter *im, gpointer data) { - EImportHookImporter *ihook = (EImportHookImporter *)im; + EImportHookImporter *ihook = (EImportHookImporter *) im; g_free (ihook->supported); g_free (ihook->get_widget); @@ -483,7 +483,7 @@ emph_construct_importer (EPluginHook *eph, xmlNodePtr root) { struct _EImportHookImporter *item; EImportHookTargetMap *map; - EImportHookClass *class = (EImportHookClass *)G_OBJECT_GET_CLASS (eph); + EImportHookClass *class = (EImportHookClass *) G_OBJECT_GET_CLASS (eph); gchar *tmp; d (printf (" loading import item\n")); @@ -521,7 +521,7 @@ emph_construct_importer (EPluginHook *eph, xmlNodePtr root) return item; error: d (printf ("error!\n")); - eih_free_importer ((EImportImporter *)item, NULL); + eih_free_importer ((EImportImporter *) item, NULL); return NULL; } diff --git a/e-util/e-plugin.c b/e-util/e-plugin.c index fa7f0d9d88..17e4b50102 100644 --- a/e-util/e-plugin.c +++ b/e-util/e-plugin.c @@ -576,7 +576,7 @@ e_plugin_load_plugins (void) static void ep_list_plugin (gpointer key, gpointer val, gpointer dat) { - GSList **l = (GSList **)dat; + GSList **l = (GSList **) dat; *l = g_slist_prepend(*l, g_object_ref(val)); } @@ -770,7 +770,7 @@ e_plugin_xml_prop_domain (xmlNodePtr node, const gchar *id, const gchar *domain) { gchar *p, *out; - p = (gchar *)xmlGetProp (node, (const guchar *)id); + p = (gchar *) xmlGetProp (node, (const guchar *) id); if (p == NULL) return NULL; @@ -796,7 +796,7 @@ e_plugin_xml_prop_domain (xmlNodePtr node, const gchar *id, const gchar *domain) gint e_plugin_xml_int (xmlNodePtr node, const gchar *id, gint def) { - gchar *p = (gchar *)xmlGetProp (node, (const guchar *)id); + gchar *p = (gchar *) xmlGetProp (node, (const guchar *) id); if (p) return atoi (p); @@ -817,7 +817,7 @@ e_plugin_xml_int (xmlNodePtr node, const gchar *id, gint def) gchar * e_plugin_xml_content (xmlNodePtr node) { - gchar *p = (gchar *)xmlNodeGetContent (node); + gchar *p = (gchar *) xmlNodeGetContent (node); if (g_mem_is_system_malloc ()) { return p; @@ -846,7 +846,7 @@ e_plugin_xml_content_domain (xmlNodePtr node, const gchar *domain) { gchar *p, *out; - p = (gchar *)xmlNodeGetContent (node); + p = (gchar *) xmlNodeGetContent (node); if (p == NULL) return NULL; @@ -935,7 +935,7 @@ e_plugin_hook_mask (xmlNodePtr root, gchar *val, *p, *start, c; guint32 mask = 0; - val = (gchar *)xmlGetProp (root, (const guchar *)prop); + val = (gchar *) xmlGetProp (root, (const guchar *) prop); if (val == NULL) return 0; @@ -988,7 +988,7 @@ e_plugin_hook_id (xmlNodePtr root, gchar *val; gint i; - val = (gchar *)xmlGetProp (root, (const guchar *)prop); + val = (gchar *) xmlGetProp (root, (const guchar *) prop); if (val == NULL) return ~0; diff --git a/e-util/e-signature-list.c b/e-util/e-signature-list.c index f089b22d75..bb2029a32f 100644 --- a/e-util/e-signature-list.c +++ b/e-util/e-signature-list.c @@ -240,7 +240,7 @@ gconf_signatures_changed (GConfClient *client, static gpointer copy_func (gconstpointer data, gpointer closure) { - GObject *object = (GObject *)data; + GObject *object = (GObject *) data; g_object_ref (object); diff --git a/e-util/e-signature.c b/e-util/e-signature.c index a7ab2519ef..434ba1c4b4 100644 --- a/e-util/e-signature.c +++ b/e-util/e-signature.c @@ -69,7 +69,7 @@ xml_set_bool (xmlNodePtr node, gboolean v_boolean; gchar *buf; - if ((buf = (gchar *)xmlGetProp (node, (xmlChar *) name))) { + if ((buf = (gchar *) xmlGetProp (node, (xmlChar *) name))) { v_boolean = (!strcmp (buf, "true") || !strcmp (buf, "yes")); xmlFree (buf); @@ -89,7 +89,7 @@ xml_set_prop (xmlNodePtr node, { gchar *buf, *new_val; - buf = (gchar *)xmlGetProp (node, (xmlChar *) name); + buf = (gchar *) xmlGetProp (node, (xmlChar *) name); new_val = g_strdup (buf); xmlFree (buf); @@ -112,7 +112,7 @@ xml_set_content (xmlNodePtr node, { gchar *buf, *new_val; - buf = (gchar *)xmlNodeGetContent (node); + buf = (gchar *) xmlNodeGetContent (node); new_val = g_strdup (buf); xmlFree (buf); diff --git a/e-util/e-sorter-array.c b/e-util/e-sorter-array.c index 2630a6608f..21d3838d96 100644 --- a/e-util/e-sorter-array.c +++ b/e-util/e-sorter-array.c @@ -59,8 +59,8 @@ esort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) gint ret_val; gint int1, int2; - int1 = *(gint *)data1; - int2 = *(gint *)data2; + int1 = *(gint *) data1; + int2 = *(gint *) data2; ret_val = esa->compare (int1, int2, esa->cmp_cache, esa->closure); if (ret_val != 0) diff --git a/e-util/e-unicode.c b/e-util/e-unicode.c index 0fc5a8b5da..a287cd8236 100644 --- a/e-util/e-unicode.c +++ b/e-util/e-unicode.c @@ -83,7 +83,7 @@ e_utf8_from_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) gint i; /* iso-8859-1 */ ib = (gchar *) string; - new = ob = (gchar *)g_new (unsigned char, bytes * 2 + 1); + new = ob = (gchar *) g_new (unsigned char, bytes * 2 + 1); for (i = 0; i < (bytes); i++) { ob += e_unichar_to_utf8 (ib[i], ob); } @@ -135,7 +135,7 @@ e_utf8_to_iconv_string_sized (iconv_t ic, const gchar *string, gint bytes) const gchar *u; gunichar uc; - new = (gchar *)g_new (unsigned char, bytes * 4 + 1); + new = (gchar *) g_new (unsigned char, bytes * 4 + 1); u = string; len = 0; @@ -324,15 +324,15 @@ e_xml_get_translated_utf8_string_prop_by_name (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = g_strdup ((gchar *)prop); + ret_val = g_strdup ((gchar *) prop); xmlFree (prop); return ret_val; } combined_name = g_strdup_printf("_%s", prop_name); - prop = xmlGetProp ((xmlNode *) parent, (guchar *)combined_name); + prop = xmlGetProp ((xmlNode *) parent, (guchar *) combined_name); if (prop != NULL) { - ret_val = g_strdup (gettext ((gchar *)prop)); + ret_val = g_strdup (gettext ((gchar *) prop)); xmlFree (prop); } g_free (combined_name); diff --git a/e-util/e-xml-utils.c b/e-util/e-xml-utils.c index f67cd514bd..443f59fea9 100644 --- a/e-util/e-xml-utils.c +++ b/e-util/e-xml-utils.c @@ -79,7 +79,7 @@ e_xml_get_child_by_name_by_lang (const xmlNode *parent, child, (const guchar *)"lang"); if (this_lang == NULL) { C = child; - } else if (xmlStrcmp (this_lang, (xmlChar *)lang) == 0) { + } else if (xmlStrcmp (this_lang, (xmlChar *) lang) == 0) { #ifdef G_OS_WIN32 g_free (freeme); #endif @@ -104,7 +104,7 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, for (node = parent->xmlChildrenNode; node != NULL; node = node->next) { xmlChar *lang; - if (node->name == NULL || strcmp ((gchar *)node->name, name) != 0) { + if (node->name == NULL || strcmp ((gchar *) node->name, name) != 0) { continue; } lang = xmlGetProp (node, (const guchar *)"xml:lang"); @@ -115,7 +115,7 @@ e_xml_get_child_by_name_by_lang_list_with_score (const xmlNode *parent, for (l = lang_list, i = 0; l != NULL && i < *best_lang_score; l = l->next, i++) { - if (strcmp ((gchar *) l->data, (gchar *)lang) == 0) { + if (strcmp ((gchar *) l->data, (gchar *) lang) == 0) { best_node = node; *best_lang_score = i; } @@ -150,7 +150,7 @@ e_xml_get_child_by_name_by_lang_list (const xmlNode *parent, language_names = g_get_language_names (); while (*language_names != NULL) lang_list = g_list_append ( - (GList *)lang_list, (gchar *)*language_names++); + (GList *) lang_list, (gchar *)*language_names++); } return e_xml_get_child_by_name_by_lang_list_with_score (parent,name, @@ -170,7 +170,7 @@ e_xml_get_child_by_name_no_lang (const xmlNode *parent, for (node = parent->xmlChildrenNode; node != NULL; node = node->next) { xmlChar *lang; - if (node->name == NULL || strcmp ((gchar *)node->name, name) != 0) { + if (node->name == NULL || strcmp ((gchar *) node->name, name) != 0) { continue; } lang = xmlGetProp (node, (const guchar *)"xml:lang"); @@ -223,7 +223,7 @@ e_xml_set_integer_prop_by_name (xmlNode *parent, g_return_if_fail (prop_name != NULL); valuestr = g_strdup_printf ("%d", value); - xmlSetProp (parent, prop_name, (guchar *)valuestr); + xmlSetProp (parent, prop_name, (guchar *) valuestr); g_free (valuestr); } @@ -267,7 +267,7 @@ e_xml_set_uint_prop_by_name (xmlNode *parent, g_return_if_fail (prop_name != NULL); valuestr = g_strdup_printf ("%u", value); - xmlSetProp (parent, prop_name, (guchar *)valuestr); + xmlSetProp (parent, prop_name, (guchar *) valuestr); g_free (valuestr); } @@ -344,7 +344,7 @@ e_xml_get_double_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = e_flexible_strtod ((gchar *)prop, NULL); + ret_val = e_flexible_strtod ((gchar *) prop, NULL); xmlFree (prop); } return ret_val; @@ -369,7 +369,7 @@ e_xml_set_double_prop_by_name (xmlNode *parent, e_ascii_dtostr (buffer, sizeof (buffer), format, value); g_free (format); - xmlSetProp (parent, prop_name, (const guchar *)buffer); + xmlSetProp (parent, prop_name, (const guchar *) buffer); } gchar * @@ -394,7 +394,7 @@ e_xml_get_string_prop_by_name_with_default (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = g_strdup ((gchar *)prop); + ret_val = g_strdup ((gchar *) prop); xmlFree (prop); } else { ret_val = g_strdup (def); @@ -411,7 +411,7 @@ e_xml_set_string_prop_by_name (xmlNode *parent, g_return_if_fail (prop_name != NULL); if (value != NULL) { - xmlSetProp (parent, prop_name, (guchar *)value); + xmlSetProp (parent, prop_name, (guchar *) value); } } @@ -428,15 +428,15 @@ e_xml_get_translated_string_prop_by_name (const xmlNode *parent, prop = xmlGetProp ((xmlNode *) parent, prop_name); if (prop != NULL) { - ret_val = g_strdup ((gchar *)prop); + ret_val = g_strdup ((gchar *) prop); xmlFree (prop); return ret_val; } combined_name = g_strdup_printf("_%s", prop_name); - prop = xmlGetProp ((xmlNode *) parent, (guchar *)combined_name); + prop = xmlGetProp ((xmlNode *) parent, (guchar *) combined_name); if (prop != NULL) { - ret_val = g_strdup (gettext ((gchar *)prop)); + ret_val = g_strdup (gettext ((gchar *) prop)); xmlFree (prop); } g_free (combined_name); diff --git a/e-util/gconf-bridge.c b/e-util/gconf-bridge.c index ee2f33e231..2207cab22d 100644 --- a/e-util/gconf-bridge.c +++ b/e-util/gconf-bridge.c @@ -588,7 +588,7 @@ gconf_bridge_block_property_bindings (GConfBridge *bridge, g_hash_table_foreach ( bridge->bindings, (GHFunc) - prop_binding_block_cb, (gpointer)key); + prop_binding_block_cb, (gpointer) key); } void @@ -600,7 +600,7 @@ gconf_bridge_unblock_property_bindings (GConfBridge *bridge, g_hash_table_foreach ( bridge->bindings, (GHFunc) - prop_binding_unblock_cb, (gpointer)key); + prop_binding_unblock_cb, (gpointer) key); } /* Unbinds a property binding */ diff --git a/em-format/em-format-quote.c b/em-format/em-format-quote.c index be07485e3b..f0a005f9ab 100644 --- a/em-format/em-format-quote.c +++ b/em-format/em-format-quote.c @@ -304,7 +304,7 @@ emfq_format_address (GString *out, struct _camel_header_address *a) g_string_append_printf (out, "%s <", name); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((guchar *)a->name))) { + if ((real = camel_header_encode_phrase ((guchar *) a->name))) { mailaddr = g_strdup_printf ("%s <%s>", real, a->v.addr); g_free (real); mailto = camel_url_encode (mailaddr, "?=&()"); @@ -514,13 +514,13 @@ emfq_format_message (EMFormat *emf, "key=\"orig\" value=\"1\">-->\n" "<blockquote type=cite>\n"); - if (((CamelMimePart *)emf->message) != part) { + if (((CamelMimePart *) emf->message) != part) { camel_stream_printf ( stream, "%s</br>\n", _("-------- Forwarded Message --------")); - emfq_format_headers (emfq, stream, (CamelMedium *)part); + emfq_format_headers (emfq, stream, (CamelMedium *) part); } else if (emfq->flags & EM_FORMAT_QUOTE_HEADERS) - emfq_format_headers (emfq, stream, (CamelMedium *)part); + emfq_format_headers (emfq, stream, (CamelMedium *) part); em_format_part (emf, stream, part, cancellable); diff --git a/em-format/em-format.c b/em-format/em-format.c index 6f3d547081..680d32b900 100644 --- a/em-format/em-format.c +++ b/em-format/em-format.c @@ -99,7 +99,7 @@ emf_clone_inlines (gpointer key, gpointer val, gpointer data) { EMFormatCache *emfc = val, *new; - new = emf_insert_cache ((EMFormat *)data, emfc->partid); + new = emf_insert_cache ((EMFormat *) data, emfc->partid); new->state = emfc->state; if (emfc->valid) new->valid = camel_cipher_validity_clone (emfc->valid); @@ -174,7 +174,7 @@ static const EMFormatHandler * emf_find_handler (EMFormat *emf, const gchar *mime_type) { - EMFormatClass *emfc = (EMFormatClass *)G_OBJECT_GET_CLASS (emf); + EMFormatClass *emfc = (EMFormatClass *) G_OBJECT_GET_CLASS (emf); return g_hash_table_lookup (emfc->type_handlers, mime_type); } @@ -268,7 +268,7 @@ emf_format_secure (EMFormat *emf, if (emf->valid == NULL) { emf->valid = valid; } else { - camel_dlist_addtail (&emf->valid_parent->children, (CamelDListNode *)valid); + camel_dlist_addtail (&emf->valid_parent->children, (CamelDListNode *) valid); camel_cipher_validity_envelope (emf->valid_parent, valid); } @@ -453,8 +453,8 @@ merge_missing (gpointer key, gpointer value, gpointer userdata) void em_format_merge_handler (EMFormat *new, EMFormat *old) { - EMFormatClass *oldc = (EMFormatClass *)G_OBJECT_GET_CLASS (old); - EMFormatClass *newc = (EMFormatClass *)G_OBJECT_GET_CLASS (new); + EMFormatClass *oldc = (EMFormatClass *) G_OBJECT_GET_CLASS (old); + EMFormatClass *newc = (EMFormatClass *) G_OBJECT_GET_CLASS (new); struct _class_handlers fclasses; fclasses.old = oldc; @@ -541,7 +541,7 @@ em_format_fallback_handler (EMFormat *emf, s = strchr (mime_type, '/'); if (s == NULL) - mime = (gchar *)mime_type; + mime = (gchar *) mime_type; else { gsize len = (s-mime_type)+1; @@ -1128,7 +1128,7 @@ em_format_is_attachment (EMFormat *emf, CamelMimePart *part) { /*CamelContentType *ct = camel_mime_part_get_content_type(part);*/ - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); if (!dw) return 0; @@ -1322,11 +1322,11 @@ em_format_format_content (EMFormat *emf, CamelMimePart *part, GCancellable *cancellable) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); if (camel_content_type_is (dw->mime_type, "text", "*")) em_format_format_text ( - emf, stream, (CamelDataWrapper *)part, cancellable); + emf, stream, (CamelDataWrapper *) part, cancellable); else camel_data_wrapper_decode_to_stream_sync ( dw, stream, cancellable, NULL); @@ -1373,14 +1373,14 @@ em_format_format_text (EMFormat *emf, filter_stream = camel_stream_filter_new (null); g_object_unref (null); - windows = (CamelMimeFilterWindows *)camel_mime_filter_windows_new (charset); + windows = (CamelMimeFilterWindows *) camel_mime_filter_windows_new (charset); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filter_stream), CAMEL_MIME_FILTER (windows)); camel_data_wrapper_decode_to_stream_sync ( - dw, (CamelStream *)filter_stream, cancellable, NULL); - camel_stream_flush ((CamelStream *)filter_stream, cancellable, NULL); + dw, (CamelStream *) filter_stream, cancellable, NULL); + camel_stream_flush ((CamelStream *) filter_stream, cancellable, NULL); g_object_unref (filter_stream); charset = camel_mime_filter_windows_real_charset (windows); @@ -1388,7 +1388,7 @@ em_format_format_text (EMFormat *emf, charset = emf->default_charset; } - mem_stream = (CamelStream *)camel_stream_mem_new (); + mem_stream = (CamelStream *) camel_stream_mem_new (); filter_stream = camel_stream_filter_new (mem_stream); if ((filter = camel_mime_filter_charset_new (charset, "UTF-8"))) { @@ -1413,9 +1413,9 @@ em_format_format_text (EMFormat *emf, size = camel_data_wrapper_decode_to_stream_sync ( emf->mode == EM_FORMAT_MODE_SOURCE ? (CamelDataWrapper *) dw : - camel_medium_get_content ((CamelMedium *)dw), - (CamelStream *)filter_stream, cancellable, NULL); - camel_stream_flush ((CamelStream *)filter_stream, cancellable, NULL); + camel_medium_get_content ((CamelMedium *) dw), + (CamelStream *) filter_stream, cancellable, NULL); + camel_stream_flush ((CamelStream *) filter_stream, cancellable, NULL); g_object_unref (filter_stream); camel_stream_reset (mem_stream, NULL); @@ -1425,7 +1425,7 @@ em_format_format_text (EMFormat *emf, camel_stream_flush ((CamelStream *) stream, cancellable, NULL); } else { EM_FORMAT_GET_CLASS (emf)->format_optional ( - emf, stream, (CamelMimePart *)dw, + emf, stream, (CamelMimePart *) dw, mem_stream, cancellable); } @@ -1602,7 +1602,7 @@ emf_multipart_appledouble (EMFormat *emf, CamelMimePart *mime_part; gint len; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1633,7 +1633,7 @@ emf_multipart_mixed (EMFormat *emf, CamelMultipart *mp; gint i, nparts, len; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1663,7 +1663,7 @@ emf_multipart_alternative (EMFormat *emf, gint i, nparts, bestid = 0; CamelMimePart *best = NULL; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1753,7 +1753,7 @@ emf_multipart_encrypted (EMFormat *emf, return; } - mpe = (CamelMultipartEncrypted*)camel_medium_get_content ((CamelMedium *)part); + mpe = (CamelMultipartEncrypted*) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART_ENCRYPTED (mpe)) { em_format_format_error ( emf, stream, _("Could not parse MIME message. " @@ -1841,7 +1841,7 @@ emf_multipart_related (EMFormat *emf, gchar *oldpartid; GList *link; - mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART (mp)) { em_format_format_source (emf, stream, part, cancellable); @@ -1948,9 +1948,9 @@ emf_multipart_signed (EMFormat *emf, return; } - mps = (CamelMultipartSigned *)camel_medium_get_content ((CamelMedium *)part); + mps = (CamelMultipartSigned *) camel_medium_get_content ((CamelMedium *) part); if (!CAMEL_IS_MULTIPART_SIGNED (mps) - || (cpart = camel_multipart_get_part ((CamelMultipart *)mps, + || (cpart = camel_multipart_get_part ((CamelMultipart *) mps, CAMEL_MULTIPART_SIGNED_CONTENT)) == NULL) { em_format_format_error ( emf, stream, _("Could not parse MIME message. " @@ -2097,7 +2097,7 @@ emf_message_rfc822 (EMFormat *emf, GCancellable *cancellable, gboolean is_fallback) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) part); const EMFormatHandler *handle; gint len; gchar *parent_message_part_id; @@ -2134,7 +2134,7 @@ emf_message_deliverystatus (EMFormat *emf, gboolean is_fallback) { em_format_format_text ( - emf, stream, (CamelDataWrapper *)part, cancellable); + emf, stream, (CamelDataWrapper *) part, cancellable); } static void @@ -2189,17 +2189,17 @@ emf_inlinepgp_signed (EMFormat *emf, filtered_stream = camel_stream_filter_new (ostream); /* Add PGP header / footer filter */ - pgp_filter = (CamelMimeFilterPgp *)camel_mime_filter_pgp_new (); + pgp_filter = (CamelMimeFilterPgp *) camel_mime_filter_pgp_new (); camel_stream_filter_add ( CAMEL_STREAM_FILTER (filtered_stream), CAMEL_MIME_FILTER (pgp_filter)); g_object_unref (pgp_filter); /* Pass through the filters that have been setup */ - dw = camel_medium_get_content ((CamelMedium *)ipart); + dw = camel_medium_get_content ((CamelMedium *) ipart); camel_data_wrapper_decode_to_stream_sync ( - dw, (CamelStream *)filtered_stream, NULL, NULL); - camel_stream_flush ((CamelStream *)filtered_stream, NULL, NULL); + dw, (CamelStream *) filtered_stream, NULL, NULL); + camel_stream_flush ((CamelStream *) filtered_stream, NULL, NULL); g_object_unref (filtered_stream); /* Create a new text/plain MIME part containing the signed @@ -2280,7 +2280,7 @@ emf_inlinepgp_encrypted (EMFormat *emf, return; } - dw = camel_medium_get_content ((CamelMedium *)opart); + dw = camel_medium_get_content ((CamelMedium *) opart); mime_type = camel_data_wrapper_get_mime_type (dw); /* this ensures to show the 'opart' as inlined, if possible */ @@ -2368,7 +2368,7 @@ em_format_snoop_type (CamelMimePart *part) if (filename != NULL) name_type = e_util_guess_mime_type (filename, FALSE); - dw = camel_medium_get_content ((CamelMedium *)part); + dw = camel_medium_get_content ((CamelMedium *) part); if (!camel_data_wrapper_is_offline (dw)) { GByteArray *byte_array; CamelStream *stream; diff --git a/em-format/em-inline-filter.c b/em-format/em-inline-filter.c index 117ddb5366..c7a8014f6b 100644 --- a/em-format/em-inline-filter.c +++ b/em-format/em-inline-filter.c @@ -100,7 +100,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) else encoding = emif_types[emif->state].encoding; - g_byte_array_append (emif->data, (guchar *)data, len); + g_byte_array_append (emif->data, (guchar *) data, len); /* check the part will actually have content */ if (emif->data->len <= 0) { return; @@ -165,7 +165,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) dw->encoding = encoding; part = camel_mime_part_new (); - camel_medium_set_content ((CamelMedium *)part, dw); + camel_medium_set_content ((CamelMedium *) part, dw); camel_mime_part_set_encoding (part, encoding); g_object_unref (dw); @@ -191,7 +191,7 @@ inline_filter_add_part (EMInlineFilter *emif, const gchar *data, gint len) static gint inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) { - EMInlineFilter *emif = (EMInlineFilter *)f; + EMInlineFilter *emif = (EMInlineFilter *) f; gchar *inptr = in, *inend = in+len; gchar *data_start = in; gchar *start = in; @@ -297,9 +297,9 @@ inline_filter_scan (CamelMimeFilter *f, gchar *in, gsize len, gint final) } else if (start > data_start) { /* backup the last line, in case the tag is divided within buffers */ camel_mime_filter_backup (f, start, inend - start); - g_byte_array_append (emif->data, (guchar *)data_start, start - data_start); + g_byte_array_append (emif->data, (guchar *) data_start, start - data_start); } else { - g_byte_array_append (emif->data, (guchar *)data_start, inend - data_start); + g_byte_array_append (emif->data, (guchar *) data_start, inend - data_start); } return 0; @@ -330,7 +330,7 @@ inline_filter_filter (CamelMimeFilter *filter, gsize *outlen, gsize *outprespace) { - inline_filter_scan (filter, (gchar *)in, len, FALSE); + inline_filter_scan (filter, (gchar *) in, len, FALSE); *out = (gchar *)in; *outlen = len; @@ -346,7 +346,7 @@ inline_filter_complete (CamelMimeFilter *filter, gsize *outlen, gsize *outprespace) { - inline_filter_scan (filter, (gchar *)in, len, TRUE); + inline_filter_scan (filter, (gchar *) in, len, TRUE); *out = (gchar *)in; *outlen = len; diff --git a/filter/e-filter-code.c b/filter/e-filter-code.c index 510d4a8808..02d8c0cccf 100644 --- a/filter/e-filter-code.c +++ b/filter/e-filter-code.c @@ -39,7 +39,7 @@ filter_code_build_code (EFilterElement *element, struct _EFilterPart *part) { GList *l; - EFilterInput *fi = (EFilterInput *)element; + EFilterInput *fi = (EFilterInput *) element; gboolean is_rawcode = fi && fi->type && g_str_equal (fi->type, "rawcode"); if (!is_rawcode) @@ -47,7 +47,7 @@ filter_code_build_code (EFilterElement *element, l = fi->values; while (l) { - g_string_append (out, (gchar *)l->data); + g_string_append (out, (gchar *) l->data); l = g_list_next (l); } diff --git a/filter/e-filter-color.c b/filter/e-filter-color.c index 63aa2ca689..64272d8f30 100644 --- a/filter/e-filter-color.c +++ b/filter/e-filter-color.c @@ -83,7 +83,7 @@ filter_color_xml_decode (EFilterElement *element, prop = xmlGetProp(node, (xmlChar *)"spec"); if (prop != NULL) { - gdk_color_parse ((gchar *)prop, &fc->color); + gdk_color_parse ((gchar *) prop, &fc->color); xmlFree (prop); } else { /* try reading the old RGB properties */ diff --git a/filter/e-filter-datespec.c b/filter/e-filter-datespec.c index 34155f8073..d7aa93adc1 100644 --- a/filter/e-filter-datespec.c +++ b/filter/e-filter-datespec.c @@ -162,7 +162,7 @@ set_button (EFilterDatespec *fds) break; } - gtk_label_set_text ((GtkLabel *)fds->priv->label_button, label); + gtk_label_set_text ((GtkLabel *) fds->priv->label_button, label); } static void @@ -175,7 +175,7 @@ get_values (EFilterDatespec *fds) guint year, month, day; struct tm tm; - gtk_calendar_get_date ((GtkCalendar *)p->calendar_specify, &year, &month, &day); + gtk_calendar_get_date ((GtkCalendar *) p->calendar_specify, &year, &month, &day); memset (&tm, 0, sizeof (tm)); tm.tm_mday = day; tm.tm_year = year - 1900; @@ -187,7 +187,7 @@ get_values (EFilterDatespec *fds) case FDST_X_AGO: { gint val; - val = gtk_spin_button_get_value_as_int ((GtkSpinButton *)p->spin_relative); + val = gtk_spin_button_get_value_as_int ((GtkSpinButton *) p->spin_relative); fds->value = timespans[p->span].seconds * val; break; } case FDST_NOW: @@ -219,19 +219,19 @@ set_values (EFilterDatespec *fds) struct tm tm; localtime_r (&fds->value, &tm); - gtk_calendar_select_month ((GtkCalendar*)p->calendar_specify, tm.tm_mon, tm.tm_year + 1900); - gtk_calendar_select_day ((GtkCalendar*)p->calendar_specify, tm.tm_mday); + gtk_calendar_select_month ((GtkCalendar*) p->calendar_specify, tm.tm_mon, tm.tm_year + 1900); + gtk_calendar_select_day ((GtkCalendar*) p->calendar_specify, tm.tm_mday); break; } case FDST_X_AGO: p->span = get_best_span (fds->value); - gtk_spin_button_set_value ((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); + gtk_spin_button_set_value ((GtkSpinButton*) p->spin_relative, fds->value/timespans[p->span].seconds); gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 0); break; case FDST_X_FUTURE: p->span = get_best_span (fds->value); - gtk_spin_button_set_value ((GtkSpinButton*)p->spin_relative, fds->value/timespans[p->span].seconds); + gtk_spin_button_set_value ((GtkSpinButton*) p->spin_relative, fds->value/timespans[p->span].seconds); gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_relative), p->span); gtk_combo_box_set_active (GTK_COMBO_BOX (p->combobox_past_future), 1); break; @@ -306,7 +306,7 @@ button_clicked (GtkButton *button, EFilterDatespec *fds) set_button (fds); } - gtk_widget_destroy ((GtkWidget *)dialog); + gtk_widget_destroy ((GtkWidget *) dialog); } static gboolean @@ -382,10 +382,10 @@ filter_datespec_xml_decode (EFilterElement *element, while (n) { if (!strcmp ((gchar *)n->name, "datespec")) { val = xmlGetProp (n, (xmlChar *)"type"); - fds->type = atoi ((gchar *)val); + fds->type = atoi ((gchar *) val); xmlFree (val); val = xmlGetProp (n, (xmlChar *)"value"); - fds->value = atoi ((gchar *)val); + fds->value = atoi ((gchar *) val); xmlFree (val); break; } diff --git a/filter/e-filter-file.c b/filter/e-filter-file.c index 91942ec6f6..d9f87ce9c8 100644 --- a/filter/e-filter-file.c +++ b/filter/e-filter-file.c @@ -132,8 +132,8 @@ filter_file_xml_encode (EFilterElement *element) xmlSetProp (value, (xmlChar *) "name", (xmlChar *) element->name); xmlSetProp (value, (xmlChar *) "type", (xmlChar *) type); - cur = xmlNewChild (value, NULL, (xmlChar *)type, NULL); - xmlNodeSetContent (cur, (xmlChar *)file->path); + cur = xmlNewChild (value, NULL, (xmlChar *) type, NULL); + xmlNodeSetContent (cur, (xmlChar *) file->path); return value; } @@ -160,8 +160,8 @@ filter_file_xml_decode (EFilterElement *element, child = node->children; while (child != NULL) { - if (!strcmp ((gchar *)child->name, type)) { - str = (gchar *)xmlNodeGetContent (child); + if (!strcmp ((gchar *) child->name, type)) { + str = (gchar *) xmlNodeGetContent (child); file->path = g_strdup (str ? str : ""); xmlFree (str); @@ -246,7 +246,7 @@ e_filter_file_new_type_name (const gchar *type) EFilterFile *file; file = e_filter_file_new (); - file->type = (gchar *) xmlStrdup ((xmlChar *)type); + file->type = (gchar *) xmlStrdup ((xmlChar *) type); return file; } diff --git a/filter/e-filter-input.c b/filter/e-filter-input.c index 84a9ad83c4..9842a5d5ea 100644 --- a/filter/e-filter-input.c +++ b/filter/e-filter-input.c @@ -64,7 +64,7 @@ filter_input_finalize (GObject *object) xmlFree (input->type); - g_list_foreach (input->values, (GFunc)g_free, NULL); + g_list_foreach (input->values, (GFunc) g_free, NULL); g_list_free (input->values); /* Chain up to parent's finalize() method. */ @@ -167,7 +167,7 @@ filter_input_xml_encode (EFilterElement *element) xmlChar *str = link->data; xmlNodePtr cur; - cur = xmlNewChild (value, NULL, (xmlChar *)type, NULL); + cur = xmlNewChild (value, NULL, (xmlChar *) type, NULL); str = xmlEncodeEntitiesReentrant (NULL, str); xmlNodeSetContent (cur, str); @@ -180,7 +180,7 @@ filter_input_xml_encode (EFilterElement *element) static gint filter_input_xml_decode (EFilterElement *element, xmlNodePtr node) { - EFilterInput *input = (EFilterInput *)element; + EFilterInput *input = (EFilterInput *) element; gchar *name, *str, *type; xmlNodePtr child; @@ -199,8 +199,8 @@ filter_input_xml_decode (EFilterElement *element, xmlNodePtr node) child = node->children; while (child != NULL) { - if (!strcmp ((gchar *)child->name, type)) { - if (!(str = (gchar *)xmlNodeGetContent (child))) + if (!strcmp ((gchar *) child->name, type)) { + if (!(str = (gchar *) xmlNodeGetContent (child))) str = (gchar *)xmlStrdup ((xmlChar *)""); input->values = g_list_append (input->values, g_strdup (str)); diff --git a/filter/e-filter-int.c b/filter/e-filter-int.c index d82b36efda..dcb9b18fba 100644 --- a/filter/e-filter-int.c +++ b/filter/e-filter-int.c @@ -101,7 +101,7 @@ filter_int_xml_encode (EFilterElement *element) xmlSetProp (value, (xmlChar *) "type", (xmlChar *) type); sprintf (intval, "%d", filter_int->val); - xmlSetProp (value, (xmlChar *)type, (xmlChar *)intval); + xmlSetProp (value, (xmlChar *) type, (xmlChar *) intval); return value; } @@ -123,7 +123,7 @@ filter_int_xml_decode (EFilterElement *element, filter_int->type = g_strdup (type); xmlFree (type); - intval = (gchar *)xmlGetProp ( + intval = (gchar *) xmlGetProp ( node, (xmlChar *) (filter_int->type ? filter_int->type : "integer")); if (intval) { diff --git a/filter/e-filter-option.c b/filter/e-filter-option.c index 7eaa4324d5..25a979794b 100644 --- a/filter/e-filter-option.c +++ b/filter/e-filter-option.c @@ -159,7 +159,7 @@ filter_option_xml_create (EFilterElement *element, if (!strcmp ((gchar *)work->name, "title") || !strcmp ((gchar *)work->name, "_title")) { if (!title) { - if (!(tmp = (gchar *)xmlNodeGetContent (work))) + if (!(tmp = (gchar *) xmlNodeGetContent (work))) tmp = (gchar *)xmlStrdup ((xmlChar *)""); title = g_strdup (tmp); @@ -167,7 +167,7 @@ filter_option_xml_create (EFilterElement *element, } } else if (!strcmp ((gchar *)work->name, "code")) { if (!code) { - if (!(tmp = (gchar *)xmlNodeGetContent (work))) + if (!(tmp = (gchar *) xmlNodeGetContent (work))) tmp = (gchar *)xmlStrdup ((xmlChar *)""); code = g_strdup (tmp); @@ -204,7 +204,7 @@ filter_option_xml_create (EFilterElement *element, GSList *items, *i; struct _filter_option *op; - option->dynamic_func = g_strdup ((const gchar *)fn); + option->dynamic_func = g_strdup ((const gchar *) fn); /* get options now, to have them available when reading saved rules */ items = filter_option_get_dynamic_options (option); @@ -357,7 +357,7 @@ filter_option_get_widget (EFilterElement *element) e_filter_option_set_current (option, old_cur->value); /* free old list */ - g_list_foreach (old_ops, (GFunc)free_option, NULL); + g_list_foreach (old_ops, (GFunc) free_option, NULL); g_list_free (old_ops); } diff --git a/filter/e-filter-part.c b/filter/e-filter-part.c index 2b75b30235..521c0781aa 100644 --- a/filter/e-filter-part.c +++ b/filter/e-filter-part.c @@ -173,14 +173,14 @@ e_filter_part_xml_create (EFilterPart *part, } else if (!strcmp ((gchar *)n->name, "title") || !strcmp ((gchar *)n->name, "_title")) { if (!part->title) { - str = (gchar *)xmlNodeGetContent (n); + str = (gchar *) xmlNodeGetContent (n); part->title = g_strdup (str); if (str) xmlFree (str); } } else if (!strcmp ((gchar *)n->name, "code")) { if (!part->code) { - str = (gchar *)xmlNodeGetContent (n); + str = (gchar *) xmlNodeGetContent (n); part->code = g_strdup (str); if (str) xmlFree (str); diff --git a/filter/e-filter-rule.c b/filter/e-filter-rule.c index 18fd63b850..590ed597ee 100644 --- a/filter/e-filter-rule.c +++ b/filter/e-filter-rule.c @@ -476,7 +476,7 @@ filter_rule_xml_encode (EFilterRule *rule) gchar *escaped = g_markup_escape_text (rule->name, -1); work = xmlNewNode (NULL, (xmlChar *)"title"); - xmlNodeSetContent (work, (xmlChar *)escaped); + xmlNodeSetContent (work, (xmlChar *) escaped); xmlAddChild (node, work); g_free (escaped); @@ -555,7 +555,7 @@ filter_rule_xml_decode (EFilterRule *rule, if (!rule->name) { gchar *str, *decstr = NULL; - str = (gchar *)xmlNodeGetContent (work); + str = (gchar *) xmlNodeGetContent (work); if (str) { decstr = g_strdup (_(str)); xmlFree (str); @@ -661,7 +661,7 @@ filter_rule_get_widget (EFilterRule *rule, label = gtk_label_new_with_mnemonic (_("R_ule name:")); name = gtk_entry_new (); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, name); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, name); if (!rule->name) { rule->name = g_strdup (_("Untitled")); @@ -727,7 +727,7 @@ filter_rule_get_widget (EFilterRule *rule, _(thread_types[i])); } - gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, combobox); gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), rule->grouping); gtk_widget_show (combobox); @@ -763,7 +763,7 @@ filter_rule_get_widget (EFilterRule *rule, _(thread_types[i])); } - gtk_label_set_mnemonic_widget ((GtkLabel *)label, combobox); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, combobox); gtk_combo_box_set_active (GTK_COMBO_BOX (combobox), rule->threading); gtk_widget_show (combobox); diff --git a/filter/e-rule-context.c b/filter/e-rule-context.c index fac44fa8b9..99378242ee 100644 --- a/filter/e-rule-context.c +++ b/filter/e-rule-context.c @@ -101,7 +101,7 @@ new_rule_response (GtkWidget *dialog, } if (e_rule_context_find_rule (context, rule->name, rule->source)) { - e_alert_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *) dialog, "filter:bad-name-notunique", rule->name, NULL); @@ -169,20 +169,20 @@ rule_context_finalize (GObject *obj) { ERuleContext *context =(ERuleContext *) obj; - g_list_foreach (context->rule_set_list, (GFunc)free_rule_set, NULL); + g_list_foreach (context->rule_set_list, (GFunc) free_rule_set, NULL); g_list_free (context->rule_set_list); g_hash_table_destroy (context->rule_set_map); - g_list_foreach (context->part_set_list, (GFunc)free_part_set, NULL); + g_list_foreach (context->part_set_list, (GFunc) free_part_set, NULL); g_list_free (context->part_set_list); g_hash_table_destroy (context->part_set_map); g_free (context->error); - g_list_foreach (context->parts, (GFunc)g_object_unref, NULL); + g_list_foreach (context->parts, (GFunc) g_object_unref, NULL); g_list_free (context->parts); - g_list_foreach (context->rules, (GFunc)g_object_unref, NULL); + g_list_foreach (context->rules, (GFunc) g_object_unref, NULL); g_list_free (context->rules); G_OBJECT_CLASS (e_rule_context_parent_class)->finalize (obj); @@ -327,7 +327,7 @@ rule_context_save (ERuleContext *context, l = context->rule_set_list; while (l) { map = l->data; - rules = xmlNewDocNode (doc, NULL, (xmlChar *)map->name, NULL); + rules = xmlNewDocNode (doc, NULL, (xmlChar *) map->name, NULL); xmlAddChild (root, rules); rule = NULL; while ((rule = map->next (context, rule, NULL))) { @@ -365,7 +365,7 @@ rule_context_revert (ERuleContext *context, /* clear out anythign we have? */ return 0; - source_hash = g_hash_table_new ((GHashFunc)source_hashf, (GCompareFunc)source_eqf); + source_hash = g_hash_table_new ((GHashFunc) source_hashf, (GCompareFunc) source_eqf); /* setup stuff we have now */ /* Note that we assume there is only 1 set of rules in a given rule context, @@ -432,7 +432,7 @@ rule_context_revert (ERuleContext *context, xmlFreeDoc (userdoc); /* remove any we still have that weren't in the file */ - g_hash_table_foreach (source_hash, (GHFunc)revert_source_remove, context); + g_hash_table_foreach (source_hash, (GHFunc) revert_source_remove, context); g_hash_table_destroy (source_hash); return 0; diff --git a/filter/e-rule-editor.c b/filter/e-rule-editor.c index d8099b1eb8..3fdf5c40bc 100644 --- a/filter/e-rule-editor.c +++ b/filter/e-rule-editor.c @@ -150,7 +150,7 @@ add_editor_response (GtkWidget *dialog, gint button, ERuleEditor *editor) } if (e_rule_context_find_rule (editor->context, editor->edit->name, editor->edit->source)) { - e_alert_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *) dialog, "filter:bad-name-notunique", editor->edit->name, NULL); return; @@ -298,7 +298,7 @@ edit_editor_response (GtkWidget *dialog, gint button, ERuleEditor *editor) rule = e_rule_context_find_rule (editor->context, editor->edit->name, editor->edit->source); if (rule != NULL && rule != editor->current) { - e_alert_run_dialog_for_args ((GtkWindow *)dialog, + e_alert_run_dialog_for_args ((GtkWindow *) dialog, "filter:bad-name-notunique", rule->name, NULL); diff --git a/libgnomecanvas/gnome-canvas-text.c b/libgnomecanvas/gnome-canvas-text.c index 393d42216e..81176df6e8 100644 --- a/libgnomecanvas/gnome-canvas-text.c +++ b/libgnomecanvas/gnome-canvas-text.c @@ -979,7 +979,7 @@ gnome_canvas_text_get_property (GObject *object, g_value_set_double ( value, ((gdouble) pango_font_description_get_size (text->font_desc)) / - (gdouble)PANGO_SCALE); + (gdouble) PANGO_SCALE); break; } break; diff --git a/libgnomecanvas/gnome-canvas.c b/libgnomecanvas/gnome-canvas.c index 5ad73e7e62..38a6757a78 100644 --- a/libgnomecanvas/gnome-canvas.c +++ b/libgnomecanvas/gnome-canvas.c @@ -1858,7 +1858,7 @@ gnome_canvas_class_init (GnomeCanvasClass *klass) GObjectClass *object_class; GtkWidgetClass *widget_class; - object_class = (GObjectClass *)klass; + object_class = (GObjectClass *) klass; widget_class = (GtkWidgetClass *) klass; canvas_parent_class = g_type_class_peek_parent (klass); diff --git a/mail/e-mail-migrate.c b/mail/e-mail-migrate.c index 1c20791edc..3866148a22 100644 --- a/mail/e-mail-migrate.c +++ b/mail/e-mail-migrate.c @@ -470,7 +470,7 @@ em_update_message_notify_settings_2_21 (void) } } - g_slist_foreach (plugins, (GFunc)g_object_unref, NULL); + g_slist_foreach (plugins, (GFunc) g_object_unref, NULL); g_slist_free (plugins); } @@ -674,7 +674,7 @@ migrate_to_db (EShellBackend *shell_backend) "folders has been moved to SQLite since Evolution 2.24.\n\nPlease be " "patient while Evolution migrates your folders...")); - em_migrate_set_progress ( (double)i/(len+1)); + em_migrate_set_progress ( (double) i/(len+1)); store = setup_local_store (shell_backend, session); url = camel_service_get_camel_url (CAMEL_SERVICE (store)); @@ -703,14 +703,14 @@ migrate_to_db (EShellBackend *shell_backend) g_main_context_iteration (NULL, TRUE); } i++; - em_migrate_set_progress ( (double)i/(len+1)); + em_migrate_set_progress ( (double) i/(len+1)); while (e_iterator_is_valid (iter)) { EAccount *account = (EAccount *) e_iterator_get (iter); EAccountService *service; service = account->source; - em_migrate_set_progress ( (double)i/(len+1)); + em_migrate_set_progress ( (double) i/(len+1)); if (account->enabled && service->url != NULL && service->url[0] && strncmp (service->url, "mbox:", 5) != 0) { diff --git a/mail/e-mail-notebook-view.c b/mail/e-mail-notebook-view.c index 582e0af166..16e2fe308b 100644 --- a/mail/e-mail-notebook-view.c +++ b/mail/e-mail-notebook-view.c @@ -89,7 +89,7 @@ mnv_set_current_tab (EMailNotebookView *view, gtk_notebook_set_current_page (view->priv->book, page); animation = clutter_actor_animate ( - (ClutterActor *)view->priv->actor, + (ClutterActor *) view->priv->actor, CLUTTER_EASE_IN_SINE, 500, "opacity", 255, NULL); } #endif @@ -282,14 +282,14 @@ mnv_tab_closed_cb (ClutterTimeline *timeline, prev = e_mail_view_get_previous_view (page); if (prev) { - num = emnv_get_page_num (data->view, (GtkWidget *)prev); + num = emnv_get_page_num (data->view, (GtkWidget *) prev); mnv_set_current_tab (data->view, num); e_mail_tab_picker_set_current_tab (data->view->priv->tab_picker, num); } e_mail_tab_picker_remove_tab (data->view->priv->tab_picker, data->tab); gtk_notebook_remove_page (data->view->priv->book, - gtk_notebook_page_num (data->view->priv->book, (GtkWidget *)page)); + gtk_notebook_page_num (data->view->priv->book, (GtkWidget *) page)); } @@ -334,7 +334,7 @@ tab_activated_cb (EMailTabPicker *picker, EMailNotebookView *view) { EMailView *page = g_object_get_data ((GObject *)tab, "page"); - gint num = emnv_get_page_num (view, (GtkWidget *)page); + gint num = emnv_get_page_num (view, (GtkWidget *) page); mnv_set_current_tab (view, num); } @@ -363,11 +363,11 @@ tab_remove_gtk_cb (GtkWidget *button, prev = e_mail_view_get_previous_view (page); if (prev) { - num = emnv_get_page_num (view, (GtkWidget *)prev); + num = emnv_get_page_num (view, (GtkWidget *) prev); gtk_notebook_set_current_page (view->priv->book, num); } gtk_notebook_remove_page (view->priv->book, - gtk_notebook_page_num (view->priv->book, (GtkWidget *)page)); + gtk_notebook_page_num (view->priv->book, (GtkWidget *) page)); } @@ -444,8 +444,8 @@ create_under_clutter (GtkWidget *widget, GtkWidget *paned) actor = create_gtk_actor (widget); clutter_actor_show (actor); - stage = gtk_clutter_embed_get_stage ((GtkClutterEmbed *)embed); - clutter_container_add_actor ((ClutterContainer *)stage, actor); + stage = gtk_clutter_embed_get_stage ((GtkClutterEmbed *) embed); + clutter_container_add_actor ((ClutterContainer *) stage, actor); g_object_set_data ((GObject *)actor, "embed", embed); g_object_set_data ((GObject *)actor, "stage", stage); @@ -485,12 +485,12 @@ mail_notebook_view_constructed (GObject *object) gtk_widget_show (widget); gtk_box_pack_start (GTK_BOX (container), widget, FALSE, FALSE, 0); - stage = gtk_clutter_embed_get_stage ((GtkClutterEmbed *)widget); + stage = gtk_clutter_embed_get_stage ((GtkClutterEmbed *) widget); clutter_actor_show (stage); clutter_actor_set_reactive (stage, TRUE); - priv->tab_picker = (EMailTabPicker *)e_mail_tab_picker_new (); - clutter_actor_show ((ClutterActor *)priv->tab_picker); + priv->tab_picker = (EMailTabPicker *) e_mail_tab_picker_new (); + clutter_actor_show ((ClutterActor *) priv->tab_picker); g_signal_connect ( priv->tab_picker, "tab-activated", G_CALLBACK (tab_activated_cb), object); @@ -527,15 +527,15 @@ mail_notebook_view_constructed (GObject *object) tab = (EMailTab *) e_mail_tab_new_full ("", NULL, 1); clone = e_mail_tab_new_full ("", NULL, 200); - e_mail_tab_set_can_close ((EMailTab *)clone, FALSE); + e_mail_tab_set_can_close ((EMailTab *) clone, FALSE); clutter_actor_set_reactive (clone, FALSE); clutter_actor_show (clone); - e_mail_tab_set_preview_actor ((EMailTab *)tab, clone); + e_mail_tab_set_preview_actor ((EMailTab *) tab, clone); e_mail_tab_set_can_close (tab, TRUE); e_mail_tab_picker_add_tab (priv->tab_picker, tab, -1); - clutter_actor_show ((ClutterActor *)tab); + clutter_actor_show ((ClutterActor *) tab); e_mail_tab_picker_set_current_tab (priv->tab_picker, 0); e_mail_tab_enable_drag (tab, TRUE); @@ -551,7 +551,7 @@ mail_notebook_view_constructed (GObject *object) #endif widget = gtk_notebook_new (); - priv->book = (GtkNotebook *)widget; + priv->book = (GtkNotebook *) widget; gtk_widget_show (widget); #if HAVE_CLUTTER priv->embed = create_under_clutter (widget, container); @@ -563,12 +563,12 @@ mail_notebook_view_constructed (GObject *object) #endif #if HAVE_CLUTTER - gtk_notebook_set_show_tabs ((GtkNotebook *)widget, FALSE); + gtk_notebook_set_show_tabs ((GtkNotebook *) widget, FALSE); #else - gtk_notebook_set_scrollable ((GtkNotebook *)widget, TRUE); + gtk_notebook_set_scrollable ((GtkNotebook *) widget, TRUE); #endif - gtk_notebook_set_show_border ((GtkNotebook *)widget, FALSE); + gtk_notebook_set_show_border ((GtkNotebook *) widget, FALSE); shell_view = e_mail_view_get_shell_view (E_MAIL_VIEW (object)); priv->current_view = e_mail_folder_pane_new (shell_view); @@ -959,11 +959,11 @@ mail_netbook_view_open_mail (EMailView *view, #endif #if HAVE_CLUTTER - tab = (EMailTab *)e_mail_tab_new_full (camel_message_info_subject (info), NULL, 1); + tab = (EMailTab *) e_mail_tab_new_full (camel_message_info_subject (info), NULL, 1); g_object_set_data ((GObject *)tab, "page", pane); g_object_set_data ((GObject *)pane, "tab", tab); - clutter_actor_show ((ClutterActor *)tab); + clutter_actor_show ((ClutterActor *) tab); clone = e_mail_tab_new_full (camel_message_info_subject (info), NULL, 200); clutter_actor_set_reactive (clone, FALSE); @@ -1128,7 +1128,7 @@ mail_notebook_view_set_folder (EMailReader *reader, FALSE); #endif - priv->current_view = (EMailView *)new_view; + priv->current_view = (EMailView *) new_view; #if HAVE_CLUTTER mnv_set_current_tab (E_MAIL_NOTEBOOK_VIEW (reader), curr); #else @@ -1156,10 +1156,10 @@ mail_notebook_view_set_folder (EMailReader *reader, shell_view = e_mail_view_get_shell_view (E_MAIL_VIEW (reader)); priv->current_view = e_mail_folder_pane_new (shell_view); - gtk_widget_show ((GtkWidget *)priv->current_view); + gtk_widget_show ((GtkWidget *) priv->current_view); e_mail_view_set_previous_view (priv->current_view, old_view); page = gtk_notebook_append_page ( - priv->book, (GtkWidget *)priv->current_view, + priv->book, (GtkWidget *) priv->current_view, create_tab_label ( E_MAIL_NOTEBOOK_VIEW (reader), priv->current_view, @@ -1184,9 +1184,9 @@ mail_notebook_view_set_folder (EMailReader *reader, g_object_set_data ((GObject *)priv->current_view, "page", tab); g_object_set_data ((GObject *)priv->current_view, "tab", tab); - clutter_actor_show ((ClutterActor *)tab); + clutter_actor_show ((ClutterActor *) tab); - clone = build_histogram ((GtkWidget *)reader, folder); + clone = build_histogram ((GtkWidget *) reader, folder); clutter_actor_set_reactive (clone, FALSE); clutter_actor_show (clone); @@ -1213,7 +1213,7 @@ mail_notebook_view_set_folder (EMailReader *reader, #endif } else { priv->inited = TRUE; - gtk_notebook_set_tab_label (priv->book, (GtkWidget *)priv->current_view, + gtk_notebook_set_tab_label (priv->book, (GtkWidget *) priv->current_view, create_tab_label (E_MAIL_NOTEBOOK_VIEW (reader), priv->current_view, camel_folder_get_full_name (folder))); @@ -1226,7 +1226,7 @@ mail_notebook_view_set_folder (EMailReader *reader, g_object_set_data ((GObject *)priv->current_view, "tab", tab); e_mail_tab_set_text (tab, camel_folder_get_full_name (folder)); - clone = build_histogram ((GtkWidget *)reader, folder); + clone = build_histogram ((GtkWidget *) reader, folder); clutter_actor_set_reactive (clone, FALSE); clutter_actor_show (clone); e_mail_tab_set_preview_actor (tab, clone); diff --git a/mail/e-mail-reader-utils.c b/mail/e-mail-reader-utils.c index 534a97368d..16964674b0 100644 --- a/mail/e-mail-reader-utils.c +++ b/mail/e-mail-reader-utils.c @@ -644,7 +644,7 @@ emr_header_from_xmldoc (xmlDocPtr doc) return NULL; h = g_malloc0 (sizeof (EMailReaderHeader)); - h->name = g_strdup ((gchar *)name); + h->name = g_strdup ((gchar *) name); xmlFree (name); if (xmlHasProp (root, (const guchar *)"enabled")) @@ -754,7 +754,7 @@ headers_changed_cb (GConfClient *client, em_format_clear_headers (EM_FORMAT (formatter)); for (p = header_config_list; p; p = g_slist_next (p)) { EMailReaderHeader *h; - gchar *xml = (gchar *)p->data; + gchar *xml = (gchar *) p->data; h = e_mail_reader_header_from_xml (xml); if (h && h->enabled) diff --git a/mail/e-mail-session.c b/mail/e-mail-session.c index 43670a3e93..d110ad2dd3 100644 --- a/mail/e-mail-session.c +++ b/mail/e-mail-session.c @@ -791,7 +791,7 @@ mail_session_lookup_addressbook (CamelSession *session, return FALSE; addr = camel_internet_address_new (); - camel_address_decode ((CamelAddress *)addr, name); + camel_address_decode ((CamelAddress *) addr, name); ret = em_utils_in_addressbook ( addr, mail_config_get_lookup_book_local_only ()); g_object_unref (addr); diff --git a/mail/e-mail-tab-picker.c b/mail/e-mail-tab-picker.c index 7c71d0580a..b6ad1c753b 100644 --- a/mail/e-mail-tab-picker.c +++ b/mail/e-mail-tab-picker.c @@ -123,12 +123,12 @@ e_mail_tab_picker_drop (MxDroppable *droppable, if (!E_MAIL_IS_TAB (draggable)) return; - if (clutter_actor_get_parent (CLUTTER_ACTOR (draggable)) != (ClutterActor *)picker) + if (clutter_actor_get_parent (CLUTTER_ACTOR (draggable)) != (ClutterActor *) picker) return; /* Get current position and property data structure */ t = g_list_find_custom (priv->tabs, draggable, e_mail_tab_picker_find_tab_cb); - tab = (EMailTabPickerProps *)t->data; + tab = (EMailTabPickerProps *) t->data; if (!tab) { g_warning ("Tab that's parented to a picker not actually in picker"); return; @@ -715,7 +715,7 @@ e_mail_tab_picker_allocate (ClutterActor *actor, (priv->scroll_offset != old_scroll_offset)) mx_adjustment_set_value ( priv->scroll_adjustment, - (gdouble)priv->scroll_offset); + (gdouble) priv->scroll_offset); /* Allocate for scroll-bar */ clutter_actor_allocate ( @@ -873,7 +873,7 @@ e_mail_tab_picker_scroll_value_cb (MxAdjustment *adjustment, if ((gint) value != priv->scroll_offset) { priv->keep_current_visible = FALSE; - priv->scroll_offset = (gint)value; + priv->scroll_offset = (gint) value; clutter_actor_queue_relayout (CLUTTER_ACTOR (picker)); } } @@ -924,8 +924,8 @@ e_mail_tab_picker_init (EMailTabPicker *self) static gint e_mail_tab_picker_find_tab_cb (gconstpointer a, gconstpointer b) { - EMailTabPickerProps *props = (EMailTabPickerProps *)a; - EMailTab *tab = (EMailTab *)b; + EMailTabPickerProps *props = (EMailTabPickerProps *) a; + EMailTab *tab = (EMailTab *) b; return (props->tab == tab) ? 0 : -1; } @@ -1136,7 +1136,7 @@ e_mail_tab_picker_set_current_tab (EMailTabPicker *picker, gint tab_no) if (tab_no < 0) tab_no = priv->n_tabs + tab_no; - props = g_list_nth_data (priv->tabs, (guint)tab_no); + props = g_list_nth_data (priv->tabs, (guint) tab_no); if (props) { e_mail_tab_picker_tab_clicked_cb (props->tab, picker); diff --git a/mail/e-mail-tab.c b/mail/e-mail-tab.c index a0dfad2602..04d0aa2645 100644 --- a/mail/e-mail-tab.c +++ b/mail/e-mail-tab.c @@ -270,7 +270,7 @@ e_mail_tab_get_property (GObject *object, guint property_id, break; case PROP_DRAG_THRESHOLD: - g_value_set_uint (value, (guint)priv->drag_threshold); + g_value_set_uint (value, (guint) priv->drag_threshold); break; case PROP_DRAG_AXIS: @@ -429,7 +429,7 @@ e_mail_tab_dispose_old_bg (EMailTab *tab) if (priv->old_bg) { - if (clutter_actor_get_parent (priv->old_bg) == (ClutterActor *)tab) + if (clutter_actor_get_parent (priv->old_bg) == (ClutterActor *) tab) clutter_actor_unparent (priv->old_bg); g_object_unref (priv->old_bg); priv->old_bg = NULL; @@ -645,7 +645,7 @@ e_mail_tab_get_preferred_height (ClutterActor *actor, mx_widget_get_padding (MX_WIDGET (actor), &padding); clutter_actor_get_preferred_height (priv->preview, - (gfloat)priv->width, + (gfloat) priv->width, &min_height, &nat_height); @@ -997,7 +997,7 @@ e_mail_tab_leave_event (ClutterActor *actor, EMailTabPrivate *priv = E_MAIL_TAB (actor)->priv; if ((event->source != actor) || - (event->related == (ClutterActor *)priv->close_button)) + (event->related == (ClutterActor *) priv->close_button)) return FALSE; priv->hover = FALSE; @@ -1687,8 +1687,8 @@ e_mail_tab_set_preview_mode (EMailTab *tab, gboolean preview) g_signal_connect (priv->preview_timeline, "new-frame", G_CALLBACK (preview_new_frame_cb), tab); - timeline = clutter_timeline_new ((guint)duration1); - timeline2 = clutter_timeline_new ((guint)duration2); + timeline = clutter_timeline_new ((guint) duration1); + timeline2 = clutter_timeline_new ((guint) duration2); g_signal_connect (timeline, "started", G_CALLBACK (preview_s1_started_cb), tab); @@ -1878,7 +1878,7 @@ e_mail_tab_alert (EMailTab *tab) priv->alert_source = g_timeout_add_full (G_PRIORITY_HIGH, 500, - (GSourceFunc)e_mail_tab_alert_cb, + (GSourceFunc) e_mail_tab_alert_cb, tab, NULL); } diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index a535227b9c..c0ddbd1871 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -621,12 +621,12 @@ default_folders_clicked (GtkButton *button, gpointer user_data) const gchar *uri; uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_DRAFTS); - em_folder_selection_button_set_selection ((EMFolderSelectionButton *)emae->priv->drafts_folder_button, uri); - emae_account_folder_changed ((EMFolderSelectionButton *)emae->priv->drafts_folder_button, emae); + em_folder_selection_button_set_selection ((EMFolderSelectionButton *) emae->priv->drafts_folder_button, uri); + emae_account_folder_changed ((EMFolderSelectionButton *) emae->priv->drafts_folder_button, emae); uri = e_mail_local_get_folder_uri (E_MAIL_LOCAL_FOLDER_SENT); - em_folder_selection_button_set_selection ((EMFolderSelectionButton *)emae->priv->sent_folder_button, uri); - emae_account_folder_changed ((EMFolderSelectionButton *)emae->priv->sent_folder_button, emae); + em_folder_selection_button_set_selection ((EMFolderSelectionButton *) emae->priv->sent_folder_button, uri); + emae_account_folder_changed ((EMFolderSelectionButton *) emae->priv->sent_folder_button, emae); gtk_toggle_button_set_active (emae->priv->trash_folder_check, FALSE); gtk_toggle_button_set_active (emae->priv->junk_folder_check, FALSE); @@ -721,8 +721,8 @@ emae_signature_added (ESignatureList *signatures, ESignature *sig, EMAccountEdit model = gtk_combo_box_get_model (emae->priv->signatures_dropdown); - gtk_list_store_append ((GtkListStore *)model, &iter); - gtk_list_store_set ((GtkListStore *)model, &iter, 0, name, 1, uid, -1); + gtk_list_store_append ((GtkListStore *) model, &iter); + gtk_list_store_set ((GtkListStore *) model, &iter, 0, name, 1, uid, -1); gtk_combo_box_set_active (emae->priv->signatures_dropdown, gtk_tree_model_iter_n_children (model, NULL)-1); } @@ -760,7 +760,7 @@ emae_signature_removed (ESignatureList *signatures, ESignature *sig, EMAccountEd GtkTreeModel *model; if (emae_signature_get_iter (emae, sig, &model, &iter)) - gtk_list_store_remove ((GtkListStore *)model, &iter); + gtk_list_store_remove ((GtkListStore *) model, &iter); } static void @@ -773,7 +773,7 @@ emae_signature_changed (ESignatureList *signatures, ESignature *sig, EMAccountEd name = e_signature_get_name (sig); if (emae_signature_get_iter (emae, sig, &model, &iter)) - gtk_list_store_set ((GtkListStore *)model, &iter, 0, name, -1); + gtk_list_store_set ((GtkListStore *) model, &iter, 0, name, -1); } static void @@ -830,7 +830,7 @@ emae_setup_signatures (EMAccountEditor *emae, GtkBuilder *builder) current = e_account_get_string (account, E_ACCOUNT_ID_SIGNATURE); emae->priv->signatures_dropdown = dropdown; - gtk_widget_show ((GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_STRING); @@ -850,7 +850,7 @@ emae_setup_signatures (EMAccountEditor *emae, GtkBuilder *builder) i = 1; it = e_list_get_iterator ((EList *) signatures); while (e_iterator_is_valid (it)) { - ESignature *sig = (ESignature *)e_iterator_get (it); + ESignature *sig = (ESignature *) e_iterator_get (it); const gchar *name; const gchar *uid; @@ -868,19 +868,19 @@ emae_setup_signatures (EMAccountEditor *emae, GtkBuilder *builder) } g_object_unref (it); - gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell, "text", 0, NULL); - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); gtk_combo_box_set_active (dropdown, active); g_signal_connect (dropdown, "changed", G_CALLBACK(emae_signaturetype_changed), emae); - gtk_widget_set_sensitive ((GtkWidget *)dropdown, e_account_writable (account, E_ACCOUNT_ID_SIGNATURE)); + gtk_widget_set_sensitive ((GtkWidget *) dropdown, e_account_writable (account, E_ACCOUNT_ID_SIGNATURE)); button = e_builder_get_widget (builder, "sigAddNew"); g_signal_connect (button, "clicked", G_CALLBACK(emae_signature_new), emae); - return (GtkWidget *)dropdown; + return (GtkWidget *) dropdown; } static void @@ -925,7 +925,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GtkBuilder *builder) account = em_account_editor_get_modified_account (emae); current = account->receipt_policy; - gtk_widget_show ((GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_INT); @@ -939,7 +939,7 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GtkBuilder *builder) active = i; } - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); cell = gtk_cell_renderer_text_new (); gtk_cell_layout_pack_start (GTK_CELL_LAYOUT (dropdown), cell, TRUE); @@ -948,9 +948,9 @@ emae_setup_receipt_policy (EMAccountEditor *emae, GtkBuilder *builder) gtk_combo_box_set_active (dropdown, active); g_signal_connect (dropdown, "changed", G_CALLBACK(emae_receipt_policy_changed), emae); - gtk_widget_set_sensitive ((GtkWidget *)dropdown, e_account_writable (account, E_ACCOUNT_RECEIPT_POLICY)); + gtk_widget_set_sensitive ((GtkWidget *) dropdown, e_account_writable (account, E_ACCOUNT_RECEIPT_POLICY)); - return (GtkWidget *)dropdown; + return (GtkWidget *) dropdown; } static void @@ -979,13 +979,13 @@ emae_account_entry (EMAccountEditor *emae, const gchar *name, gint item, GtkBuil const gchar *text; account = em_account_editor_get_modified_account (emae); - entry = (GtkEntry *)e_builder_get_widget (builder, name); + entry = (GtkEntry *) e_builder_get_widget (builder, name); text = e_account_get_string (account, item); if (text) gtk_entry_set_text (entry, text); g_object_set_data ((GObject *)entry, "account-item", GINT_TO_POINTER(item)); g_signal_connect (entry, "changed", G_CALLBACK(emae_account_entry_changed), emae); - gtk_widget_set_sensitive ((GtkWidget *)entry, e_account_writable (account, item)); + gtk_widget_set_sensitive ((GtkWidget *) entry, e_account_writable (account, item)); return entry; } @@ -1033,7 +1033,7 @@ emae_account_toggle (EMAccountEditor *emae, const gchar *name, gint item, GtkBui { GtkToggleButton *toggle; - toggle = (GtkToggleButton *)e_builder_get_widget (builder, name); + toggle = (GtkToggleButton *) e_builder_get_widget (builder, name); emae_account_toggle_widget (emae, toggle, item); return toggle; @@ -1083,7 +1083,7 @@ emae_account_spinint (EMAccountEditor *emae, const gchar *name, gint item) { GtkSpinButton *spin; - spin = (GtkSpinButton *)e_builder_get_widget (emae->priv->xml, name); + spin = (GtkSpinButton *) e_builder_get_widget (emae->priv->xml, name); emae_account_spinint_widget (emae, spin, item); return spin; @@ -1115,7 +1115,7 @@ emae_account_folder (EMAccountEditor *emae, const gchar *name, gint item, gint d account = em_account_editor_get_modified_account (emae); session = em_account_editor_get_session (emae); - folder = (EMFolderSelectionButton *)e_builder_get_widget (builder, name); + folder = (EMFolderSelectionButton *) e_builder_get_widget (builder, name); em_folder_selection_button_set_session (folder, session); uri = e_account_get_string (account, item); @@ -1129,9 +1129,9 @@ emae_account_folder (EMAccountEditor *emae, const gchar *name, gint item, gint d g_object_set_data ((GObject *)folder, "account-item", GINT_TO_POINTER(item)); g_object_set_data ((GObject *)folder, "folder-default", GINT_TO_POINTER(deffolder)); g_signal_connect (folder, "selected", G_CALLBACK(emae_account_folder_changed), emae); - gtk_widget_show ((GtkWidget *)folder); + gtk_widget_show ((GtkWidget *) folder); - gtk_widget_set_sensitive ((GtkWidget *)folder, e_account_writable (account, item)); + gtk_widget_set_sensitive ((GtkWidget *) folder, e_account_writable (account, item)); return folder; } @@ -1146,16 +1146,16 @@ smime_changed (EMAccountEditor *emae) tmp = gtk_entry_get_text (priv->smime_sign_key); act = tmp && tmp[0]; - gtk_widget_set_sensitive ((GtkWidget *)priv->smime_sign_key_clear, act); - gtk_widget_set_sensitive ((GtkWidget *)priv->smime_sign_default, act); + gtk_widget_set_sensitive ((GtkWidget *) priv->smime_sign_key_clear, act); + gtk_widget_set_sensitive ((GtkWidget *) priv->smime_sign_default, act); if (!act) gtk_toggle_button_set_active (priv->smime_sign_default, FALSE); tmp = gtk_entry_get_text (priv->smime_encrypt_key); act = tmp && tmp[0]; - gtk_widget_set_sensitive ((GtkWidget *)priv->smime_encrypt_key_clear, act); - gtk_widget_set_sensitive ((GtkWidget *)priv->smime_encrypt_default, act); - gtk_widget_set_sensitive ((GtkWidget *)priv->smime_encrypt_to_self, act); + gtk_widget_set_sensitive ((GtkWidget *) priv->smime_encrypt_key_clear, act); + gtk_widget_set_sensitive ((GtkWidget *) priv->smime_encrypt_default, act); + gtk_widget_set_sensitive ((GtkWidget *) priv->smime_encrypt_to_self, act); if (!act) { gtk_toggle_button_set_active (priv->smime_encrypt_default, FALSE); } @@ -1181,8 +1181,8 @@ smime_sign_key_select (GtkWidget *button, EMAccountEditor *emae) GtkWidget *w; w = e_cert_selector_new (E_CERT_SELECTOR_SIGNER, gtk_entry_get_text (priv->smime_sign_key)); - gtk_window_set_modal ((GtkWindow *)w, TRUE); - gtk_window_set_transient_for ((GtkWindow *)w, (GtkWindow *)gtk_widget_get_toplevel (button)); + gtk_window_set_modal ((GtkWindow *) w, TRUE); + gtk_window_set_transient_for ((GtkWindow *) w, (GtkWindow *) gtk_widget_get_toplevel (button)); g_signal_connect (w, "selected", G_CALLBACK(smime_sign_key_selected), emae); gtk_widget_show (w); } @@ -1216,8 +1216,8 @@ smime_encrypt_key_select (GtkWidget *button, EMAccountEditor *emae) GtkWidget *w; w = e_cert_selector_new (E_CERT_SELECTOR_RECIPIENT, gtk_entry_get_text (priv->smime_encrypt_key)); - gtk_window_set_modal ((GtkWindow *)w, TRUE); - gtk_window_set_transient_for ((GtkWindow *)w, (GtkWindow *)gtk_widget_get_toplevel (button)); + gtk_window_set_modal ((GtkWindow *) w, TRUE); + gtk_window_set_transient_for ((GtkWindow *) w, (GtkWindow *) gtk_widget_get_toplevel (button)); g_signal_connect (w, "selected", G_CALLBACK(smime_encrypt_key_selected), emae); gtk_widget_show (w); } @@ -1565,14 +1565,14 @@ emae_service_provider_changed (EMAccountEditorService *service) gtk_widget_show (service->frame); enable = e_account_writable_option (account, service->provider->protocol, "auth"); - gtk_widget_set_sensitive ((GtkWidget *)service->authtype, enable); - gtk_widget_set_sensitive ((GtkWidget *)service->check_supported, enable); + gtk_widget_set_sensitive ((GtkWidget *) service->authtype, enable); + gtk_widget_set_sensitive ((GtkWidget *) service->check_supported, enable); enable = e_account_writable_option (account, service->provider->protocol, "use_ssl"); - gtk_widget_set_sensitive ((GtkWidget *)service->use_ssl, enable); + gtk_widget_set_sensitive ((GtkWidget *) service->use_ssl, enable); enable = e_account_writable (account, emae_service_info[service->type].save_passwd_key); - gtk_widget_set_sensitive ((GtkWidget *)service->remember, enable); + gtk_widget_set_sensitive ((GtkWidget *) service->remember, enable); if (service->port && service->provider->port_entries) e_port_entry_set_camel_entries (service->port, service->provider->port_entries); @@ -1595,7 +1595,7 @@ emae_service_provider_changed (EMAccountEditorService *service) if (info->setval && !hide) { if (GTK_IS_ENTRY (w)) - info->setval (url, enable?gtk_entry_get_text ((GtkEntry *)w):NULL); + info->setval (url, enable?gtk_entry_get_text ((GtkEntry *) w):NULL); else if (E_IS_PORT_ENTRY (w)) info->setval (url, enable?g_strdup_printf("%i", e_port_entry_get_port (E_PORT_ENTRY (w))):NULL); @@ -1615,7 +1615,7 @@ emae_service_provider_changed (EMAccountEditorService *service) if (url->authmech) { if (service->provider->authtypes) { for (ll = service->provider->authtypes;ll;ll = g_list_next (ll)) - if (!strcmp (url->authmech, ((CamelServiceAuthType *)ll->data)->authproto)) + if (!strcmp (url->authmech, ((CamelServiceAuthType *) ll->data)->authproto)) break; if (ll == NULL) camel_url_set_authmech (url, NULL); @@ -1626,10 +1626,10 @@ emae_service_provider_changed (EMAccountEditorService *service) emae_refresh_authtype (service->emae, service); if (service->needs_auth && !CAMEL_PROVIDER_NEEDS (service->provider, CAMEL_URL_PART_AUTH)) - gtk_widget_show ((GtkWidget *)service->needs_auth); + gtk_widget_show ((GtkWidget *) service->needs_auth); } else { if (service->needs_auth) - gtk_widget_hide ((GtkWidget *)service->needs_auth); + gtk_widget_hide ((GtkWidget *) service->needs_auth); } #ifdef HAVE_SSL old_port = url->port; @@ -1691,7 +1691,7 @@ emae_provider_changed (GtkComboBox *dropdown, EMAccountEditorService *service) emae_service_provider_changed (service); - e_config_target_changed ((EConfig *)service->emae->priv->config, E_CONFIG_TARGET_CHANGED_REBUILD); + e_config_target_changed ((EConfig *) service->emae->priv->config, E_CONFIG_TARGET_CHANGED_REBUILD); } static void @@ -1714,7 +1714,7 @@ emae_refresh_providers (EMAccountEditor *emae, EMAccountEditorService *service) uri = e_account_get_string (account, info->account_uri_key); dropdown = service->providers; - gtk_widget_show ((GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); if (uri) { const gchar *colon = strchr (uri, ':'); @@ -1779,9 +1779,9 @@ emae_refresh_providers (EMAccountEditor *emae, EMAccountEditorService *service) i++; } - gtk_cell_layout_clear ((GtkCellLayout *)dropdown); - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); - gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_clear ((GtkCellLayout *) dropdown); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); + gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell, "text", 0, NULL); g_signal_handlers_disconnect_by_func (dropdown, emae_provider_changed, service); @@ -1841,7 +1841,7 @@ emae_authtype_changed (GtkComboBox *dropdown, EMAccountEditorService *service) } camel_url_free (url); - gtk_widget_set_sensitive ((GtkWidget *)service->remember, sensitive); + gtk_widget_set_sensitive ((GtkWidget *) service->remember, sensitive); } static void @@ -1882,7 +1882,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) uri = e_account_get_string (account, info->account_uri_key); dropdown = service->authtype; - gtk_widget_show ((GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); store = gtk_list_store_new (3, G_TYPE_STRING, G_TYPE_POINTER, G_TYPE_BOOLEAN); @@ -1897,7 +1897,7 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) /* if we have some already shown */ if (service->authtypes) { for (ll = service->authtypes;ll;ll = g_list_next (ll)) - if (!strcmp (authtype->authproto, ((CamelServiceAuthType *)ll->data)->authproto)) + if (!strcmp (authtype->authproto, ((CamelServiceAuthType *) ll->data)->authproto)) break; avail = ll != NULL; } else { @@ -1912,13 +1912,13 @@ emae_refresh_authtype (EMAccountEditor *emae, EMAccountEditorService *service) } } - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); gtk_combo_box_set_active (dropdown, -1); if (service->auth_changed_id == 0) { GtkCellRenderer *cell = gtk_cell_renderer_text_new (); - gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); gtk_cell_layout_set_attributes ((GtkCellLayout *)dropdown, cell, "text", 0, "strikethrough", 2, NULL); service->auth_changed_id = g_signal_connect (dropdown, "changed", G_CALLBACK(emae_authtype_changed), service); @@ -2006,7 +2006,7 @@ emae_check_authtype (GtkWidget *w, g_object_ref (emae); - service->check_dialog = e_alert_dialog_new_for_args (editor ? (GtkWindow *)gtk_widget_get_toplevel (editor) : (GtkWindow *)gtk_widget_get_toplevel (w), + service->check_dialog = e_alert_dialog_new_for_args (editor ? (GtkWindow *) gtk_widget_get_toplevel (editor) : (GtkWindow *) gtk_widget_get_toplevel (w), "mail:checking-service", NULL); g_signal_connect (service->check_dialog, "response", G_CALLBACK(emae_check_authtype_response), service); gtk_widget_show (service->check_dialog); @@ -2048,31 +2048,31 @@ emae_setup_service (EMAccountEditor *emae, EMAccountEditorService *service, GtkB service->container = e_builder_get_widget (builder, info->container); service->description = GTK_LABEL (e_builder_get_widget (builder, info->description)); service->hostname = GTK_ENTRY (e_builder_get_widget (builder, info->hostname)); - service->hostlabel = (GtkLabel *)e_builder_get_widget (builder, info->hostlabel); + service->hostlabel = (GtkLabel *) e_builder_get_widget (builder, info->hostlabel); service->port = E_PORT_ENTRY (e_builder_get_widget (builder, info->port)); - service->portlabel = (GtkLabel *)e_builder_get_widget (builder, info->portlabel); + service->portlabel = (GtkLabel *) e_builder_get_widget (builder, info->portlabel); service->username = GTK_ENTRY (e_builder_get_widget (builder, info->username)); - service->userlabel = (GtkLabel *)e_builder_get_widget (builder, info->userlabel); + service->userlabel = (GtkLabel *) e_builder_get_widget (builder, info->userlabel); if (info->pathentry) { - service->pathlabel = (GtkLabel *)e_builder_get_widget (builder, info->pathlabel); + service->pathlabel = (GtkLabel *) e_builder_get_widget (builder, info->pathlabel); service->pathentry = e_builder_get_widget (builder, info->pathentry); } service->ssl_frame = e_builder_get_widget (builder, info->security_frame); gtk_widget_hide (service->ssl_frame); service->ssl_hbox = e_builder_get_widget (builder, info->ssl_hbox); - service->use_ssl = (GtkComboBox *)e_builder_get_widget (builder, info->use_ssl); + service->use_ssl = (GtkComboBox *) e_builder_get_widget (builder, info->use_ssl); service->no_ssl = e_builder_get_widget (builder, info->ssl_disabled); service->auth_frame = e_builder_get_widget (builder, info->auth_frame); - service->check_supported = (GtkButton *)e_builder_get_widget (builder, info->authtype_check); - service->authtype = (GtkComboBox *)e_builder_get_widget (builder, info->authtype); - service->providers = (GtkComboBox *)e_builder_get_widget (builder, info->type_dropdown); + service->check_supported = (GtkButton *) e_builder_get_widget (builder, info->authtype_check); + service->authtype = (GtkComboBox *) e_builder_get_widget (builder, info->authtype); + service->providers = (GtkComboBox *) e_builder_get_widget (builder, info->type_dropdown); service->remember = emae_account_toggle (emae, info->remember_password, info->save_passwd_key, builder); if (info->needs_auth) - service->needs_auth = (GtkToggleButton *)e_builder_get_widget (builder, info->needs_auth); + service->needs_auth = (GtkToggleButton *) e_builder_get_widget (builder, info->needs_auth); else service->needs_auth = NULL; @@ -2223,7 +2223,7 @@ emae_queue_widgets (EMAccountEditor *emae, GtkBuilder *builder, const gchar *fir va_start (ap, first); while (first) { - g_hash_table_insert (emae->priv->widgets, (gchar *)first, e_builder_get_widget (builder, first)); + g_hash_table_insert (emae->priv->widgets, (gchar *) first, e_builder_get_widget (builder, first)); first = va_arg (ap, const gchar *); } va_end (ap); @@ -2277,8 +2277,8 @@ emae_identity_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget w = e_builder_get_widget (builder, item->label); if (emae->type == EMAE_PAGES) { - gtk_box_pack_start ((GtkBox *)emae->pages[0], w, TRUE, TRUE, 0); - } else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) { + gtk_box_pack_start ((GtkBox *) emae->pages[0], w, TRUE, TRUE, 0); + } else if (((EConfig *) priv->config)->type == E_CONFIG_ASSISTANT) { GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "identity_page"); gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0); @@ -2322,8 +2322,8 @@ emae_receive_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget w = e_builder_get_widget (builder, item->label); if (emae->type == EMAE_PAGES) { - gtk_box_pack_start ((GtkBox *)emae->pages[1], w, TRUE, TRUE, 0); - } else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) { + gtk_box_pack_start ((GtkBox *) emae->pages[1], w, TRUE, TRUE, 0); + } else if (((EConfig *) priv->config)->type == E_CONFIG_ASSISTANT) { GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "source_page"); gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0); @@ -2356,7 +2356,7 @@ emae_option_toggle_changed (GtkToggleButton *toggle, EMAccountEditorService *ser CamelURL *url = emae_account_url (service->emae, emae_service_info[service->type].account_uri_key); for (;depl;depl = g_slist_next (depl)) - gtk_widget_set_sensitive ((GtkWidget *)depl->data, active); + gtk_widget_set_sensitive ((GtkWidget *) depl->data, active); camel_url_set_param (url, name, active?"":NULL); emae_uri_changed (service, url); @@ -2429,13 +2429,13 @@ emae_option_checkspin_check_changed (GtkToggleButton *toggle, EMAccountEditorSer GtkSpinButton *spin = g_object_get_data ((GObject *)toggle, "option-target"); if (gtk_toggle_button_get_active (toggle)) { - gtk_widget_set_sensitive ((GtkWidget *)spin, TRUE); + gtk_widget_set_sensitive ((GtkWidget *) spin, TRUE); emae_option_checkspin_changed (spin, service); } else { CamelURL *url = emae_account_url (service->emae, emae_service_info[service->type].account_uri_key); camel_url_set_param (url, name, NULL); - gtk_widget_set_sensitive ((GtkWidget *)spin, FALSE); + gtk_widget_set_sensitive ((GtkWidget *) spin, FALSE); emae_uri_changed (service, url); camel_url_free (url); } @@ -2499,15 +2499,15 @@ emae_option_checkspin (EMAccountEditorService *service, CamelURL *url, const gch hbox = gtk_hbox_new (FALSE, 0); check = g_object_new (gtk_check_button_get_type (), "label", pre, "use_underline", TRUE, "active", on, NULL); - spin = gtk_spin_button_new ((GtkAdjustment *)gtk_adjustment_new (def, min, max, 1, 1, 0), 1, 0); + spin = gtk_spin_button_new ((GtkAdjustment *) gtk_adjustment_new (def, min, max, 1, 1, 0), 1, 0); if (post) { label = gtk_label_new_with_mnemonic (post); gtk_label_set_mnemonic_widget (GTK_LABEL (label), check); } - gtk_box_pack_start ((GtkBox *)hbox, check, FALSE, TRUE, 0); - gtk_box_pack_start ((GtkBox *)hbox, spin, FALSE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) hbox, check, FALSE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) hbox, spin, FALSE, TRUE, 0); if (label) - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, TRUE, 4); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, TRUE, 4); g_object_set_data ((GObject *)spin, "option-name", (gpointer)name); g_object_set_data ((GObject *)check, "option-name", (gpointer)name); @@ -2593,7 +2593,7 @@ emae_option_options (EMAccountEditorService *service, CamelURL *url, const gchar g_free (cp); } - gtk_combo_box_set_model (w, (GtkTreeModel *)store); + gtk_combo_box_set_model (w, (GtkTreeModel *) store); gtk_combo_box_set_active (w, i > 0 ? active : -1); cell = gtk_cell_renderer_text_new (); @@ -2626,8 +2626,8 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt GtkWidget *box = gtk_hbox_new (FALSE, 12); gtk_widget_reparent (old, box); gtk_widget_show (box); - gtk_box_set_child_packing ((GtkBox *)box, old, TRUE, TRUE, 12, GTK_PACK_START); - gtk_box_pack_end ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0); + gtk_box_set_child_packing ((GtkBox *) box, old, TRUE, TRUE, 12, GTK_PACK_START); + gtk_box_pack_end ((GtkBox *) emae->pages[2], box, FALSE, FALSE, 0); } return old; } @@ -2636,8 +2636,8 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt GtkWidget *box = gtk_hbox_new (FALSE, 12); gtk_widget_reparent (parent, box); gtk_widget_show (box); - gtk_box_set_child_packing ((GtkBox *)box, parent, TRUE, TRUE, 12, GTK_PACK_START); - gtk_box_pack_start ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0); + gtk_box_set_child_packing ((GtkBox *) box, parent, TRUE, TRUE, 12, GTK_PACK_START); + gtk_box_pack_start ((GtkBox *) emae->pages[2], box, FALSE, FALSE, 0); } /* We have to add the automatic mail check item with the rest of the receive options */ @@ -2645,20 +2645,20 @@ emae_receive_options_item (EConfig *ec, EConfigItem *item, GtkWidget *parent, Gt box = gtk_hbox_new (FALSE, 4); w = gtk_check_button_new_with_mnemonic (_("Check for _new messages every")); - emae_account_toggle_widget (emae, (GtkToggleButton *)w, E_ACCOUNT_SOURCE_AUTO_CHECK); - gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0); + emae_account_toggle_widget (emae, (GtkToggleButton *) w, E_ACCOUNT_SOURCE_AUTO_CHECK); + gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 0); spin = gtk_spin_button_new_with_range (1.0, 1440.0, 1.0); - emae_account_spinint_widget (emae, (GtkSpinButton *)spin, E_ACCOUNT_SOURCE_AUTO_CHECK_TIME); - gtk_box_pack_start ((GtkBox *)box, spin, FALSE, TRUE, 0); + emae_account_spinint_widget (emae, (GtkSpinButton *) spin, E_ACCOUNT_SOURCE_AUTO_CHECK_TIME); + gtk_box_pack_start ((GtkBox *) box, spin, FALSE, TRUE, 0); w = gtk_label_new_with_mnemonic (_("minu_tes")); gtk_label_set_mnemonic_widget (GTK_LABEL (w), spin); - gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 0); gtk_widget_show_all (box); - gtk_table_attach ((GtkTable *)parent, box, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) parent, box, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); return box; } @@ -2667,7 +2667,7 @@ static GtkWidget * emae_receive_options_extra_item (EConfig *ec, EConfigItem *eitem, GtkWidget *parent, GtkWidget *old, gpointer data) { EMAccountEditor *emae = data; - struct _receive_options_item *item = (struct _receive_options_item *)eitem; + struct _receive_options_item *item = (struct _receive_options_item *) eitem; GtkWidget *w, *l, *h; CamelProviderConfEntry *entries; GtkWidget *depw; @@ -2685,8 +2685,8 @@ emae_receive_options_extra_item (EConfig *ec, EConfigItem *eitem, GtkWidget *par GtkWidget *box = gtk_hbox_new (FALSE, 12); gtk_widget_reparent (parent, box); gtk_widget_show (box); - gtk_box_set_child_packing ((GtkBox *)box, parent, TRUE, TRUE, 12, GTK_PACK_START); - gtk_box_pack_start ((GtkBox *)emae->pages[2], box, FALSE, FALSE, 0); + gtk_box_set_child_packing ((GtkBox *) box, parent, TRUE, TRUE, 12, GTK_PACK_START); + gtk_box_pack_start ((GtkBox *) emae->pages[2], box, FALSE, FALSE, 0); } entries = emae->priv->source.provider->extra_conf; @@ -2720,47 +2720,47 @@ section: case CAMEL_PROVIDER_CONF_LABEL: /* FIXME: This is a hack for exchange connector, labels should be removed from confentry */ if (!strcmp (entries[i].name, "hostname")) - l = (GtkWidget *)emae->priv->source.hostlabel; + l = (GtkWidget *) emae->priv->source.hostlabel; else if (!strcmp (entries[i].name, "username")) - l = (GtkWidget *)emae->priv->source.userlabel; + l = (GtkWidget *) emae->priv->source.userlabel; else l = NULL; if (l) { - gtk_label_set_text_with_mnemonic ((GtkLabel *)l, entries[i].text); + gtk_label_set_text_with_mnemonic ((GtkLabel *) l, entries[i].text); if (depw) depl = g_slist_prepend (depl, l); } break; case CAMEL_PROVIDER_CONF_CHECKBOX: w = emae_option_toggle (service, url, entries[i].text, entries[i].name); - gtk_table_attach ((GtkTable *)parent, w, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); - g_hash_table_insert (extra, (gpointer)entries[i].name, w); + gtk_table_attach ((GtkTable *) parent, w, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); + g_hash_table_insert (extra, (gpointer) entries[i].name, w); if (depw) depl = g_slist_prepend (depl, w); row++; /* HACK: keep_on_server is stored in the e-account, but is displayed as a properly on the uri, make sure they track/match here */ if (!strcmp (entries[i].name, "keep_on_server")) - emae_account_toggle_widget (emae, (GtkToggleButton *)w, E_ACCOUNT_SOURCE_KEEP_ON_SERVER); + emae_account_toggle_widget (emae, (GtkToggleButton *) w, E_ACCOUNT_SOURCE_KEEP_ON_SERVER); break; case CAMEL_PROVIDER_CONF_ENTRY: l = g_object_new (gtk_label_get_type (), "label", entries[i].text, "xalign", 0.0, "use_underline", TRUE, NULL); gtk_widget_show (l); w = emae_option_entry (service, url, entries[i].name, l); - gtk_table_attach ((GtkTable *)parent, l, 0, 1, row, row+1, GTK_FILL, 0, 0, 0); - gtk_table_attach ((GtkTable *)parent, w, 1, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) parent, l, 0, 1, row, row+1, GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) parent, w, 1, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); if (depw) { depl = g_slist_prepend (depl, w); depl = g_slist_prepend (depl, l); } row++; /* FIXME: this is another hack for exchange/groupwise connector */ - g_hash_table_insert (item->extra_table, (gpointer)entries[i].name, w); + g_hash_table_insert (item->extra_table, (gpointer) entries[i].name, w); break; case CAMEL_PROVIDER_CONF_CHECKSPIN: w = emae_option_checkspin (service, url, entries[i].name, entries[i].text, entries[i].value); - gtk_table_attach ((GtkTable *)parent, w, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) parent, w, 0, 2, row, row+1, GTK_EXPAND|GTK_FILL, 0, 0, 0); if (depw) depl = g_slist_prepend (depl, w); row++; @@ -2773,7 +2773,7 @@ section: w = emae_option_options (service, url, entries[i].name, entries[i].value, l); gtk_box_pack_start (GTK_BOX (h), l, FALSE, FALSE, 0); gtk_box_pack_start (GTK_BOX (h), w, FALSE, FALSE, 0); - gtk_table_attach ((GtkTable *)parent, h, 0, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); + gtk_table_attach ((GtkTable *) parent, h, 0, 2, row, row+1, GTK_EXPAND | GTK_FILL, 0, 0, 0); if (depw) { depl = g_slist_prepend (depl, h); } @@ -2784,11 +2784,11 @@ section: } if (depw && depl) { - gint act = gtk_toggle_button_get_active ((GtkToggleButton *)depw); + gint act = gtk_toggle_button_get_active ((GtkToggleButton *) depw); g_object_set_data_full ((GObject *)depw, "dependent-list", depl, (GDestroyNotify)g_slist_free); for (n=depl;n;n=g_slist_next (n)) - gtk_widget_set_sensitive ((GtkWidget *)n->data, act); + gtk_widget_set_sensitive ((GtkWidget *) n->data, act); } } @@ -2822,8 +2822,8 @@ emae_send_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *ol w = e_builder_get_widget (builder, item->label); if (emae->type == EMAE_PAGES) { - gtk_box_pack_start ((GtkBox *)emae->pages[3], w, TRUE, TRUE, 0); - } else if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) { + gtk_box_pack_start ((GtkBox *) emae->pages[3], w, TRUE, TRUE, 0); + } else if (((EConfig *) priv->config)->type == E_CONFIG_ASSISTANT) { GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "transport_page"); gtk_box_pack_start (GTK_BOX (page), w, TRUE, TRUE, 0); @@ -3032,7 +3032,7 @@ emae_defaults_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget /*if (old) return old;*/ - if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT && emae->type != EMAE_PAGES) + if (((EConfig *) priv->config)->type == E_CONFIG_ASSISTANT && emae->type != EMAE_PAGES) return NULL; account = em_account_editor_get_modified_account (emae); @@ -3093,15 +3093,15 @@ emae_defaults_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget emae_account_toggle (emae, "always_bcc", E_ACCOUNT_BCC_ALWAYS, builder); emae_account_entry (emae, "bcc_addrs", E_ACCOUNT_BCC_ADDRS, builder); - gtk_widget_set_sensitive ((GtkWidget *)priv->drafts_folder_button, e_account_writable (account, E_ACCOUNT_DRAFTS_FOLDER_URI)); + gtk_widget_set_sensitive ((GtkWidget *) priv->drafts_folder_button, e_account_writable (account, E_ACCOUNT_DRAFTS_FOLDER_URI)); - gtk_widget_set_sensitive ( (GtkWidget *)priv->sent_folder_button, + gtk_widget_set_sensitive ( (GtkWidget *) priv->sent_folder_button, e_account_writable (account, E_ACCOUNT_SENT_FOLDER_URI) && (emae->priv->source.provider ? !(emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER): TRUE) ); - gtk_widget_set_sensitive ((GtkWidget *)priv->restore_folders_button, + gtk_widget_set_sensitive ((GtkWidget *) priv->restore_folders_button, (e_account_writable (account, E_ACCOUNT_SENT_FOLDER_URI) && ((emae->priv->source.provider && !( emae->priv->source.provider->flags & CAMEL_PROVIDER_DISABLE_SENT_FOLDER)) || e_account_writable (account, E_ACCOUNT_DRAFTS_FOLDER_URI)))); @@ -3111,7 +3111,7 @@ emae_defaults_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget widget = e_builder_get_widget (builder, item->label); if (emae->type == EMAE_PAGES) { - gtk_box_pack_start ((GtkBox *)emae->pages[4], widget, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) emae->pages[4], widget, TRUE, TRUE, 0); gtk_widget_show (widget); }else { gtk_notebook_append_page ((GtkNotebook *)parent, widget, gtk_label_new (_("Defaults"))); @@ -3318,7 +3318,7 @@ emae_management_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg GtkWidget *w; w = priv->management_frame; - if (((EConfig *)priv->config)->type == E_CONFIG_ASSISTANT) { + if (((EConfig *) priv->config)->type == E_CONFIG_ASSISTANT) { GtkWidget *page = emae_create_basic_assistant_page (emae, GTK_ASSISTANT (parent), "management_page"); gtk_widget_reparent (w, page); @@ -3332,7 +3332,7 @@ emae_management_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidg static GtkWidget * emae_widget_assistant_page (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget *old, gpointer data) { - EMAccountEditor *emae = (EMAccountEditor *)data; + EMAccountEditor *emae = (EMAccountEditor *) data; if (emae->type == EMAE_PAGES) return NULL; @@ -3500,7 +3500,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) /* We use the page-check of various pages to 'prepare' or pre-load their values, only in the assistant */ if (pageid - && ((EConfig *)emae->priv->config)->type == E_CONFIG_ASSISTANT) { + && ((EConfig *) emae->priv->config)->type == E_CONFIG_ASSISTANT) { if (!strcmp (pageid, "00.identity")) { if (!emae->priv->identity_set) { gchar *uname; @@ -3524,7 +3524,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) CamelURL *url; emae->priv->receive_set = 1; - tmp = (gchar *)e_account_get_string (account, E_ACCOUNT_ID_ADDRESS); + tmp = (gchar *) e_account_get_string (account, E_ACCOUNT_ID_ADDRESS); at = strchr (tmp, '@'); user = g_alloca (at-tmp+1); memcpy (user, tmp, at-tmp); @@ -3570,7 +3570,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) if (!emae->priv->send_set) { CamelURL *url; gchar *at, *user; - gchar *uri = (gchar *)e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL); + gchar *uri = (gchar *) e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL); ServerData *sdata; emae->priv->send_set = 1; @@ -3608,7 +3608,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) emae_check_set_authtype (emae->priv->transport.authtype, sdata->send_auth); else emae_authtype_changed (emae->priv->transport.authtype, &emae->priv->transport); - uri = (gchar *)e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL); + uri = (gchar *) e_account_get_string (account, E_ACCOUNT_TRANSPORT_URL); } else gtk_entry_set_text (emae->priv->transport.username, user); } @@ -3697,7 +3697,7 @@ emae_check_complete (EConfig *ec, const gchar *pageid, gpointer data) gboolean em_account_editor_check (EMAccountEditor *emae, const gchar *page) { - return emae_check_complete ((EConfig *)emae->config, page, emae); + return emae_check_complete ((EConfig *) emae->config, page, emae); } static void @@ -3789,7 +3789,7 @@ emae_commit (EConfig *ec, GSList *items, gpointer data) void em_account_editor_commit (EMAccountEditor *emae) { - emae_commit ((EConfig *)emae->config, NULL, emae); + emae_commit ((EConfig *) emae->config, NULL, emae); } static void @@ -3898,7 +3898,7 @@ em_account_editor_construct (EMAccountEditor *emae, emae->type = type; /* sort the providers, remote first */ - priv->providers = g_list_sort (camel_provider_list (TRUE), (GCompareFunc)provider_compare); + priv->providers = g_list_sort (camel_provider_list (TRUE), (GCompareFunc) provider_compare); if (type == EMAE_NOTEBOOK) { ec = em_config_new (E_CONFIG_BOOK, id); @@ -3926,14 +3926,14 @@ em_account_editor_construct (EMAccountEditor *emae, l = NULL; for (i=0;items[i].path;i++) l = g_slist_prepend (l, &items[i]); - e_config_add_items ((EConfig *)ec, l, emae_commit, NULL, emae_free, emae); + e_config_add_items ((EConfig *) ec, l, emae_commit, NULL, emae_free, emae); /* This is kinda yuck, we're dynamically mapping from the 'old style' extensibility api to the new one */ l = NULL; have = g_hash_table_new (g_str_hash, g_str_equal); index = 20; for (prov=priv->providers;prov;prov=g_list_next (prov)) { - CamelProviderConfEntry *entries = ((CamelProvider *)prov->data)->extra_conf; + CamelProviderConfEntry *entries = ((CamelProvider *) prov->data)->extra_conf; for (i=0;entries && entries[i].type != CAMEL_PROVIDER_CONF_END;i++) { struct _receive_options_item *item; @@ -3965,19 +3965,19 @@ em_account_editor_construct (EMAccountEditor *emae, l = g_slist_prepend (l, item); index += 10; - g_hash_table_insert (have, (gpointer)entries[i].name, have); + g_hash_table_insert (have, (gpointer) entries[i].name, have); } } g_hash_table_destroy (have); - e_config_add_items ((EConfig *)ec, l, NULL, NULL, emae_free_auto, emae); + e_config_add_items ((EConfig *) ec, l, NULL, NULL, emae_free_auto, emae); priv->extra_items = l; - e_config_add_page_check ((EConfig *)ec, NULL, emae_check_complete, emae); + e_config_add_page_check ((EConfig *) ec, NULL, emae_check_complete, emae); original_account = em_account_editor_get_original_account (emae); modified_account = em_account_editor_get_modified_account (emae); target = em_config_target_new_account ( ec, original_account, modified_account); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); } diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c index 9d2b6603ce..72225c7d55 100644 --- a/mail/em-composer-utils.c +++ b/mail/em-composer-utils.c @@ -1172,7 +1172,7 @@ edit_message (EShell *shell, gtk_widget_show (GTK_WIDGET (composer)); - return (GtkWidget *)composer; + return (GtkWidget *) composer; } typedef enum { @@ -1464,7 +1464,7 @@ forward_non_attached (EShell *shell, composer = create_new_composer (shell, subject, folder); if (composer) { - if (CAMEL_IS_MULTIPART (camel_medium_get_content ((CamelMedium *)message))) + if (CAMEL_IS_MULTIPART (camel_medium_get_content ((CamelMedium *) message))) e_msg_composer_add_message_attachments (composer, message, FALSE); e_msg_composer_set_body_text (composer, text, TRUE); @@ -2055,7 +2055,7 @@ reply_get_composer (EShell *shell, g_free (subject); /* add post-to, if nessecary */ - if (postto && camel_address_length ((CamelAddress *)postto)) { + if (postto && camel_address_length ((CamelAddress *) postto)) { gchar *store_url = NULL; gchar *post; @@ -2075,7 +2075,7 @@ reply_get_composer (EShell *shell, store_url[strlen (store_url)-1] = '\0'; } - post = camel_address_encode ((CamelAddress *)postto); + post = camel_address_encode ((CamelAddress *) postto); e_composer_header_table_set_post_to_base ( table, store_url ? store_url : "", post); g_free (post); @@ -2215,7 +2215,7 @@ get_reply_sender (CamelMimeMessage *message, if (postto && ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To")) || (posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))) { - camel_address_decode ((CamelAddress *)postto, posthdr); + camel_address_decode ((CamelAddress *) postto, posthdr); return; } @@ -2248,7 +2248,7 @@ get_reply_from (CamelMimeMessage *message, if (postto && ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To")) || (posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups")))) { - camel_address_decode ((CamelAddress *)postto, posthdr); + camel_address_decode ((CamelAddress *) postto, posthdr); return; } @@ -2290,9 +2290,9 @@ get_reply_all (CamelMimeMessage *message, /* check whether there is a 'Newsgroups: ' header in there */ if (postto) { if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Followup-To"))) - camel_address_decode ((CamelAddress *)postto, posthdr); + camel_address_decode ((CamelAddress *) postto, posthdr); if ((posthdr = camel_medium_get_header((CamelMedium *)message, "Newsgroups"))) - camel_address_decode ((CamelAddress *)postto, posthdr); + camel_address_decode ((CamelAddress *) postto, posthdr); } rcpt_hash = em_utils_generate_account_hash (); @@ -2320,15 +2320,15 @@ get_reply_all (CamelMimeMessage *message, /* Promote the first Cc: address to To: if To: is empty. */ if (camel_address_length ((CamelAddress *) to) == 0 && - camel_address_length ((CamelAddress *)cc) > 0) { + camel_address_length ((CamelAddress *) cc) > 0) { camel_internet_address_get (cc, 0, &name, &addr); camel_internet_address_add (to, name, addr); - camel_address_remove ((CamelAddress *)cc, 0); + camel_address_remove ((CamelAddress *) cc, 0); } /* If To: is still empty, may we removed duplicates (i.e. ourself), * so add the original To if it was set. */ - if (camel_address_length ((CamelAddress *)to) == 0 + if (camel_address_length ((CamelAddress *) to) == 0 && (camel_internet_address_get (to_addrs, 0, &name, &addr) || camel_internet_address_get (cc_addrs, 0, &name, &addr))) { camel_internet_address_add (to, name, addr); diff --git a/mail/em-config.c b/mail/em-config.c index 53728b8e66..a5ddb7a702 100644 --- a/mail/em-config.c +++ b/mail/em-config.c @@ -47,7 +47,7 @@ struct _EMConfigPrivate { static void emp_account_changed (struct _EAccount *ea, gint id, EMConfig *emc) { - e_config_target_changed ((EConfig *)emc, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *) emc, E_CONFIG_TARGET_CHANGED_STATE); } static void @@ -79,7 +79,7 @@ em_config_set_target (EConfig *ep, /*EMConfigTargetPrefs *s = (EMConfigTargetPrefs *)t;*/ break; } case EM_CONFIG_TARGET_ACCOUNT: { - EMConfigTargetAccount *s = (EMConfigTargetAccount *)t; + EMConfigTargetAccount *s = (EMConfigTargetAccount *) t; EMConfig *config = (EMConfig *) ep; config->priv->account_changed_id = g_signal_connect ( @@ -101,7 +101,7 @@ em_config_target_free (EConfig *ep, case EM_CONFIG_TARGET_PREFS: break; case EM_CONFIG_TARGET_ACCOUNT: { - EMConfigTargetAccount *s = (EMConfigTargetAccount *)t; + EMConfigTargetAccount *s = (EMConfigTargetAccount *) t; EMConfig *config = (EMConfig *) ep; if (config->priv->account_changed_id > 0) { @@ -116,19 +116,19 @@ em_config_target_free (EConfig *ep, switch (t->type) { case EM_CONFIG_TARGET_FOLDER: { - EMConfigTargetFolder *s = (EMConfigTargetFolder *)t; + EMConfigTargetFolder *s = (EMConfigTargetFolder *) t; g_free (s->uri); g_object_unref (s->folder); break; } case EM_CONFIG_TARGET_PREFS: { - EMConfigTargetPrefs *s = (EMConfigTargetPrefs *)t; + EMConfigTargetPrefs *s = (EMConfigTargetPrefs *) t; if (s->gconf) g_object_unref (s->gconf); break; } case EM_CONFIG_TARGET_ACCOUNT: { - EMConfigTargetAccount *s = (EMConfigTargetAccount *)t; + EMConfigTargetAccount *s = (EMConfigTargetAccount *) t; if (s->original_account != NULL) g_object_unref (s->original_account); diff --git a/mail/em-event.c b/mail/em-event.c index a1b0442024..a2972afa7f 100644 --- a/mail/em-event.c +++ b/mail/em-event.c @@ -41,7 +41,7 @@ eme_target_free (EEvent *ep, EEventTarget *t) { switch (t->type) { case EM_EVENT_TARGET_FOLDER: { - EMEventTargetFolder *s = (EMEventTargetFolder *)t; + EMEventTargetFolder *s = (EMEventTargetFolder *) t; if (s->account != NULL) g_object_unref (s->account); g_free (s->name); @@ -51,7 +51,7 @@ eme_target_free (EEvent *ep, EEventTarget *t) g_free (s->msg_subject); break; } case EM_EVENT_TARGET_MESSAGE: { - EMEventTargetMessage *s = (EMEventTargetMessage *)t; + EMEventTargetMessage *s = (EMEventTargetMessage *) t; if (s->folder) g_object_unref (s->folder); @@ -62,7 +62,7 @@ eme_target_free (EEvent *ep, EEventTarget *t) g_object_unref (s->composer); break; } case EM_EVENT_TARGET_COMPOSER : { - EMEventTargetComposer *s = (EMEventTargetComposer *)t; + EMEventTargetComposer *s = (EMEventTargetComposer *) t; if (s->composer) g_object_unref (s->composer); diff --git a/mail/em-filter-context.c b/mail/em-filter-context.c index 57d182a4eb..ff25e49cb9 100644 --- a/mail/em-filter-context.c +++ b/mail/em-filter-context.c @@ -205,7 +205,7 @@ filter_context_delete_uri (ERuleContext *context, EM_FILTER_FOLDER_ELEMENT (element)), uri)) { /* check if last action, if so, remove rule instead? */ l = l->next; - em_filter_rule_remove_action ((EMFilterRule *)rule, action); + em_filter_rule_remove_action ((EMFilterRule *) rule, action); g_object_unref (action); count++; if (!recorded) diff --git a/mail/em-filter-editor.c b/mail/em-filter-editor.c index ca41486b1e..1efdca622a 100644 --- a/mail/em-filter-editor.c +++ b/mail/em-filter-editor.c @@ -44,13 +44,13 @@ filter_editor_create_rule (ERuleEditor *rule_editor) EFilterPart *part; /* create a rule with 1 part & 1 action in it */ - rule = (EFilterRule *)em_filter_rule_new (); + rule = (EFilterRule *) em_filter_rule_new (); part = e_rule_context_next_part (rule_editor->context, NULL); e_filter_rule_add_part (rule, e_filter_part_clone (part)); part = em_filter_context_next_action ( - (EMFilterContext *)rule_editor->context, NULL); + (EMFilterContext *) rule_editor->context, NULL); em_filter_rule_add_action ( - (EMFilterRule *)rule, e_filter_part_clone (part)); + (EMFilterRule *) rule, e_filter_part_clone (part)); return rule; } @@ -134,7 +134,7 @@ free_sources (gpointer data) { GSList *sources = data; - g_slist_foreach (sources, (GFunc)g_free, NULL); + g_slist_foreach (sources, (GFunc) g_free, NULL); g_slist_free (sources); } @@ -155,7 +155,7 @@ select_source (GtkComboBox *combobox, EMFilterEditor *fe) source = (gchar *) (g_slist_nth (sources, idx))->data; g_return_if_fail (source); - e_rule_editor_set_source ((ERuleEditor *)fe, source); + e_rule_editor_set_source ((ERuleEditor *) fe, source); } void diff --git a/mail/em-filter-rule.c b/mail/em-filter-rule.c index 545eb1fce4..77b4d971a9 100644 --- a/mail/em-filter-rule.c +++ b/mail/em-filter-rule.c @@ -64,7 +64,7 @@ em_filter_rule_get_type (void) NULL, /* class_data */ sizeof (EMFilterRule), 0, /* n_preallocs */ - (GInstanceInitFunc)em_filter_rule_init, + (GInstanceInitFunc) em_filter_rule_init, }; type = g_type_register_static(E_TYPE_FILTER_RULE, "EMFilterRule", &info, 0); @@ -77,7 +77,7 @@ static void em_filter_rule_class_init (EMFilterRuleClass *klass) { GObjectClass *object_class = G_OBJECT_CLASS (klass); - EFilterRuleClass *fr_class =(EFilterRuleClass *)klass; + EFilterRuleClass *fr_class =(EFilterRuleClass *) klass; parent_class = g_type_class_ref (E_TYPE_FILTER_RULE); @@ -137,7 +137,7 @@ em_filter_rule_add_action (EMFilterRule *fr, EFilterPart *fp) { fr->actions = g_list_append (fr->actions, fp); - e_filter_rule_emit_changed ((EFilterRule *)fr); + e_filter_rule_emit_changed ((EFilterRule *) fr); } void @@ -145,7 +145,7 @@ em_filter_rule_remove_action (EMFilterRule *fr, EFilterPart *fp) { fr->actions = g_list_remove (fr->actions, fp); - e_filter_rule_emit_changed ((EFilterRule *)fr); + e_filter_rule_emit_changed ((EFilterRule *) fr); } void @@ -160,7 +160,7 @@ em_filter_rule_replace_action (EMFilterRule *fr, EFilterPart *fp, EFilterPart *n fr->actions = g_list_append (fr->actions, new); } - e_filter_rule_emit_changed ((EFilterRule *)fr); + e_filter_rule_emit_changed ((EFilterRule *) fr); } void @@ -174,7 +174,7 @@ em_filter_rule_build_action (EMFilterRule *fr, GString *out) static gint validate (EFilterRule *fr, EAlert **alert) { - EMFilterRule *ff =(EMFilterRule *)fr; + EMFilterRule *ff =(EMFilterRule *) fr; GList *parts; gint valid; @@ -183,7 +183,7 @@ validate (EFilterRule *fr, EAlert **alert) /* validate rule actions */ parts = ff->actions; while (parts && valid) { - valid = e_filter_part_validate ((EFilterPart *)parts->data, alert); + valid = e_filter_part_validate ((EFilterPart *) parts->data, alert); parts = parts->next; } @@ -210,13 +210,13 @@ static gint filter_eq (EFilterRule *fr, EFilterRule *cm) { return E_FILTER_RULE_CLASS (parent_class)->eq (fr, cm) - && list_eq (((EMFilterRule *)fr)->actions,((EMFilterRule *)cm)->actions); + && list_eq (((EMFilterRule *) fr)->actions,((EMFilterRule *) cm)->actions); } static xmlNodePtr xml_encode (EFilterRule *fr) { - EMFilterRule *ff =(EMFilterRule *)fr; + EMFilterRule *ff =(EMFilterRule *) fr; xmlNodePtr node, set, work; GList *l; @@ -226,7 +226,7 @@ xml_encode (EFilterRule *fr) xmlAddChild (node, set); l = ff->actions; while (l) { - work = e_filter_part_xml_encode ((EFilterPart *)l->data); + work = e_filter_part_xml_encode ((EFilterPart *) l->data); xmlAddChild (set, work); l = l->next; } @@ -246,7 +246,7 @@ load_set (xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc) while (work) { if (!strcmp((gchar *)work->name, "part")) { rulename = (gchar *)xmlGetProp(work, (const guchar *)"name"); - part = em_filter_context_find_action ((EMFilterContext *)rc, rulename); + part = em_filter_context_find_action ((EMFilterContext *) rc, rulename); if (part) { part = e_filter_part_clone (part); e_filter_part_xml_decode (part, work); @@ -265,7 +265,7 @@ load_set (xmlNodePtr node, EMFilterRule *ff, ERuleContext *rc) static gint xml_decode (EFilterRule *fr, xmlNodePtr node, ERuleContext *rc) { - EMFilterRule *ff =(EMFilterRule *)fr; + EMFilterRule *ff =(EMFilterRule *) fr; xmlNodePtr work; gint result; @@ -290,11 +290,11 @@ rule_copy (EFilterRule *dest, EFilterRule *src) EMFilterRule *fdest, *fsrc; GList *node; - fdest =(EMFilterRule *)dest; - fsrc =(EMFilterRule *)src; + fdest =(EMFilterRule *) dest; + fsrc =(EMFilterRule *) src; if (fdest->actions) { - g_list_foreach (fdest->actions, (GFunc)g_object_unref, NULL); + g_list_foreach (fdest->actions, (GFunc) g_object_unref, NULL); g_list_free (fdest->actions); fdest->actions = NULL; } @@ -351,7 +351,7 @@ part_combobox_changed (GtkComboBox *combobox, struct _part_data *data) newpart = e_filter_part_clone (part); e_filter_part_copy_values (newpart, data->part); - em_filter_rule_replace_action ((EMFilterRule *)data->fr, data->part, newpart); + em_filter_rule_replace_action ((EMFilterRule *) data->fr, data->part, newpart); g_object_unref (data->part); data->part = newpart; data->partwidget = e_filter_part_get_widget (newpart); @@ -421,7 +421,7 @@ less_parts (GtkWidget *button, struct _rule_data *data) struct _part_data *part_data; GList *l; - l =((EMFilterRule *)data->fr)->actions; + l =((EMFilterRule *) data->fr)->actions; if (g_list_length (l) < 2) return; @@ -433,7 +433,7 @@ less_parts (GtkWidget *button, struct _rule_data *data) part = part_data->part; /* remove the part from the list */ - em_filter_rule_remove_action ((EMFilterRule *)data->fr, part); + em_filter_rule_remove_action ((EMFilterRule *) data->fr, part); g_object_unref (part); /* and from the display */ @@ -480,13 +480,13 @@ more_parts (GtkWidget *button, struct _rule_data *data) EFilterPart *new; /* create a new rule entry, use the first type of rule */ - new = em_filter_context_next_action ((EMFilterContext *)data->f, NULL); + new = em_filter_context_next_action ((EMFilterContext *) data->f, NULL); if (new) { GtkWidget *w; guint rows; new = e_filter_part_clone (new); - em_filter_rule_add_action ((EMFilterRule *)data->fr, new); + em_filter_rule_add_action ((EMFilterRule *) data->fr, new); w = get_rule_part_widget (data->f, new, data->fr); g_object_get (data->parts, "n-rows", &rows, NULL); @@ -526,7 +526,7 @@ get_widget (EFilterRule *fr, ERuleContext *rc) GList *l; EFilterPart *part; struct _rule_data *data; - EMFilterRule *ff =(EMFilterRule *)fr; + EMFilterRule *ff =(EMFilterRule *) fr; gint rows, i = 0; gchar *msg; @@ -555,7 +555,7 @@ get_widget (EFilterRule *fr, ERuleContext *rc) rows = g_list_length (ff->actions); parts = gtk_table_new (rows, 2, FALSE); data = g_malloc0 (sizeof (*data)); - data->f =(EMFilterContext *)rc; + data->f =(EMFilterContext *) rc; data->fr = fr; data->parts = parts; @@ -577,7 +577,7 @@ get_widget (EFilterRule *fr, ERuleContext *rc) while (l) { part = l->data; d(printf("adding action %s\n", part->title)); - w = get_rule_part_widget ((EMFilterContext *)rc, part, fr); + w = get_rule_part_widget ((EMFilterContext *) rc, part, fr); attach_rule (w, data, part, i++); l = l->next; } diff --git a/mail/em-filter-source-element.c b/mail/em-filter-source-element.c index ee6785f15c..48f47ca4a6 100644 --- a/mail/em-filter-source-element.c +++ b/mail/em-filter-source-element.c @@ -78,12 +78,12 @@ em_filter_source_element_get_type (void) sizeof (EMFilterSourceElementClass), NULL, /* base_class_init */ NULL, /* base_class_finalize */ - (GClassInitFunc)em_filter_source_element_class_init, + (GClassInitFunc) em_filter_source_element_class_init, NULL, /* class_finalize */ NULL, /* class_data */ sizeof (EMFilterSourceElement), 0, /* n_preallocs */ - (GInstanceInitFunc)em_filter_source_element_init, + (GInstanceInitFunc) em_filter_source_element_init, }; type = g_type_register_static(E_TYPE_FILTER_ELEMENT, "EMFilterSourceElement", &info, 0); @@ -124,7 +124,7 @@ em_filter_source_element_init (EMFilterSourceElement *fs) static void em_filter_source_element_finalize (GObject *obj) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)obj; + EMFilterSourceElement *fs = (EMFilterSourceElement *) obj; GList *i = fs->priv->sources; while (i) { @@ -154,7 +154,7 @@ em_filter_source_element_new (void) static gint source_eq (EFilterElement *fe, EFilterElement *cm) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe, *cs = (EMFilterSourceElement *)cm; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe, *cs = (EMFilterSourceElement *) cm; return E_FILTER_ELEMENT_CLASS (parent_class)->eq (fe, cm) &&((fs->priv->current_url && cs->priv->current_url @@ -174,7 +174,7 @@ xml_encode (EFilterElement *fe) { xmlNodePtr value; - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; value = xmlNewNode(NULL, (const guchar *)"value"); xmlSetProp(value, (const guchar *)"name", (guchar *)fe->name); @@ -189,14 +189,14 @@ xml_encode (EFilterElement *fe) static gint xml_decode (EFilterElement *fe, xmlNodePtr node) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; CamelURL *url; gchar *uri; node = node->children; while (node != NULL) { if (!strcmp((gchar *)node->name, "uri")) { - uri = (gchar *)xmlNodeGetContent (node); + uri = (gchar *) xmlNodeGetContent (node); url = camel_url_new (uri, NULL); xmlFree (uri); @@ -215,21 +215,21 @@ xml_decode (EFilterElement *fe, xmlNodePtr node) static EFilterElement * filter_clone (EFilterElement *fe) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; EMFilterSourceElement *cpy; GList *i; cpy = (EMFilterSourceElement *) em_filter_source_element_new (); - ((EFilterElement *)cpy)->name = (gchar *)xmlStrdup ((guchar *)fe->name); + ((EFilterElement *) cpy)->name = (gchar *) xmlStrdup ((guchar *) fe->name); cpy->priv->current_url = g_strdup (fs->priv->current_url); for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) { - SourceInfo *info = (SourceInfo *)i->data; + SourceInfo *info = (SourceInfo *) i->data; em_filter_source_element_add_source (cpy, info->account_name, info->name, info->address, info->url); } - return (EFilterElement *)cpy; + return (EFilterElement *) cpy; } static void @@ -251,7 +251,7 @@ source_changed (GtkComboBox *combobox, EMFilterSourceElement *fs) static GtkWidget * get_widget (EFilterElement *fe) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; GtkWidget *combobox; GList *i; SourceInfo *first = NULL; @@ -266,7 +266,7 @@ get_widget (EFilterElement *fe) current_index = -1; for (i = fs->priv->sources; i != NULL; i = g_list_next (i)) { - SourceInfo *info = (SourceInfo *)i->data; + SourceInfo *info = (SourceInfo *) i->data; gchar *label; if (info->url != NULL) { @@ -316,7 +316,7 @@ build_code (EFilterElement *fe, GString *out, EFilterPart *ff) static void format_sexp (EFilterElement *fe, GString *out) { - EMFilterSourceElement *fs = (EMFilterSourceElement *)fe; + EMFilterSourceElement *fs = (EMFilterSourceElement *) fe; e_sexp_encode_string (out, fs->priv->current_url); } @@ -350,10 +350,10 @@ em_filter_source_element_get_sources (EMFilterSourceElement *fs) /* should this get the global object from mail? */ accounts = e_get_account_list (); - for (it = e_list_get_iterator ((EList *)accounts); + for (it = e_list_get_iterator ((EList *) accounts); e_iterator_is_valid (it); e_iterator_next (it)) { - account = (const EAccount *)e_iterator_get (it); + account = (const EAccount *) e_iterator_get (it); if (account->source == NULL || account->source->url == NULL || account->source->url[0] == 0) continue; diff --git a/mail/em-folder-properties.c b/mail/em-folder-properties.c index bf2322c732..6882ab0980 100644 --- a/mail/em-folder-properties.c +++ b/mail/em-folder-properties.c @@ -52,9 +52,9 @@ static void emfp_dialog_response (GtkWidget *dialog, gint response, struct _prop_data *prop_data) { if (response == GTK_RESPONSE_OK) - e_config_commit ((EConfig *)prop_data->config); + e_config_commit ((EConfig *) prop_data->config); else - e_config_abort ((EConfig *)prop_data->config); + e_config_abort ((EConfig *) prop_data->config); gtk_widget_destroy (dialog); } @@ -310,11 +310,11 @@ emfp_dialog_got_folder_quota (CamelFolder *folder, l = NULL; for (i = 0; i < G_N_ELEMENTS (emfp_items); i++) l = g_slist_prepend (l, &emfp_items[i]); - e_config_add_items ((EConfig *)ec, l, NULL, NULL, emfp_free, prop_data); + e_config_add_items ((EConfig *) ec, l, NULL, NULL, emfp_free, prop_data); target = em_config_target_new_folder (ec, folder, folder_uri); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); - w = e_config_create_widget ((EConfig *)ec); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); + w = e_config_create_widget ((EConfig *) ec); gtk_box_pack_start (GTK_BOX (content_area), w, TRUE, TRUE, 0); @@ -383,5 +383,5 @@ em_folder_properties_show (EShellView *shell_view, session, uri, 0, emfp_dialog_got_folder, shell_view, mail_msg_unordered_push); else - emfp_dialog_got_folder ((gchar *)uri, folder, shell_view); + emfp_dialog_got_folder ((gchar *) uri, folder, shell_view); } diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c index 794586399c..43bf83c58c 100644 --- a/mail/em-folder-tree.c +++ b/mail/em-folder-tree.c @@ -194,7 +194,7 @@ folder_tree_get_folder_info__desc (struct _EMFolderTreeGetFolderInfo *m) { gchar *ret, *name; - name = camel_service_get_name ((CamelService *)m->store, TRUE); + name = camel_service_get_name ((CamelService *) m->store, TRUE); ret = g_strdup_printf(_("Scanning folders in \"%s\""), name); g_free (name); return ret; @@ -1386,7 +1386,7 @@ folder_tree_new (EMFolderTree *folder_tree) folder_tree_select_func, NULL, NULL); gtk_tree_view_set_headers_visible ((GtkTreeView *) tree, FALSE); - gtk_tree_view_set_search_column ((GtkTreeView *)tree, COL_STRING_DISPLAY_NAME); + gtk_tree_view_set_search_column ((GtkTreeView *) tree, COL_STRING_DISPLAY_NAME); return (GtkTreeView *) tree; } @@ -1937,7 +1937,7 @@ folder_tree_drop_async__desc (struct _DragDataReceivedAsync *m) data = gtk_selection_data_get_data (m->selection); if (m->info == DND_DROP_TYPE_FOLDER) { - url = camel_url_new ((gchar *)data, NULL); + url = camel_url_new ((gchar *) data, NULL); if (m->move) buf = g_strdup_printf ( @@ -2661,7 +2661,7 @@ em_folder_tree_get_selected_uris (EMFolderTree *folder_tree) /* at first, add lost uris */ for (sl = folder_tree->priv->select_uris; sl; sl = g_slist_next (sl)) - list = g_list_append (list, g_strdup (((struct _selected_uri *)sl->data)->uri)); + list = g_list_append (list, g_strdup (((struct _selected_uri *) sl->data)->uri)); rows = gtk_tree_selection_get_selected_rows (selection, &model); for (l=rows; l; l=g_list_next (l)) { @@ -2803,7 +2803,7 @@ em_folder_tree_set_selected (EMFolderTree *folder_tree, g_return_if_fail (EM_IS_FOLDER_TREE (folder_tree)); if (uri && uri[0]) - l = g_list_append (l, (gpointer)uri); + l = g_list_append (l, (gpointer) uri); em_folder_tree_set_selected_list (folder_tree, l, expand_only); g_list_free (l); diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c index 89f382da9b..c4fa537907 100644 --- a/mail/em-folder-utils.c +++ b/mail/em-folder-utils.c @@ -779,7 +779,7 @@ emfu_popup_new_folder_response (EMFolderSelector *emfs, rule = em_vfolder_rule_new (session); e_filter_rule_set_name (rule, path); vfolder_gui_add_rule (EM_VFOLDER_RULE (rule)); - gtk_widget_destroy ((GtkWidget *)emfs); + gtk_widget_destroy ((GtkWidget *) emfs); } else { /* Temp data to pass to create_folder_real function */ emcftd = (struct _EMCreateFolderTempData *) diff --git a/mail/em-format-hook.c b/mail/em-format-hook.c index 66fa0944cd..017dea8a81 100644 --- a/mail/em-format-hook.c +++ b/mail/em-format-hook.c @@ -70,7 +70,7 @@ emfh_format_format (EMFormat *md, GCancellable *cancellable, gboolean is_fallback) { - struct _EMFormatHookItem *item = (EMFormatHookItem *)info; + struct _EMFormatHookItem *item = (EMFormatHookItem *) info; if (item->hook->hook.plugin->enabled) { EMFormatHookTarget target = { @@ -97,7 +97,7 @@ emfh_free_item (struct _EMFormatHookItem *item) static void emfh_free_group (struct _EMFormatHookGroup *group) { - g_slist_foreach (group->items, (GFunc)emfh_free_item, NULL); + g_slist_foreach (group->items, (GFunc) emfh_free_item, NULL); g_slist_free (group->items); g_free (group->id); @@ -169,7 +169,7 @@ emfh_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) d(printf("loading format hook\n")); - if (((EPluginHookClass *)emfh_parent_class)->construct (eph, ep, root) == -1) + if (((EPluginHookClass *) emfh_parent_class)->construct (eph, ep, root) == -1) return -1; node = root->children; @@ -205,7 +205,7 @@ emfh_construct (EPluginHook *eph, EPlugin *ep, xmlNodePtr root) eph->plugin = ep; /* Load the plugin as it does a few thing in the formatter thread. */ - ((EPluginClass *)G_OBJECT_GET_CLASS (ep))->enable (ep, 1); + ((EPluginClass *) G_OBJECT_GET_CLASS (ep))->enable (ep, 1); return 0; } @@ -237,18 +237,18 @@ emfh_enable (EPluginHook *eph, gint state) static void emfh_finalise (GObject *o) { - EPluginHook *eph = (EPluginHook *)o; + EPluginHook *eph = (EPluginHook *) o; - g_slist_foreach (emfh->groups, (GFunc)emfh_free_group, NULL); + g_slist_foreach (emfh->groups, (GFunc) emfh_free_group, NULL); g_slist_free (emfh->groups); - ((GObjectClass *)emfh_parent_class)->finalize (o); + ((GObjectClass *) emfh_parent_class)->finalize (o); } static void emfh_class_init (EPluginHookClass *klass) { - ((GObjectClass *)klass)->finalize = emfh_finalise; + ((GObjectClass *) klass)->finalize = emfh_finalise; klass->construct = emfh_construct; klass->enable = emfh_enable; klass->id = "org.gnome.evolution.mail.format:1.0"; @@ -292,5 +292,5 @@ em_format_hook_register_type (GType type) d(printf("registering formatter type '%s'\n", g_type_name(type))); klass = g_type_class_ref (type); - g_hash_table_insert (emfh_types, (gpointer)g_type_name (type), klass); + g_hash_table_insert (emfh_types, (gpointer) g_type_name (type), klass); } diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index d44915f9f3..75cb530ed9 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -157,7 +157,7 @@ static gpointer parent_class; static void efhd_xpkcs7mime_free (EMFormatHTMLPObject *o) { - struct _smime_pobject *po = (struct _smime_pobject *)o; + struct _smime_pobject *po = (struct _smime_pobject *) o; if (po->widget) gtk_widget_destroy (po->widget); @@ -192,7 +192,7 @@ efhd_xpkcs7mime_viewcert_clicked (GtkWidget *button, g_signal_connect(w, "response", G_CALLBACK(gtk_widget_destroy), NULL); if (w && po->widget) - gtk_window_set_transient_for ((GtkWindow *)w, (GtkWindow *)po->widget); + gtk_window_set_transient_for ((GtkWindow *) w, (GtkWindow *) po->widget); g_object_unref (ec); } else { @@ -206,8 +206,8 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox, CamelDList *certlist, struct _smime_pobject *po) { - CamelCipherCertInfo *info = (CamelCipherCertInfo *)certlist->head; - GtkTable *table = (GtkTable *)gtk_table_new (camel_dlist_length (certlist), 2, FALSE); + CamelCipherCertInfo *info = (CamelCipherCertInfo *) certlist->head; + GtkTable *table = (GtkTable *) gtk_table_new (camel_dlist_length (certlist), 2, FALSE); gint n = 0; while (info->next) { @@ -230,7 +230,7 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox, ECert *ec = NULL; #endif w = gtk_label_new (l); - gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5); + gtk_misc_set_alignment ((GtkMisc *) w, 0.0, 0.5); g_free (la); gtk_table_attach (table, w, 0, 1, n, n+1, GTK_FILL, GTK_FILL, 3, 3); #if defined (HAVE_NSS) && defined (ENABLE_SMIME) @@ -256,14 +256,14 @@ efhd_xpkcs7mime_add_cert_table (GtkWidget *vbox, info = info->next; } - gtk_box_pack_start ((GtkBox *)vbox, (GtkWidget *)table, TRUE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) vbox, (GtkWidget *) table, TRUE, TRUE, 6); } static void efhd_xpkcs7mime_validity_clicked (GtkWidget *button, EMFormatHTMLPObject *pobject) { - struct _smime_pobject *po = (struct _smime_pobject *)pobject; + struct _smime_pobject *po = (struct _smime_pobject *) pobject; GtkBuilder *builder; GtkWidget *vbox, *w; @@ -278,9 +278,9 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, vbox = e_builder_get_widget(builder, "signature_vbox"); w = gtk_label_new (_(smime_sign_table[po->valid->sign.status].description)); - gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5); - gtk_label_set_line_wrap ((GtkLabel *)w, TRUE); - gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6); + gtk_misc_set_alignment ((GtkMisc *) w, 0.0, 0.5); + gtk_label_set_line_wrap ((GtkLabel *) w, TRUE); + gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); if (po->valid->sign.description) { GtkTextBuffer *buffer; @@ -300,7 +300,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, NULL); g_object_unref (buffer); - gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); } if (!camel_dlist_empty (&po->valid->sign.signers)) @@ -310,9 +310,9 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, vbox = e_builder_get_widget(builder, "encryption_vbox"); w = gtk_label_new (_(smime_encrypt_table[po->valid->encrypt.status].description)); - gtk_misc_set_alignment ((GtkMisc *)w, 0.0, 0.5); - gtk_label_set_line_wrap ((GtkLabel *)w, TRUE); - gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6); + gtk_misc_set_alignment ((GtkMisc *) w, 0.0, 0.5); + gtk_label_set_line_wrap ((GtkLabel *) w, TRUE); + gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); if (po->valid->encrypt.description) { GtkTextBuffer *buffer; @@ -332,7 +332,7 @@ efhd_xpkcs7mime_validity_clicked (GtkWidget *button, NULL); g_object_unref (buffer); - gtk_box_pack_start ((GtkBox *)vbox, w, TRUE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) vbox, w, TRUE, TRUE, 6); } if (!camel_dlist_empty (&po->valid->encrypt.encrypters)) @@ -353,7 +353,7 @@ efhd_xpkcs7mime_button (EMFormatHTML *efh, { GtkWidget *container; GtkWidget *widget; - struct _smime_pobject *po = (struct _smime_pobject *)pobject; + struct _smime_pobject *po = (struct _smime_pobject *) pobject; const gchar *icon_name; /* FIXME: need to have it based on encryption and signing too */ @@ -607,7 +607,7 @@ efhd_format_secure (EMFormat *emf, camel_stream_printf (stream, "%s", gettext (desc)); - signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *)valid->sign.signers.head); + signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *) valid->sign.signers.head); if (signers && *signers) { camel_stream_printf (stream, " (%s)", signers); } @@ -740,7 +740,7 @@ efhd_builtin_init (EMFormatHTMLDisplayClass *efhc) gint i; for (i = 0; i < G_N_ELEMENTS (type_builtin_table); i++) - em_format_class_add_handler ((EMFormatClass *)efhc, &type_builtin_table[i]); + em_format_class_add_handler ((EMFormatClass *) efhc, &type_builtin_table[i]); } static void @@ -749,7 +749,7 @@ efhd_write_image (EMFormat *emf, EMFormatPURI *puri, GCancellable *cancellable) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) puri->part); /* TODO: identical to efh_write_image */ d(printf("writing image '%s'\n", puri->cid)); @@ -792,7 +792,7 @@ efhd_message_prefix (EMFormat *emf, classid = g_strdup_printf("icon:///em-format-html-display/%s/%s", emf->part_id->str, comp&&comp[0]?"comp":"uncomp"); camel_stream_printf(stream, "<td align=\"left\"><img src=\"%s\"></td>", classid); - (void)em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efhd_write_image); + (void) em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efhd_write_image); g_free (classid); g_object_unref (iconpart); } @@ -875,7 +875,7 @@ attachment_button_realized (GtkWidget *widget) static gboolean efhd_attachment_button (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject) { - EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *)efh; + EMFormatHTMLDisplay *efhd = (EMFormatHTMLDisplay *) efh; struct _attach_puri *info; EAttachmentView *view; EAttachmentStore *store; @@ -907,7 +907,7 @@ efhd_attachment_button (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObj } } - info = (struct _attach_puri *)em_format_find_puri ((EMFormat *)efh, pobject->classid); + info = (struct _attach_puri *) em_format_find_puri ((EMFormat *) efh, pobject->classid); if (!info || info->forward) { g_warning ("unable to expand the attachment\n"); @@ -976,7 +976,7 @@ efhd_attachment_frame (EMFormat *emf, EMFormatPURI *puri, GCancellable *cancellable) { - struct _attach_puri *info = (struct _attach_puri *)puri; + struct _attach_puri *info = (struct _attach_puri *) puri; if (info->shown) info->handle->handler ( @@ -1112,7 +1112,7 @@ efhd_attachment_optional (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPO /* FIXME: handle default shown case */ d(printf("adding attachment button/content for optional rendering\n")); - info = (struct _attach_puri *)em_format_find_puri ((EMFormat *)efh, pobject->classid); + info = (struct _attach_puri *) em_format_find_puri ((EMFormat *) efh, pobject->classid); if (!info || info->forward) { g_warning ("unable to expand the attachment\n"); return TRUE; diff --git a/mail/em-format-html-print.c b/mail/em-format-html-print.c index f67d3c7084..1be0e5ed63 100644 --- a/mail/em-format-html-print.c +++ b/mail/em-format-html-print.c @@ -40,7 +40,7 @@ static gpointer parent_class = NULL; static void efhp_finalize (GObject *object) { - EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *)object; + EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *) object; gtk_widget_destroy (efhp->window); if (efhp->source != NULL) @@ -78,7 +78,7 @@ efhp_class_init (EMFormatHTMLPrintClass *class) static void efhp_init (GObject *o) { - EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *)o; + EMFormatHTMLPrint *efhp = (EMFormatHTMLPrint *) o; EWebView *web_view; web_view = em_format_html_get_web_view (EM_FORMAT_HTML (efhp)); @@ -89,7 +89,7 @@ efhp_init (GObject *o) gtk_container_add (GTK_CONTAINER (efhp->window), GTK_WIDGET (web_view)); gtk_widget_realize (GTK_WIDGET (web_view)); efhp->parent.show_icon = FALSE; - ((EMFormat *)efhp)->print = TRUE; + ((EMFormat *) efhp)->print = TRUE; } GType diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 6103f25e40..f2191c507c 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -182,7 +182,7 @@ efh_format_exec (struct _format_msg *m, format = EM_FORMAT (m->format); camel_stream_printf ( - (CamelStream *)m->estream, + (CamelStream *) m->estream, "<!doctype html public \"-//W3C//DTD HTML 4.0 TRANSITIONAL//EN\">\n<html>\n" "<head>\n<meta name=\"generator\" content=\"Evolution Mail Component\">\n</head>\n" "<body bgcolor =\"#%06x\" text=\"#%06x\" marginwidth=6 marginheight=6>\n", @@ -222,7 +222,7 @@ efh_format_exec (struct _format_msg *m, cancellable, FALSE); } - camel_stream_flush ((CamelStream *)m->estream, cancellable, NULL); + camel_stream_flush ((CamelStream *) m->estream, cancellable, NULL); puri_level = format->pending_uri_level; base = format->base; @@ -261,7 +261,7 @@ efh_format_exec (struct _format_msg *m, camel_stream_write_string ( (CamelStream *) m->estream, "</body>\n</html>\n", cancellable, NULL); - camel_stream_close ((CamelStream *)m->estream, cancellable, NULL); + camel_stream_close ((CamelStream *) m->estream, cancellable, NULL); g_object_unref (m->estream); m->estream = NULL; } @@ -290,7 +290,7 @@ efh_format_free (struct _format_msg *m) d(printf("formatter freed\n")); g_object_unref (m->format); if (m->estream) { - camel_stream_close ((CamelStream *)m->estream, NULL, NULL); + camel_stream_close ((CamelStream *) m->estream, NULL, NULL); g_object_unref (m->estream); } if (m->folder) @@ -343,10 +343,10 @@ efh_format_timeout (struct _format_msg *m) em_format_html_clear_pobject (m->format); /* FIXME: method off EMFormat? */ - if (((EMFormat *)efh)->valid) { - camel_cipher_validity_free (((EMFormat *)efh)->valid); - ((EMFormat *)efh)->valid = NULL; - ((EMFormat *)efh)->valid_parent = NULL; + if (((EMFormat *) efh)->valid) { + camel_cipher_validity_free (((EMFormat *) efh)->valid); + ((EMFormat *) efh)->valid = NULL; + ((EMFormat *) efh)->valid_parent = NULL; } if (m->message == NULL) { @@ -367,7 +367,7 @@ efh_format_timeout (struct _format_msg *m) } hstream = NULL; - m->estream = (EMHTMLStream *)em_html_stream_new ( + m->estream = (EMHTMLStream *) em_html_stream_new ( GTK_HTML (web_view), hstream); if (p->last_part == m->message) { @@ -767,7 +767,7 @@ efh_format_attachment (EMFormat *emf, /* output some info about it */ text = em_format_describe_part (part, mime_type); html = camel_text_to_html ( - text, ((EMFormatHTML *)emf)->text_html_flags & + text, ((EMFormatHTML *) emf)->text_html_flags & CAMEL_MIME_FILTER_TOHTML_CONVERT_URLS, 0); camel_stream_write_string (stream, html, cancellable, NULL); g_free (html); @@ -1330,7 +1330,7 @@ em_format_html_file_part (EMFormatHTML *efh, if (mime_type) camel_data_wrapper_set_mime_type (dw, mime_type); part = camel_mime_part_new (); - camel_medium_set_content ((CamelMedium *)part, dw); + camel_medium_set_content ((CamelMedium *) part, dw); g_object_unref (dw); basename = g_path_get_basename (filename); camel_mime_part_set_filename (part, basename); @@ -1449,11 +1449,11 @@ em_format_html_job_new (EMFormatHTML *emfh, struct _EMFormatHTMLJob *job = g_malloc0 (sizeof (*job)); job->format = emfh; - job->puri_level = ((EMFormat *)emfh)->pending_uri_level; + job->puri_level = ((EMFormat *) emfh)->pending_uri_level; job->callback = callback; job->u.data = data; - if (((EMFormat *)emfh)->base) - job->base = camel_url_copy (((EMFormat *)emfh)->base); + if (((EMFormat *) emfh)->base) + job->base = camel_url_copy (((EMFormat *) emfh)->base); return job; } @@ -1509,7 +1509,7 @@ emfh_gethttp (struct _EMFormatHTMLJob *job, if (!(job->format->priv->load_images_now || policy == E_MAIL_IMAGE_LOADING_POLICY_ALWAYS || (policy == E_MAIL_IMAGE_LOADING_POLICY_SOMETIMES - && em_utils_in_addressbook ((CamelInternetAddress *)camel_mime_message_get_from (job->format->parent.message), FALSE)))) { + && em_utils_in_addressbook ((CamelInternetAddress *) camel_mime_message_get_from (job->format->parent.message), FALSE)))) { /* TODO: Ideally we would put the http requests into another queue and only send them out if the user selects 'load images', when they do. The problem is how to maintain this state with multiple renderings, and how to adjust the thread dispatch/setup routine to handle it */ @@ -1517,16 +1517,16 @@ emfh_gethttp (struct _EMFormatHTMLJob *job, goto done; } - instream = camel_http_stream_new (CAMEL_HTTP_METHOD_GET, ((EMFormat *)job->format)->session, url); + instream = camel_http_stream_new (CAMEL_HTTP_METHOD_GET, ((EMFormat *) job->format)->session, url); camel_http_stream_set_user_agent((CamelHttpStream *)instream, "CamelHttpStream/1.0 Evolution/" VERSION); proxy = em_utils_get_proxy_uri (job->u.uri); if (proxy) { - camel_http_stream_set_proxy ((CamelHttpStream *)instream, proxy); + camel_http_stream_set_proxy ((CamelHttpStream *) instream, proxy); g_free (proxy); } camel_operation_push_message ( cancellable, _("Retrieving '%s'"), job->u.uri); - tmp_stream = (CamelHttpStream *)instream; + tmp_stream = (CamelHttpStream *) instream; content_type = camel_http_stream_get_content_type (tmp_stream); length = camel_header_raw_find(&tmp_stream->headers, "Content-Length", NULL); d(printf(" Content-Length: %s\n", length)); @@ -1597,9 +1597,9 @@ efh_url_requested (GtkHTML *html, const gchar *url, GtkHTMLStream *handle, EMFor d(printf("url requested, html = %p, url '%s'\n", html, url)); - puri = em_format_find_visible_puri ((EMFormat *)efh, url); + puri = em_format_find_visible_puri ((EMFormat *) efh, url); if (puri) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) puri->part); CamelContentType *ct = dw?dw->mime_type:NULL; /* GtkHTML only handles text and images. @@ -1740,7 +1740,7 @@ efh_format_secure (EMFormat *emf, iconpath = e_icon_factory_get_icon_filename (icon, GTK_ICON_SIZE_DIALOG); iconpart = em_format_html_file_part((EMFormatHTML *)emf, "image/png", iconpath, cancellable); if (iconpart) { - (void)em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efh_write_image); + (void) em_format_add_puri (emf, sizeof (EMFormatPURI), classid, iconpart, efh_write_image); g_object_unref (iconpart); } g_free (iconpath); @@ -1751,7 +1751,7 @@ efh_format_secure (EMFormat *emf, camel_stream_printf (stream, "%s", _(smime_sign_table[valid->sign.status].shortdesc)); - signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *)valid->sign.signers.head); + signers = em_format_html_format_cert_infos ((CamelCipherCertInfo *) valid->sign.signers.head); if (signers && *signers) { camel_stream_printf (stream, " (%s)", signers); } @@ -1792,7 +1792,7 @@ efh_text_plain (EMFormat *emf, flags = efh->text_html_flags; - dw = camel_medium_get_content ((CamelMedium *)part); + dw = camel_medium_get_content ((CamelMedium *) part); /* Check for RFC 2646 flowed text. */ if (camel_content_type_is(dw->mime_type, "text", "plain") @@ -1842,8 +1842,8 @@ efh_text_plain (EMFormat *emf, CAMEL_STREAM_FILTER (filtered_stream), CAMEL_MIME_FILTER (inline_filter)); camel_data_wrapper_decode_to_stream_sync ( - dw, (CamelStream *)filtered_stream, cancellable, NULL); - camel_stream_close ((CamelStream *)filtered_stream, cancellable, NULL); + dw, (CamelStream *) filtered_stream, cancellable, NULL); + camel_stream_close ((CamelStream *) filtered_stream, cancellable, NULL); g_object_unref (filtered_stream); mp = em_inline_filter_get_multipart (inline_filter); @@ -1896,7 +1896,7 @@ efh_text_plain (EMFormat *emf, emf, filtered_stream, (CamelDataWrapper *) newpart, cancellable); - camel_stream_flush ((CamelStream *)filtered_stream, cancellable, NULL); + camel_stream_flush ((CamelStream *) filtered_stream, cancellable, NULL); camel_stream_write_string (stream, "</tt>\n", cancellable, NULL); camel_stream_write_string (stream, "</div>\n", cancellable, NULL); } else { @@ -1954,7 +1954,7 @@ efh_text_enriched (EMFormat *emf, em_format_format_text ( emf, (CamelStream *) filtered_stream, - (CamelDataWrapper *)part, cancellable); + (CamelDataWrapper *) part, cancellable); g_object_unref (filtered_stream); camel_stream_write_string (stream, "</div>", cancellable, NULL); @@ -1980,7 +1980,7 @@ efh_write_text_html (EMFormat *emf, g_object_unref (out); #endif em_format_format_text ( - emf, stream, (CamelDataWrapper *)puri->part, cancellable); + emf, stream, (CamelDataWrapper *) puri->part, cancellable); } static void @@ -2177,7 +2177,7 @@ efh_message_deliverystatus (EMFormat *emf, camel_stream_write_string (stream, "<tt>\n" EFH_MESSAGE_START, cancellable, NULL); em_format_format_text ( emf, filtered_stream, - (CamelDataWrapper *)part, cancellable); + (CamelDataWrapper *) part, cancellable); camel_stream_flush (filtered_stream, cancellable, NULL); camel_stream_write_string (stream, "</tt>\n", cancellable, NULL); @@ -2250,7 +2250,7 @@ efh_multipart_related (EMFormat *emf, GCancellable *cancellable, gboolean is_fallback) { - CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + CamelMultipart *mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); CamelMimePart *body_part, *display_part = NULL; CamelContentType *content_type; const gchar *start; @@ -2319,7 +2319,7 @@ efh_multipart_related (EMFormat *emf, EM_FORMAT_HTML (emf), emfh_multipart_related_check, NULL); job->stream = stream; g_object_ref (stream); - em_format_html_job_queue ((EMFormatHTML *)emf, job); + em_format_html_job_queue ((EMFormatHTML *) emf, job); em_format_pull_level (emf); } @@ -2330,7 +2330,7 @@ efh_write_image (EMFormat *emf, EMFormatPURI *puri, GCancellable *cancellable) { - CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *)puri->part); + CamelDataWrapper *dw = camel_medium_get_content ((CamelMedium *) puri->part); d(printf("writing image '%s'\n", puri->cid)); camel_data_wrapper_decode_to_stream_sync ( @@ -2501,7 +2501,7 @@ efh_format_address (EMFormatHTML *efh, GString *out, struct _camel_header_addres g_string_append (out, " <"); /* rfc2368 for mailto syntax and url encoding extras */ - if ((real = camel_header_encode_phrase ((guchar *)a->name))) { + if ((real = camel_header_encode_phrase ((guchar *) a->name))) { mailaddr = g_strdup_printf("%s <%s>", real, a->v.addr); g_free (real); mailto = camel_url_encode (mailaddr, "?=&()"); @@ -2609,7 +2609,7 @@ canon_header_name (gchar *name) static void efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const gchar *charset) { - EMFormatHTML *efh = (EMFormatHTML *)emf; + EMFormatHTML *efh = (EMFormatHTML *) emf; gchar *name, *buf, *value = NULL; const gchar *label, *txt; gboolean addrspec = FALSE; @@ -2643,7 +2643,7 @@ efh_format_header (EMFormat *emf, CamelStream *stream, CamelMedium *part, struct g_free (buf); html = g_string_new(""); - img = efh_format_address (efh, html, addrs, (gchar *)label); + img = efh_format_address (efh, html, addrs, (gchar *) label); if (img) { str_field = g_strdup_printf ("%s%s:", img, label); @@ -2780,7 +2780,7 @@ efh_format_headers (EMFormatHTML *efh, if (!part) return; - ct = camel_mime_part_get_content_type ((CamelMimePart *)part); + ct = camel_mime_part_get_content_type ((CamelMimePart *) part); charset = camel_content_type_param (ct, "charset"); charset = camel_iconv_charset_name (charset); @@ -2801,7 +2801,7 @@ efh_format_headers (EMFormatHTML *efh, struct _camel_header_address *addrs = NULL; GString *from = g_string_new (""); - header = ((CamelMimePart *)part)->headers; + header = ((CamelMimePart *) part)->headers; while (header) { if (!g_ascii_strcasecmp (header->name, "From")) { GString *tmp; @@ -2840,7 +2840,7 @@ efh_format_headers (EMFormatHTML *efh, return; } - header = ((CamelMimePart *)part)->headers; + header = ((CamelMimePart *) part)->headers; while (header) { if (!g_ascii_strcasecmp (header->name, "Sender")) { struct _camel_header_address *addrs; @@ -2918,7 +2918,7 @@ efh_format_headers (EMFormatHTML *efh, /* dump selected headers */ if (emf->mode == EM_FORMAT_MODE_ALLHEADERS) { - header = ((CamelMimePart *)part)->headers; + header = ((CamelMimePart *) part)->headers; while (header) { efh_format_header (emf, stream, part, header, EM_FORMAT_HTML_HEADER_NOCOLUMNS, charset); header = header->next; @@ -2933,7 +2933,7 @@ efh_format_headers (EMFormatHTML *efh, EMFormatHeader *h = link->data; gint mailer, face; - header = ((CamelMimePart *)part)->headers; + header = ((CamelMimePart *) part)->headers; mailer = !g_ascii_strcasecmp (h->name, "X-Evolution-Mailer"); face = !g_ascii_strcasecmp (h->name, "Face"); @@ -3083,7 +3083,7 @@ efh_format_message (EMFormat *emf, emf->valid = NULL; emf->valid_parent = NULL; - if (emf->message != (CamelMimeMessage *)part) + if (emf->message != (CamelMimeMessage *) part) camel_stream_printf(stream, "<blockquote>\n"); if (!efh->hide_headers) @@ -3098,7 +3098,7 @@ efh_format_message (EMFormat *emf, camel_stream_printf (stream, EM_FORMAT_HTML_VPAD); em_format_part (emf, stream, part, cancellable); - if (emf->message != (CamelMimeMessage *)part) + if (emf->message != (CamelMimeMessage *) part) camel_stream_printf(stream, "</blockquote>\n"); camel_cipher_validity_free (emf->valid); diff --git a/mail/em-html-stream.c b/mail/em-html-stream.c index 87e2296c03..ccc9f82eba 100644 --- a/mail/em-html-stream.c +++ b/mail/em-html-stream.c @@ -96,7 +96,7 @@ static gint html_stream_sync_flush (CamelStream *stream, GError **error) { - EMHTMLStream *emhs = (EMHTMLStream *)stream; + EMHTMLStream *emhs = (EMHTMLStream *) stream; if (emhs->html_stream == NULL) { g_set_error ( @@ -114,7 +114,7 @@ static gint html_stream_sync_close (CamelStream *stream, GError **error) { - EMHTMLStream *emhs = (EMHTMLStream *)stream; + EMHTMLStream *emhs = (EMHTMLStream *) stream; if (emhs->html_stream == NULL) { g_set_error ( diff --git a/mail/em-utils.c b/mail/em-utils.c index aef894a9e1..67ee603038 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -313,7 +313,7 @@ em_utils_edit_filters (GtkWidget *parent, if (((ERuleContext *) fc)->error) { e_mail_backend_submit_alert ( backend, "mail:filter-load-error", - ((ERuleContext *)fc)->error, NULL); + ((ERuleContext *) fc)->error, NULL); return; } @@ -649,7 +649,7 @@ em_utils_read_messages_from_stream (CamelFolder *folder, /* NB: de-from filter, once written */ msg = camel_mime_message_new (); if (!camel_mime_part_construct_from_parser_sync ( - (CamelMimePart *)msg, mp, NULL, NULL)) { + (CamelMimePart *) msg, mp, NULL, NULL)) { g_object_unref (msg); break; } @@ -757,10 +757,10 @@ em_utils_selection_get_message (GtkSelectionData *selection_data, return; stream = (CamelStream *) - camel_stream_mem_new_with_buffer ((gchar *)data, length); + camel_stream_mem_new_with_buffer ((gchar *) data, length); msg = camel_mime_message_new (); if (camel_data_wrapper_construct_from_stream_sync ( - (CamelDataWrapper *)msg, stream, NULL, NULL)) + (CamelDataWrapper *) msg, stream, NULL, NULL)) /* FIXME camel_folder_append_message_sync() may block. */ camel_folder_append_message_sync ( folder, msg, NULL, NULL, NULL, NULL); @@ -936,7 +936,7 @@ em_utils_selection_set_urilist (GtkSelectionData *data, GdkAtom target; target = gtk_selection_data_get_target (data); - gtk_selection_data_set (data, target, 8, (guchar *)uri_crlf, strlen (uri_crlf)); + gtk_selection_data_set (data, target, 8, (guchar *) uri_crlf, strlen (uri_crlf)); g_free (uri_crlf); } @@ -1275,7 +1275,7 @@ em_utils_get_proxy_uri (const gchar *pUri) g_static_mutex_lock (&emu_proxy_lock); if (!emu_proxy) { - mail_call_main (MAIL_CALL_p_p, (MailMainFunc)emu_proxy_setup, NULL); + mail_call_main (MAIL_CALL_p_p, (MailMainFunc) emu_proxy_setup, NULL); } if (e_proxy_require_proxy_for_uri (emu_proxy, pUri)) @@ -1500,7 +1500,7 @@ struct TryOpenEBookStruct { static void try_open_e_book_cb (EBook *book, const GError *error, gpointer closure) { - struct TryOpenEBookStruct *data = (struct TryOpenEBookStruct *)closure; + struct TryOpenEBookStruct *data = (struct TryOpenEBookStruct *) closure; if (!data) return; @@ -1736,7 +1736,7 @@ search_address_in_addressbooks (const gchar *address, found = TRUE; } - g_list_foreach (contacts, (GFunc)g_object_unref, NULL); + g_list_foreach (contacts, (GFunc) g_object_unref, NULL); g_list_free (contacts); } } else if (book) { diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c index c144cbd799..e409cdc016 100644 --- a/mail/em-vfolder-rule.c +++ b/mail/em-vfolder-rule.c @@ -257,7 +257,7 @@ em_vfolder_rule_remove_source (EMVFolderRule *rule, g_return_if_fail (EM_IS_VFOLDER_RULE (rule)); - found =(gchar *)em_vfolder_rule_find_source (rule, uri); + found =(gchar *) em_vfolder_rule_find_source (rule, uri); if (found) { rule->sources = g_list_remove (rule->sources, found); g_free (found); @@ -274,7 +274,7 @@ em_vfolder_rule_next_source (EMVFolderRule *rule, if (last == NULL) { node = rule->sources; } else { - node = g_list_find (rule->sources, (gchar *)last); + node = g_list_find (rule->sources, (gchar *) last); if (node == NULL) node = rule->sources; else @@ -282,7 +282,7 @@ em_vfolder_rule_next_source (EMVFolderRule *rule, } if (node) - return (const gchar *)node->data; + return (const gchar *) node->data; return NULL; } @@ -301,8 +301,8 @@ validate (EFilterRule *fr, EAlert **alert) /* We have to have at least one source set in the "specific" case. Do not translate this string! */ - if (((EMVFolderRule *)fr)->with == EM_VFOLDER_RULE_WITH_SPECIFIC && - ((EMVFolderRule *)fr)->sources == NULL) { + if (((EMVFolderRule *) fr)->with == EM_VFOLDER_RULE_WITH_SPECIFIC && + ((EMVFolderRule *) fr)->sources == NULL) { if (alert) *alert = e_alert_new ("mail:vfolder-no-source", NULL); return 0; @@ -331,13 +331,13 @@ static gint vfolder_eq (EFilterRule *fr, EFilterRule *cm) { return E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)->eq (fr, cm) - && list_eq (((EMVFolderRule *)fr)->sources, ((EMVFolderRule *)cm)->sources); + && list_eq (((EMVFolderRule *) fr)->sources, ((EMVFolderRule *) cm)->sources); } static xmlNodePtr xml_encode (EFilterRule *fr) { - EMVFolderRule *vr =(EMVFolderRule *)fr; + EMVFolderRule *vr =(EMVFolderRule *) fr; xmlNodePtr node, set, work; GList *l; @@ -379,7 +379,7 @@ xml_decode (EFilterRule *fr, xmlNodePtr node, struct _ERuleContext *f) { xmlNodePtr set, work; gint result; - EMVFolderRule *vr =(EMVFolderRule *)fr; + EMVFolderRule *vr =(EMVFolderRule *) fr; gchar *tmp; result = E_FILTER_RULE_CLASS (em_vfolder_rule_parent_class)-> @@ -425,11 +425,11 @@ rule_copy (EFilterRule *dest, EFilterRule *src) EMVFolderRule *vdest, *vsrc; GList *node; - vdest =(EMVFolderRule *)dest; - vsrc =(EMVFolderRule *)src; + vdest =(EMVFolderRule *) dest; + vsrc =(EMVFolderRule *) src; if (vdest->sources) { - g_list_foreach (vdest->sources, (GFunc)g_free, NULL); + g_list_foreach (vdest->sources, (GFunc) g_free, NULL); g_list_free (vdest->sources); vdest->sources = NULL; } @@ -668,7 +668,7 @@ source_remove (GtkWidget *widget, struct _source_data *data) static GtkWidget * get_widget (EFilterRule *fr, ERuleContext *rc) { - EMVFolderRule *vr =(EMVFolderRule *)fr; + EMVFolderRule *vr =(EMVFolderRule *) fr; GtkWidget *widget, *frame; struct _source_data *data; GtkRadioButton *rb; diff --git a/mail/importers/elm-importer.c b/mail/importers/elm-importer.c index 292d7c3ffe..0bf58a7b73 100644 --- a/mail/importers/elm-importer.c +++ b/mail/importers/elm-importer.c @@ -228,7 +228,7 @@ elm_import_done (struct _elm_import_msg *m) g_object_unref (gconf); } - e_import_complete (m->import, (EImportTarget *)m->target); + e_import_complete (m->import, (EImportTarget *) m->target); } static void @@ -271,7 +271,7 @@ elm_status_timeout (gpointer data) pc = importer->status_pc; g_mutex_unlock (importer->status_lock); - e_import_status (importer->import, (EImportTarget *)importer->target, what, pc); + e_import_status (importer->import, (EImportTarget *) importer->target, what, pc); } return TRUE; @@ -295,7 +295,7 @@ mail_importer_elm_import (EImport *ei, EImportTarget *target) g_datalist_set_data(&target->data, "elm-msg", m); m->import = ei; g_object_ref (m->import); - m->target = (EImportTargetHome *)target; + m->target = (EImportTargetHome *) target; m->status_timeout_id = g_timeout_add (100, elm_status_timeout, m); m->status_lock = g_mutex_new (); m->status = camel_operation_new (); @@ -337,10 +337,10 @@ elm_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) box = gtk_vbox_new (FALSE, 2); w = gtk_check_button_new_with_label(_("Mail")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_mail); + gtk_toggle_button_set_active ((GtkToggleButton *) w, !done_mail); g_signal_connect(w, "toggled", G_CALLBACK(checkbox_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 0); gtk_widget_show_all (box); return box; diff --git a/mail/importers/evolution-mbox-importer.c b/mail/importers/evolution-mbox-importer.c index 1354b9ba0b..803165b4ee 100644 --- a/mail/importers/evolution-mbox-importer.c +++ b/mail/importers/evolution-mbox-importer.c @@ -125,7 +125,7 @@ mbox_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) hbox = gtk_hbox_new (FALSE, 0); w = gtk_label_new_with_mnemonic (_("_Destination folder:")); - gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6); label = GTK_LABEL (w); @@ -133,13 +133,13 @@ mbox_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) session, _("Select folder"), _("Select folder to import into")); gtk_label_set_mnemonic_widget (label, w); - em_folder_selection_button_set_selection ((EMFolderSelectionButton *)w, select_uri); - folder_selected (EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *)target); + em_folder_selection_button_set_selection ((EMFolderSelectionButton *) w, select_uri); + folder_selected (EM_FOLDER_SELECTION_BUTTON (w), (EImportTargetURI *) target); g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target); - gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6); w = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)w, hbox, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) w, hbox, FALSE, FALSE, 0); gtk_widget_show_all (w); g_free (select_uri); @@ -159,7 +159,7 @@ mbox_supported (EImport *ei, EImportTarget *target, EImportImporter *im) if (target->type != E_IMPORT_TARGET_URI) return FALSE; - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) return TRUE; @@ -204,7 +204,7 @@ mbox_status_timeout (gpointer data) pc = importer->status_pc; g_mutex_unlock (importer->status_lock); - e_import_status (importer->import, (EImportTarget *)importer->target, what, pc); + e_import_status (importer->import, (EImportTarget *) importer->target, what, pc); } return TRUE; @@ -254,9 +254,9 @@ mbox_import (EImport *ei, EImportTarget *target, EImportImporter *im) importer->cancellable, "status", G_CALLBACK (mbox_status), importer); - filename = g_filename_from_uri (((EImportTargetURI *)target)->uri_src, NULL, NULL); + filename = g_filename_from_uri (((EImportTargetURI *) target)->uri_src, NULL, NULL); mail_importer_import_mbox ( - session, filename, ((EImportTargetURI *)target)->uri_dest, + session, filename, ((EImportTargetURI *) target)->uri_dest, importer->cancellable, mbox_import_done, importer); g_free (filename); } @@ -314,7 +314,7 @@ static GtkWidget * mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) { GtkWidget *preview = NULL; - EImportTargetURI *s = (EImportTargetURI *)target; + EImportTargetURI *s = (EImportTargetURI *) target; gchar *filename; gint fd; CamelMimeParser *mp; @@ -355,7 +355,7 @@ mbox_get_preview (EImport *ei, EImportTarget *target, EImportImporter *im) msg = camel_mime_message_new (); if (!camel_mime_part_construct_from_parser_sync ( - (CamelMimePart *)msg, mp, NULL, NULL)) { + (CamelMimePart *) msg, mp, NULL, NULL)) { g_object_unref (msg); break; } diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c index f8edee6dac..9bf663ac50 100644 --- a/mail/importers/mail-importer.c +++ b/mail/importers/mail-importer.c @@ -168,7 +168,7 @@ import_mbox_exec (struct _import_mbox_msg *m, msg = camel_mime_message_new (); if (!camel_mime_part_construct_from_parser_sync ( - (CamelMimePart *)msg, mp, NULL, NULL)) { + (CamelMimePart *) msg, mp, NULL, NULL)) { /* set exception? */ g_object_unref (msg); break; diff --git a/mail/importers/pine-importer.c b/mail/importers/pine-importer.c index e7ace0b1b5..e229978e33 100644 --- a/mail/importers/pine-importer.c +++ b/mail/importers/pine-importer.c @@ -137,7 +137,7 @@ import_contact (EBook *book, gchar *line) g_object_unref (d); } e_contact_set_attributes (card, E_CONTACT_EMAIL, list); - g_list_foreach (list, (GFunc)e_vcard_attribute_free, NULL); + g_list_foreach (list, (GFunc) e_vcard_attribute_free, NULL); g_list_free (list); g_strfreev (addrs); e_contact_set (card, E_CONTACT_IS_LIST, GINT_TO_POINTER (TRUE)); @@ -274,7 +274,7 @@ pine_import_done (struct _pine_import_msg *m) g_object_unref (gconf); } - e_import_complete (m->import, (EImportTarget *)m->target); + e_import_complete (m->import, (EImportTarget *) m->target); } static void @@ -413,14 +413,14 @@ pine_getwidget (EImport *ei, EImportTarget *target, EImportImporter *im) box = gtk_vbox_new (FALSE, 2); w = gtk_check_button_new_with_label(_("Mail")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_mail); + gtk_toggle_button_set_active ((GtkToggleButton *) w, !done_mail); g_signal_connect(w, "toggled", G_CALLBACK(checkbox_mail_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 0); w = gtk_check_button_new_with_label(_("Address Book")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, !done_addr); + gtk_toggle_button_set_active ((GtkToggleButton *) w, !done_addr); g_signal_connect(w, "toggled", G_CALLBACK(checkbox_addr_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)box, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) box, w, FALSE, FALSE, 0); gtk_widget_show_all (box); diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 22bc51c779..f56135bf60 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -64,11 +64,11 @@ rule_match_recipients (ERuleContext *context, /* address types etc should handle multiple values */ for (i = 0; camel_internet_address_get (iaddr, i, &real, &addr); i++) { part = e_rule_context_create_part (context, "to"); - e_filter_rule_add_part ((EFilterRule *)rule, part); + e_filter_rule_add_part ((EFilterRule *) rule, part); element = e_filter_part_find_element (part, "recipient-type"); e_filter_option_set_current ((EFilterOption *)element, "contains"); element = e_filter_part_find_element (part, "recipient"); - e_filter_input_set_value ((EFilterInput *)element, addr); + e_filter_input_set_value ((EFilterInput *) element, addr); namestr = g_strdup_printf (_("Mail to %s"), real && real[0] ? real : addr); e_filter_rule_set_name (rule, namestr); @@ -133,11 +133,11 @@ rule_add_subject (ERuleContext *context, EFilterRule *rule, const gchar *text) if (*text == 0) return; part = e_rule_context_create_part (context, "subject"); - e_filter_rule_add_part ((EFilterRule *)rule, part); + e_filter_rule_add_part ((EFilterRule *) rule, part); element = e_filter_part_find_element (part, "subject-type"); e_filter_option_set_current ((EFilterOption *)element, "contains"); element = e_filter_part_find_element (part, "subject"); - e_filter_input_set_value ((EFilterInput *)element, text); + e_filter_input_set_value ((EFilterInput *) element, text); } static void @@ -150,11 +150,11 @@ rule_add_sender (ERuleContext *context, EFilterRule *rule, const gchar *text) if (*text == 0) return; part = e_rule_context_create_part (context, "sender"); - e_filter_rule_add_part ((EFilterRule *)rule, part); + e_filter_rule_add_part ((EFilterRule *) rule, part); element = e_filter_part_find_element (part, "sender-type"); e_filter_option_set_current ((EFilterOption *)element, "contains"); element = e_filter_part_find_element (part, "sender"); - e_filter_input_set_value ((EFilterInput *)element, text); + e_filter_input_set_value ((EFilterInput *) element, text); } /* do a bunch of things on the subject to try and detect mailing lists, remove @@ -217,7 +217,7 @@ rule_match_mlist (ERuleContext *context, EFilterRule *rule, const gchar *mlist) e_filter_option_set_current((EFilterOption *)element, "is"); element = e_filter_part_find_element (part, "mlist"); - e_filter_input_set_value ((EFilterInput *)element, mlist); + e_filter_input_set_value ((EFilterInput *) element, mlist); } static void @@ -298,7 +298,7 @@ rule_from_message (EFilterRule *rule, if (flags & AUTO_MLIST) { gchar *name, *mlist; - mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *)msg)->headers); + mlist = camel_header_raw_check_mailing_list (&((CamelMimePart *) msg)->headers); if (mlist) { rule_match_mlist (context, rule, mlist); name = g_strdup_printf (_("%s mailing list"), mlist); @@ -391,7 +391,7 @@ filter_gui_add_from_message (EMailSession *session, config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "filters.xml", NULL); system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL); - e_rule_context_load ((ERuleContext *)fc, system, user); + e_rule_context_load ((ERuleContext *) fc, system, user); g_free (system); rule = filter_rule_from_message (fc, msg, flags); @@ -431,15 +431,15 @@ mail_filter_rename_folder (EMailBackend *backend, config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "filters.xml", NULL); system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL); - e_rule_context_load ((ERuleContext *)fc, system, user); + e_rule_context_load ((ERuleContext *) fc, system, user); g_free (system); changed = e_rule_context_rename_uri ( - (ERuleContext *)fc, old_uri, new_uri, g_str_equal); + (ERuleContext *) fc, old_uri, new_uri, g_str_equal); if (changed) { - if (e_rule_context_save ((ERuleContext *)fc, user) == -1) + if (e_rule_context_save ((ERuleContext *) fc, user) == -1) g_warning("Could not write out changed filter rules\n"); - e_rule_context_free_uri_list ((ERuleContext *)fc, changed); + e_rule_context_free_uri_list ((ERuleContext *) fc, changed); } g_free (user); @@ -473,7 +473,7 @@ mail_filter_delete_folder (EMailBackend *backend, config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "filters.xml", NULL); system = g_build_filename (EVOLUTION_PRIVDATADIR, "filtertypes.xml", NULL); - e_rule_context_load ((ERuleContext *)fc, system, user); + e_rule_context_load ((ERuleContext *) fc, system, user); g_free (system); deleted = e_rule_context_delete_uri ( @@ -487,7 +487,7 @@ mail_filter_delete_folder (EMailBackend *backend, s = g_string_new(""); s_count = 0; for (l = deleted; l; l = l->next) { - const gchar *name = (const gchar *)l->data; + const gchar *name = (const gchar *) l->data; if (s_count == 0) { g_string_append (s, name); diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c index 1068f3600f..6f4829be7d 100644 --- a/mail/mail-folder-cache.c +++ b/mail/mail-folder-cache.c @@ -671,8 +671,8 @@ get_folders (CamelFolderInfo *fi, GPtrArray *folders) static gint folder_cmp (gconstpointer ap, gconstpointer bp) { - const CamelFolderInfo *a = ((CamelFolderInfo **)ap)[0]; - const CamelFolderInfo *b = ((CamelFolderInfo **)bp)[0]; + const CamelFolderInfo *a = ((CamelFolderInfo **) ap)[0]; + const CamelFolderInfo *b = ((CamelFolderInfo **) bp)[0]; return strcmp (a->full_name, b->full_name); } @@ -1219,7 +1219,7 @@ mail_folder_cache_note_store_remove (MailFolderCache *self, } g_object_unref (si->store); - g_hash_table_foreach (si->folders, (GHFunc)free_folder_info_hash, NULL); + g_hash_table_foreach (si->folders, (GHFunc) free_folder_info_hash, NULL); g_hash_table_destroy (si->folders); g_free (si); } diff --git a/mail/mail-ops.c b/mail/mail-ops.c index e6bee3e534..8288ac2fd9 100644 --- a/mail/mail-ops.c +++ b/mail/mail-ops.c @@ -209,7 +209,7 @@ fetch_mail_exec (struct _fetch_mail_msg *m, GCancellable *cancellable, GError **error) { - struct _filter_mail_msg *fm = (struct _filter_mail_msg *)m; + struct _filter_mail_msg *fm = (struct _filter_mail_msg *) m; CamelFolder *folder; const gchar *uid; gint i; @@ -356,7 +356,7 @@ mail_fetch_mail (CamelStore *store, session = camel_service_get_session (CAMEL_SERVICE (store)); m = mail_msg_new (&fetch_mail_info); - fm = (struct _filter_mail_msg *)m; + fm = (struct _filter_mail_msg *) m; fm->session = g_object_ref (session); m->store = g_object_ref (store); fm->delete = !keep; @@ -1048,7 +1048,7 @@ get_folderinfo_desc (struct _get_folderinfo_msg *m) { gchar *ret, *name; - name = camel_service_get_name ((CamelService *)m->store, TRUE); + name = camel_service_get_name ((CamelService *) m->store, TRUE); ret = g_strdup_printf (_("Scanning folders in '%s'"), name); g_free (name); return ret; @@ -1759,7 +1759,7 @@ expunge_pop3_stores (CamelFolder *expunging, EMailSession *session, GCancellable if (!expunging_uids) return; - for (iter = e_list_get_iterator ((EList *)e_get_account_list ()); + for (iter = e_list_get_iterator ((EList *) e_get_account_list ()); e_iterator_is_valid (iter) && (!error || !*error); e_iterator_next (iter)) { account = (EAccount *) e_iterator_get (iter); @@ -2215,10 +2215,10 @@ save_messages_exec (struct _save_messages_msg *m, stream, cancellable, error) == -1 || camel_data_wrapper_write_to_stream_sync ( (CamelDataWrapper *) message, - (CamelStream *)filtered_stream, + (CamelStream *) filtered_stream, cancellable, error) == -1 || camel_stream_flush ( - (CamelStream *)filtered_stream, + (CamelStream *) filtered_stream, cancellable, error) == -1 || camel_stream_write_string ( stream, "\n", @@ -2229,7 +2229,7 @@ save_messages_exec (struct _save_messages_msg *m, error, _("Error saving messages to: %s:\n"), m->path); g_free (from); - g_object_unref ((CamelObject *)message); + g_object_unref ((CamelObject *) message); break; } g_free (from); diff --git a/mail/mail-send-recv.c b/mail/mail-send-recv.c index 71037cb5b2..a39bf77d1a 100644 --- a/mail/mail-send-recv.c +++ b/mail/mail-send-recv.c @@ -257,13 +257,13 @@ dialog_response (GtkDialog *gd, gint button, struct _send_data *data) d(printf("cancelled whole thing\n")); if (!data->cancelled) { data->cancelled = TRUE; - g_hash_table_foreach (data->active, (GHFunc)cancel_send_info, NULL); + g_hash_table_foreach (data->active, (GHFunc) cancel_send_info, NULL); } gtk_dialog_set_response_sensitive (gd, GTK_RESPONSE_CANCEL, FALSE); break; default: d(printf("hiding dialog\n")); - g_hash_table_foreach (data->active, (GHFunc)hide_send_info, NULL); + g_hash_table_foreach (data->active, (GHFunc) hide_send_info, NULL); data->gd = NULL; /*gtk_widget_destroy((GtkWidget *)gd);*/ break; @@ -448,7 +448,7 @@ build_dialog (GtkWindow *parent, gconf_bridge_get (), GCONF_KEY_PREFIX, GTK_WINDOW (send_recv_dialog)); - gtk_widget_ensure_style ((GtkWidget *)gd); + gtk_widget_ensure_style ((GtkWidget *) gd); container = gtk_dialog_get_action_area (gd); gtk_container_set_border_width (GTK_CONTAINER (container), 6); @@ -728,7 +728,7 @@ build_dialog (GtkWindow *parent, static void update_folders (gchar *uri, struct _folder_info *info, gpointer data) { - time_t now = *((time_t *)data); + time_t now = *((time_t *) data); d(printf("checking update for folder: %s\n", info->uri)); @@ -754,7 +754,7 @@ receive_status (CamelFilterDriver *driver, time_t now = time (NULL); /* let it flow through to the folder, every now and then too? */ - g_hash_table_foreach (info->data->folders, (GHFunc)update_folders, &now); + g_hash_table_foreach (info->data->folders, (GHFunc) update_folders, &now); if (info->data->inbox && now > info->data->inbox_update+20) { d(printf("updating inbox too\n")); @@ -843,7 +843,7 @@ receive_done (gpointer data) if (g_hash_table_size (info->data->active) == 0) { if (info->data->gd) - gtk_widget_destroy ((GtkWidget *)info->data->gd); + gtk_widget_destroy ((GtkWidget *) info->data->gd); free_send_data (); } @@ -1242,7 +1242,7 @@ auto_online (EShell *shell) shell_settings, "mail-check-all-on-start"); accounts = e_get_account_list (); - for (iter = e_list_get_iterator ((EList *)accounts); + for (iter = e_list_get_iterator ((EList *) accounts); e_iterator_is_valid (iter); e_iterator_next (iter)) { EAccount *account = (EAccount *) e_iterator_get (iter); @@ -1292,7 +1292,7 @@ mail_autoreceive_init (EMailBackend *backend) accounts, "account-changed", G_CALLBACK (auto_account_changed), NULL); - for (iter = e_list_get_iterator ((EList *)accounts); + for (iter = e_list_get_iterator ((EList *) accounts); e_iterator_is_valid (iter); e_iterator_next (iter)) auto_account_added ( diff --git a/mail/mail-tools.c b/mail/mail-tools.c index 00c6b7e899..107a3ac9ed 100644 --- a/mail/mail-tools.c +++ b/mail/mail-tools.c @@ -56,7 +56,7 @@ mail_tool_get_local_movemail_path (CamelStore *store, struct stat st; uid = camel_service_get_uid (CAMEL_SERVICE (store)); - safe_uid = (guchar *)g_strdup ((const gchar *)uid); + safe_uid = (guchar *) g_strdup ((const gchar *) uid); for (c = safe_uid; *c; c++) if (strchr("/:;=|%&#!*^()\\, ", *c) || !isprint((gint) *c)) *c = '_'; @@ -179,12 +179,12 @@ mail_tool_remove_xevolution_headers (CamelMimeMessage *message) { struct _camel_header_raw *scan, *list = NULL; - for (scan = ((CamelMimePart *)message)->headers;scan;scan=scan->next) + for (scan = ((CamelMimePart *) message)->headers;scan;scan=scan->next) if (!strncmp(scan->name, "X-Evolution", 11)) camel_header_raw_append (&list, scan->name, scan->value, scan->offset); for (scan=list;scan;scan=scan->next) - camel_medium_remove_header ((CamelMedium *)message, scan->name); + camel_medium_remove_header ((CamelMedium *) message, scan->name); return list; } diff --git a/mail/mail-vfolder.c b/mail/mail-vfolder.c index 67e3d0752a..a2ebddf604 100644 --- a/mail/mail-vfolder.c +++ b/mail/mail-vfolder.c @@ -96,7 +96,7 @@ vfolder_setup_exec (struct _setup_msg *m, GList *l, *list = NULL; CamelFolder *folder; - camel_vee_folder_set_expression ((CamelVeeFolder *)m->folder, m->query); + camel_vee_folder_set_expression ((CamelVeeFolder *) m->folder, m->query); l = m->sources_uri; while (l && !vfolder_shutdown) { @@ -118,7 +118,7 @@ vfolder_setup_exec (struct _setup_msg *m, } if (!vfolder_shutdown) - camel_vee_folder_set_folders ((CamelVeeFolder *)m->folder, list); + camel_vee_folder_set_folders ((CamelVeeFolder *) m->folder, list); l = list; while (l) { @@ -273,7 +273,7 @@ vfolder_adduri_exec (struct _adduri_msg *m, camel_vee_folder_remove_folder ( CAMEL_VEE_FOLDER (l->data), folder); else - camel_vee_folder_add_folder ((CamelVeeFolder *)l->data, folder); + camel_vee_folder_add_folder ((CamelVeeFolder *) l->data, folder); l = l->next; } g_object_unref (folder); @@ -289,7 +289,7 @@ static void vfolder_adduri_free (struct _adduri_msg *m) { g_object_unref (m->session); - g_list_foreach (m->folders, (GFunc)g_object_unref, NULL); + g_list_foreach (m->folders, (GFunc) g_object_unref, NULL); g_list_free (m->folders); g_free (m->uri); } @@ -490,7 +490,7 @@ mail_vfolder_add_folder (EMailSession *session, goto done; rule = NULL; - while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) { + while ((rule = e_rule_context_next_rule ((ERuleContext *) context, rule, NULL))) { gint found = FALSE; if (!rule->name) { @@ -501,17 +501,17 @@ mail_vfolder_add_folder (EMailSession *session, * they must be explictly listed as a source. */ if (rule->source && !is_ignore - && ((((EMVFolderRule *)rule)->with == + && ((((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_LOCAL && !remote) - || (((EMVFolderRule *)rule)->with == + || (((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE && remote) - || (((EMVFolderRule *)rule)->with == + || (((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE))) found = TRUE; source = NULL; while (!found && (source = em_vfolder_rule_next_source ( - (EMVFolderRule *)rule, source))) { + (EMVFolderRule *) rule, source))) { found = e_mail_folder_uri_equal ( CAMEL_SESSION (session), uri, source); } @@ -613,7 +613,7 @@ mail_vfolder_delete_folder (EMailBackend *backend, rule, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, rule_changed, vf); - em_vfolder_rule_remove_source ((EMVFolderRule *)rule, source); + em_vfolder_rule_remove_source ((EMVFolderRule *) rule, source); g_signal_connect (rule, "changed", G_CALLBACK(rule_changed), vf); if (changed_count == 0) { g_string_append (changed, rule->name); @@ -709,9 +709,9 @@ mail_vfolder_rename_folder (CamelStore *store, /* see if any rules directly reference this removed uri */ rule = NULL; - while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) { + while ((rule = e_rule_context_next_rule ((ERuleContext *) context, rule, NULL))) { source = NULL; - while ((source = em_vfolder_rule_next_source ((EMVFolderRule *)rule, source))) { + while ((source = em_vfolder_rule_next_source ((EMVFolderRule *) rule, source))) { /* Remove all sources that match, ignore changed events though because the adduri call above does the work async */ if (e_mail_folder_uri_equal (session, old_uri, source)) { @@ -724,8 +724,8 @@ mail_vfolder_rename_folder (CamelStore *store, rule, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, rule_changed, vf); - em_vfolder_rule_remove_source ((EMVFolderRule *)rule, source); - em_vfolder_rule_add_source ((EMVFolderRule *)rule, new_uri); + em_vfolder_rule_remove_source ((EMVFolderRule *) rule, source); + em_vfolder_rule_add_source ((EMVFolderRule *) rule, new_uri); g_signal_connect(rule, "changed", G_CALLBACK(rule_changed), vf); changed++; source = NULL; @@ -742,7 +742,7 @@ mail_vfolder_rename_folder (CamelStore *store, d(printf("Vfolders updated from renamed folder\n")); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_save ((ERuleContext *)context, user); + e_rule_context_save ((ERuleContext *) context, user); g_free (user); } @@ -839,20 +839,20 @@ rule_changed (EFilterRule *rule, CamelFolder *folder) /* find any (currently available) folders, and add them to the ones to open */ rule_add_sources ( - session, ((EMVFolderRule *)rule)->sources, + session, ((EMVFolderRule *) rule)->sources, &sources_folder, &sources_uri); G_LOCK (vfolder); - if (((EMVFolderRule *)rule)->with == + if (((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_LOCAL || - ((EMVFolderRule *)rule)->with == + ((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE) rule_add_sources ( session, source_folders_local, &sources_folder, &sources_uri); - if (((EMVFolderRule *)rule)->with == + if (((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_REMOTE_ACTIVE || - ((EMVFolderRule *)rule)->with == + ((EMVFolderRule *) rule)->with == EM_VFOLDER_RULE_WITH_LOCAL_REMOTE_ACTIVE) rule_add_sources ( session, source_folders_remote, @@ -930,7 +930,7 @@ store_folder_deleted_cb (CamelStore *store, G_LOCK (vfolder); /* delete it from our list */ - rule = e_rule_context_find_rule ((ERuleContext *)context, info->full_name, NULL); + rule = e_rule_context_find_rule ((ERuleContext *) context, info->full_name, NULL); if (rule) { const gchar *config_dir; @@ -939,7 +939,7 @@ store_folder_deleted_cb (CamelStore *store, g_signal_handlers_disconnect_matched ( context, G_SIGNAL_MATCH_FUNC | G_SIGNAL_MATCH_DATA, 0, 0, NULL, context_rule_removed, context); - e_rule_context_remove_rule ((ERuleContext *)context, rule); + e_rule_context_remove_rule ((ERuleContext *) context, rule); g_object_unref (rule); g_signal_connect ( context, "rule_removed", @@ -947,7 +947,7 @@ store_folder_deleted_cb (CamelStore *store, config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_save ((ERuleContext *)context, user); + e_rule_context_save ((ERuleContext *) context, user); g_free (user); } else { g_warning ( @@ -982,7 +982,7 @@ store_folder_renamed_cb (CamelStore *store, g_free (key); g_hash_table_insert (vfolder_hash, g_strdup (info->full_name), folder); - rule = e_rule_context_find_rule ((ERuleContext *)context, old_name, NULL); + rule = e_rule_context_find_rule ((ERuleContext *) context, old_name, NULL); if (!rule) { G_UNLOCK (vfolder); g_warning ("Rule shouldn't be NULL\n"); @@ -997,7 +997,7 @@ store_folder_renamed_cb (CamelStore *store, config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_save ((ERuleContext *)context, user); + e_rule_context_save ((ERuleContext *) context, user); g_free (user); G_UNLOCK (vfolder); @@ -1108,7 +1108,7 @@ vfolder_load_storage (EMailBackend *backend) context = em_vfolder_context_new (session); xmlfile = g_build_filename (EVOLUTION_PRIVDATADIR, "vfoldertypes.xml", NULL); - if (e_rule_context_load ((ERuleContext *)context, + if (e_rule_context_load ((ERuleContext *) context, xmlfile, user) != 0) { g_warning("cannot load vfolders: %s\n", ((ERuleContext *)context)->error); } @@ -1123,10 +1123,10 @@ vfolder_load_storage (EMailBackend *backend) /* and setup the rules we have */ rule = NULL; - while ((rule = e_rule_context_next_rule ((ERuleContext *)context, rule, NULL))) { + while ((rule = e_rule_context_next_rule ((ERuleContext *) context, rule, NULL))) { if (rule->name) { d(printf("rule added: %s\n", rule->name)); - context_rule_added ((ERuleContext *)context, rule); + context_rule_added ((ERuleContext *) context, rule); } else { d(printf("invalid rule (%p) encountered: rule->name is NULL\n", rule)); } @@ -1166,7 +1166,7 @@ vfolder_revert (void) d(printf("vfolder_revert\n")); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_revert ((ERuleContext *)context, user); + e_rule_context_revert ((ERuleContext *) context, user); g_free (user); } @@ -1222,7 +1222,7 @@ edit_rule_response (GtkWidget *w, gint button, gpointer data) e_filter_rule_copy (orig, rule); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_save ((ERuleContext *)context, user); + e_rule_context_save ((ERuleContext *) context, user); g_free (user); } @@ -1249,9 +1249,9 @@ vfolder_edit_rule (EMailBackend *backend, g_object_ref (G_OBJECT (rule)); newrule = e_filter_rule_clone (rule); - w = e_filter_rule_get_widget ((EFilterRule *)newrule, (ERuleContext *)context); + w = e_filter_rule_get_widget ((EFilterRule *) newrule, (ERuleContext *) context); - gd = (GtkDialog *)gtk_dialog_new_with_buttons ( + gd = (GtkDialog *) gtk_dialog_new_with_buttons ( _("Edit Search Folder"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, @@ -1266,7 +1266,7 @@ vfolder_edit_rule (EMailBackend *backend, g_object_set (gd, "resizable", TRUE, NULL); gtk_window_set_default_size (GTK_WINDOW (gd), 500, 500); gtk_box_pack_start (GTK_BOX (container), w, TRUE, TRUE, 0); - gtk_widget_show ((GtkWidget *)gd); + gtk_widget_show ((GtkWidget *) gd); g_object_set_data_full ( G_OBJECT (gd), "rule", newrule, (GDestroyNotify) g_object_unref); @@ -1276,7 +1276,7 @@ vfolder_edit_rule (EMailBackend *backend, g_signal_connect ( gd, "response", G_CALLBACK (edit_rule_response), NULL); - gtk_widget_show ((GtkWidget *)gd); + gtk_widget_show ((GtkWidget *) gd); } else { /* TODO: we should probably just create it ... */ e_mail_backend_submit_alert ( @@ -1302,7 +1302,7 @@ new_rule_clicked (GtkWidget *w, gint button, gpointer data) return; } - if (e_rule_context_find_rule ((ERuleContext *)context, rule->name, rule->source)) { + if (e_rule_context_find_rule ((ERuleContext *) context, rule->name, rule->source)) { e_alert_run_dialog_for_args ( GTK_WINDOW (w), "mail:vfolder-notunique", rule->name, NULL); @@ -1310,10 +1310,10 @@ new_rule_clicked (GtkWidget *w, gint button, gpointer data) } g_object_ref (rule); - e_rule_context_add_rule ((ERuleContext *)context, rule); + e_rule_context_add_rule ((ERuleContext *) context, rule); config_dir = mail_session_get_config_dir (); user = g_build_filename (config_dir, "vfolders.xml", NULL); - e_rule_context_save ((ERuleContext *)context, user); + e_rule_context_save ((ERuleContext *) context, user); g_free (user); } @@ -1332,7 +1332,7 @@ new_rule_changed_cb (EFilterRule *rule, GtkDialog *dialog) EFilterPart * vfolder_create_part (const gchar *name) { - return e_rule_context_create_part ((ERuleContext *)context, name); + return e_rule_context_create_part ((ERuleContext *) context, name); } /* clones a filter/search rule into a matching vfolder rule @@ -1346,7 +1346,7 @@ vfolder_clone_rule (EMailSession *session, EFilterRule *in) rule = em_vfolder_rule_new (session); xml = e_filter_rule_xml_encode (in); - e_filter_rule_xml_decode (rule, xml, (ERuleContext *)context); + e_filter_rule_xml_decode (rule, xml, (ERuleContext *) context); xmlFreeNodeList (xml); return rule; @@ -1360,9 +1360,9 @@ vfolder_gui_add_rule (EMVFolderRule *rule) GtkDialog *gd; GtkWidget *container; - w = e_filter_rule_get_widget ((EFilterRule *)rule, (ERuleContext *)context); + w = e_filter_rule_get_widget ((EFilterRule *) rule, (ERuleContext *) context); - gd = (GtkDialog *)gtk_dialog_new_with_buttons ( + gd = (GtkDialog *) gtk_dialog_new_with_buttons ( _("New Search Folder"), NULL, GTK_DIALOG_DESTROY_WITH_PARENT, @@ -1378,12 +1378,12 @@ vfolder_gui_add_rule (EMVFolderRule *rule) g_object_set (gd, "resizable", TRUE, NULL); gtk_window_set_default_size (GTK_WINDOW (gd), 500, 500); gtk_box_pack_start (GTK_BOX (container), w, TRUE, TRUE, 0); - gtk_widget_show ((GtkWidget *)gd); + gtk_widget_show ((GtkWidget *) gd); g_object_set_data_full(G_OBJECT(gd), "rule", rule, (GDestroyNotify)g_object_unref); g_signal_connect(rule, "changed", G_CALLBACK (new_rule_changed_cb), gd); - new_rule_changed_cb ((EFilterRule*)rule, gd); + new_rule_changed_cb ((EFilterRule*) rule, gd); g_signal_connect(gd, "response", G_CALLBACK(new_rule_clicked), NULL); - gtk_widget_show ((GtkWidget *)gd); + gtk_widget_show ((GtkWidget *) gd); } void @@ -1411,7 +1411,7 @@ vfolder_gui_add_from_address (EMailSession *session, g_return_if_fail (addr != NULL); - rule = (EMVFolderRule*)em_vfolder_rule_from_address ( + rule = (EMVFolderRule*) em_vfolder_rule_from_address ( context, addr, flags, folder); vfolder_gui_add_rule (rule); } diff --git a/mail/message-list.c b/mail/message-list.c index 19c7a79c44..811f5e95e4 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -586,7 +586,7 @@ ml_search_path (MessageList *ml, MessageListSelectDirection direction, guint32 f row = e_tree_table_adapter_row_of_node (etta, node); if (row == -1) return NULL; - count = e_table_model_row_count ((ETableModel *)etta); + count = e_table_model_row_count ((ETableModel *) etta); if ((direction & MESSAGE_LIST_SELECT_DIRECTION) == MESSAGE_LIST_SELECT_NEXT) node = ml_search_forward (ml, row + 1, count - 1, flags, mask); @@ -767,7 +767,7 @@ message_list_select_next_thread (MessageList *ml) row = e_tree_table_adapter_row_of_node (etta, node); if (row == -1) return; - count = e_table_model_row_count ((ETableModel *)etta); + count = e_table_model_row_count ((ETableModel *) etta); /* find the next node which has a root parent (i.e. toplevel node) */ for (i=row+1;i<count-1;i++) { @@ -1198,7 +1198,7 @@ ml_value_is_empty (ETreeModel *etm, gint col, gconstpointer value, gpointer data case COL_MIXED_SENDER: case COL_MIXED_RECIPIENTS: case COL_LABELS: - return !(value && *(gchar *)value); + return !(value && *(gchar *) value); default: g_warning ("This shouldn't be reached\n"); return FALSE; @@ -1305,9 +1305,9 @@ unread_foreach (ETreeModel *etm, ETreePath node, gpointer data) CamelMessageInfo *info; if (!etm) - info = (CamelMessageInfo *)node; + info = (CamelMessageInfo *) node; else - info = e_tree_memory_node_get_data ((ETreeMemory *)etm, node); + info = e_tree_memory_node_get_data ((ETreeMemory *) etm, node); g_return_val_if_fail (info != NULL, FALSE); if (!(camel_message_info_flags (info) & CAMEL_MESSAGE_SEEN)) @@ -1329,9 +1329,9 @@ latest_foreach (ETreeModel *etm, ETreePath node, gpointer data) time_t date; if (!etm) - info = (CamelMessageInfo *)node; + info = (CamelMessageInfo *) node; else - info = e_tree_memory_node_get_data ((ETreeMemory *)etm, node); + info = e_tree_memory_node_get_data ((ETreeMemory *) etm, node); g_return_val_if_fail (info != NULL, FALSE); date = ld->sent ? camel_message_info_date_sent (info) @@ -1414,9 +1414,9 @@ add_all_labels_foreach (ETreeModel *etm, ETreePath node, gpointer data) const CamelFlag *flag; if (!etm) - msg_info = (CamelMessageInfo *)node; + msg_info = (CamelMessageInfo *) node; else - msg_info = e_tree_memory_node_get_data ((ETreeMemory *)etm, node); + msg_info = e_tree_memory_node_get_data ((ETreeMemory *) etm, node); g_return_val_if_fail (msg_info != NULL, FALSE); for (flag = camel_message_info_user_flags (msg_info); flag; flag = flag->next) @@ -2387,7 +2387,7 @@ ml_tree_drag_motion (ETree *tree, GdkDragContext *context, gint x, gint y, guint d(printf("atom drop '%s'\n", gdk_atom_name(targets->data))); for (i = 0; i < G_N_ELEMENTS (ml_drag_info); i++) - if (targets->data == (gpointer)ml_drag_info[i].atom) + if (targets->data == (gpointer) ml_drag_info[i].atom) actions |= ml_drag_info[i].actions; targets = g_list_next (targets); @@ -2573,7 +2573,7 @@ message_list_dispose (GObject *object) mail_regen_cancel (message_list); if (message_list->uid_nodemap) { - g_hash_table_foreach (message_list->uid_nodemap, (GHFunc)clear_info, message_list); + g_hash_table_foreach (message_list->uid_nodemap, (GHFunc) clear_info, message_list); g_hash_table_destroy (message_list->uid_nodemap); message_list->uid_nodemap = NULL; } @@ -2930,9 +2930,9 @@ clear_info (gchar *key, ETreePath *node, MessageList *ml) { CamelMessageInfo *info; - info = e_tree_memory_node_get_data ((ETreeMemory *)ml->model, node); + info = e_tree_memory_node_get_data ((ETreeMemory *) ml->model, node); camel_folder_free_message_info (ml->folder, info); - e_tree_memory_node_set_data ((ETreeMemory *)ml->model, node, NULL); + e_tree_memory_node_set_data ((ETreeMemory *) ml->model, node, NULL); } static void @@ -2950,7 +2950,7 @@ clear_tree (MessageList *ml, gboolean tfree) /* we also reset the uid_rowmap since it is no longer useful/valid anyway */ if (ml->folder) - g_hash_table_foreach (ml->uid_nodemap, (GHFunc)clear_info, ml); + g_hash_table_foreach (ml->uid_nodemap, (GHFunc) clear_info, ml); g_hash_table_destroy (ml->uid_nodemap); ml->uid_nodemap = g_hash_table_new (g_str_hash, g_str_equal); @@ -3419,7 +3419,7 @@ build_subtree_diff (MessageList *ml, ETreePath parent, ETreePath path, CamelFold gpointer olduid, oldrow; /* if this is a message row, check/update the row id map */ if (g_hash_table_lookup_extended (ml->uid_rowmap, camel_message_info_uid (bp->message), &olduid, &oldrow)) { - if ((gint)oldrow != (*row)) { + if ((gint) oldrow != (*row)) { g_hash_table_insert (ml->uid_rowmap, olduid, (gpointer)(*row)); } } else { @@ -3946,7 +3946,7 @@ on_selection_changed_cmd (ETree *tree, MessageList *ml) if (uids->len == 1) newuid = uids->pdata[0]; else if ((cursor = e_tree_get_cursor (tree))) - newuid = (gchar *)camel_message_info_uid (e_tree_memory_node_get_data ((ETreeMemory *)tree, cursor)); + newuid = (gchar *) camel_message_info_uid (e_tree_memory_node_get_data ((ETreeMemory *) tree, cursor)); else newuid = NULL; @@ -4211,7 +4211,7 @@ message_list_set_search (MessageList *ml, const gchar *search) texture = clutter_texture_new_from_file (gtk_icon_info_get_filename (info), NULL); gtk_icon_info_free (info); } - clutter_container_add_actor ((ClutterContainer *)stage, texture); + clutter_container_add_actor ((ClutterContainer *) stage, texture); ml->priv->search_texture = texture; ml->priv->timeline = clutter_timeline_new (2 * 1000); @@ -4917,6 +4917,6 @@ mail_regen_list (MessageList *ml, const gchar *search, const gchar *hideexpr, Ca ml_regen_timeout (m); else { ml->regen_timeout_msg = m; - ml->regen_timeout_id = g_timeout_add (500, (GSourceFunc)ml_regen_timeout, m); + ml->regen_timeout_id = g_timeout_add (500, (GSourceFunc) ml_regen_timeout, m); } } diff --git a/modules/addressbook/addressbook-config.c b/modules/addressbook/addressbook-config.c index c7f1db51ca..93577a0e0b 100644 --- a/modules/addressbook/addressbook-config.c +++ b/modules/addressbook/addressbook-config.c @@ -415,7 +415,7 @@ query_for_supported_bases (GtkWidget *button, AddressbookSourceDialog *sdialog) gchar *dn; gtk_tree_model_get (model, &iter, 0, &dn, -1); - gtk_entry_set_text ((GtkEntry *)sdialog->rootdn, dn); + gtk_entry_set_text ((GtkEntry *) sdialog->rootdn, dn); g_free (dn); } } @@ -487,7 +487,7 @@ eabc_type_changed (GtkComboBox *dropdown, AddressbookSourceDialog *sdialog) e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source)); } - e_config_target_changed ((EConfig *)sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD); + e_config_target_changed ((EConfig *) sdialog->config, E_CONFIG_TARGET_CHANGED_REBUILD); } static GtkWidget * @@ -507,9 +507,9 @@ eabc_general_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget w = gtk_hbox_new (FALSE, 6); label = gtk_label_new_with_mnemonic(_("_Type:")); - gtk_box_pack_start ((GtkBox *)w, label, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) w, label, FALSE, FALSE, 0); - dropdown = (GtkComboBox *)gtk_combo_box_new (); + dropdown = (GtkComboBox *) gtk_combo_box_new (); cell = gtk_cell_renderer_text_new (); store = gtk_list_store_new (2, G_TYPE_STRING, G_TYPE_POINTER); i = 0; @@ -523,21 +523,21 @@ eabc_general_type (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget i++; } - gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); gtk_cell_layout_set_attributes((GtkCellLayout *)dropdown, cell, "text", 0, NULL); - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); gtk_combo_box_set_active (dropdown, -1); gtk_combo_box_set_active (dropdown, row); g_signal_connect(dropdown, "changed", G_CALLBACK(eabc_type_changed), sdialog); - gtk_widget_show ((GtkWidget *)dropdown); - gtk_box_pack_start ((GtkBox *)w, (GtkWidget *)dropdown, TRUE, TRUE, 0); - gtk_label_set_mnemonic_widget ((GtkLabel *)label, (GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); + gtk_box_pack_start ((GtkBox *) w, (GtkWidget *) dropdown, TRUE, TRUE, 0); + gtk_label_set_mnemonic_widget ((GtkLabel *) label, (GtkWidget *) dropdown); - gtk_box_pack_start ((GtkBox *)parent, (GtkWidget *)w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, (GtkWidget *) w, FALSE, FALSE, 0); gtk_widget_show_all (w); - return (GtkWidget *)w; + return (GtkWidget *) w; } static void @@ -568,11 +568,11 @@ eabc_general_name (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget e_load_ui_builder_definition (builder, "ldap-config.ui"); w = e_builder_get_widget (builder, item->label); - gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); sdialog->display_name = e_builder_get_widget (builder, "account-editor-display-name-entry"); g_signal_connect(sdialog->display_name, "changed", G_CALLBACK(name_changed_cb), sdialog); - gtk_entry_set_text ((GtkEntry *)sdialog->display_name, e_source_peek_name (sdialog->source)); + gtk_entry_set_text ((GtkEntry *) sdialog->display_name, e_source_peek_name (sdialog->source)); /* Hardcoded: groupwise can't edit the name (or anything else) */ if (sdialog->original_source) { @@ -696,7 +696,7 @@ host_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) static void port_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - const gchar *port = gtk_entry_get_text ((GtkEntry *)w); + const gchar *port = gtk_entry_get_text ((GtkEntry *) w); if (!strcmp (port, LDAPS_PORT_STRING)) { sdialog->ssl = ADDRESSBOOK_LDAP_SSL_WHENEVER_POSSIBLE; @@ -735,7 +735,7 @@ eabc_general_host (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget e_load_ui_builder_definition (builder, "ldap-config.ui"); w = e_builder_get_widget (builder, item->label); - gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); uri = e_source_get_uri (sdialog->source); if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS) @@ -773,7 +773,7 @@ eabc_general_host (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget static void auth_entry_changed_cb (GtkWidget *w, AddressbookSourceDialog *sdialog) { - const gchar *principal = gtk_entry_get_text ((GtkEntry *)w); + const gchar *principal = gtk_entry_get_text ((GtkEntry *) w); /* seems messy ... but the api is */ switch (sdialog->auth) { @@ -818,7 +818,7 @@ eabc_general_auth (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget e_load_ui_builder_definition (builder, "ldap-config.ui"); w = e_builder_get_widget (builder, item->label); - gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); sdialog->auth_combobox = e_builder_get_widget (builder, "auth-combobox"); gtk_widget_set_has_tooltip (sdialog->auth_combobox, TRUE); @@ -884,7 +884,7 @@ eabc_details_search (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidge e_load_ui_builder_definition (builder, "ldap-config.ui"); w = e_builder_get_widget (builder, item->label); - gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); uri = e_source_get_uri (sdialog->source); if (ldap_url_parse (uri, &lud) != LDAP_SUCCESS) @@ -979,7 +979,7 @@ eabc_details_limit (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget e_load_ui_builder_definition (builder, "ldap-config.ui"); w = e_builder_get_widget (builder, item->label); - gtk_box_pack_start ((GtkBox *)parent, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) parent, w, FALSE, FALSE, 0); sdialog->timeout_scale = e_builder_get_widget (builder, "timeout-scale"); range = GTK_RANGE (sdialog->timeout_scale); @@ -992,7 +992,7 @@ eabc_details_limit (EConfig *ec, EConfigItem *item, GtkWidget *parent, GtkWidget sdialog->limit_spinbutton = e_builder_get_widget (builder, "download-limit-spinbutton"); tmp = e_source_get_property(sdialog->source, "limit"); - gtk_spin_button_set_value ((GtkSpinButton *)sdialog->limit_spinbutton, tmp?g_strtod (tmp, NULL):100.0); + gtk_spin_button_set_value ((GtkSpinButton *) sdialog->limit_spinbutton, tmp?g_strtod (tmp, NULL):100.0); g_signal_connect (sdialog->limit_spinbutton, "value_changed", G_CALLBACK (limit_changed_cb), sdialog); sdialog->canbrowsecheck = e_builder_get_widget (builder, "canbrowsecheck"); @@ -1196,7 +1196,7 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) if (!strncmp("ldap:", e_source_group_peek_base_uri(l->data), 5)) sdialog->menu_source_groups = g_slist_remove (sdialog->menu_source_groups, l->data); #endif - sdialog->source_group = (ESourceGroup *)sdialog->menu_source_groups->data; + sdialog->source_group = (ESourceGroup *) sdialog->menu_source_groups->data; for (i=0;eabc_new_items[i].path;i++) items = g_slist_prepend (items, &eabc_new_items[i]); g_object_unref (gconf); @@ -1220,11 +1220,11 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) items = g_slist_prepend (items, &eabc_items[i]); } - e_config_add_items ((EConfig *)ec, items, eabc_commit, NULL, eabc_free, sdialog); - e_config_add_page_check ((EConfig *)ec, NULL, eabc_check_complete, sdialog); + e_config_add_items ((EConfig *) ec, items, eabc_commit, NULL, eabc_free, sdialog); + e_config_add_page_check ((EConfig *) ec, NULL, eabc_check_complete, sdialog); target = eab_config_target_new_source (ec, sdialog->source); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); if (source) sdialog->window = e_config_create_window((EConfig *)ec, NULL, _("Address Book Properties")); @@ -1234,7 +1234,7 @@ addressbook_config_edit_source (GtkWidget *parent, ESource *source) /* forces initial validation */ if (!sdialog->original_source) { e_source_set_relative_uri (sdialog->source, e_source_peek_uid (sdialog->source)); - e_config_target_changed ((EConfig *)ec, E_CONFIG_TARGET_CHANGED_STATE); + e_config_target_changed ((EConfig *) ec, E_CONFIG_TARGET_CHANGED_STATE); } return sdialog->window; diff --git a/modules/addressbook/openldap-extract.h b/modules/addressbook/openldap-extract.h index 7da5800d16..9c238d1970 100644 --- a/modules/addressbook/openldap-extract.h +++ b/modules/addressbook/openldap-extract.h @@ -284,7 +284,7 @@ ldap_int_parse_numericoid (const gchar **sp, gint *code, const gint flags) } } if (flags & LDAP_SCHEMA_SKIP) { - res = (gchar *)start; + res = (gchar *) start; } else { res = LDAP_MALLOC (len+1); if (!res) { @@ -1125,7 +1125,7 @@ ldap_url_parse_ext ( LDAP_CONST gchar *url_in, LDAPURLDesc **ludpp ) } /* allocate return struct */ - ludp = (LDAPURLDesc *)LDAP_CALLOC ( 1, sizeof ( LDAPURLDesc )); + ludp = (LDAPURLDesc *) LDAP_CALLOC ( 1, sizeof ( LDAPURLDesc )); if (ludp == NULL) { LDAP_FREE ( url ); diff --git a/modules/calendar/e-cal-shell-migrate.c b/modules/calendar/e-cal-shell-migrate.c index 710aa8f2a2..791352206e 100644 --- a/modules/calendar/e-cal-shell-migrate.c +++ b/modules/calendar/e-cal-shell-migrate.c @@ -174,7 +174,7 @@ create_calendar_sources (EShellBackend *shell_backend, shell_settings, "cal-primary-calendar", e_source_peek_uid (source)); - link.data = (gpointer)e_source_peek_uid (source); + link.data = (gpointer) e_source_peek_uid (source); link.next = NULL; e_cal_shell_backend_set_selected_calendars ( diff --git a/modules/calendar/e-cal-shell-view.c b/modules/calendar/e-cal-shell-view.c index b81b453bb0..20f30c12c4 100644 --- a/modules/calendar/e-cal-shell-view.c +++ b/modules/calendar/e-cal-shell-view.c @@ -321,7 +321,7 @@ cal_shell_view_update_actions (EShellView *shell_view) /* Hide the New button on the toolbar. */ widget = e_shell_window_get_managed_widget ( shell_window, "/main-toolbar"); - widget = (GtkWidget *)gtk_toolbar_get_nth_item ( + widget = (GtkWidget *) gtk_toolbar_get_nth_item ( GTK_TOOLBAR (widget), 0); gtk_widget_hide (widget); diff --git a/modules/calendar/e-calendar-preferences.c b/modules/calendar/e-calendar-preferences.c index 9db9f4538b..328fba44f1 100644 --- a/modules/calendar/e-calendar-preferences.c +++ b/modules/calendar/e-calendar-preferences.c @@ -864,8 +864,8 @@ calendar_preferences_construct (ECalendarPreferences *prefs, /* Hook up and add the toplevel widget */ target = e_cal_config_target_new_prefs (ec); - e_config_set_target ((EConfig *)ec, (EConfigTarget *) target); - toplevel = e_config_create_widget ((EConfig *)ec); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); + toplevel = e_config_create_widget ((EConfig *) ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); show_config (prefs); diff --git a/modules/calendar/e-memo-shell-migrate.c b/modules/calendar/e-memo-shell-migrate.c index b760990f6b..efe71f6632 100644 --- a/modules/calendar/e-memo-shell-migrate.c +++ b/modules/calendar/e-memo-shell-migrate.c @@ -129,7 +129,7 @@ create_memo_sources (EShellBackend *shell_backend, shell_settings, "cal-primary-memo-list", e_source_peek_uid (source)); - link.data = (gpointer)e_source_peek_uid (source); + link.data = (gpointer) e_source_peek_uid (source); link.next = NULL; e_memo_shell_backend_set_selected_memo_lists ( @@ -251,7 +251,7 @@ e_memo_shell_backend_migrate (EShellBackend *shell_backend, al = e_get_account_list (); - for (it = e_list_get_iterator ((EList *)al); + for (it = e_list_get_iterator ((EList *) al); e_iterator_is_valid (it); e_iterator_next (it)) { a = (EAccount *) e_iterator_get (it); diff --git a/modules/calendar/e-task-shell-migrate.c b/modules/calendar/e-task-shell-migrate.c index d7daafc91d..d9b5aa7af6 100644 --- a/modules/calendar/e-task-shell-migrate.c +++ b/modules/calendar/e-task-shell-migrate.c @@ -141,7 +141,7 @@ create_task_sources (EShellBackend *shell_backend, shell_settings, "cal-primary-task-list", e_source_peek_uid (source)); - link.data = (gpointer)e_source_peek_uid (source); + link.data = (gpointer) e_source_peek_uid (source); link.next = NULL; e_task_shell_backend_set_selected_task_lists ( diff --git a/modules/mail/em-composer-prefs.c b/modules/mail/em-composer-prefs.c index 35be54525b..a3e5bfae7f 100644 --- a/modules/mail/em-composer-prefs.c +++ b/modules/mail/em-composer-prefs.c @@ -347,7 +347,7 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, l = NULL; for (i = 0; i < G_N_ELEMENTS (emcp_items); i++) l = g_slist_prepend (l, &emcp_items[i]); - e_config_add_items ((EConfig *)ec, l, NULL, NULL, emcp_free, prefs); + e_config_add_items ((EConfig *) ec, l, NULL, NULL, emcp_free, prefs); /* General tab */ @@ -574,8 +574,8 @@ em_composer_prefs_construct (EMComposerPrefs *prefs, /* get our toplevel widget */ client = gconf_client_get_default (); target = em_config_target_new_prefs (ec, client); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); - toplevel = e_config_create_widget ((EConfig *)ec); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); + toplevel = e_config_create_widget ((EConfig *) ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); g_object_unref (client); } diff --git a/modules/mail/em-mailer-prefs.c b/modules/mail/em-mailer-prefs.c index c651cdee77..18b5a1d00b 100644 --- a/modules/mail/em-mailer-prefs.c +++ b/modules/mail/em-mailer-prefs.c @@ -263,7 +263,7 @@ jh_remove_cb (GtkWidget *widget, gpointer user_data) gconf_client_set_list (prefs->gconf, "/apps/evolution/mail/junk/custom_header", GCONF_VALUE_STRING, list, NULL); - g_slist_foreach (list, (GFunc)g_free, NULL); + g_slist_foreach (list, (GFunc) g_free, NULL); g_slist_free (list); g_free (name); g_free (value); @@ -425,7 +425,7 @@ emmp_header_add_header (GtkWidget *widget, EMMailerPrefs *prefs) GtkTreeIter iter; const gchar *text = gtk_entry_get_text (prefs->entry_header); - g_strstrip ((gchar *)text); + g_strstrip ((gchar *) text); if (text && (strlen (text)>0)) { gtk_list_store_append (GTK_LIST_STORE (model), &iter); @@ -692,7 +692,7 @@ junk_plugin_changed (GtkWidget *combo, EMMailerPrefs *prefs) CAMEL_SESSION (prefs->session)->junk_plugin = CAMEL_JUNK_PLUGIN (&iface->camel); status = e_plugin_invoke (iface->hook->plugin, iface->validate_binary, NULL) != NULL; - if ((gboolean)status == TRUE) { + if ((gboolean) status == TRUE) { gchar *text, *html; gtk_image_set_from_stock (prefs->plugin_image, "gtk-dialog-info", GTK_ICON_SIZE_MENU); text = g_strdup_printf (_("%s plugin is available and the binary is installed."), iface->plugin_name); @@ -736,7 +736,7 @@ junk_plugin_setup (GtkComboBox *combo_box, EMMailerPrefs *prefs) "text", 0, NULL); - if (!plugins || !g_list_length ((GList *)plugins)) { + if (!plugins || !g_list_length ((GList *) plugins)) { GtkTreeIter iter; gtk_list_store_append (store, &iter); @@ -835,7 +835,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, l = NULL; for (i = 0; i < G_N_ELEMENTS (emmp_items); i++) l = g_slist_prepend (l, &emmp_items[i]); - e_config_add_items ((EConfig *)ec, l, NULL, NULL, emmp_free, prefs); + e_config_add_items ((EConfig *) ec, l, NULL, NULL, emmp_free, prefs); /* General tab */ @@ -1198,7 +1198,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, junk_book_lookup_button_toggled (prefs->junk_book_lookup, prefs); - prefs->junk_header_list_store = init_junk_tree ((GtkWidget *)prefs->junk_header_tree, prefs); + prefs->junk_header_list_store = init_junk_tree ((GtkWidget *) prefs->junk_header_tree, prefs); toggle_button_init (prefs, prefs->junk_header_check, FALSE, "/apps/evolution/mail/junk/check_custom_header", G_CALLBACK (custom_junk_button_toggled)); @@ -1210,8 +1210,8 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs, /* get our toplevel widget */ target = em_config_target_new_prefs (ec, prefs->gconf); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); - toplevel = e_config_create_widget ((EConfig *)ec); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); + toplevel = e_config_create_widget ((EConfig *) ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); } diff --git a/modules/mail/em-network-prefs.c b/modules/mail/em-network-prefs.c index f216d81c28..3094f15f47 100644 --- a/modules/mail/em-network-prefs.c +++ b/modules/mail/em-network-prefs.c @@ -207,11 +207,11 @@ widget_entry_changed_cb (GtkWidget *widget, gpointer data) */ if (GTK_IS_SPIN_BUTTON (widget)) { port = gtk_spin_button_get_value_as_int (GTK_SPIN_BUTTON (widget)); - gconf_client_set_int (client, (const gchar *)data, port, NULL); + gconf_client_set_int (client, (const gchar *) data, port, NULL); d(g_print ("%s:%s: %s is SpinButton: value = [%d]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, port)); } else if (GTK_IS_ENTRY (widget)) { value = gtk_entry_get_text (GTK_ENTRY (widget)); - gconf_client_set_string (client, (const gchar *)data, value, NULL); + gconf_client_set_string (client, (const gchar *) data, value, NULL); d(g_print ("%s:%s: %s is Entry: value = [%s]\n", G_STRLOC, G_STRFUNC, (const gchar *)data, value)); } @@ -328,7 +328,7 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) l = NULL; for (i = 0; i < G_N_ELEMENTS (emnp_items); i++) l = g_slist_prepend (l, &emnp_items[i]); - e_config_add_items ((EConfig *)ec, l, NULL, NULL, emnp_free, prefs); + e_config_add_items ((EConfig *) ec, l, NULL, NULL, emnp_free, prefs); /* Proxy tab */ @@ -480,10 +480,10 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) g_free (buf); port = gconf_client_get_int (prefs->gconf, GCONF_E_HTTP_PORT_KEY, NULL); - gtk_spin_button_set_value (prefs->http_port, (gdouble)port); + gtk_spin_button_set_value (prefs->http_port, (gdouble) port); port = gconf_client_get_int (prefs->gconf, GCONF_E_HTTPS_PORT_KEY, NULL); - gtk_spin_button_set_value (prefs->https_port, (gdouble)port); + gtk_spin_button_set_value (prefs->https_port, (gdouble) port); #if 0 buf = gconf_client_get_string (prefs->gconf, GCONF_E_SOCKS_HOST_KEY, NULL); @@ -491,7 +491,7 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) g_free (buf); port = gconf_client_get_int (prefs->gconf, GCONF_E_SOCKS_PORT_KEY, NULL); - gtk_spin_button_set_value (prefs->socks_port, (gdouble)port); + gtk_spin_button_set_value (prefs->socks_port, (gdouble) port); #endif emnp_set_markups (prefs); @@ -509,8 +509,8 @@ em_network_prefs_construct (EMNetworkPrefs *prefs) /* get our toplevel widget */ target = em_config_target_new_prefs (ec, prefs->gconf); - e_config_set_target ((EConfig *)ec, (EConfigTarget *)target); - toplevel = e_config_create_widget ((EConfig *)ec); + e_config_set_target ((EConfig *) ec, (EConfigTarget *) target); + toplevel = e_config_create_widget ((EConfig *) ec); gtk_container_add (GTK_CONTAINER (prefs), toplevel); } diff --git a/modules/windows-sens/evolution-windows-sens.c b/modules/windows-sens/evolution-windows-sens.c index 96f0a18701..d974422cd5 100644 --- a/modules/windows-sens/evolution-windows-sens.c +++ b/modules/windows-sens/evolution-windows-sens.c @@ -308,14 +308,14 @@ e_sens_network_listener_queryinterface (ISensNetwork *This, static ULONG WINAPI e_sens_network_listener_addref (ISensNetwork *This) { - ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; + ESensNetworkListener *esnl_ptr=(ESensNetworkListener*) This; return InterlockedIncrement (&(esnl_ptr->ref)); } static ULONG WINAPI e_sens_network_listener_release (ISensNetwork *This) { - ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; + ESensNetworkListener *esnl_ptr=(ESensNetworkListener*) This; ULONG tmp = InterlockedDecrement (&(esnl_ptr->ref)); return tmp; } @@ -368,7 +368,7 @@ e_sens_network_listener_connectionmade (ISensNetwork *This, LPSENS_QOCINFO lpQOCInfo) { if (ulType) { - ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; + ESensNetworkListener *esnl_ptr=(ESensNetworkListener*) This; EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr); /* Wait a second so that the connection stabilizes */ g_usleep (G_USEC_PER_SEC); @@ -392,7 +392,7 @@ e_sens_network_listener_connectionlost (ISensNetwork *This, ULONG ulType) { if (ulType) { - ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; + ESensNetworkListener *esnl_ptr=(ESensNetworkListener*) This; EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr); e_shell_set_network_available (shell, FALSE); } @@ -407,7 +407,7 @@ e_sens_network_listener_destinationreachable (ISensNetwork *This, LPSENS_QOCINFO lpQOCInfo) { if (ulType) { - ESensNetworkListener *esnl_ptr=(ESensNetworkListener*)This; + ESensNetworkListener *esnl_ptr=(ESensNetworkListener*) This; EShell *shell = windows_sens_get_shell (esnl_ptr->ews_ptr); /* Wait a second so that the connection stabilizes */ g_usleep (G_USEC_PER_SEC); @@ -502,7 +502,7 @@ windows_sens_constructed (GObject *object) UUID tmp_uuid; UuidCreate (&tmp_uuid); UuidToString (&tmp_uuid, &subids[i]); - res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((gchar *)subids[i]))); + res=pEventSubscription->lpVtbl->put_SubscriptionID (pEventSubscription, _mb2wchar (add_curly_braces_to_uuid ((gchar *) subids[i]))); if (res) { RpcStringFree (&subids[i]); break; @@ -517,7 +517,7 @@ windows_sens_constructed (GObject *object) res=pEventSubscription->lpVtbl->put_EventClassID (pEventSubscription, _mb2wchar (eventclassid)); if (res) break; - res=pEventSubscription->lpVtbl->put_SubscriberInterface (pEventSubscription, (IUnknown*)pESensNetworkListener); + res=pEventSubscription->lpVtbl->put_SubscriberInterface (pEventSubscription, (IUnknown*) pESensNetworkListener); if (res) break; /* Make the subscription receive the event only if the owner of the subscription @@ -528,7 +528,7 @@ windows_sens_constructed (GObject *object) if (res) break; - res=pEventSystem->lpVtbl->Store (pEventSystem, (BSTR)PROGID_EventSubscription, (IUnknown*)pEventSubscription); + res=pEventSystem->lpVtbl->Store (pEventSystem, (BSTR) PROGID_EventSubscription, (IUnknown*) pEventSubscription); if (res) break; pEventSubscription->lpVtbl->Release (pEventSubscription); diff --git a/plugins/attachment-reminder/attachment-reminder.c b/plugins/attachment-reminder/attachment-reminder.c index 113424bd78..e21dd94498 100644 --- a/plugins/attachment-reminder/attachment-reminder.c +++ b/plugins/attachment-reminder/attachment-reminder.c @@ -96,7 +96,7 @@ org_gnome_evolution_attachment_reminder (EPlugin *ep, EMEventTargetComposer *t) /* Set presend_check_status for the composer*/ if (check_for_attachment_clues (filtered_str) && !check_for_attachment (t->composer)) - if (!ask_for_missing_attachment (ep, (GtkWindow *)t->composer)) + if (!ask_for_missing_attachment (ep, (GtkWindow *) t->composer)) g_object_set_data ((GObject *) t->composer, "presend_check_status", GINT_TO_POINTER(1)); g_free (filtered_str); diff --git a/plugins/backup-restore/backup-restore.c b/plugins/backup-restore/backup-restore.c index aa0693ece3..d6e1b05076 100644 --- a/plugins/backup-restore/backup-restore.c +++ b/plugins/backup-restore/backup-restore.c @@ -273,7 +273,7 @@ static void check_toggled (GtkToggleButton *button, GtkAssistant *assistant) { GtkWidget *box = g_object_get_data ((GObject *)button, "box"); - gboolean state = gtk_toggle_button_get_active ((GtkToggleButton *)button); + gboolean state = gtk_toggle_button_get_active ((GtkToggleButton *) button); gtk_widget_set_sensitive (box, state); @@ -324,27 +324,27 @@ backup_restore_page (EPlugin *ep, EConfigHookItemFactoryData *hook_data) hbox = gtk_hbox_new (FALSE, 6); label = gtk_label_new (_("You can restore Evolution from your backup. It can restore all the Mails, Calendars, Tasks, Memos, Contacts. It also restores all your personal settings, mail filters etc.")); - gtk_label_set_line_wrap ((GtkLabel *)label, TRUE); - gtk_label_set_single_line_mode ((GtkLabel *)label, FALSE); - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 6); - gtk_box_pack_start ((GtkBox *)page, hbox, FALSE, FALSE, 0); + gtk_label_set_line_wrap ((GtkLabel *) label, TRUE); + gtk_label_set_single_line_mode ((GtkLabel *) label, FALSE); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) page, hbox, FALSE, FALSE, 0); hbox = gtk_hbox_new (FALSE, 6); cbox = gtk_check_button_new_with_mnemonic (_("_Restore Evolution from the backup file")); g_signal_connect (cbox, "toggled", G_CALLBACK (check_toggled), assistant); - gtk_box_pack_start ((GtkBox *)hbox, cbox, FALSE, FALSE, 6); - gtk_box_pack_start ((GtkBox *)page, hbox, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) hbox, cbox, FALSE, FALSE, 6); + gtk_box_pack_start ((GtkBox *) page, hbox, FALSE, FALSE, 0); hbox = gtk_hbox_new (FALSE, 6); g_object_set_data ((GObject *)cbox, "box", hbox); label = gtk_label_new (_("Please select an Evolution Archive to restore:")); - gtk_box_pack_start ((GtkBox *)hbox, label, FALSE, FALSE, 12); + gtk_box_pack_start ((GtkBox *) hbox, label, FALSE, FALSE, 12); button = gtk_file_chooser_button_new (_("Choose a file to restore"), GTK_FILE_CHOOSER_ACTION_OPEN); g_signal_connect (button, "selection-changed", G_CALLBACK (file_changed), assistant); - gtk_file_chooser_button_set_width_chars ((GtkFileChooserButton *)button, 20); - gtk_box_pack_start ((GtkBox *)hbox, button, FALSE, FALSE, 0); - gtk_box_pack_start ((GtkBox *)page, hbox, FALSE, FALSE, 0); + gtk_file_chooser_button_set_width_chars ((GtkFileChooserButton *) button, 20); + gtk_box_pack_start ((GtkBox *) hbox, button, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) page, hbox, FALSE, FALSE, 0); gtk_widget_set_sensitive (hbox, FALSE); gtk_assistant_append_page (assistant, page); @@ -367,7 +367,7 @@ backup_restore_commit (EPlugin *ep, EMConfigTargetAccount *target) if (state) { if (!file || !sanity_check (file)) { - e_alert_run_dialog_for_args ((GtkWindow *)assistant, + e_alert_run_dialog_for_args ((GtkWindow *) assistant, "org.gnome.backup-restore:invalid-backup", NULL); } else { diff --git a/plugins/backup-restore/backup.c b/plugins/backup-restore/backup.c index 9334de3b20..aa792169f2 100644 --- a/plugins/backup-restore/backup.c +++ b/plugins/backup-restore/backup.c @@ -560,8 +560,8 @@ static gboolean pbar_update (gpointer data) { if (!complete) { - gtk_progress_bar_pulse ((GtkProgressBar *)pbar); - gtk_progress_bar_set_text ((GtkProgressBar *)pbar, txt); + gtk_progress_bar_pulse ((GtkProgressBar *) pbar); + gtk_progress_bar_set_text ((GtkProgressBar *) pbar, txt); return TRUE; } @@ -589,7 +589,7 @@ idle_cb (gpointer data) { if (gui_arg) { /* Show progress dialog */ - gtk_progress_bar_pulse ((GtkProgressBar *)pbar); + gtk_progress_bar_pulse ((GtkProgressBar *) pbar); g_timeout_add (50, pbar_update, NULL); } diff --git a/plugins/bbdb/bbdb.c b/plugins/bbdb/bbdb.c index 545fd6842d..bfb63c5505 100644 --- a/plugins/bbdb/bbdb.c +++ b/plugins/bbdb/bbdb.c @@ -197,7 +197,7 @@ bbdb_do_in_thread (gpointer data) if (!book || !bbdb_open_ebook (book)) { G_LOCK (todo); - g_slist_foreach (todo, (GFunc)free_todo_struct, NULL); + g_slist_foreach (todo, (GFunc) free_todo_struct, NULL); g_slist_free (todo); todo = NULL; @@ -357,7 +357,7 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) e_book_query_unref (query); if (contacts != NULL || !status) { for (l = contacts; l != NULL; l = l->next) - g_object_unref ((GObject *)l->data); + g_object_unref ((GObject *) l->data); g_list_free (contacts); g_free (temp_name); @@ -391,7 +391,7 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) this. */ if (!status || contacts->next != NULL) { for (l = contacts; l != NULL; l = l->next) - g_object_unref ((GObject *)l->data); + g_object_unref ((GObject *) l->data); g_list_free (contacts); g_free (temp_name); return; @@ -405,7 +405,7 @@ bbdb_do_it (EBook *book, const gchar *name, const gchar *email) } for (l = contacts; l != NULL; l = l->next) - g_object_unref ((GObject *)l->data); + g_object_unref ((GObject *) l->data); g_list_free (contacts); g_free (temp_name); diff --git a/plugins/bbdb/gaimbuddies.c b/plugins/bbdb/gaimbuddies.c index 62fc89d9ec..3e6f344ed0 100644 --- a/plugins/bbdb/gaimbuddies.c +++ b/plugins/bbdb/gaimbuddies.c @@ -385,7 +385,7 @@ bbdb_merge_buddy_to_contact (EBook *book, GaimBuddy *b, EContact *c) return dirty; } - photo->data.inlined.data = (guchar *)contents; + photo->data.inlined.data = (guchar *) contents; e_contact_set (c, E_CONTACT_PHOTO, (gpointer) photo); dirty = TRUE; } @@ -492,7 +492,7 @@ bbdb_get_gaim_buddy_list (void) xmlFreeDoc (buddy_xml); - g_slist_foreach (blocked, (GFunc)g_free, NULL); + g_slist_foreach (blocked, (GFunc) g_free, NULL); g_slist_free (blocked); return buddies; @@ -514,7 +514,7 @@ free_gaim_body (GaimBuddy *gb) static void free_buddy_list (GList *blist) { - g_list_foreach (blist, (GFunc)free_gaim_body, NULL); + g_list_foreach (blist, (GFunc) free_gaim_body, NULL); g_list_free (blist); } @@ -525,7 +525,7 @@ get_node_text (xmlNodePtr node) strcmp ((gchar *)node->children->name, "text")) return NULL; - return g_strdup ((gchar *)node->children->content); + return g_strdup ((gchar *) node->children->content); } static gchar * diff --git a/plugins/calendar-file/calendar-file.c b/plugins/calendar-file/calendar-file.c index e81411a153..df1d5b3306 100644 --- a/plugins/calendar-file/calendar-file.c +++ b/plugins/calendar-file/calendar-file.c @@ -123,32 +123,32 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data) GTK_EXPAND | GTK_FILL, 0, 0, 0); maincheck = gtk_check_button_new_with_mnemonic (_("_Customize options")); - gtk_box_pack_start ((GtkBox *)mainbox, maincheck, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) mainbox, maincheck, TRUE, TRUE, 2); box1 = gtk_hbox_new (FALSE, 2); - gtk_box_pack_start ((GtkBox *)mainbox, box1, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) mainbox, box1, TRUE, TRUE, 2); g_object_set_data ((GObject*)maincheck, "child", box1); /* left-most space, the first one */ w1 = gtk_label_new (""); - gtk_box_pack_start ((GtkBox *)box1, w1, FALSE, TRUE, 8); + gtk_box_pack_start ((GtkBox *) box1, w1, FALSE, TRUE, 8); box2 = gtk_vbox_new (FALSE, 2); - gtk_box_pack_start ((GtkBox *)box1, box2, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box1, box2, TRUE, TRUE, 2); box1 = box2; box2 = gtk_hbox_new (FALSE, 2); - gtk_box_pack_start ((GtkBox *)box1, box2, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box1, box2, TRUE, TRUE, 2); w1 = gtk_label_new_with_mnemonic (_("File _name:")); gtk_misc_set_alignment (GTK_MISC (w1), 0.0, 0.5); - gtk_box_pack_start ((GtkBox *)box2, w1, FALSE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box2, w1, FALSE, TRUE, 2); w2 = gtk_file_chooser_button_new (_("Choose calendar file"), GTK_FILE_CHOOSER_ACTION_OPEN); gtk_file_chooser_set_local_only (GTK_FILE_CHOOSER (w2), TRUE); gtk_label_set_mnemonic_widget (GTK_LABEL (w1), w2); - gtk_box_pack_start ((GtkBox *)box2, w2, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box2, w2, TRUE, TRUE, 2); g_object_set_data (G_OBJECT (maincheck), "file-chooser", w2); @@ -186,21 +186,21 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data) g_signal_connect (G_OBJECT (maincheck), "toggled", G_CALLBACK (maincheck_toggled), source); box2 = gtk_hbox_new (FALSE, 2); - gtk_box_pack_start ((GtkBox *)box1, box2, FALSE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box1, box2, FALSE, TRUE, 2); w1 = gtk_label_new_with_mnemonic (_("Re_fresh:")); gtk_misc_set_alignment (GTK_MISC (w1), 0.0, 0.5); - gtk_box_pack_start ((GtkBox *)box2, w1, FALSE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box2, w1, FALSE, TRUE, 2); w2 = gtk_combo_box_text_new (); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On open")); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("On file change")); gtk_combo_box_text_append_text (GTK_COMBO_BOX_TEXT (w2), _("Periodically")); gtk_label_set_mnemonic_widget (GTK_LABEL (w1), w2); - gtk_box_pack_start ((GtkBox *)box2, w2, FALSE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box2, w2, FALSE, TRUE, 2); value = e_source_get_property (source, "refresh-type"); - gtk_combo_box_set_active ((GtkComboBox *)w2, (value && *value && !value[1] && value[0] >= '0' && value[0] <= '2') ? value[0] - '0' : 0); + gtk_combo_box_set_active ((GtkComboBox *) w2, (value && *value && !value[1] && value[0] >= '0' && value[0] <= '2') ? value[0] - '0' : 0); w1 = w2; w2 = e_plugin_util_add_refresh (NULL, NULL, source, "refresh"); @@ -211,7 +211,7 @@ e_calendar_file_customs (EPlugin *epl, EConfigHookItemFactoryData *data) g_signal_connect (G_OBJECT (w1), "changed", G_CALLBACK (refresh_type_changed), source); w2 = e_plugin_util_add_check (NULL, _("Force read _only"), source, "custom-file-readonly", "1", NULL); - gtk_box_pack_start ((GtkBox *)box1, w2, TRUE, TRUE, 2); + gtk_box_pack_start ((GtkBox *) box1, w2, TRUE, TRUE, 2); gtk_widget_show_all (mainbox); diff --git a/plugins/calendar-weather/calendar-weather.c b/plugins/calendar-weather/calendar-weather.c index f9d1180429..73ab8c8b3f 100644 --- a/plugins/calendar-weather/calendar-weather.c +++ b/plugins/calendar-weather/calendar-weather.c @@ -75,7 +75,7 @@ e_plugin_lib_enable (EPlugin *epl, gint enable) /* Add the categories icons if we don't have them. */ for (l = saved_cats; l; l = g_list_next (l)) { - if (!strcmp ((const gchar *)l->data, tmp)) + if (!strcmp ((const gchar *) l->data, tmp)) goto exit; } diff --git a/plugins/contacts-map/contacts-map.c b/plugins/contacts-map/contacts-map.c index 24297e0243..d1954297fd 100644 --- a/plugins/contacts-map/contacts-map.c +++ b/plugins/contacts-map/contacts-map.c @@ -112,7 +112,7 @@ show_map_general (ESourceSelector *selector) gdouble *min_lng = NULL; gdouble *max_lng = NULL; - primary_source = (ESource*)e_source_selector_get_primary_selection (selector); + primary_source = (ESource*) e_source_selector_get_primary_selection (selector); uri = e_source_get_uri (primary_source); book = e_book_new_from_uri (uri, NULL); diff --git a/plugins/dbx-import/dbx-importer.c b/plugins/dbx-import/dbx-importer.c index 47e4139cda..c2ca34cdb7 100644 --- a/plugins/dbx-import/dbx-importer.c +++ b/plugins/dbx-import/dbx-importer.c @@ -158,7 +158,7 @@ org_gnome_evolution_readdbx_supported (EPlugin *epl, EImportTarget *target) return FALSE; } - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) { return TRUE; @@ -240,7 +240,7 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei, hbox = gtk_hbox_new (FALSE, 0); w = gtk_label_new_with_mnemonic (_("_Destination folder:")); - gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6); label = GTK_LABEL (w); @@ -253,13 +253,13 @@ org_gnome_evolution_readdbx_getwidget (EImport *ei, _("Select folder to import into")); gtk_label_set_mnemonic_widget (label, w); - em_folder_selection_button_set_selection ((EMFolderSelectionButton *)w, select_uri); - folder_selected ((EMFolderSelectionButton *)w, (EImportTargetURI *)target); + em_folder_selection_button_set_selection ((EMFolderSelectionButton *) w, select_uri); + folder_selected ((EMFolderSelectionButton *) w, (EImportTargetURI *) target); g_signal_connect (w, "selected", G_CALLBACK(folder_selected), target); - gtk_box_pack_start ((GtkBox *)hbox, w, FALSE, TRUE, 6); + gtk_box_pack_start ((GtkBox *) hbox, w, FALSE, TRUE, 6); w = gtk_vbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)w, hbox, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) w, hbox, FALSE, FALSE, 0); gtk_widget_show_all (w); g_free (select_uri); @@ -577,10 +577,10 @@ dbx_import_file (DbxImporter *m) gint missing = 0; m->status_what = NULL; filename = g_filename_from_uri ( - ((EImportTargetURI *)m->target)->uri_src, NULL, NULL); + ((EImportTargetURI *) m->target)->uri_src, NULL, NULL); /* Destination folder, was set in our widget */ - m->parent_uri = g_strdup (((EImportTargetURI *)m->target)->uri_dest); + m->parent_uri = g_strdup (((EImportTargetURI *) m->target)->uri_dest); cancellable = e_activity_get_cancellable (m->base.activity); @@ -602,7 +602,7 @@ dbx_import_file (DbxImporter *m) camel_folder_freeze (folder); filename = g_filename_from_uri ( - ((EImportTargetURI *)m->target)->uri_src, NULL, NULL); + ((EImportTargetURI *) m->target)->uri_src, NULL, NULL); m->dbx_fd = g_open (filename, O_RDONLY, 0); g_free (filename); @@ -657,7 +657,7 @@ dbx_import_file (DbxImporter *m) msg = camel_mime_message_new (); if (!camel_mime_part_construct_from_parser_sync ( - (CamelMimePart *)msg, mp, NULL, NULL)) { + (CamelMimePart *) msg, mp, NULL, NULL)) { /* set exception? */ g_object_unref (msg); g_object_unref (mp); @@ -707,7 +707,7 @@ dbx_import_import (DbxImporter *m, static void dbx_import_imported (DbxImporter *m) { - e_import_complete (m->target->import, (EImportTarget *)m->target); + e_import_complete (m->target->import, (EImportTarget *) m->target); } static void diff --git a/plugins/email-custom-header/email-custom-header.c b/plugins/email-custom-header/email-custom-header.c index 23f474c5ef..eb0ab3fb2f 100644 --- a/plugins/email-custom-header/email-custom-header.c +++ b/plugins/email-custom-header/email-custom-header.c @@ -102,7 +102,7 @@ epech_get_widgets_data (CustomHeaderOptionsDialog *mch) index_column < priv->email_custom_header_details->len; index_column++) { sub_combo_box_get = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,index_column); - selected_item = gtk_combo_box_get_active ((GtkComboBox *)sub_combo_box_get->header_value_combo_box); + selected_item = gtk_combo_box_get_active ((GtkComboBox *) sub_combo_box_get->header_value_combo_box); g_array_append_val (priv->header_index_type, selected_item); } } @@ -142,9 +142,9 @@ epech_fill_widgets_with_data (CustomHeaderOptionsDialog *mch) sub_combo_box_fill = &g_array_index (priv->combo_box_header_value, HeaderValueComboBox,set_index_column); if (priv->flag == 0) { - gtk_combo_box_set_active ((GtkComboBox *)sub_combo_box_fill->header_value_combo_box,0); + gtk_combo_box_set_active ((GtkComboBox *) sub_combo_box_fill->header_value_combo_box,0); } else { - gtk_combo_box_set_active ((GtkComboBox *)sub_combo_box_fill->header_value_combo_box, + gtk_combo_box_set_active ((GtkComboBox *) sub_combo_box_fill->header_value_combo_box, g_array_index (priv->header_index_type, gint, set_index_column)); } } @@ -425,7 +425,7 @@ epech_dialog_init (GObject *object) static void epech_dialog_finalize (GObject *object) { - CustomHeaderOptionsDialog *mch = (CustomHeaderOptionsDialog *)object; + CustomHeaderOptionsDialog *mch = (CustomHeaderOptionsDialog *) object; EmailCustomHeaderOptionsDialogPrivate *priv; g_return_if_fail (EMAIL_CUSTOM_HEADER_OPTIONS_IS_DIALOG (mch)); @@ -461,7 +461,7 @@ epech_append_to_custom_header (CustomHeaderOptionsDialog *dialog, gint state, gp CustomSubHeader *temp_header_value_ptr; gint index_subtype,sub_type_index; - composer = (EMsgComposer *)data; + composer = (EMsgComposer *) data; priv = dialog->priv; if (state == GTK_RESPONSE_OK) { @@ -515,7 +515,7 @@ static gint epech_check_existing_composer_window (gconstpointer compowindow, gconstpointer other_compowindow) { if ((compowindow) && (other_compowindow)) { - if (((EmailCustomHeaderWindow *)compowindow)->epech_window == (GdkWindow *)other_compowindow) { + if (((EmailCustomHeaderWindow *) compowindow)->epech_window == (GdkWindow *) other_compowindow) { return 0; } } diff --git a/plugins/external-editor/external-editor.c b/plugins/external-editor/external-editor.c index b3f58410af..5ca435a0e6 100644 --- a/plugins/external-editor/external-editor.c +++ b/plugins/external-editor/external-editor.c @@ -372,7 +372,7 @@ static void launch_editor (GtkAction *action, EMsgComposer *composer) disable_composer (composer); - editor_thread = g_thread_create ((GThreadFunc)async_external_editor, composer, FALSE, NULL); + editor_thread = g_thread_create ((GThreadFunc) async_external_editor, composer, FALSE, NULL); } static GtkActionEntry entries[] = { @@ -427,7 +427,7 @@ editor_running (void) { gboolean running = FALSE; - g_thread_foreach ((GFunc)editor_running_thread_func, &running); + g_thread_foreach ((GFunc) editor_running_thread_func, &running); return running; } diff --git a/plugins/imap-features/imap-headers.c b/plugins/imap-features/imap-headers.c index 35fbecacd0..9444658cd5 100644 --- a/plugins/imap-features/imap-headers.c +++ b/plugins/imap-features/imap-headers.c @@ -80,7 +80,7 @@ imap_headers_commit (EPlugin *efp, EConfigHookItemFactoryData *data) EAccount *modified_account; gboolean use_imap = g_getenv ("USE_IMAP") != NULL; - target_account = (EMConfigTargetAccount *)data->config->target; + target_account = (EMConfigTargetAccount *) data->config->target; original_account = target_account->original_account; modified_account = target_account->modified_account; @@ -272,7 +272,7 @@ org_gnome_imap_headers (EPlugin *epl, EConfigHookItemFactoryData *data) ui = g_new0 (EPImapFeaturesData, 1); - target_account = (EMConfigTargetAccount *)data->config->target; + target_account = (EMConfigTargetAccount *) data->config->target; account = target_account->modified_account; if (!g_str_has_prefix (account->source->url, "imap://") && !(use_imap && g_str_has_prefix (account->source->url, "groupwise://"))) diff --git a/plugins/itip-formatter/itip-formatter.c b/plugins/itip-formatter/itip-formatter.c index d93f2f5384..7a620a6db8 100644 --- a/plugins/itip-formatter/itip-formatter.c +++ b/plugins/itip-formatter/itip-formatter.c @@ -230,7 +230,7 @@ find_to_address (struct _itip_puri *pitip, icalcomponent *ical_comp, icalparamet { EIterator *it; - it = e_list_get_iterator ((EList *)pitip->accounts); + it = e_list_get_iterator ((EList *) pitip->accounts); if (!pitip->to_address && pitip->msg && pitip->folder) { EAccount *account = em_utils_guess_account (pitip->msg, pitip->folder); @@ -388,7 +388,7 @@ find_from_address (struct _itip_puri *pitip, icalcomponent *ical_comp) if (param) pitip->from_name = g_strdup (icalparameter_get_cn (param)); - it = e_list_get_iterator ((EList *)pitip->accounts); + it = e_list_get_iterator ((EList *) pitip->accounts); while (e_iterator_is_valid (it)) { const EAccount *account = e_iterator_get (it); @@ -1011,7 +1011,7 @@ message_foreach_part (CamelMimePart *part, GSList **part_list) message_foreach_part (part, part_list); } } else if (CAMEL_IS_MIME_MESSAGE (containee)) { - message_foreach_part ((CamelMimePart *)containee, part_list); + message_foreach_part ((CamelMimePart *) containee, part_list); } } @@ -1180,7 +1180,7 @@ update_item (struct _itip_puri *pitip, ItipViewResponse response) alarms = e_cal_component_get_alarm_uids (real_comp); for (l = alarms; l; l = l->next) { - alarm = e_cal_component_get_alarm (real_comp, (const gchar *)l->data); + alarm = e_cal_component_get_alarm (real_comp, (const gchar *) l->data); if (alarm) { ECalComponentAlarm *aclone = e_cal_component_alarm_clone (alarm); @@ -2318,7 +2318,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject shell = e_shell_get_default (); shell_settings = e_shell_get_shell_settings (shell); - info = (struct _itip_puri *) em_format_find_puri ((EMFormat *)efh, pobject->classid); + info = (struct _itip_puri *) em_format_find_puri ((EMFormat *) efh, pobject->classid); /* Accounts */ info->accounts = e_get_account_list (); @@ -2341,7 +2341,7 @@ format_itip_object (EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject gtk_container_add (GTK_CONTAINER (eb), info->view); gtk_widget_show (info->view); - response_enabled = in_proper_folder (((EMFormat*)efh)->folder); + response_enabled = in_proper_folder (((EMFormat*) efh)->folder); if (!response_enabled) { itip_view_set_mode (ITIP_VIEW (info->view), ITIP_VIEW_MODE_HIDE_ALL); @@ -2690,7 +2690,7 @@ format_itip (EPlugin *ep, EMFormatHookTarget *target) !camel_folder_get_message_user_flag (target->format->folder, target->format->uid, "$has_cal")) camel_folder_set_message_user_flag (target->format->folder, target->format->uid, "$has_cal", TRUE); - puri = (struct _itip_puri *)em_format_add_puri (target->format, sizeof (struct _itip_puri), classid, target->part, itip_attachment_frame); + puri = (struct _itip_puri *) em_format_add_puri (target->format, sizeof (struct _itip_puri), classid, target->part, itip_attachment_frame); em_format_html_add_pobject ((EMFormatHTML *) target->format, sizeof (EMFormatHTMLPObject), classid, target->part, format_itip_object); @@ -2891,7 +2891,7 @@ itip_attachment_frame (EMFormat *emf, EMFormatPURI *puri, GCancellable *cancellable) { - struct _itip_puri *info = (struct _itip_puri *)puri; + struct _itip_puri *info = (struct _itip_puri *) puri; info->handle->handler ( emf, stream, info->puri.part, diff --git a/plugins/mail-notification/mail-notification.c b/plugins/mail-notification/mail-notification.c index ba7d84c09c..88b5c81893 100644 --- a/plugins/mail-notification/mail-notification.c +++ b/plugins/mail-notification/mail-notification.c @@ -365,7 +365,7 @@ can_support_actions (void) } } - g_list_foreach (caps, (GFunc)g_free, NULL); + g_list_foreach (caps, (GFunc) g_free, NULL); g_list_free (caps); } diff --git a/plugins/mail-to-task/mail-to-task.c b/plugins/mail-to-task/mail-to-task.c index 558489578a..1deca6d4f1 100644 --- a/plugins/mail-to-task/mail-to-task.c +++ b/plugins/mail-to-task/mail-to-task.c @@ -433,7 +433,7 @@ report_error_idle (const gchar *format, const gchar *param) err->param = g_strdup (param); g_usleep (250); - g_idle_add ((GSourceFunc)do_report_error, err); + g_idle_add ((GSourceFunc) do_report_error, err); } struct _manage_comp @@ -869,7 +869,7 @@ do_mail_to_event (AsyncData *data) if (mcs) { /* process this in the main thread, as we may ask user too */ - g_idle_add ((GSourceFunc)do_manage_comp_idle, mcs); + g_idle_add ((GSourceFunc) do_manage_comp_idle, mcs); } } diff --git a/plugins/prefer-plain/prefer-plain.c b/plugins/prefer-plain/prefer-plain.c index 50b0d2852a..71bcd41f56 100644 --- a/plugins/prefer-plain/prefer-plain.c +++ b/plugins/prefer-plain/prefer-plain.c @@ -122,7 +122,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream part = camel_multipart_get_part (mp, i); if (part != except) { - CamelMultipart *multipart = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)part); + CamelMultipart *multipart = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) part); if (CAMEL_IS_MULTIPART (multipart)) { export_as_attachments (multipart, format, stream, except); @@ -136,7 +136,7 @@ export_as_attachments (CamelMultipart *mp, EMFormat *format, CamelStream *stream void org_gnome_prefer_plain_multipart_alternative (gpointer ep, EMFormatHookTarget *t) { - CamelMultipart *mp = (CamelMultipart *)camel_medium_get_content ((CamelMedium *)t->part); + CamelMultipart *mp = (CamelMultipart *) camel_medium_get_content ((CamelMedium *) t->part); CamelMimePart *part, *display_part = NULL, *calendar_part = NULL; gint i, nparts, partidlen, displayid = 0, calendarid = 0; @@ -292,7 +292,7 @@ org_gnome_prefer_plain_config_mode (struct _EPlugin *epl, struct _EConfigHookIte gtk_widget_show (check); g_signal_connect (check, "toggled", G_CALLBACK (epp_show_suppressed_toggled), NULL); - dropdown = (GtkComboBox *)gtk_combo_box_new (); + dropdown = (GtkComboBox *) gtk_combo_box_new (); cell = gtk_cell_renderer_text_new (); store = gtk_list_store_new (1, G_TYPE_STRING); for (i = 0; i < G_N_ELEMENTS (epp_options); i++) { @@ -300,16 +300,16 @@ org_gnome_prefer_plain_config_mode (struct _EPlugin *epl, struct _EConfigHookIte gtk_list_store_set (store, &iter, 0, _(epp_options[i].label), -1); } - gtk_cell_layout_pack_start ((GtkCellLayout *)dropdown, cell, TRUE); + gtk_cell_layout_pack_start ((GtkCellLayout *) dropdown, cell, TRUE); gtk_cell_layout_set_attributes((GtkCellLayout *)dropdown, cell, "text", 0, NULL); - gtk_combo_box_set_model (dropdown, (GtkTreeModel *)store); + gtk_combo_box_set_model (dropdown, (GtkTreeModel *) store); /*gtk_combo_box_set_active(dropdown, -1);*/ gtk_combo_box_set_active (dropdown, epp_mode); - gtk_widget_show ((GtkWidget *)dropdown); + gtk_widget_show ((GtkWidget *) dropdown); dropdown_label = gtk_label_new_with_mnemonic (_("HTML _Mode")); gtk_widget_show (dropdown_label); - gtk_label_set_mnemonic_widget (GTK_LABEL (dropdown_label), (GtkWidget *)dropdown); + gtk_label_set_mnemonic_widget (GTK_LABEL (dropdown_label), (GtkWidget *) dropdown); info = gtk_label_new (NULL); gtk_misc_set_alignment (GTK_MISC (info), 0.0, 0.5); @@ -321,14 +321,14 @@ org_gnome_prefer_plain_config_mode (struct _EPlugin *epl, struct _EConfigHookIte g_signal_connect (dropdown, "changed", G_CALLBACK(epp_mode_changed), info); g_object_get (data->parent, "n-rows", &i, NULL); - gtk_table_attach ((GtkTable *)data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); - gtk_table_attach ((GtkTable *)data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0); - gtk_table_attach ((GtkTable *)data->parent, (GtkWidget *)dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0); - gtk_table_attach ((GtkTable *)data->parent, info, 1, 2, i + 2, i + 3, GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_table_attach ((GtkTable *) data->parent, check, 0, 2, i, i + 1, GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_table_attach ((GtkTable *) data->parent, dropdown_label, 0, 1, i + 1, i + 2, 0, 0, 0, 0); + gtk_table_attach ((GtkTable *) data->parent, (GtkWidget *) dropdown, 1, 2, i + 1, i + 2, GTK_FILL | GTK_EXPAND, 0, 0, 0); + gtk_table_attach ((GtkTable *) data->parent, info, 1, 2, i + 2, i + 3, GTK_FILL | GTK_EXPAND, 0, 0, 0); /* since this isnt dynamic, we don't need to track each item */ - return (GtkWidget *)dropdown; + return (GtkWidget *) dropdown; } gint e_plugin_lib_enable (EPlugin *ep, gint enable); diff --git a/plugins/pst-import/pst-importer.c b/plugins/pst-import/pst-importer.c index 603e739fe5..e17c50ad72 100644 --- a/plugins/pst-import/pst-importer.c +++ b/plugins/pst-import/pst-importer.c @@ -144,7 +144,7 @@ org_credativ_evolution_readpst_supported (EPlugin *epl, EImportTarget *target) return FALSE; } - s = (EImportTargetURI *)target; + s = (EImportTargetURI *) target; if (s->uri_src == NULL) { return TRUE; @@ -338,19 +338,19 @@ org_credativ_evolution_readpst_getwidget (EImport *ei, EImportTarget *target, EI w = gtk_check_button_new_with_mnemonic (_("A_ppointments")); gtk_toggle_button_set_active ((GtkToggleButton *) w, FALSE); g_signal_connect (w, "toggled", G_CALLBACK (checkbox_appt_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)framebox, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) framebox, w, FALSE, FALSE, 0); /* Tasks */ w = gtk_check_button_new_with_mnemonic (_("_Tasks")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, FALSE); + gtk_toggle_button_set_active ((GtkToggleButton *) w, FALSE); g_signal_connect (w, "toggled", G_CALLBACK (checkbox_task_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)framebox, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) framebox, w, FALSE, FALSE, 0); /* Journal */ w = gtk_check_button_new_with_mnemonic (_("_Journal entries")); - gtk_toggle_button_set_active ((GtkToggleButton *)w, FALSE); + gtk_toggle_button_set_active ((GtkToggleButton *) w, FALSE); g_signal_connect (w, "toggled", G_CALLBACK (checkbox_journal_toggle_cb), target); - gtk_box_pack_start ((GtkBox *)framebox, w, FALSE, FALSE, 0); + gtk_box_pack_start ((GtkBox *) framebox, w, FALSE, FALSE, 0); gtk_widget_show_all (framebox); @@ -474,8 +474,8 @@ pst_import_file (PstImporter *m) shell_backend = e_shell_get_backend_by_name (shell, "mail"); session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend)); - filename = g_filename_from_uri (((EImportTargetURI *)m->target)->uri_src, NULL, NULL); - m->parent_uri = g_strdup (((EImportTargetURI *)m->target)->uri_dest); /* Destination folder, was set in our widget */ + filename = g_filename_from_uri (((EImportTargetURI *) m->target)->uri_src, NULL, NULL); + m->parent_uri = g_strdup (((EImportTargetURI *) m->target)->uri_dest); /* Destination folder, was set in our widget */ camel_operation_push_message (NULL, _("Importing '%s'"), filename); @@ -741,7 +741,7 @@ pst_create_folder (PstImporter *m) shell_backend = e_shell_get_backend_by_name (shell, "mail"); session = e_mail_backend_get_session (E_MAIL_BACKEND (shell_backend)); - parent = ((EImportTargetURI *)m->target)->uri_dest; + parent = ((EImportTargetURI *) m->target)->uri_dest; dest = g_strdup (m->folder_uri); g_assert (g_str_has_prefix (dest, parent)); @@ -891,7 +891,7 @@ pst_process_email (PstImporter *m, pst_item *item) /*g_message (" Email headers... %s...", item->email->header);*/ stream = camel_stream_mem_new_with_buffer (item->email->header.str, strlen (item->email->header.str)); - if (!camel_data_wrapper_construct_from_stream_sync ((CamelDataWrapper *)msg, stream, NULL, NULL)) + if (!camel_data_wrapper_construct_from_stream_sync ((CamelDataWrapper *) msg, stream, NULL, NULL)) g_warning ("Error reading headers, skipped"); } else { @@ -1556,7 +1556,7 @@ pst_error_msg (const gchar *fmt, ...) static void pst_import_imported (PstImporter *m) { - e_import_complete (m->target->import, (EImportTarget *)m->target); + e_import_complete (m->target->import, (EImportTarget *) m->target); } static void @@ -1600,7 +1600,7 @@ pst_status_timeout (gpointer data) pc = importer->status_pc; g_mutex_unlock (importer->status_lock); - e_import_status (importer->target->import, (EImportTarget *)importer->target, what, pc); + e_import_status (importer->target->import, (EImportTarget *) importer->target, what, pc); } return TRUE; diff --git a/plugins/publish-calendar/publish-location.c b/plugins/publish-calendar/publish-location.c index d22bc4fa47..8db5ccb1b1 100644 --- a/plugins/publish-calendar/publish-location.c +++ b/plugins/publish-calendar/publish-location.c @@ -61,7 +61,7 @@ migrateURI (const gchar *xml, xmlDocPtr doc) frequency = xmlGetProp (root, (const guchar *)"frequency"); username = xmlGetProp (root, (const guchar *)"username"); - euri = e_uri_new ((const gchar *)location); + euri = e_uri_new ((const gchar *) location); if (!euri) { g_warning ("Could not form the uri for %s \n", location); @@ -71,7 +71,7 @@ migrateURI (const gchar *xml, xmlDocPtr doc) if (euri->user) g_free (euri->user); - euri->user = g_strdup ((const gchar *)username); + euri->user = g_strdup ((const gchar *) username); temp = e_uri_to_string (euri, FALSE); uri->location = g_strdup_printf ("dav://%s", strstr (temp, "//") + 2); @@ -79,9 +79,9 @@ migrateURI (const gchar *xml, xmlDocPtr doc) e_uri_free (euri); if (enabled != NULL) - uri->enabled = atoi ((gchar *)enabled); + uri->enabled = atoi ((gchar *) enabled); if (frequency != NULL) - uri->publish_frequency = atoi ((gchar *)frequency); + uri->publish_frequency = atoi ((gchar *) frequency); uri->publish_format = URI_PUBLISH_AS_FB; password = e_passwords_get_password ("Calendar", (gchar *)location); @@ -129,7 +129,7 @@ e_publish_uri_from_xml (const gchar *xml) GSList *events = NULL; EPublishUri *uri; - doc = xmlParseDoc ((const guchar *)xml); + doc = xmlParseDoc ((const guchar *) xml); if (doc == NULL) return NULL; @@ -154,18 +154,18 @@ e_publish_uri_from_xml (const gchar *xml) fb_duration_type = xmlGetProp (root, (xmlChar *)"fb_duration_type"); if (location != NULL) - uri->location = (gchar *)location; + uri->location = (gchar *) location; if (enabled != NULL) - uri->enabled = atoi ((gchar *)enabled); + uri->enabled = atoi ((gchar *) enabled); if (frequency != NULL) - uri->publish_frequency = atoi ((gchar *)frequency); + uri->publish_frequency = atoi ((gchar *) frequency); if (format != NULL) - uri->publish_format = atoi ((gchar *)format); + uri->publish_format = atoi ((gchar *) format); if (publish_time != NULL) - uri->last_pub_time = (gchar *)publish_time; + uri->last_pub_time = (gchar *) publish_time; if (fb_duration_value) - uri->fb_duration_value = atoi ((gchar *)fb_duration_value); + uri->fb_duration_value = atoi ((gchar *) fb_duration_value); else uri->fb_duration_value = -1; diff --git a/plugins/sa-junk-plugin/em-junk-filter.c b/plugins/sa-junk-plugin/em-junk-filter.c index 19df46826a..635e1192c4 100644 --- a/plugins/sa-junk-plugin/em-junk-filter.c +++ b/plugins/sa-junk-plugin/em-junk-filter.c @@ -866,7 +866,7 @@ em_junk_sa_init (void) G_UNLOCK (socket_path); gconf_client_notify_add(em_junk_sa_gconf, "/apps/evolution/mail/junk/sa", - (GConfClientNotifyFunc)em_junk_sa_setting_notify, + (GConfClientNotifyFunc) em_junk_sa_setting_notify, NULL, NULL, NULL); em_junk_sa_spamc_gconf_binary = gconf_client_get_string (em_junk_sa_gconf, "/apps/evolution/mail/junk/sa/spamc_binary", NULL); diff --git a/plugins/save-calendar/csv-format.c b/plugins/save-calendar/csv-format.c index 8bfec0df55..8692908544 100644 --- a/plugins/save-calendar/csv-format.c +++ b/plugins/save-calendar/csv-format.c @@ -96,10 +96,10 @@ add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type) needquotes = TRUE; switch (type) { case ECALCOMPONENTATTENDEE: - str = ((ECalComponentAttendee*)list->data)->value; + str = ((ECalComponentAttendee*) list->data)->value; break; case ECALCOMPONENTTEXT: - str = ((ECalComponentText*)list->data)->value; + str = ((ECalComponentText*) list->data)->value; break; case CONSTCHAR: default: @@ -109,7 +109,7 @@ add_list_to_csv (GString *line, GSList *list_in, CsvConfig *config, gint type) if (!needquotes) needquotes = string_needsquotes (str, config); if (str) - tmp = g_string_append (tmp, (const gchar *)str); + tmp = g_string_append (tmp, (const gchar *) str); list = g_slist_next (list); cnt++; if (list) tmp = g_string_append (tmp, config->delimiter); @@ -248,7 +248,7 @@ add_string_to_csv (GString *line, const gchar *value, CsvConfig *config) if (needquotes) line = g_string_append (line, config->quote); - line = g_string_append (line, (const gchar *)value); + line = g_string_append (line, (const gchar *) value); if (needquotes) line = g_string_append (line, config->quote); } diff --git a/plugins/save-calendar/rdf-format.c b/plugins/save-calendar/rdf-format.c index 462f4f2a31..084250e70c 100644 --- a/plugins/save-calendar/rdf-format.c +++ b/plugins/save-calendar/rdf-format.c @@ -101,10 +101,10 @@ add_list_to_rdf (xmlNodePtr node, const gchar *tag, GSList *list_in, gint type) switch (type) { case ECALCOMPONENTATTENDEE: - str = ((ECalComponentAttendee*)list->data)->value; + str = ((ECalComponentAttendee*) list->data)->value; break; case ECALCOMPONENTTEXT: - str = ((ECalComponentText*)list->data)->value; + str = ((ECalComponentText*) list->data)->value; break; case CONSTCHAR: default: @@ -124,7 +124,7 @@ add_nummeric_to_rdf (xmlNodePtr node, const gchar *tag, gint *nummeric) { if (nummeric) { gchar *value = g_strdup_printf ("%d", *nummeric); - xmlNodePtr cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)value); + xmlNodePtr cur_node = xmlNewChild (node, NULL, (guchar *) tag, (guchar *) value); xmlSetProp (cur_node, (const guchar *)"rdf:datatype", (const guchar *)"http://www.w3.org/2001/XMLSchema#integer"); g_free (value); } @@ -146,7 +146,7 @@ add_time_to_rdf (xmlNodePtr node, const gchar *tag, icaltimetype *time) * */ e_utf8_strftime (str, 200, _("%FT%T"), &mytm); - cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)str); + cur_node = xmlNewChild (node, NULL, (guchar *) tag, (guchar *) str); /* Not sure about this property */ timezone = calendar_config_get_timezone (); @@ -163,7 +163,7 @@ add_string_to_rdf (xmlNodePtr node, const gchar *tag, const gchar *value) { if (value) { xmlNodePtr cur_node = NULL; - cur_node = xmlNewChild (node, NULL, (guchar *)tag, (guchar *)value); + cur_node = xmlNewChild (node, NULL, (guchar *) tag, (guchar *) value); xmlSetProp (cur_node, (const guchar *)"rdf:datatype", (const guchar *)"http://www.w3.org/2001/XMLSchema#string"); } } diff --git a/plugins/templates/templates.c b/plugins/templates/templates.c index b97926adfe..6f287c3168 100644 --- a/plugins/templates/templates.c +++ b/plugins/templates/templates.c @@ -655,7 +655,7 @@ fill_template (CamelMimeMessage *message, CamelMimePart *template) camel_data_wrapper_decode_to_stream_sync (camel_medium_get_content (CAMEL_MEDIUM (message_part)), stream, NULL, NULL); camel_stream_flush (stream, NULL, NULL); byte_array = camel_stream_mem_get_byte_array (CAMEL_STREAM_MEM (stream)); - message_body = g_string_new_len ((gchar *)byte_array->data, byte_array->len); + message_body = g_string_new_len ((gchar *) byte_array->data, byte_array->len); g_object_unref (stream); if (template_html && !message_html) { @@ -836,7 +836,7 @@ action_reply_with_template_cb (GtkAction *action, template = camel_folder_get_message_sync (template_folder, uid, NULL, NULL); mail_get_message (folder, uids->pdata[0], create_new_message, - (gpointer)template, mail_msg_unordered_push); + (gpointer) template, mail_msg_unordered_push); g_object_unref (G_OBJECT (action)); diff --git a/plugins/tnef-attachments/tnef-plugin.c b/plugins/tnef-attachments/tnef-plugin.c index 0f97512757..0a87418f01 100644 --- a/plugins/tnef-attachments/tnef-plugin.c +++ b/plugins/tnef-attachments/tnef-plugin.c @@ -103,7 +103,7 @@ org_gnome_format_tnef (gpointer ep, EMFormatHookTarget *t) out = camel_stream_fs_new_with_name (name, O_RDWR|O_CREAT, 0666, NULL); if (out == NULL) goto fail; - content = camel_medium_get_content ((CamelMedium *)t->part); + content = camel_medium_get_content ((CamelMedium *) t->part); if (content == NULL) goto fail; if (camel_data_wrapper_decode_to_stream_sync (content, out, NULL, NULL) == -1 @@ -134,7 +134,7 @@ org_gnome_format_tnef (gpointer ep, EMFormatHookTarget *t) camel_data_wrapper_set_mime_type((CamelDataWrapper *)mp, "multipart/mixed"); camel_multipart_set_boundary (mp, NULL); - camel_medium_set_content ((CamelMedium *)mainpart, (CamelDataWrapper *)mp); + camel_medium_set_content ((CamelMedium *) mainpart, (CamelDataWrapper *) mp); while ((d = readdir (dir))) { CamelMimePart *part; @@ -159,12 +159,12 @@ org_gnome_format_tnef (gpointer ep, EMFormatHookTarget *t) part = camel_mime_part_new (); camel_mime_part_set_encoding (part, CAMEL_TRANSFER_ENCODING_BINARY); - camel_medium_set_content ((CamelMedium *)part, content); + camel_medium_set_content ((CamelMedium *) part, content); g_object_unref (content); type = em_format_snoop_type (part); if (type) - camel_data_wrapper_set_mime_type ((CamelDataWrapper *)part, type); + camel_data_wrapper_set_mime_type ((CamelDataWrapper *) part, type); camel_mime_part_set_filename (part, d->d_name); @@ -930,7 +930,7 @@ void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir) { filename = NULL; if ((filename=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_LONG, 0x8201))) != MAPI_UNDEFINED) { - dword_ptr = (DWORD*)filename->data; + dword_ptr = (DWORD*) filename->data; fprintf(fptr, "SEQUENCE:%i\n", (gint) *dword_ptr); } if ((filename=MAPIFindProperty (&(tnef->MapiProperties), @@ -1092,7 +1092,7 @@ void saveVCalendar (TNEFStruct *tnef, const gchar *tmpdir) { filename = NULL; if ((filename=MAPIFindUserProp (&(tnef->MapiProperties), PROP_TAG (PT_BOOLEAN, 0x8506))) != MAPI_UNDEFINED) { - dword_ptr = (DWORD*)filename->data; + dword_ptr = (DWORD*) filename->data; fprintf(fptr, "CLASS:" ); if (*dword_ptr == 1) { fprintf(fptr,"PRIVATE\n"); @@ -1226,7 +1226,7 @@ void saveVTask (TNEFStruct *tnef, const gchar *tmpdir) { filename = MAPIFindUserProp (&(tnef->MapiProperties), \ PROP_TAG (PT_BOOLEAN, 0x8506)); if (filename != MAPI_UNDEFINED) { - dword_ptr = (DWORD*)filename->data; + dword_ptr = (DWORD*) filename->data; fprintf(fptr, "CLASS:" ); if (*dword_ptr == 1) { fprintf(fptr,"PRIVATE\n"); diff --git a/shell/e-shell-window.c b/shell/e-shell-window.c index 1ba075d957..7d8e6c5f85 100644 --- a/shell/e-shell-window.c +++ b/shell/e-shell-window.c @@ -362,11 +362,11 @@ shell_window_construct_menubar (EShellWindow *shell_window) parent = gtk_widget_get_parent (main_menu); g_object_ref (parent); - gtk_container_remove ((GtkContainer *)parent, main_menu); + gtk_container_remove ((GtkContainer *) parent, main_menu); child = gtk_hbox_new (FALSE, 0); - gtk_box_pack_start ((GtkBox *)child, main_menu, TRUE, TRUE, 0); + gtk_box_pack_start ((GtkBox *) child, main_menu, TRUE, TRUE, 0); gtk_widget_show (child); - gtk_container_add ((GtkContainer *)parent, child); + gtk_container_add ((GtkContainer *) parent, child); shell_window->priv->menubar_box = child; g_object_bind_property ( diff --git a/shell/es-event.c b/shell/es-event.c index 6fc6751d3a..f079afd8b5 100644 --- a/shell/es-event.c +++ b/shell/es-event.c @@ -44,7 +44,7 @@ eme_init (GObject *o) static void eme_finalise (GObject *o) { - ((GObjectClass *)eme_parent)->finalize (o); + ((GObjectClass *) eme_parent)->finalize (o); } static void @@ -52,20 +52,20 @@ eme_target_free (EEvent *ep, EEventTarget *t) { switch (t->type) { case ES_EVENT_TARGET_STATE: { - ESEventTargetState *s = (ESEventTargetState *)t; + ESEventTargetState *s = (ESEventTargetState *) t; s = s; break; } } - ((EEventClass *)eme_parent)->target_free (ep, t); + ((EEventClass *) eme_parent)->target_free (ep, t); } static void eme_class_init (GObjectClass *klass) { klass->finalize = eme_finalise; - ((EEventClass *)klass)->target_free = eme_target_free; + ((EEventClass *) klass)->target_free = eme_target_free; } GType @@ -77,10 +77,10 @@ es_event_get_type (void) static const GTypeInfo info = { sizeof (ESEventClass), NULL, NULL, - (GClassInitFunc)eme_class_init, + (GClassInitFunc) eme_class_init, NULL, NULL, sizeof (ESEvent), 0, - (GInstanceInitFunc)eme_init + (GInstanceInitFunc) eme_init }; eme_parent = g_type_class_ref (e_event_get_type ()); type = g_type_register_static(e_event_get_type(), "ESEvent", &info, 0); @@ -189,7 +189,7 @@ emeh_finalise (GObject *o) { /*EPluginHook *eph = (EPluginHook *)o;*/ - ((GObjectClass *)emeh_parent_class)->finalize (o); + ((GObjectClass *) emeh_parent_class)->finalize (o); } static void @@ -204,13 +204,13 @@ emeh_class_init (EPluginHookClass *klass) * A hook for events coming from the shell. **/ - ((GObjectClass *)klass)->finalize = emeh_finalise; + ((GObjectClass *) klass)->finalize = emeh_finalise; ((EPluginHookClass *)klass)->id = "org.gnome.evolution.shell.events:1.0"; for (i=0;emeh_targets[i].type;i++) - e_event_hook_class_add_target_map ((EEventHookClass *)klass, &emeh_targets[i]); + e_event_hook_class_add_target_map ((EEventHookClass *) klass, &emeh_targets[i]); - ((EEventHookClass *)klass)->event = (EEvent *)es_event_peek (); + ((EEventHookClass *) klass)->event = (EEvent *) es_event_peek (); } GType diff --git a/smclient/eggdesktopfile.c b/smclient/eggdesktopfile.c index 21f2e38209..1d094ad181 100644 --- a/smclient/eggdesktopfile.c +++ b/smclient/eggdesktopfile.c @@ -948,11 +948,11 @@ start_startup_notification (GdkDisplay *display, launch_time = gdk_x11_display_get_user_time (display); startup_id = g_strdup_printf ("%s-%lu-%s-%s-%d_TIME%lu", g_get_prgname (), - (unsigned long)getpid (), + (unsigned long) getpid (), g_get_host_name (), argv0, sequence++, - (unsigned long)launch_time); + (unsigned long) launch_time); description = g_strdup_printf (_("Starting %s"), desktop_file->name); screen_str = g_strdup_printf ("%d", screen); @@ -1266,7 +1266,7 @@ egg_desktop_file_launchv (EggDesktopFile *desktop_file, out: if (env) { - g_ptr_array_foreach (env, (GFunc)g_free, NULL); + g_ptr_array_foreach (env, (GFunc) g_free, NULL); g_ptr_array_free (env, TRUE); } free_document_list (translated_documents); diff --git a/smclient/eggsmclient-xsmp.c b/smclient/eggsmclient-xsmp.c index c838766da7..c246e17081 100644 --- a/smclient/eggsmclient-xsmp.c +++ b/smclient/eggsmclient-xsmp.c @@ -248,7 +248,7 @@ sm_client_xsmp_set_initial_properties (gpointer user_data) if (cmdline && g_shell_parse_argv (cmdline, &argc, &argv, &err)) { egg_sm_client_set_restart_command (EGG_SM_CLIENT (xsmp), - argc, (const gchar **)argv); + argc, (const gchar **) argv); g_strfreev (argv); } else @@ -323,7 +323,7 @@ static void sm_client_xsmp_startup (EggSMClient *client, const gchar *client_id) { - EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client; + EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client; SmcCallbacks callbacks; gchar *ret_client_id; gchar error_string_ret[256]; @@ -401,7 +401,7 @@ sm_client_xsmp_set_restart_command (EggSMClient *client, gint argc, const gchar **argv) { - EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client; + EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client; gint i; g_strfreev (xsmp->restart_command); @@ -418,7 +418,7 @@ static void sm_client_xsmp_will_quit (EggSMClient *client, gboolean will_quit) { - EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client; + EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client; if (xsmp->state == XSMP_STATE_CONNECTION_CLOSED) { @@ -457,7 +457,7 @@ sm_client_xsmp_end_session (EggSMClient *client, EggSMClientEndStyle style, gboolean request_confirmation) { - EggSMClientXSMP *xsmp = (EggSMClientXSMP *)client; + EggSMClientXSMP *xsmp = (EggSMClientXSMP *) client; gint save_type; /* To end the session via XSMP, we have to send a @@ -792,7 +792,7 @@ save_state (EggSMClientXSMP *xsmp) */ xsmp->state = XSMP_STATE_SAVE_YOURSELF; - state_file = egg_sm_client_save_state ((EggSMClient *)xsmp); + state_file = egg_sm_client_save_state ((EggSMClient *) xsmp); if (!state_file) { restart = generate_command (xsmp->restart_command, xsmp->client_id, NULL); @@ -851,7 +851,7 @@ save_state (EggSMClientXSMP *xsmp) restart->pdata[i] = g_shell_quote (restart->pdata[i]); g_ptr_array_add (restart, NULL); exec = g_strjoinv (" ", (gchar **)restart->pdata); - g_strfreev ((gchar **)restart->pdata); + g_strfreev ((gchar **) restart->pdata); g_ptr_array_free (restart, FALSE); g_key_file_set_string (state_file, EGG_DESKTOP_FILE_GROUP, @@ -880,7 +880,7 @@ save_state (EggSMClientXSMP *xsmp) g_get_user_config_dir (), G_DIR_SEPARATOR, G_DIR_SEPARATOR, g_get_prgname (), - (long)time (NULL) + offset, + (long) time (NULL) + offset, desktop_file ? "desktop" : "state"); fd = open (state_file_path, O_WRONLY | O_CREAT | O_EXCL, 0644); @@ -1066,13 +1066,13 @@ generate_command (gchar **restart_command, const gchar *client_id, if (client_id) { g_ptr_array_add (cmd, (gchar *)"--sm-client-id"); - g_ptr_array_add (cmd, (gchar *)client_id); + g_ptr_array_add (cmd, (gchar *) client_id); } if (state_file) { g_ptr_array_add (cmd, (gchar *)"--sm-client-state-file"); - g_ptr_array_add (cmd, (gchar *)state_file); + g_ptr_array_add (cmd, (gchar *) state_file); } for (i = 1; restart_command[i]; i++) @@ -1103,7 +1103,7 @@ set_properties (EggSMClientXSMP *xsmp, ...) if (xsmp->connection) { SmcSetProperties (xsmp->connection, props->len, - (SmProp **)props->pdata); + (SmProp **) props->pdata); } for (i = 0; i < props->len; i++) @@ -1134,7 +1134,7 @@ delete_properties (EggSMClientXSMP *xsmp, ...) va_end (ap); SmcDeleteProperties (xsmp->connection, props->len, - (gchar **)props->pdata); + (gchar **) props->pdata); g_ptr_array_free (props, TRUE); } @@ -1153,8 +1153,8 @@ array_prop (const gchar *name, ...) va_list ap; prop = g_new (SmProp, 1); - prop->name = (gchar *)name; - prop->type = (gchar *)SmLISTofARRAY8; + prop->name = (gchar *) name; + prop->type = (gchar *) SmLISTofARRAY8; vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); @@ -1167,7 +1167,7 @@ array_prop (const gchar *name, ...) } prop->num_vals = vals->len; - prop->vals = (SmPropValue *)vals->data; + prop->vals = (SmPropValue *) vals->data; g_array_free (vals, FALSE); @@ -1187,8 +1187,8 @@ ptrarray_prop (const gchar *name, GPtrArray *values) guint i; prop = g_new (SmProp, 1); - prop->name = (gchar *)name; - prop->type = (gchar *)SmLISTofARRAY8; + prop->name = (gchar *) name; + prop->type = (gchar *) SmLISTofARRAY8; vals = g_array_new (FALSE, FALSE, sizeof (SmPropValue)); @@ -1200,7 +1200,7 @@ ptrarray_prop (const gchar *name, GPtrArray *values) } prop->num_vals = vals->len; - prop->vals = (SmPropValue *)vals->data; + prop->vals = (SmPropValue *) vals->data; g_array_free (vals, FALSE); @@ -1217,14 +1217,14 @@ string_prop (const gchar *name, const gchar *value) SmProp *prop; prop = g_new (SmProp, 1); - prop->name = (gchar *)name; - prop->type = (gchar *)SmARRAY8; + prop->name = (gchar *) name; + prop->type = (gchar *) SmARRAY8; prop->num_vals = 1; prop->vals = g_new (SmPropValue, 1); prop->vals[0].length = strlen (value); - prop->vals[0].value = (gchar *)value; + prop->vals[0].value = (gchar *) value; return prop; } @@ -1242,8 +1242,8 @@ card8_prop (const gchar *name, guchar value) */ prop = g_new (SmProp, 1); - prop->name = (gchar *)name; - prop->type = (gchar *)SmCARD8; + prop->name = (gchar *) name; + prop->type = (gchar *) SmCARD8; prop->num_vals = 1; prop->vals = g_new (SmPropValue, 2); diff --git a/smime/gui/ca-trust-dialog.c b/smime/gui/ca-trust-dialog.c index a8169dd2e7..887af30277 100644 --- a/smime/gui/ca-trust-dialog.c +++ b/smime/gui/ca-trust-dialog.c @@ -102,7 +102,7 @@ ca_trust_dialog_show (ECert *cert, gboolean importing) w = e_builder_get_widget(ctd_data->builder, "ca-trust-label"); txt = g_strdup_printf(_("Certificate '%s' is a CA certificate.\n\nEdit trust settings:"), e_cert_get_cn(cert)); - gtk_label_set_text ((GtkLabel *)w, txt); + gtk_label_set_text ((GtkLabel *) w, txt); g_free (txt); g_signal_connect (ctd_data->dialog, "response", G_CALLBACK (catd_response), ctd_data); diff --git a/smime/gui/cert-trust-dialog.c b/smime/gui/cert-trust-dialog.c index 4f13ff2b74..7c76b01b88 100644 --- a/smime/gui/cert-trust-dialog.c +++ b/smime/gui/cert-trust-dialog.c @@ -140,11 +140,11 @@ cert_trust_dialog_show (ECert *cert) icert = e_cert_get_internal_cert (ctd_data->cacert); if (e_cert_trust_has_trusted_ca (icert->trust, FALSE, TRUE, FALSE)) - gtk_label_set_text ((GtkLabel *)ctd_data->label, + gtk_label_set_text ((GtkLabel *) ctd_data->label, _("Because you trust the certificate authority that issued this certificate, " "then you trust the authenticity of this certificate unless otherwise indicated here")); else - gtk_label_set_text ((GtkLabel *)ctd_data->label, + gtk_label_set_text ((GtkLabel *) ctd_data->label, _("Because you do not trust the certificate authority that issued this certificate, " "then you do not trust the authenticity of this certificate unless otherwise indicated here")); diff --git a/smime/gui/certificate-manager.c b/smime/gui/certificate-manager.c index 624059c902..4d95a67364 100644 --- a/smime/gui/certificate-manager.c +++ b/smime/gui/certificate-manager.c @@ -1055,7 +1055,7 @@ load_certs (CertificateManagerData *cfm, for (node = CERT_LIST_HEAD (certList); !CERT_LIST_END (node, certList); node = CERT_LIST_NEXT (node)) { - ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*)node->cert)); + ECert *cert = e_cert_new (CERT_DupCertificate ((CERTCertificate*) node->cert)); ECertType ct = e_cert_get_cert_type (cert); /* show everything else in a contact tab */ diff --git a/smime/gui/certificate-viewer.c b/smime/gui/certificate-viewer.c index c78bd77a75..78a160b707 100644 --- a/smime/gui/certificate-viewer.c +++ b/smime/gui/certificate-viewer.c @@ -49,7 +49,7 @@ free_data (gpointer data, GObject *where_the_object_was) { CertificateViewerData *cvm = data; - g_list_foreach (cvm->cert_chain, (GFunc)g_object_unref, NULL); + g_list_foreach (cvm->cert_chain, (GFunc) g_object_unref, NULL); g_list_free (cvm->cert_chain); g_object_unref (cvm->builder); @@ -169,7 +169,7 @@ populate_fields_tree (CertificateViewerData *cvm_data, EASN1Object *asn1, GtkTre populate_fields_tree (cvm_data, subasn1, &new_iter); } } - g_list_foreach (children, (GFunc)g_object_unref, NULL); + g_list_foreach (children, (GFunc) g_object_unref, NULL); g_list_free (children); } } diff --git a/smime/gui/e-cert-selector.c b/smime/gui/e-cert-selector.c index f20baa582c..c88f044e9b 100644 --- a/smime/gui/e-cert-selector.c +++ b/smime/gui/e-cert-selector.c @@ -91,7 +91,7 @@ e_cert_selector_response (GtkDialog *dialog, gint button) switch (button) { case GTK_RESPONSE_OK: - node = ecs_find_current ((ECertSelector *)dialog); + node = ecs_find_current ((ECertSelector *) dialog); break; default: node = NULL; @@ -117,7 +117,7 @@ ecs_cert_changed (GtkWidget *w, ECertSelector *ecs) g_string_append_printf(text, _("Issued by:\n Subject: %s\n"), node->cert->issuerName); } - buffer = gtk_text_view_get_buffer ((GtkTextView *)p->description); + buffer = gtk_text_view_get_buffer ((GtkTextView *) p->description); gtk_text_buffer_set_text (buffer, text->str, text->len); g_string_free (text, TRUE); } @@ -218,7 +218,7 @@ e_cert_selector_new (gint type, const gchar *currentid) static void e_cert_selector_init (ECertSelector *ecs) { - gtk_dialog_add_buttons ((GtkDialog *)ecs, + gtk_dialog_add_buttons ((GtkDialog *) ecs, GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL, GTK_STOCK_OK, GTK_RESPONSE_OK, NULL); @@ -228,21 +228,21 @@ e_cert_selector_init (ECertSelector *ecs) static void e_cert_selector_finalise (GObject *o) { - ECertSelector *ecs = (ECertSelector *)o; + ECertSelector *ecs = (ECertSelector *) o; if (ecs->priv->certlist) CERT_DestroyCertList (ecs->priv->certlist); g_free (ecs->priv); - ((GObjectClass *)e_cert_selector_parent_class)->finalize (o); + ((GObjectClass *) e_cert_selector_parent_class)->finalize (o); } static void e_cert_selector_class_init (ECertSelectorClass *klass) { - ((GObjectClass *)klass)->finalize = e_cert_selector_finalise; - ((GtkDialogClass *)klass)->response = e_cert_selector_response; + ((GObjectClass *) klass)->finalize = e_cert_selector_finalise; + ((GtkDialogClass *) klass)->response = e_cert_selector_response; ecs_signals[ECS_SELECTED] = g_signal_new("selected", diff --git a/smime/lib/e-asn1-object.c b/smime/lib/e-asn1-object.c index d858a53579..eb8863f46e 100644 --- a/smime/lib/e-asn1-object.c +++ b/smime/lib/e-asn1-object.c @@ -76,7 +76,7 @@ e_asn1_object_dispose (GObject *object) if (obj->priv->value) g_free (obj->priv->value); - g_list_foreach (obj->priv->children, (GFunc)g_object_unref, NULL); + g_list_foreach (obj->priv->children, (GFunc) g_object_unref, NULL); g_list_free (obj->priv->children); g_free (obj->priv); @@ -238,7 +238,7 @@ build_from_der (EASN1Object *parent, gchar *data, gchar *end) return FALSE; } data++; - len = get_der_item_length ((guchar *)data, (guchar *)end, &bytesUsed, &indefinite); + len = get_der_item_length ((guchar *) data, (guchar *) end, &bytesUsed, &indefinite); data += bytesUsed; if ((len < 0) || ((data+len) > end)) return FALSE; @@ -336,7 +336,7 @@ e_asn1_object_get_children (EASN1Object *obj) { GList *children = g_list_copy (obj->priv->children); - g_list_foreach (children, (GFunc)g_object_ref, NULL); + g_list_foreach (children, (GFunc) g_object_ref, NULL); return children; } diff --git a/smime/lib/e-cert-db.c b/smime/lib/e-cert-db.c index 4b70b1118d..a5fbbbed23 100644 --- a/smime/lib/e-cert-db.c +++ b/smime/lib/e-cert-db.c @@ -321,7 +321,7 @@ collect_certs (gpointer arg, SECItem **certs, gint numcerts) SECItem *cert; SECStatus rv; - collectArgs = (CERTDERCerts *)arg; + collectArgs = (CERTDERCerts *) arg; collectArgs->numcerts = numcerts; collectArgs->rawCerts = (SECItem *) PORT_ArenaZAlloc ( @@ -349,7 +349,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena, { /*nsNSSShutDownPreventionLock locker;*/ CERTDERCerts *collectArgs = - (CERTDERCerts *)PORT_ArenaZAlloc (arena, sizeof (CERTDERCerts)); + (CERTDERCerts *) PORT_ArenaZAlloc (arena, sizeof (CERTDERCerts)); SECStatus sec_rv; if (!collectArgs) @@ -358,7 +358,7 @@ e_cert_db_get_certs_from_package (PRArenaPool *arena, collectArgs->arena = arena; sec_rv = CERT_DecodeCertPackage (data, length, collect_certs, - (gpointer)collectArgs); + (gpointer) collectArgs); if (sec_rv != SECSuccess) return NULL; @@ -644,9 +644,9 @@ e_cert_db_find_cert_by_nickname (ECertDB *certdb, CERTCertificate *cert = NULL; /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Getting \"%s\"\n", asciiname));*/ - cert = PK11_FindCertFromNickname ((gchar *)nickname, NULL); + cert = PK11_FindCertFromNickname ((gchar *) nickname, NULL); if (!cert) { - cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (), (gchar *)nickname); + cert = CERT_FindCertByNickname (CERT_GetDefaultCertDB (), (gchar *) nickname); } if (cert) { @@ -679,7 +679,7 @@ e_cert_db_find_cert_by_key (ECertDB *certdb, } dummy = NSSBase64_DecodeBuffer (NULL, &keyItem, db_key, - (PRUint32)PL_strlen (db_key)); + (PRUint32) PL_strlen (db_key)); /* someday maybe we can speed up the search using the moduleID and slotID*/ moduleID = NS_NSS_GET_LONG (keyItem.data); @@ -880,7 +880,7 @@ handle_ca_cert_download (ECertDB *cert_db, GList *certs, GError **error) return FALSE; } - der.data = (guchar *)raw_der; + der.data = (guchar *) raw_der; { /*PR_LOG(gPIPNSSLog, PR_LOG_DEBUG, ("Creating temp cert\n"));*/ @@ -1074,10 +1074,10 @@ e_cert_db_import_certs (ECertDB *certdb, SECItem *currItem = &certCollection->rawCerts[i]; ECert *cert; - cert = e_cert_new_from_der ((gchar *)currItem->data, currItem->len); + cert = e_cert_new_from_der ((gchar *) currItem->data, currItem->len); if (!cert) { set_nss_error (error); - g_list_foreach (certs, (GFunc)g_object_unref, NULL); + g_list_foreach (certs, (GFunc) g_object_unref, NULL); g_list_free (certs); PORT_FreeArena (arena, PR_FALSE); return FALSE; @@ -1109,7 +1109,7 @@ e_cert_db_import_certs (ECertDB *certdb, rv = FALSE; } - g_list_foreach (certs, (GFunc)g_object_unref, NULL); + g_list_foreach (certs, (GFunc) g_object_unref, NULL); g_list_free (certs); PORT_FreeArena (arena, PR_FALSE); return rv; @@ -1138,7 +1138,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), certCollection->rawCerts, - (gchar *)NULL, PR_FALSE, PR_TRUE); + (gchar *) NULL, PR_FALSE, PR_TRUE); if (!cert) { set_nss_error (error); rv = FALSE; @@ -1172,7 +1172,7 @@ e_cert_db_import_email_cert (ECertDB *certdb, SECItem *currItem = &certCollection->rawCerts[i]; ECert *cert; - cert = e_cert_new_from_der ((gchar *)currItem->data, currItem->len); + cert = e_cert_new_from_der ((gchar *) currItem->data, currItem->len); if (cert) *imported_certs = g_slist_prepend (*imported_certs, cert); } @@ -1342,7 +1342,7 @@ e_cert_db_import_user_cert (ECertDB *certdb, } cert = CERT_NewTempCertificate (CERT_GetDefaultCertDB (), collectArgs->rawCerts, - (gchar *)NULL, PR_FALSE, PR_TRUE); + (gchar *) NULL, PR_FALSE, PR_TRUE); if (!cert) { set_nss_error (error); goto loser; diff --git a/smime/lib/e-cert.c b/smime/lib/e-cert.c index a7605a42ce..e4e32d4948 100644 --- a/smime/lib/e-cert.c +++ b/smime/lib/e-cert.c @@ -1032,7 +1032,7 @@ process_name (CERTName *name, gchar **value) return FALSE; } - avavalue = g_string_new_len ((gchar *)decodeItem->data, decodeItem->len); + avavalue = g_string_new_len ((gchar *) decodeItem->data, decodeItem->len); SECITEM_FreeItem (decodeItem, PR_TRUE); diff --git a/smime/lib/e-pkcs12.c b/smime/lib/e-pkcs12.c index 6b7b7ae63c..4cc4fb90d1 100644 --- a/smime/lib/e-pkcs12.c +++ b/smime/lib/e-pkcs12.c @@ -402,8 +402,8 @@ nickname_collision (SECItem *oldNick, PRBool *cancel, gpointer wincx) new_nick = PR_Malloc (sizeof (SECItem)); new_nick->type = siAsciiString; - new_nick->data = (guchar *)nickname; - new_nick->len = strlen ((gchar *)new_nick->data); + new_nick->data = (guchar *) nickname; + new_nick->len = strlen ((gchar *) new_nick->data); return new_nick; } diff --git a/widgets/menus/gal-define-views-model.c b/widgets/menus/gal-define-views-model.c index 50ac7f1ac1..2ce1d46531 100644 --- a/widgets/menus/gal-define-views-model.c +++ b/widgets/menus/gal-define-views-model.c @@ -181,7 +181,7 @@ gdvm_initialize_value (ETableModel *etc, gint col) static gboolean gdvm_value_is_empty (ETableModel *etc, gint col, gconstpointer value) { - return !(value && *(gchar *)value); + return !(value && *(gchar *) value); } static gchar * diff --git a/widgets/menus/gal-view-new-dialog.c b/widgets/menus/gal-view-new-dialog.c index 5b9f8f12da..278e096125 100644 --- a/widgets/menus/gal-view-new-dialog.c +++ b/widgets/menus/gal-view-new-dialog.c @@ -162,7 +162,7 @@ selection_func (GtkTreeSelection *selection, gtk_tree_model_get_iter (GTK_TREE_MODEL (dialog->list_store), &iter, - (GtkTreePath*)path); + (GtkTreePath*) path); gtk_tree_model_get (GTK_TREE_MODEL (dialog->list_store), &iter, diff --git a/widgets/misc/e-buffer-tagger.c b/widgets/misc/e-buffer-tagger.c index cc2444d607..c6ddd99e0e 100644 --- a/widgets/misc/e-buffer-tagger.c +++ b/widgets/misc/e-buffer-tagger.c @@ -424,7 +424,7 @@ textview_event_after (GtkTextView *textview, GdkEvent *ev) g_return_val_if_fail (GTK_IS_TEXT_VIEW (textview), FALSE); if (ev->type == GDK_KEY_PRESS || ev->type == GDK_KEY_RELEASE) { - GdkEventKey *event_key = (GdkEventKey *)ev; + GdkEventKey *event_key = (GdkEventKey *) ev; switch (event_key->keyval) { case GDK_KEY_Control_L: @@ -448,7 +448,7 @@ textview_event_after (GtkTextView *textview, GdkEvent *ev) if (ev->type != GDK_BUTTON_RELEASE) return FALSE; - event = (GdkEventButton *)ev; + event = (GdkEventButton *) ev; if (event->button != 1 || (event->state & GDK_CONTROL_MASK) == 0) return FALSE; diff --git a/widgets/misc/e-image-chooser.c b/widgets/misc/e-image-chooser.c index 3e9a976c18..e21d1c6c67 100644 --- a/widgets/misc/e-image-chooser.c +++ b/widgets/misc/e-image-chooser.c @@ -96,15 +96,15 @@ set_image_from_data (EImageChooser *chooser, || chooser->priv->image_width < new_width) { /* we need to scale down */ if (new_height > new_width) - scale = (gfloat)chooser->priv->image_height / new_height; + scale = (gfloat) chooser->priv->image_height / new_height; else - scale = (gfloat)chooser->priv->image_width / new_width; + scale = (gfloat) chooser->priv->image_width / new_width; } else { /* we need to scale up */ if (new_height > new_width) - scale = (gfloat)new_height / chooser->priv->image_height; + scale = (gfloat) new_height / chooser->priv->image_height; else - scale = (gfloat)new_width / chooser->priv->image_width; + scale = (gfloat) new_width / chooser->priv->image_width; } if (scale == 1.0) { diff --git a/widgets/misc/e-import-assistant.c b/widgets/misc/e-import-assistant.c index 99c49ea32e..a87f7ce040 100644 --- a/widgets/misc/e-import-assistant.c +++ b/widgets/misc/e-import-assistant.c @@ -669,7 +669,7 @@ prepare_file_page (GtkAssistant *assistant, } page->target = e_import_target_new_uri (priv->import, NULL, NULL); - importers = e_import_get_importers (priv->import, (EImportTarget *)page->target); + importers = e_import_get_importers (priv->import, (EImportTarget *) page->target); store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (page->filetype))); gtk_list_store_clear (store); @@ -777,7 +777,7 @@ prepare_progress_page (GtkAssistant *assistant, if (is_simple) { priv->import_importer = priv->simple_page.importer; - priv->import_target = (EImportTarget *)priv->simple_page.target; + priv->import_target = (EImportTarget *) priv->simple_page.target; done = import_simple_done; } else if (intelligent_import) { page->current = page->importers; @@ -789,7 +789,7 @@ prepare_progress_page (GtkAssistant *assistant, } else { if (priv->file_page.importer) { priv->import_importer = priv->file_page.importer; - priv->import_target = (EImportTarget *)priv->file_page.target; + priv->import_target = (EImportTarget *) priv->file_page.target; done = import_done; } } @@ -868,7 +868,7 @@ prepare_simple_page (GtkAssistant *assistant, GtkWidget *vbox) uri = g_ptr_array_remove_index (priv->fileuris, 0); page->target = e_import_target_new_uri (priv->import, uri, NULL); g_free (uri); - importers = e_import_get_importers (priv->import, (EImportTarget *)page->target); + importers = e_import_get_importers (priv->import, (EImportTarget *) page->target); store = GTK_LIST_STORE (gtk_combo_box_get_model (GTK_COMBO_BOX (page->filetype))); gtk_list_store_clear (store); @@ -908,7 +908,7 @@ prepare_simple_page (GtkAssistant *assistant, GtkWidget *vbox) title = g_strconcat ( _("Import Data"), " - ", - ((EImportImporter *)importers->data)->name, NULL); + ((EImportImporter *) importers->data)->name, NULL); gtk_assistant_set_page_title (assistant, vbox, title); g_free (title); } else { diff --git a/widgets/misc/e-searching-tokenizer.c b/widgets/misc/e-searching-tokenizer.c index 3e7cb7f1dd..0955779534 100644 --- a/widgets/misc/e-searching-tokenizer.c +++ b/widgets/misc/e-searching-tokenizer.c @@ -667,7 +667,7 @@ searcher_next_token (struct _searcher *s) while (g_queue_is_empty (&s->output)) { /* get next token */ - tok = (guchar *)s->next_token (s->next_data); + tok = (guchar *) s->next_token (s->next_data); if (tok == NULL) { output_subpending (s); output_pending (s); @@ -675,15 +675,15 @@ searcher_next_token (struct _searcher *s) } /* we dont always have to copy each token, e.g. if we dont match anything */ - token = append_token (&s->input, (gchar *)tok, -1); + token = append_token (&s->input, (gchar *) tok, -1); token->offset = s->offset; - tok = (guchar *)token->tok; + tok = (guchar *) token->tok; d (printf("new token %d '%s'\n", token->offset, token->tok[0]==TAG_ESCAPE?token->tok+1:token->tok)); /* tag test, reset state on unknown tags */ if (tok[0] == TAG_ESCAPE) { - if (!ignore_tag ((gchar *)tok)) { + if (!ignore_tag ((gchar *) tok)) { /* force reset */ output_subpending (s); output_pending (s); @@ -832,7 +832,7 @@ search_info_add_string (struct _search_info *si, const gchar *s) } /* should probably also strip trailing, but i'm lazy today */ if (start[0]) - g_ptr_array_add (si->strv, g_strdup ((gchar *)start)); + g_ptr_array_add (si->strv, g_strdup ((gchar *) start)); } } @@ -895,7 +895,7 @@ search_info_to_searcher (struct _search_info *si) tage = g_alloca (20); sprintf(tage, "%c</font>", TAG_ESCAPE); - return searcher_new (si->flags, si->strv->len, (guchar **)si->strv->pdata, tags, tage); + return searcher_new (si->flags, si->strv->len, (guchar **) si->strv->pdata, tags, tage); } /* ********************************************************************** */ diff --git a/widgets/misc/e-send-options.c b/widgets/misc/e-send-options.c index 563195d645..9a916fbf0b 100644 --- a/widgets/misc/e-send-options.c +++ b/widgets/misc/e-send-options.c @@ -656,7 +656,7 @@ e_send_options_dialog_run (ESendOptionsDialog *sod, GtkWidget *parent, Item_type e_send_options_fill_widgets_with_data (sod); sensitize_widgets (sod); init_widgets (sod); - gtk_window_set_modal ((GtkWindow *)priv->main, TRUE); + gtk_window_set_modal ((GtkWindow *) priv->main, TRUE); gtk_widget_show (priv->main); diff --git a/widgets/misc/ea-calendar-item.c b/widgets/misc/ea-calendar-item.c index 6179d45551..80eec98409 100644 --- a/widgets/misc/ea-calendar-item.c +++ b/widgets/misc/ea-calendar-item.c @@ -439,7 +439,7 @@ ea_calendar_item_ref_child (AtkObject *accessible, gint index) #ifdef ACC_DEBUG g_print ("AccDebug: ea_calendar_item children[%d]=%p\n", index, - (gpointer)cell); + (gpointer) cell); #endif return g_object_ref (atk_gobject_accessible_for_object (G_OBJECT (cell))); } @@ -1306,7 +1306,7 @@ ea_calendar_set_focus_object (EaCalendarItem *ea_calitem, AtkObject *item_cell) AtkStateSet *state_set, *old_state_set; AtkObject *old_cell; - old_cell = (AtkObject *)g_object_get_data ( + old_cell = (AtkObject *) g_object_get_data ( G_OBJECT(ea_calitem), "gail-focus-object"); if (old_cell && EA_IS_CALENDAR_CELL (old_cell)) { old_state_set = atk_object_ref_state_set (old_cell); diff --git a/widgets/table/e-cell-combo.c b/widgets/table/e-cell-combo.c index a54f6c9c98..48a762a8d9 100644 --- a/widgets/table/e-cell-combo.c +++ b/widgets/table/e-cell-combo.c @@ -420,10 +420,10 @@ e_cell_combo_get_popup_pos (ECellCombo *ecc, *x += x1; /* The ETable positions don't include the grid lines, I think, so we add 1. */ *y += y1 + 1 - - (gint)gtk_adjustment_get_value ( + - (gint) gtk_adjustment_get_value ( gtk_scrollable_get_vadjustment ( - GTK_SCROLLABLE (&((GnomeCanvas *)canvas)->layout))) - + ((GnomeCanvas *)canvas)->zoom_yofs; + GTK_SCROLLABLE (&((GnomeCanvas *) canvas)->layout))) + + ((GnomeCanvas *) canvas)->zoom_yofs; widget = gtk_scrolled_window_get_vscrollbar (popup); gtk_widget_get_child_requisition (widget, &requisition); diff --git a/widgets/table/e-cell-hbox.c b/widgets/table/e-cell-hbox.c index e8f6a0925d..e268b23dea 100644 --- a/widgets/table/e-cell-hbox.c +++ b/widgets/table/e-cell-hbox.c @@ -72,7 +72,7 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view hbox_view->def_size_cols[i] = ecv->def_size_cols[i]; } - return (ECellView *)hbox_view; + return (ECellView *) hbox_view; } /* @@ -149,7 +149,7 @@ ecv_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint subcell_offset = 0; gint i; @@ -180,7 +180,7 @@ ecv_draw (ECellView *ecell_view, static gint ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint y = 0; gint i; gint subcell_offset = 0; @@ -217,7 +217,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint height = 0, max_height = 0; gint i; @@ -234,7 +234,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { - ECellHboxView *hbox_view = (ECellHboxView *)ecell_view; + ECellHboxView *hbox_view = (ECellHboxView *) ecell_view; gint width = 0; gint i; diff --git a/widgets/table/e-cell-pixbuf.c b/widgets/table/e-cell-pixbuf.c index 3bf671b48a..45f1fb3727 100644 --- a/widgets/table/e-cell-pixbuf.c +++ b/widgets/table/e-cell-pixbuf.c @@ -188,8 +188,8 @@ pixbuf_print (ECellView *ecell_view, GtkPrintContext *context, scale = gdk_pixbuf_get_height (pixbuf); cairo_save (cr); - cairo_translate (cr, 0, (gdouble)(height - scale) / (gdouble)2); - gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble)scale, (gdouble)scale); + cairo_translate (cr, 0, (gdouble)(height - scale) / (gdouble) 2); + gdk_cairo_set_source_pixbuf (cr, pixbuf, (gdouble) scale, (gdouble) scale); cairo_paint (cr); cairo_restore (cr); } diff --git a/widgets/table/e-cell-text.c b/widgets/table/e-cell-text.c index 310b36c655..1683e896f0 100644 --- a/widgets/table/e-cell-text.c +++ b/widgets/table/e-cell-text.c @@ -333,7 +333,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view text_view->xofs = 0.0; text_view->yofs = 0.0; - return (ECellView *)text_view; + return (ECellView *) text_view; } /* @@ -502,7 +502,7 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) PangoContext *context; cairo_font_options_t *font_options; - layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas), text); + layout = gtk_widget_create_pango_layout (GTK_WIDGET (((GnomeCanvasItem *) ecell_view->e_table_item_view)->canvas), text); attrs = (PangoAttrList *) build_attr_list (text_view, row, text ? strlen (text) : 0); @@ -528,12 +528,12 @@ build_layout (ECellTextView *text_view, gint row, const gchar *text, gint width) fixed_desc = pango_font_description_from_string (ect->font_name); if (fixed_desc) { - fixed_family = (gchar *)pango_font_description_get_family (fixed_desc); + fixed_family = (gchar *) pango_font_description_get_family (fixed_desc); fixed_size = pango_font_description_get_size (fixed_desc); fixed_points = !pango_font_description_get_size_is_absolute (fixed_desc); } - desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *)ecell_view->e_table_item_view)->canvas))->font_desc); + desc = pango_font_description_copy (gtk_widget_get_style (GTK_WIDGET (((GnomeCanvasItem *) ecell_view->e_table_item_view)->canvas))->font_desc); pango_font_description_set_family (desc, fixed_family); if (fixed_points) pango_font_description_set_size (desc, fixed_size); @@ -856,7 +856,7 @@ ect_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col if (edit_display && edit->im_context && gtk_im_context_filter_keypress (\ edit->im_context, - (GdkEventKey*)event)) { + (GdkEventKey*) event)) { edit->need_im_reset = TRUE; if (preedit_len && flags & E_CELL_PREEDIT) @@ -1067,7 +1067,7 @@ ect_enter_edit (ECellView *ecell_view, gint model_col, gint view_col, gint row) edit->view_col = view_col; edit->row = row; edit->cell_width = e_table_header_get_column ( - ((ETableItem *)ecell_view->e_table_item_view)->header, + ((ETableItem *) ecell_view->e_table_item_view)->header, view_col)->width - 8; edit->layout = generate_layout (text_view, model_col, view_col, row, edit->cell_width); @@ -1229,7 +1229,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, PangoContext *pango_context; PangoFontMetrics *font_metrics; ECellText *ect = E_CELL_TEXT (ecell_view->ecell); - ECellTextView *ectView = (ECellTextView *)ecell_view; + ECellTextView *ectView = (ECellTextView *) ecell_view; GtkWidget *canvas = GTK_WIDGET (ectView->canvas); GtkStyle *style; PangoDirection dir; @@ -1260,7 +1260,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, pango_context_get_language (pango_context)); ty = (gdouble)(text_height - pango_font_metrics_get_ascent (font_metrics) - - pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble)PANGO_SCALE; + pango_font_metrics_get_descent (font_metrics)) / 2.0 /(gdouble) PANGO_SCALE; strikeout = ect->strikeout_column >= 0 && row >= 0 && e_table_model_value_at (ecell_view->e_table_model, ect->strikeout_column, row); @@ -1270,7 +1270,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, dir = pango_find_base_dir (string, strlen (string)); if (underline) { - ly = ty + (gdouble)pango_font_metrics_get_underline_position (font_metrics)/(gdouble)PANGO_SCALE; + ly = ty + (gdouble) pango_font_metrics_get_underline_position (font_metrics)/(gdouble) PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1280,12 +1280,12 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr, (gdouble)pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble)PANGO_SCALE); + cairo_set_line_width (cr, (gdouble) pango_font_metrics_get_underline_thickness (font_metrics)/(gdouble) PANGO_SCALE); cairo_stroke (cr); } if (strikeout) { - ly = ty + (gdouble)pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble)PANGO_SCALE; + ly = ty + (gdouble) pango_font_metrics_get_strikethrough_position (font_metrics)/(gdouble) PANGO_SCALE; cairo_new_path (cr); if (dir == PANGO_DIRECTION_RTL) { cairo_move_to (cr, width - 2, ly + text_height + 6); @@ -1295,7 +1295,7 @@ ect_print (ECellView *ecell_view, GtkPrintContext *context, cairo_move_to (cr, 2, ly + text_height + 6); cairo_line_to (cr, MIN (2 + text_width, width - 2), ly + text_height + 6); } - cairo_set_line_width (cr,(gdouble)pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble)PANGO_SCALE); + cairo_set_line_width (cr,(gdouble) pango_font_metrics_get_strikethrough_thickness (font_metrics)/(gdouble) PANGO_SCALE); cairo_stroke (cr); } @@ -1609,7 +1609,7 @@ e_cell_text_get_cursor_locations (ECellTextView *tv, { GdkRectangle area; CellEdit *edit=tv->edit; - ECellView *cell_view = (ECellView *)tv; + ECellView *cell_view = (ECellView *) tv; ETableItem *item = E_TABLE_ITEM ((cell_view)->e_table_item_view); GnomeCanvasItem *parent_item = GNOME_CANVAS_ITEM (item)->parent; PangoRectangle pango_strong_pos; @@ -1691,7 +1691,7 @@ e_cell_text_commit_cb (GtkIMContext *context, if (g_utf8_validate (str, strlen (str), NULL)) { command.action = E_TEP_INSERT; command.position = E_TEP_SELECTION; - command.string = (gchar *)str; + command.string = (gchar *) str; command.value = strlen (str); e_cell_text_view_command (edit->tep, &command, edit); } @@ -1876,7 +1876,7 @@ get_position_from_xy (CellEdit *edit, gint x, gint y) PangoLayout *layout = generate_layout (edit->text_view, edit->model_col, edit->view_col, edit->row, edit->cell_width); ECellTextView *text_view = edit->text_view; - ECellText *ect = (ECellText *) ((ECellView *)text_view)->ecell; + ECellText *ect = (ECellText *) ((ECellView *) text_view)->ecell; x -= (ect->x + text_view->xofs - edit->xofs_edit); y -= (ect->y + text_view->yofs - edit->yofs_edit); @@ -1894,7 +1894,7 @@ static gboolean _blink_scroll_timeout (gpointer data) { ECellTextView *text_view = (ECellTextView *) data; - ECellText *ect = E_CELL_TEXT (((ECellView *)text_view)->ecell); + ECellText *ect = E_CELL_TEXT (((ECellView *) text_view)->ecell); CellEdit *edit = text_view->edit; gulong current_time; @@ -2410,7 +2410,7 @@ paste_received (GtkClipboard *clipboard, ETextEventProcessorCommand command; command.action = E_TEP_INSERT; command.position = E_TEP_SELECTION; - command.string = (gchar *)text; + command.string = (gchar *) text; command.value = strlen (text); command.time = GDK_CURRENT_TIME; e_cell_text_view_command (edit->tep, &command, edit); @@ -2471,7 +2471,7 @@ e_cell_text_set_selection (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, FALSE); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return FALSE; @@ -2520,7 +2520,7 @@ e_cell_text_get_selection (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, FALSE); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return FALSE; @@ -2556,7 +2556,7 @@ e_cell_text_copy_clipboard (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2590,7 +2590,7 @@ e_cell_text_paste_clipboard (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2624,7 +2624,7 @@ e_cell_text_delete_selection (ECellView *cell_view, g_return_if_fail (cell_view != NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (!edit) return; @@ -2661,7 +2661,7 @@ e_cell_text_get_text_by_view (ECellView *cell_view, g_return_val_if_fail (cell_view != NULL, NULL); - ectv = (ECellTextView *)cell_view; + ectv = (ECellTextView *) cell_view; edit = ectv->edit; if (edit && ectv->edit->row == row && ectv->edit->model_col == col) { /* being editted now */ diff --git a/widgets/table/e-cell-toggle.c b/widgets/table/e-cell-toggle.c index 3d4f453820..b1edb1424e 100644 --- a/widgets/table/e-cell-toggle.c +++ b/widgets/table/e-cell-toggle.c @@ -302,8 +302,8 @@ cell_toggle_print (ECellView *ecell_view, cairo_save (cr); cairo_translate (cr, 0 , 0); image = gdk_pixbuf_add_alpha (image, TRUE, 255, 255, 255); - image_width = (gdouble)gdk_pixbuf_get_width (image); - image_height = (gdouble)gdk_pixbuf_get_height (image); + image_width = (gdouble) gdk_pixbuf_get_width (image); + image_height = (gdouble) gdk_pixbuf_get_height (image); cairo_rectangle (cr, image_width / 7, image_height / 3, image_width - image_width / 4, image_width - image_height / 7); diff --git a/widgets/table/e-cell-tree.c b/widgets/table/e-cell-tree.c index 467523d6d7..b06b3d492b 100644 --- a/widgets/table/e-cell-tree.c +++ b/widgets/table/e-cell-tree.c @@ -65,7 +65,7 @@ typedef struct { ECellView * e_cell_tree_view_get_subcell_view (ECellView *ect) { - return ((ECellTreeView *)ect)->subcell_view; + return ((ECellTreeView *) ect)->subcell_view; } static ETreePath @@ -134,7 +134,7 @@ ect_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view tree_view->canvas = canvas; - return (ECellView *)tree_view; + return (ECellView *) tree_view; } /* @@ -224,7 +224,7 @@ ect_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellTreeView *tree_view = (ECellTreeView *)ecell_view; + ECellTreeView *tree_view = (ECellTreeView *) ecell_view; ETreeModel *tree_model = e_cell_tree_get_tree_model (ecell_view->e_table_model, row); ETreeTableAdapter *tree_table_adapter = e_cell_tree_get_tree_table_adapter (ecell_view->e_table_model, row); ETreePath node; diff --git a/widgets/table/e-cell-vbox.c b/widgets/table/e-cell-vbox.c index 5d0c5989a5..1d36d4e5ce 100644 --- a/widgets/table/e-cell-vbox.c +++ b/widgets/table/e-cell-vbox.c @@ -66,7 +66,7 @@ ecv_new_view (ECell *ecell, ETableModel *table_model, gpointer e_table_item_view vbox_view->model_cols[i] = ecv->model_cols[i]; } - return (ECellView *)vbox_view; + return (ECellView *) vbox_view; } /* @@ -142,7 +142,7 @@ ecv_draw (ECellView *ecell_view, gint x2, gint y2) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint subcell_offset = 0; gint i; @@ -173,7 +173,7 @@ ecv_draw (ECellView *ecell_view, static gint ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col, gint row, ECellFlags flags, ECellActions *actions) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint y = 0; gint i; gint subcell_offset = 0; @@ -208,7 +208,7 @@ ecv_event (ECellView *ecell_view, GdkEvent *event, gint model_col, gint view_col static gint ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint height = 0; gint i; @@ -224,7 +224,7 @@ ecv_height (ECellView *ecell_view, gint model_col, gint view_col, gint row) static gint ecv_max_width (ECellView *ecell_view, gint model_col, gint view_col) { - ECellVboxView *vbox_view = (ECellVboxView *)ecell_view; + ECellVboxView *vbox_view = (ECellVboxView *) ecell_view; gint max_width = 0; gint i; diff --git a/widgets/table/e-table-config.c b/widgets/table/e-table-config.c index 490072cf80..00ad664e61 100644 --- a/widgets/table/e-table-config.c +++ b/widgets/table/e-table-config.c @@ -441,8 +441,8 @@ setup_fields (ETableConfig *config) { gint i; - e_table_model_freeze ((ETableModel *)config->available_model); - e_table_model_freeze ((ETableModel *)config->shown_model); + e_table_model_freeze ((ETableModel *) config->available_model); + e_table_model_freeze ((ETableModel *) config->shown_model); e_table_without_show_all (config->available_model); e_table_subset_variable_clear (config->shown_model); @@ -457,8 +457,8 @@ setup_fields (ETableConfig *config) e_table_without_hide (config->available_model, GINT_TO_POINTER (idx)); } } - e_table_model_thaw ((ETableModel *)config->available_model); - e_table_model_thaw ((ETableModel *)config->shown_model); + e_table_model_thaw ((ETableModel *) config->available_model); + e_table_model_thaw ((ETableModel *) config->shown_model); } static void diff --git a/widgets/table/e-table-field-chooser-item.c b/widgets/table/e-table-field-chooser-item.c index 6afde43911..14a080362a 100644 --- a/widgets/table/e-table-field-chooser-item.c +++ b/widgets/table/e-table-field-chooser-item.c @@ -413,7 +413,7 @@ etfci_drag_data_get (GtkWidget *widget, gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, sizeof (string[0]), - (guchar *)string, + (guchar *) string, strlen (string)); g_free (string); } diff --git a/widgets/table/e-table-group-container.c b/widgets/table/e-table-group-container.c index 7f4352a6d5..564d48494c 100644 --- a/widgets/table/e-table-group-container.c +++ b/widgets/table/e-table-group-container.c @@ -253,7 +253,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) ETableGroupContainerChildNode *child_node; ETableGroup *child; - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (e_table_group_get_focus (child)) { @@ -269,7 +269,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) list = list->next; if (list) { - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (use_col) e_table_group_set_focus (child, direction, start_col); @@ -289,7 +289,7 @@ etgc_event (GnomeCanvasItem *item, GdkEvent *event) ETableGroupContainerChildNode *child_node; ETableGroup *child; - child_node = (ETableGroupContainerChildNode *)list->data; + child_node = (ETableGroupContainerChildNode *) list->data; child = child_node->child; if (start_col == -1) @@ -620,7 +620,7 @@ etgc_row_count (ETableGroup *etg) GList *list; gint count = 0; for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroup *group = ((ETableGroupContainerChildNode *)list->data)->child; + ETableGroup *group = ((ETableGroupContainerChildNode *) list->data)->child; gint this_count = e_table_group_row_count (group); count += this_count; } @@ -634,7 +634,7 @@ etgc_increment (ETableGroup *etg, gint position, gint amount) GList *list; for (list = etgc->children; list; list = g_list_next (list)) - e_table_group_increment (((ETableGroupContainerChildNode *)list->data)->child, + e_table_group_increment (((ETableGroupContainerChildNode *) list->data)->child, position, amount); } @@ -645,7 +645,7 @@ etgc_decrement (ETableGroup *etg, gint position, gint amount) GList *list; for (list = etgc->children; list; list = g_list_next (list)) - e_table_group_decrement (((ETableGroupContainerChildNode *)list->data)->child, + e_table_group_decrement (((ETableGroupContainerChildNode *) list->data)->child, position, amount); } @@ -655,10 +655,10 @@ etgc_set_focus (ETableGroup *etg, EFocus direction, gint view_col) ETableGroupContainer *etgc = E_TABLE_GROUP_CONTAINER (etg); if (etgc->children) { if (direction == E_FOCUS_END) - e_table_group_set_focus (((ETableGroupContainerChildNode *)g_list_last (etgc->children)->data)->child, + e_table_group_set_focus (((ETableGroupContainerChildNode *) g_list_last (etgc->children)->data)->child, direction, view_col); else - e_table_group_set_focus (((ETableGroupContainerChildNode *)etgc->children->data)->child, + e_table_group_set_focus (((ETableGroupContainerChildNode *) etgc->children->data)->child, direction, view_col); } } @@ -670,7 +670,7 @@ etgc_get_focus_column (ETableGroup *etg) if (etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; if (e_table_group_get_focus (child)) { return e_table_group_get_focus_column (child); @@ -696,7 +696,7 @@ etgc_compute_location (ETableGroup *etg, gint *x, gint *y, gint *row, gint *col) if (*x >= 0 && *y >= 0 && etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; e_table_group_compute_location (child, x, y, row, col); @@ -721,7 +721,7 @@ etgc_get_mouse_over (ETableGroup *etg, gint *row, gint *col) GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; e_table_group_get_mouse_over (child, row, col); @@ -749,7 +749,7 @@ etgc_get_cell_geometry (ETableGroup *etg, gint *row, gint *col, gint *x, gint *y if (etgc->children) { GList *list; for (list = etgc->children; list; list = list->next) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; ETableGroup *child = child_node->child; gint thisy; @@ -791,7 +791,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp etgc->minimum_width = g_value_get_double (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "minimum_width", etgc->minimum_width - GROUP_INDENT, NULL); @@ -800,7 +800,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_LENGTH_THRESHOLD: etgc->length_threshold = g_value_get_int (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "length_threshold", etgc->length_threshold, NULL); @@ -809,7 +809,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_UNIFORM_ROW_HEIGHT: etgc->uniform_row_height = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "uniform_row_height", etgc->uniform_row_height, NULL); @@ -823,7 +823,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp if (etgc->selection_model) g_object_ref (etgc->selection_model); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "selection_model", etgc->selection_model, NULL); @@ -833,7 +833,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_ALTERNATING_ROW_COLORS: etgc->alternating_row_colors = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "alternating_row_colors", etgc->alternating_row_colors, NULL); @@ -843,7 +843,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_HORIZONTAL_DRAW_GRID: etgc->horizontal_draw_grid = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "horizontal_draw_grid", etgc->horizontal_draw_grid, NULL); @@ -853,7 +853,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_VERTICAL_DRAW_GRID: etgc->vertical_draw_grid = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "vertical_draw_grid", etgc->vertical_draw_grid, NULL); @@ -863,7 +863,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_TABLE_DRAW_FOCUS: etgc->draw_focus = g_value_get_boolean (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "drawfocus", etgc->draw_focus, NULL); @@ -873,7 +873,7 @@ etgc_set_property (GObject *object, guint prop_id, const GValue *value, GParamSp case PROP_CURSOR_MODE: etgc->cursor_mode = g_value_get_int (value); for (list = etgc->children; list; list = g_list_next (list)) { - ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *)list->data; + ETableGroupContainerChildNode *child_node = (ETableGroupContainerChildNode *) list->data; g_object_set (child_node->child, "cursor_mode", etgc->cursor_mode, NULL); diff --git a/widgets/table/e-table-header-item.c b/widgets/table/e-table-header-item.c index 346ffed2d3..5d38b686a0 100644 --- a/widgets/table/e-table-header-item.c +++ b/widgets/table/e-table-header-item.c @@ -802,7 +802,7 @@ ethi_drag_data_received (GtkWidget *canvas, if (data != NULL) { count = e_table_header_count (ethi->eth); - column = atoi ((gchar *)data); + column = atoi ((gchar *) data); drop_col = ethi->drop_col; ethi->drop_col = -1; @@ -846,7 +846,7 @@ ethi_drag_data_get (GtkWidget *canvas, gtk_selection_data_set (selection_data, GDK_SELECTION_TYPE_STRING, sizeof (string[0]), - (guchar *)string, + (guchar *) string, strlen (string)); g_free (string); } @@ -1867,7 +1867,7 @@ ethi_event (GnomeCanvasItem *item, GdkEvent *e) gint width = 0; g_signal_emit_by_name (ethi->eth, "request_width", - (gint)ethi->resize_col, &width); + (gint) ethi->resize_col, &width); /* Add 10 to stop it from "..."ing */ e_table_header_set_size (ethi->eth, ethi->resize_col, width + 10); diff --git a/widgets/table/e-table-header.c b/widgets/table/e-table-header.c index ef1b573346..cc5b147747 100644 --- a/widgets/table/e-table-header.c +++ b/widgets/table/e-table-header.c @@ -779,7 +779,7 @@ eth_set_size (ETableHeader *eth, gint idx, gint size) /* Set the new expansion so that it will generate the desired size. */ eth->columns[idx]->expansion = expansion * (((gdouble)(size - (eth->columns[idx]->min_width + - eth->width_extras))) / ((gdouble)total_extra)); + eth->width_extras))) / ((gdouble) total_extra)); /* The expansion left for the columns on the right. */ expansion -= eth->columns[idx]->expansion; diff --git a/widgets/table/e-table-item.c b/widgets/table/e-table-item.c index 746e4c41b4..6da76cf77f 100644 --- a/widgets/table/e-table-item.c +++ b/widgets/table/e-table-item.c @@ -2180,7 +2180,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) } ecell_view = eti->cell_views[col]; - button = *(GdkEventButton *)e; + button = *(GdkEventButton *) e; button.x = x1; button.y = y1; @@ -2529,7 +2529,7 @@ eti_event (GnomeCanvasItem *item, GdkEvent *e) gint view_col = model_to_view_col (eti, cursor_col); if ((view_col >= 0) && (view_col < eti->cols)) - if (eti_e_cell_event (eti, eti->cell_views[view_col], e, ((GdkEventKey *)e)->time, cursor_col, view_col, model_to_view_row (eti, cursor_row), E_CELL_CURSOR)) + if (eti_e_cell_event (eti, eti->cell_views[view_col], e, ((GdkEventKey *) e)->time, cursor_col, view_col, model_to_view_row (eti, cursor_row), E_CELL_CURSOR)) return TRUE; } else return_val = e_selection_model_key_press (E_SELECTION_MODEL (eti->selection), (GdkEventKey *) e); @@ -3273,7 +3273,7 @@ e_table_item_compute_mouse_over (ETableItem *eti, gnome_canvas_item_w2i (GNOME_CANVAS_ITEM (eti), &realx, &realy); - if (!find_cell (eti, (gint)realx, (gint)realy, col, row, NULL, NULL)) { + if (!find_cell (eti, (gint) realx, (gint) realy, col, row, NULL, NULL)) { *row = -1; *col = -1; } diff --git a/widgets/table/e-table-memory-callbacks.c b/widgets/table/e-table-memory-callbacks.c index 5101e9ec73..a68e9a2822 100644 --- a/widgets/table/e-table-memory-callbacks.c +++ b/widgets/table/e-table-memory-callbacks.c @@ -80,7 +80,7 @@ etmc_duplicate_value (ETableModel *etm, gint col, gconstpointer value) if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->data); else - return (gpointer)value; + return (gpointer) value; } static void diff --git a/widgets/table/e-table-one.c b/widgets/table/e-table-one.c index ed8a481104..69880b9113 100644 --- a/widgets/table/e-table-one.c +++ b/widgets/table/e-table-one.c @@ -88,7 +88,7 @@ one_duplicate_value (ETableModel *etm, gint col, gconstpointer value) if (one->source) return e_table_model_duplicate_value (one->source, col, value); else - return (gpointer)value; + return (gpointer) value; } static void diff --git a/widgets/table/e-table-sorter.c b/widgets/table/e-table-sorter.c index 491fe7fc6f..4727103f22 100644 --- a/widgets/table/e-table-sorter.c +++ b/widgets/table/e-table-sorter.c @@ -276,8 +276,8 @@ static gint qsort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { struct qsort_data *qd = (struct qsort_data *) user_data; - gint row1 = *(gint *)data1; - gint row2 = *(gint *)data2; + gint row1 = *(gint *) data1; + gint row2 = *(gint *) data2; gint j; gint sort_count = e_table_sort_info_sorting_get_count (qd->ets->sort_info) + e_table_sort_info_grouping_get_count (qd->ets->sort_info); gint comp_val = 0; diff --git a/widgets/table/e-table-sorting-utils.c b/widgets/table/e-table-sorting-utils.c index 1fa91214c2..5254a5e698 100644 --- a/widgets/table/e-table-sorting-utils.c +++ b/widgets/table/e-table-sorting-utils.c @@ -84,8 +84,8 @@ typedef struct { static gint e_sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - gint row1 = *(gint *)data1; - gint row2 = *(gint *)data2; + gint row1 = *(gint *) data1; + gint row2 = *(gint *) data2; ETableSortClosure *closure = user_data; gint j; gint sort_count = closure->cols; @@ -257,8 +257,8 @@ etsu_tree_compare (ETreeModel *source, ETableSortInfo *sort_info, ETableHeader * static gint e_sort_tree_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - ETreePath *path1 = *(ETreePath *)data1; - ETreePath *path2 = *(ETreePath *)data2; + ETreePath *path1 = *(ETreePath *) data1; + ETreePath *path2 = *(ETreePath *) data2; ETreeSortClosure *closure = user_data; return etsu_tree_compare (closure->tree, closure->sort_info, closure->full_header, path1, path2, closure->cmp_cache); diff --git a/widgets/table/e-table-specification.c b/widgets/table/e-table-specification.c index dfa7da9e36..3324748e61 100644 --- a/widgets/table/e-table-specification.c +++ b/widgets/table/e-table-specification.c @@ -330,7 +330,7 @@ e_table_specification_save_to_string (ETableSpecification *specification) xmlDocSetRootElement (doc, e_table_specification_save_to_node (specification, doc)); xmlDocDumpMemory (doc, &string, &length); - ret_val = g_strdup ((gchar *)string); + ret_val = g_strdup ((gchar *) string); xmlFree (string); return ret_val; } diff --git a/widgets/table/e-table-state.c b/widgets/table/e-table-state.c index 536bf3c5c8..2f58715504 100644 --- a/widgets/table/e-table-state.c +++ b/widgets/table/e-table-state.c @@ -243,7 +243,7 @@ e_table_state_save_to_string (ETableState *state) xmlDocDumpMemory (doc, &string, &length); xmlFreeDoc (doc); - ret_val = g_strdup ((gchar *)string); + ret_val = g_strdup ((gchar *) string); xmlFree (string); return ret_val; } diff --git a/widgets/table/e-table-subset-variable.c b/widgets/table/e-table-subset-variable.c index 0f9a58db31..be9e3e29ec 100644 --- a/widgets/table/e-table-subset-variable.c +++ b/widgets/table/e-table-subset-variable.c @@ -213,7 +213,7 @@ e_table_subset_variable_clear (ETableSubsetVariable *etssv) e_table_model_pre_change (etm); etss->n_map = 0; g_free (etss->map_table); - etss->map_table = (gint *)g_new (unsigned int, 1); + etss->map_table = (gint *) g_new (unsigned int, 1); etssv->n_vals_allocated = 1; e_table_model_changed (etm); diff --git a/widgets/table/e-table-subset.c b/widgets/table/e-table-subset.c index 7473099bf9..77ea5fe9b5 100644 --- a/widgets/table/e-table-subset.c +++ b/widgets/table/e-table-subset.c @@ -134,7 +134,7 @@ etss_finalize (GObject *object) static gint etss_column_count (ETableModel *etm) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_column_count (etss->source); } @@ -142,7 +142,7 @@ etss_column_count (ETableModel *etm) static gint etss_row_count (ETableModel *etm) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return etss->n_map; } @@ -150,7 +150,7 @@ etss_row_count (ETableModel *etm) static gpointer etss_value_at (ETableModel *etm, gint col, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), NULL); @@ -162,7 +162,7 @@ etss_value_at (ETableModel *etm, gint col, gint row) static void etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_if_fail (VALID_ROW (etss, row)); @@ -174,7 +174,7 @@ etss_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) static gboolean etss_is_cell_editable (ETableModel *etm, gint col, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), FALSE); @@ -190,7 +190,7 @@ etss_has_save_id (ETableModel *etm) static gchar * etss_get_save_id (ETableModel *etm, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; g_return_val_if_fail (VALID_ROW (etss, row), NULL); @@ -203,14 +203,14 @@ etss_get_save_id (ETableModel *etm, gint row) static void etss_append_row (ETableModel *etm, ETableModel *source, gint row) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; e_table_model_append_row (etss->source, source, row); } static gpointer etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_duplicate_value (etss->source, col, value); } @@ -218,7 +218,7 @@ etss_duplicate_value (ETableModel *etm, gint col, gconstpointer value) static void etss_free_value (ETableModel *etm, gint col, gpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; e_table_model_free_value (etss->source, col, value); } @@ -226,7 +226,7 @@ etss_free_value (ETableModel *etm, gint col, gpointer value) static gpointer etss_initialize_value (ETableModel *etm, gint col) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_initialize_value (etss->source, col); } @@ -234,7 +234,7 @@ etss_initialize_value (ETableModel *etm, gint col) static gboolean etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_value_is_empty (etss->source, col, value); } @@ -242,7 +242,7 @@ etss_value_is_empty (ETableModel *etm, gint col, gconstpointer value) static gchar * etss_value_to_string (ETableModel *etm, gint col, gconstpointer value) { - ETableSubset *etss = (ETableSubset *)etm; + ETableSubset *etss = (ETableSubset *) etm; return e_table_model_value_to_string (etss->source, col, value); } @@ -399,7 +399,7 @@ e_table_subset_construct (ETableSubset *etss, ETableModel *source, gint nvals) return NULL; } else buffer = NULL; - etss->map_table = (gint *)buffer; + etss->map_table = (gint *) buffer; etss->n_map = nvals; etss->source = source; g_object_ref (source); diff --git a/widgets/table/e-table.c b/widgets/table/e-table.c index 38ede4dd80..c1d0a2ad94 100644 --- a/widgets/table/e-table.c +++ b/widgets/table/e-table.c @@ -733,8 +733,8 @@ table_canvas_reflow_idle (ETable *e_table) g_object_get ( e_table->canvas_vbox, "height", &height, "width", &width, NULL); - height = MAX ((gint)height, allocation.height); - width = MAX ((gint)width, allocation.width); + height = MAX ((gint) height, allocation.height); + width = MAX ((gint) width, allocation.width); /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_get_scroll_region (GNOME_CANVAS (e_table->table_canvas), NULL, NULL, &oldwidth, &oldheight); @@ -763,7 +763,7 @@ table_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_table->canvas_vbox, "height", &height, NULL); - height = MAX ((gint)height, alloc->height); + height = MAX ((gint) height, alloc->height); g_object_set (e_table->canvas_vbox, "width", width, @@ -1214,7 +1214,7 @@ table_canvas_focus_event_cb (GtkWidget *widget, GdkEventFocus *event, gpointer d } else if (!canvas->focused_item && etable->group) { focus_first_etable_item (etable->group); } else if (canvas->focused_item) { - ESelectionModel *selection = (ESelectionModel *)etable->selection; + ESelectionModel *selection = (ESelectionModel *) etable->selection; /* check whether click_to_add already got the focus */ if (etable->click_to_add) { @@ -2030,7 +2030,7 @@ e_table_set_specification (ETable *e_table, const gchar *spec) g_return_val_if_fail (spec != NULL, -1); /* doesn't work yet, sigh */ - xmlSpec = xmlParseMemory ((gchar *)spec, strlen (spec)); + xmlSpec = xmlParseMemory ((gchar *) spec, strlen (spec)); ret = et_real_set_specification (e_table, xmlSpec); xmlFreeDoc (xmlSpec); diff --git a/widgets/table/e-tree-memory-callbacks.c b/widgets/table/e-tree-memory-callbacks.c index 1edaa3e09d..9c46cf7fda 100644 --- a/widgets/table/e-tree-memory-callbacks.c +++ b/widgets/table/e-tree-memory-callbacks.c @@ -138,7 +138,7 @@ etmc_duplicate_value (ETreeModel *etm, gint col, gconstpointer value) if (etmc->duplicate_value) return etmc->duplicate_value (etm, col, value, etmc->model_data); else - return (gpointer)value; + return (gpointer) value; } static void @@ -288,6 +288,6 @@ e_tree_memory_callbacks_new (ETreeMemoryCallbacksIconAtFn icon_at, etmc->model_data = model_data; - return (ETreeModel*)etmc; + return (ETreeModel*) etmc; } diff --git a/widgets/table/e-tree-memory.c b/widgets/table/e-tree-memory.c index c32b7311bd..61200cda4c 100644 --- a/widgets/table/e-tree-memory.c +++ b/widgets/table/e-tree-memory.c @@ -641,8 +641,8 @@ typedef struct { static gint sort_callback (gconstpointer data1, gconstpointer data2, gpointer user_data) { - ETreePath path1 = *(ETreePath *)data1; - ETreePath path2 = *(ETreePath *)data2; + ETreePath path1 = *(ETreePath *) data1; + ETreePath path2 = *(ETreePath *) data2; MemoryAndClosure *mac = user_data; return (*mac->callback) (mac->memory, path1, path2, mac->closure); } diff --git a/widgets/table/e-tree-selection-model.c b/widgets/table/e-tree-selection-model.c index 8644187b91..f486f7eec7 100644 --- a/widgets/table/e-tree-selection-model.c +++ b/widgets/table/e-tree-selection-model.c @@ -601,9 +601,9 @@ etsm_select_single_row (ESelectionModel *selection, gint row) gint *p = rows; while (p<rowp) - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, *p++); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, *p++); } - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, row); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, row); } } @@ -622,7 +622,7 @@ etsm_toggle_single_row (ESelectionModel *selection, gint row) etsm->priv->start_path = NULL; - e_selection_model_selection_row_changed ((ESelectionModel *)etsm, row); + e_selection_model_selection_row_changed ((ESelectionModel *) etsm, row); } static void diff --git a/widgets/table/e-tree-table-adapter.c b/widgets/table/e-tree-table-adapter.c index fe8f90f536..e162030e0f 100644 --- a/widgets/table/e-tree-table-adapter.c +++ b/widgets/table/e-tree-table-adapter.c @@ -161,13 +161,13 @@ get_node (ETreeTableAdapter *etta, ETreePath path) if (!gnode) return NULL; - return (node_t *)gnode->data; + return (node_t *) gnode->data; } static void resort_node (ETreeTableAdapter *etta, GNode *gnode, gboolean recurse) { - node_t *node = (node_t *)gnode->data; + node_t *node = (node_t *) gnode->data; ETreePath *paths, path; GNode *prev, *curr; gint i, count; @@ -242,7 +242,7 @@ get_path (ETreeTableAdapter *etta, gint row) static void kill_gnode (GNode *node, ETreeTableAdapter *etta) { - g_hash_table_remove (etta->priv->nodes, ((node_t *)node->data)->path); + g_hash_table_remove (etta->priv->nodes, ((node_t *) node->data)->path); while (node->children) { GNode *next = node->children->next; @@ -269,7 +269,7 @@ update_child_counts (GNode *gnode, gint delta) static gint delete_children (ETreeTableAdapter *etta, GNode *gnode) { - node_t *node = (node_t *)gnode->data; + node_t *node = (node_t *) gnode->data; gint to_remove = node ? node->num_visible_children : 0; if (to_remove == 0) @@ -348,7 +348,7 @@ insert_children (ETreeTableAdapter *etta, GNode *gnode) gint count = 0; gint pos = 0; - path = ((node_t *)gnode->data)->path; + path = ((node_t *) gnode->data)->path; for (tmp = e_tree_model_node_get_first_child (etta->priv->source, path); tmp; tmp = e_tree_model_node_get_next (etta->priv->source, tmp), pos++) { @@ -580,7 +580,7 @@ etta_dispose (GObject *object) static gint etta_column_count (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_column_count (etta->priv->source); } @@ -588,7 +588,7 @@ etta_column_count (ETableModel *etm) static gboolean etta_has_save_id (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_has_save_id (etta->priv->source); } @@ -596,7 +596,7 @@ etta_has_save_id (ETableModel *etm) static gchar * etta_get_save_id (ETableModel *etm, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_get_save_id (etta->priv->source, get_path (etta, row)); } @@ -604,7 +604,7 @@ etta_get_save_id (ETableModel *etm, gint row) static gboolean etta_has_change_pending (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_has_change_pending (etta->priv->source); } @@ -612,7 +612,7 @@ etta_has_change_pending (ETableModel *etm) static gint etta_row_count (ETableModel *etm) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return etta->priv->n_map; } @@ -620,7 +620,7 @@ etta_row_count (ETableModel *etm) static gpointer etta_value_at (ETableModel *etm, gint col, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; switch (col) { case -1: @@ -639,7 +639,7 @@ etta_value_at (ETableModel *etm, gint col, gint row) static void etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; e_tree_model_set_value_at (etta->priv->source, get_path (etta, row), col, val); } @@ -647,7 +647,7 @@ etta_set_value_at (ETableModel *etm, gint col, gint row, gconstpointer val) static gboolean etta_is_cell_editable (ETableModel *etm, gint col, gint row) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_node_is_editable (etta->priv->source, get_path (etta, row), col); } @@ -660,7 +660,7 @@ etta_append_row (ETableModel *etm, ETableModel *source, gint row) static gpointer etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_duplicate_value (etta->priv->source, col, value); } @@ -668,7 +668,7 @@ etta_duplicate_value (ETableModel *etm, gint col, gconstpointer value) static void etta_free_value (ETableModel *etm, gint col, gpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; e_tree_model_free_value (etta->priv->source, col, value); } @@ -676,7 +676,7 @@ etta_free_value (ETableModel *etm, gint col, gpointer value) static gpointer etta_initialize_value (ETableModel *etm, gint col) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_initialize_value (etta->priv->source, col); } @@ -684,7 +684,7 @@ etta_initialize_value (ETableModel *etm, gint col) static gboolean etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_value_is_empty (etta->priv->source, col, value); } @@ -692,7 +692,7 @@ etta_value_is_empty (ETableModel *etm, gint col, gconstpointer value) static gchar * etta_value_to_string (ETableModel *etm, gint col, gconstpointer value) { - ETreeTableAdapter *etta = (ETreeTableAdapter *)etm; + ETreeTableAdapter *etta = (ETreeTableAdapter *) etm; return e_tree_model_value_to_string (etta->priv->source, col, value); } @@ -935,7 +935,7 @@ static void save_expanded_state_func (gpointer keyp, gpointer value, gpointer data) { ETreePath path = keyp; - node_t *node = ((GNode *)value)->data; + node_t *node = ((GNode *) value)->data; TreeAndRoot *tar = data; xmlNode *xmlnode; @@ -1136,7 +1136,7 @@ e_tree_table_adapter_root_node_set_visible (ETreeTableAdapter *etta, gboolean vi if (root) e_tree_table_adapter_node_set_expanded (etta, root, TRUE); } - size = (visible ? 1 : 0) + (etta->priv->root ? ((node_t *)etta->priv->root->data)->num_visible_children : 0); + size = (visible ? 1 : 0) + (etta->priv->root ? ((node_t *) etta->priv->root->data)->num_visible_children : 0); resize_map (etta, size); if (etta->priv->root) fill_map (etta, 0, etta->priv->root); @@ -1303,7 +1303,7 @@ e_tree_table_adapter_node_get_next (ETreeTableAdapter *etta, ETreePath path) GNode *node = lookup_gnode (etta, path); if (node && node->next) - return ((node_t *)node->next->data)->path; + return ((node_t *) node->next->data)->path; return NULL; } diff --git a/widgets/table/e-tree.c b/widgets/table/e-tree.c index d9b6ce4035..470fc074e4 100644 --- a/widgets/table/e-tree.c +++ b/widgets/table/e-tree.c @@ -775,8 +775,8 @@ tree_canvas_reflow_idle (ETree *e_tree) e_tree->priv->item, "height", &height, "width", &width, NULL); - height = MAX ((gint)height, allocation.height); - width = MAX ((gint)width, allocation.width); + height = MAX ((gint) height, allocation.height); + width = MAX ((gint) width, allocation.width); /* I have no idea why this needs to be -1, but it works. */ gnome_canvas_get_scroll_region ( @@ -815,7 +815,7 @@ tree_canvas_size_allocate (GtkWidget *widget, GtkAllocation *alloc, g_object_get (e_tree->priv->item, "height", &height, NULL); - height = MAX ((gint)height, alloc->height); + height = MAX ((gint) height, alloc->height); g_object_set (e_tree->priv->item, "width", width, diff --git a/widgets/table/gal-a11y-e-cell-tree.c b/widgets/table/gal-a11y-e-cell-tree.c index ee06f6e025..808a611934 100644 --- a/widgets/table/gal-a11y-e-cell-tree.c +++ b/widgets/table/gal-a11y-e-cell-tree.c @@ -211,14 +211,14 @@ gal_a11y_e_cell_tree_new (ETableItem *item, /* Translators: description of an "expand" action */ _("expands the row in the ETree containing this cell"), NULL, - (ACTION_FUNC)ectr_do_action_expand); + (ACTION_FUNC) ectr_do_action_expand); gal_a11y_e_cell_add_action (GAL_A11Y_E_CELL (subcell_a11y), "collapse", /* Translators: description of a "collapse" action */ _("collapses the row in the ETree containing this cell"), NULL, - (ACTION_FUNC)ectr_do_action_collapse); + (ACTION_FUNC) ectr_do_action_collapse); /* init AtkStates for the cell's a11y object */ node = e_table_model_value_at (item->table_model, -1, row); diff --git a/widgets/table/gal-a11y-e-cell-vbox.c b/widgets/table/gal-a11y-e-cell-vbox.c index 1fa24f821a..637a53e7e3 100644 --- a/widgets/table/gal-a11y-e-cell-vbox.c +++ b/widgets/table/gal-a11y-e-cell-vbox.c @@ -138,7 +138,7 @@ ecv_ref_accessible_at_point (AtkComponent *component, ecvv->subcell_views[i], ecvv->model_cols[i], gaec->view_col, gaec->row); if ( 0 <= y && y <= subcell_height) { - return ecv_ref_child ((AtkObject *)component, i); + return ecv_ref_child ((AtkObject *) component, i); } else y -= subcell_height; } diff --git a/widgets/table/gal-a11y-e-cell.c b/widgets/table/gal-a11y-e-cell.c index 17f9b8f166..1cac917edd 100644 --- a/widgets/table/gal-a11y-e-cell.c +++ b/widgets/table/gal-a11y-e-cell.c @@ -282,7 +282,7 @@ static void _gal_a11y_e_cell_destroy_action_info (gpointer action_info, gpointer user_data) { - ActionInfo *info = (ActionInfo *)action_info; + ActionInfo *info = (ActionInfo *) action_info; g_return_if_fail (info != NULL); g_free (info->name); diff --git a/widgets/table/gal-a11y-e-table-item.c b/widgets/table/gal-a11y-e-table-item.c index 92716e68bc..ffa4bd51c2 100644 --- a/widgets/table/gal-a11y-e-table-item.c +++ b/widgets/table/gal-a11y-e-table-item.c @@ -756,7 +756,7 @@ eti_rows_deleted (ETableModel * model, gint row, gint count, } } g_signal_emit_by_name (table_item, "visible-data-changed"); - eti_a11y_reset_focus_object ((GalA11yETableItem *)table_item, item, TRUE); + eti_a11y_reset_focus_object ((GalA11yETableItem *) table_item, item, TRUE); } static void diff --git a/widgets/table/gal-a11y-e-table.c b/widgets/table/gal-a11y-e-table.c index c6ba4e7d2b..d04bda280e 100644 --- a/widgets/table/gal-a11y-e-table.c +++ b/widgets/table/gal-a11y-e-table.c @@ -91,7 +91,7 @@ init_child_item (GalA11yETable *a11y) table = E_TABLE (gtk_accessible_get_widget (GTK_ACCESSIBLE (a11y))); if (table && gtk_widget_get_mapped (GTK_WIDGET (table)) && table->group && E_IS_TABLE_GROUP_CONTAINER (table->group)) { - ETableGroupContainer *etgc = (ETableGroupContainer *)table->group; + ETableGroupContainer *etgc = (ETableGroupContainer *) table->group; GList *list; for (list = etgc->children; list; list = g_list_next (list)) { @@ -133,7 +133,7 @@ et_get_n_children (AtkObject *accessible) if (E_IS_TABLE_GROUP_LEAF (et->group)) n = 1; else if (E_IS_TABLE_GROUP_CONTAINER (et->group)) { - ETableGroupContainer *etgc = (ETableGroupContainer *)et->group; + ETableGroupContainer *etgc = (ETableGroupContainer *) et->group; n = g_list_length (etgc->children); } } @@ -291,7 +291,7 @@ gal_a11y_e_table_new (GObject *widget) g_object_ref (a11y); g_object_ref (widget); - g_idle_add ((GSourceFunc)init_child_item, a11y); + g_idle_add ((GSourceFunc) init_child_item, a11y); } return ATK_OBJECT (a11y); diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c index 0b9f7f149f..40aedfc735 100644 --- a/widgets/text/e-text.c +++ b/widgets/text/e-text.c @@ -2318,7 +2318,7 @@ popup_targets_received (GtkClipboard *clipboard, /* If invoked by S-F10 key binding, button will be 0. */ if (button->button == 0) { gtk_menu_popup (GTK_MENU (popup_menu), NULL, NULL, - popup_menu_placement_cb, (gpointer)text, + popup_menu_placement_cb, (gpointer) text, button->button, GDK_CURRENT_TIME); } else { gtk_menu_popup (GTK_MENU (popup_menu), NULL, NULL, @@ -2327,7 +2327,7 @@ popup_targets_received (GtkClipboard *clipboard, } g_object_unref (text); - gdk_event_free ((GdkEvent *)button); + gdk_event_free ((GdkEvent *) button); } static void @@ -2337,7 +2337,7 @@ e_text_do_popup (EText *text, GdkEventButton *button, gint position) closure->text = text; g_object_ref (closure->text); - closure->button = (GdkEventButton *) gdk_event_copy ((GdkEvent *)button); + closure->button = (GdkEventButton *) gdk_event_copy ((GdkEvent *) button); closure->position = position; gtk_clipboard_request_contents ( |