diff options
author | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:24:42 +0800 |
---|---|---|
committer | Matthew Barnes <mbarnes@redhat.com> | 2011-05-09 01:37:20 +0800 |
commit | 8a186c3588d3598857c36e2122fa68d01eba30fd (patch) | |
tree | 731078659d4e04af8346c5ca68512d8537b3707a /mail | |
parent | 2bf3460cd3eb0853a1d10a6e36f5091898a5533f (diff) | |
download | gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.gz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.bz2 gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.lz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.xz gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.tar.zst gsoc2013-evolution-8a186c3588d3598857c36e2122fa68d01eba30fd.zip |
Coding style cleanups.
Diffstat (limited to 'mail')
35 files changed, 470 insertions, 470 deletions
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); } } |