From 9c26fef2d420b58f8e3699af4c09705f3e9eb65b Mon Sep 17 00:00:00 2001 From: Not Zed Date: Wed, 2 Mar 2005 05:23:46 +0000 Subject: include atkutil.h (message_list_construct): cast warning. 2005-03-01 Not Zed * message-list.c: include atkutil.h (message_list_construct): cast warning. * mail-session.c (mail_session_set_interactive): remove unused variable since we can no longer terminate password requests. * mail-autofilter.c (em_vfolder_rule_from_address): properly define in header. * em-utils.c (emu_get_save_filesel): only define filename in the !gtkfilechooser case. * em-mailer-prefs.c (restore_labels_clicked): cast for warning. (em_mailer_prefs_construct): same. * em-format-html.c (efh_format_header): remove unused variable. * em-account-editor.c (emae_widget_druid_glade): remove unused variable. * importers/mail-importer.h: forward-delcare struct _MailComponent. * *c: remove/disable various debug. svn path=/trunk/; revision=28934 --- mail/ChangeLog | 27 +++++++++++++++++++++++++++ mail/e-searching-tokenizer.c | 4 ++-- mail/em-account-editor.c | 22 +++++++++------------- mail/em-format-html-display.c | 4 ++-- mail/em-format-html.c | 3 +-- mail/em-icon-stream.c | 2 +- mail/em-mailer-prefs.c | 4 ++-- mail/em-menu.c | 2 -- mail/em-utils.c | 4 +++- mail/importers/mail-importer.h | 2 ++ mail/mail-autofilter.c | 5 +++-- mail/mail-autofilter.h | 3 ++- mail/mail-session.c | 1 - mail/message-list.c | 18 +++++++++--------- 14 files changed, 63 insertions(+), 38 deletions(-) diff --git a/mail/ChangeLog b/mail/ChangeLog index 75ddde2ef8..2ec5d0b12b 100644 --- a/mail/ChangeLog +++ b/mail/ChangeLog @@ -1,3 +1,30 @@ +2005-03-01 Not Zed + + * message-list.c: include atkutil.h + (message_list_construct): cast warning. + + * mail-session.c (mail_session_set_interactive): remove unused + variable since we can no longer terminate password requests. + + * mail-autofilter.c (em_vfolder_rule_from_address): properly + define in header. + + * em-utils.c (emu_get_save_filesel): only define filename in the + !gtkfilechooser case. + + * em-mailer-prefs.c (restore_labels_clicked): cast for warning. + (em_mailer_prefs_construct): same. + + * em-format-html.c (efh_format_header): remove unused variable. + + * em-account-editor.c (emae_widget_druid_glade): remove unused + variable. + + * importers/mail-importer.h: forward-delcare struct + _MailComponent. + + * *c: remove/disable various debug. + 2005-03-02 Harry Lu Fix for 71733. diff --git a/mail/e-searching-tokenizer.c b/mail/e-searching-tokenizer.c index 370ab02747..3ace0860c8 100644 --- a/mail/e-searching-tokenizer.c +++ b/mail/e-searching-tokenizer.c @@ -571,7 +571,7 @@ output_match(struct _searcher *s, unsigned int start, unsigned int end) endtoken = find_token(s, end); if (starttoken == NULL || endtoken == NULL) { - printf("Cannot find match history for match %d-%d\n", start, end); + d(printf("Cannot find match history for match %d-%d\n", start, end)); return; } @@ -669,7 +669,7 @@ push_subpending(struct _searcher *s, int offstart, int offend) { /* This is really an assertion, we just ignore the last pending match instead of crashing though */ if (s->submatchp >= s->words) { - printf("ERROR: submatch pending stack overflow\n"); + d(printf("ERROR: submatch pending stack overflow\n")); s->submatchp = s->words-1; } diff --git a/mail/em-account-editor.c b/mail/em-account-editor.c index 47bc9e2f9c..3e25485134 100644 --- a/mail/em-account-editor.c +++ b/mail/em-account-editor.c @@ -526,13 +526,13 @@ emae_auto_detect(EMAccountEditor *emae) || (entries = service->provider->extra_conf) == NULL) return; - printf("Running auto-detect\n"); + d(printf("Running auto-detect\n")); url = emae_account_url(emae, E_ACCOUNT_SOURCE_URL); camel_provider_auto_detect(service->provider, url, &auto_detected, NULL); camel_url_free(url); if (auto_detected == NULL) { - printf(" no values detected\n"); + d(printf(" no values detected\n")); return; } @@ -647,8 +647,6 @@ emae_signaturetype_changed(GtkComboBox *dropdown, EMAccountEditor *emae) gtk_tree_model_get(model, &iter, 1, &uid, -1); } - printf("signaturetype changed: %d uid=%s\n", id, uid?uid:""); - e_account_set_string(emae->account, E_ACCOUNT_ID_SIGNATURE, uid); g_free(uid); } @@ -699,7 +697,6 @@ emae_setup_signatures(EMAccountEditor *emae, GladeXML *xml) gtk_list_store_append(store, &iter); gtk_list_store_set(store, &iter, 0, sig->autogen?_("Autogenerated"):sig->name, 1, sig->uid, -1); - printf("check sig '%s' is ours '%s' = %s\n", sig->uid, current, (current && !strcmp(current, sig->uid))?"yep":"no"); if (current && !strcmp(current, sig->uid)) active = i; @@ -1919,7 +1916,7 @@ emae_receive_options_extra_item(EConfig *ec, EConfigItem *eitem, struct _GtkWidg return NULL; section: - printf("Building extra section '%s'\n", eitem->path); + d(printf("Building extra section '%s'\n", eitem->path)); url = emae_account_url(emae, emae_service_info[service->type].account_uri_key); item->extra_table = g_hash_table_new(g_str_hash, g_str_equal); @@ -2226,7 +2223,6 @@ emae_management_page(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, static GtkWidget * emae_widget_druid_glade(EConfig *ec, EConfigItem *item, struct _GtkWidget *parent, struct _GtkWidget *old, void *data) { - EMAccountEditor *emae = data; GladeXML *druidxml = glade_xml_new(EVOLUTION_GLADEDIR "/mail-config.glade", item->label, NULL); GtkWidget *w; @@ -2352,19 +2348,19 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) || tmp[0] == 0 || is_email(tmp)); if (!ok) - printf("identity incomplete\n"); + d(printf("identity incomplete\n")); } if (ok && (pageid == NULL || !strcmp(pageid, "10.receive"))) { ok = emae_service_complete(emae, &emae->priv->source); if (!ok) - printf("receive page incomplete\n"); + d(printf("receive page incomplete\n")); } if (ok && (pageid == NULL || !strcmp(pageid, "30.send"))) { ok = emae_service_complete(emae, &emae->priv->transport); if (!ok) - printf("send page incomplete\n"); + d(printf("send page incomplete\n")); } if (ok && (pageid == NULL || !strcmp(pageid, "40.management"))) { @@ -2373,7 +2369,7 @@ emae_check_complete(EConfig *ec, const char *pageid, void *data) && ((ea = mail_config_get_account_by_name(tmp)) == NULL || ea == emae->original); if (!ok) - printf("management page incomplete\n"); + d(printf("management page incomplete\n")); } /* We use the page-check of various pages to 'prepare' or @@ -2454,12 +2450,12 @@ emae_commit(EConfig *ec, GSList *items, void *data) /* the mail-config*acconts* api needs a lot of work */ if (emae->original) { - printf("Committing account '%s'\n", e_account_get_string(emae->account, E_ACCOUNT_NAME)); + d(printf("Committing account '%s'\n", e_account_get_string(emae->account, E_ACCOUNT_NAME))); e_account_import(emae->original, emae->account); account = emae->original; e_account_list_change(accounts, account); } else { - printf("Adding new account '%s'\n", e_account_get_string(emae->account, E_ACCOUNT_NAME)); + d(printf("Adding new account '%s'\n", e_account_get_string(emae->account, E_ACCOUNT_NAME))); e_account_list_add(accounts, emae->account); account = emae->account; diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c index 6f74fa0495..4876989357 100644 --- a/mail/em-format-html-display.c +++ b/mail/em-format-html-display.c @@ -1434,8 +1434,8 @@ efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject * wrapper = camel_medium_get_content_object((CamelMedium *)pobject->part); if (FALSE && !g_ascii_strncasecmp (eb->type, "text/", 5)) { /* do charset conversion, etc */ - printf ("performing charset conversion for %s component\n", eb->type); - em_format_format_text ((EMFormat *) efh, (CamelStream *) cstream, wrapper); + d(printf("performing charset conversion for %s component\n", eb->type)); + em_format_format_text((EMFormat *)efh, (CamelStream *)cstream, wrapper); } else { camel_data_wrapper_decode_to_stream (wrapper, (CamelStream *) cstream); } diff --git a/mail/em-format-html.c b/mail/em-format-html.c index 100a97c46d..9126bdd337 100644 --- a/mail/em-format-html.c +++ b/mail/em-format-html.c @@ -562,7 +562,7 @@ efh_object_requested(GtkHTML *html, GtkHTMLEmbedded *eb, EMFormatHTML *efh) res = pobject->func(efh, eb, pobject); e_dlist_addhead(&efh->pending_object_list, (EDListNode *)pobject); } else { - printf("HTML Includes reference to unknown object '%s'\n", eb->classid); + d(printf("HTML Includes reference to unknown object '%s'\n", eb->classid)); } return res; @@ -1484,7 +1484,6 @@ efh_format_address (GString *out, struct _camel_header_address *a) static void efh_format_header(EMFormat *emf, CamelStream *stream, CamelMedium *part, struct _camel_header_raw *header, guint32 flags, const char *charset) { - CamelMimeMessage *msg = (CamelMimeMessage *)part; EMFormatHTML *efh = (EMFormatHTML *)emf; char *name, *value = NULL, *p; const char *label, *txt; diff --git a/mail/em-icon-stream.c b/mail/em-icon-stream.c index fb76177722..565eacc34e 100644 --- a/mail/em-icon-stream.c +++ b/mail/em-icon-stream.c @@ -168,7 +168,7 @@ emis_sync_close(CamelStream *stream) pixbuf = gdk_pixbuf_loader_get_pixbuf(emis->loader); if (pixbuf == NULL) { - printf("couldn't get pixbuf from loader\n"); + d(printf("couldn't get pixbuf from loader\n")); emis_cleanup(emis); return -1; } diff --git a/mail/em-mailer-prefs.c b/mail/em-mailer-prefs.c index 5b88e7b4c9..0799d0b879 100644 --- a/mail/em-mailer-prefs.c +++ b/mail/em-mailer-prefs.c @@ -248,7 +248,7 @@ restore_labels_clicked (GtkWidget *widget, gpointer user_data) for (i = 0; i < 5; i++) { gtk_entry_set_text (prefs->labels[i].name, _(label_defaults[i].name)); colorpicker_set_color (prefs->labels[i].color, label_defaults[i].colour); - atk_object_set_name (gtk_widget_get_accessible (prefs->labels[i].color), _(label_defaults[i].name)); + atk_object_set_name(gtk_widget_get_accessible((GtkWidget *)prefs->labels[i].color), _(label_defaults[i].name)); } } @@ -884,7 +884,7 @@ em_mailer_prefs_construct (EMMailerPrefs *prefs) colorpicker_set_color (prefs->labels[i].color, label->colour); g_signal_connect (prefs->labels[i].color, "color-set", G_CALLBACK (label_color_set), prefs); - atk_object_set_name (gtk_widget_get_accessible (prefs->labels[i].color), label->name); + atk_object_set_name(gtk_widget_get_accessible((GtkWidget *)prefs->labels[i].color), label->name); i++; list = list->next; diff --git a/mail/em-menu.c b/mail/em-menu.c index 2bcf74cc5d..e5a5087c61 100644 --- a/mail/em-menu.c +++ b/mail/em-menu.c @@ -100,8 +100,6 @@ emp_target_free(EMenu *ep, EMenuTarget *t) static void emp_class_init(GObjectClass *klass) { - printf("em menu class init\n"); - klass->finalize = emp_finalise; ((EMenuClass *)klass)->target_free = emp_target_free; diff --git a/mail/em-utils.c b/mail/em-utils.c index 679875bcfe..22b0ea1dda 100644 --- a/mail/em-utils.c +++ b/mail/em-utils.c @@ -304,7 +304,7 @@ emu_get_save_filesel (GtkWidget *parent, const char *title, const char *name) { GtkWidget *filesel; const char *dir; - char *realname, *filename, *gdir; + char *realname, *gdir; GConfClient *gconf; #ifdef USE_GTKFILECHOOSER @@ -316,6 +316,8 @@ emu_get_save_filesel (GtkWidget *parent, const char *title, const char *name) NULL); gtk_dialog_set_default_response (GTK_DIALOG (filesel), GTK_RESPONSE_OK); #else + char *filename; + filesel = gtk_file_selection_new (title); #endif diff --git a/mail/importers/mail-importer.h b/mail/importers/mail-importer.h index 56c83495a8..17eeea1fb9 100644 --- a/mail/importers/mail-importer.h +++ b/mail/importers/mail-importer.h @@ -31,6 +31,8 @@ struct _MailImporter { gboolean frozen; /* Is folder frozen? */ }; +struct _MailComponent; + void mail_importer_init (struct _MailComponent *mc); void mail_importer_uninit (void); diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c index 8084b226f1..a1f7728d78 100644 --- a/mail/mail-autofilter.c +++ b/mail/mail-autofilter.c @@ -52,6 +52,7 @@ #include "em-filter-editor.h" #include "filter/filter-option.h" +#define d(x) static void rule_match_recipients (RuleContext *context, FilterRule *rule, CamelInternetAddress *iaddr) @@ -385,7 +386,7 @@ mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri changed = rule_context_rename_uri((RuleContext *)fc, eolduri, enewuri, g_str_equal); if (changed) { - printf("Folder rename '%s' -> '%s' changed filters, resaving\n", olduri, newuri); + d(printf("Folder rename '%s' -> '%s' changed filters, resaving\n", olduri, newuri)); if (rule_context_save((RuleContext *)fc, user) == -1) g_warning("Could not write out changed filter rules\n"); rule_context_free_uri_list((RuleContext *)fc, changed); @@ -431,7 +432,7 @@ mail_filter_delete_uri(CamelStore *store, const char *uri) g_string_free(s, TRUE); gtk_widget_show(dialog); - printf("Folder deleterename '%s' changed filters, resaving\n", euri); + d(printf("Folder delete/rename '%s' changed filters, resaving\n", euri)); if (rule_context_save ((RuleContext *) fc, user) == -1) g_warning ("Could not write out changed filter rules\n"); rule_context_free_uri_list ((RuleContext *) fc, deleted); diff --git a/mail/mail-autofilter.h b/mail/mail-autofilter.h index c6501e2fa1..7bd7882dcc 100644 --- a/mail/mail-autofilter.h +++ b/mail/mail-autofilter.h @@ -39,9 +39,10 @@ enum { FilterRule *em_vfolder_rule_from_message(EMVFolderContext *context, CamelMimeMessage *msg, int flags, const char *source); FilterRule *filter_rule_from_message(EMFilterContext *context, CamelMimeMessage *msg, int flags); +FilterRule *em_vfolder_rule_from_address(EMVFolderContext *context, CamelInternetAddress *addr, int flags, const char *source); /* easiest place to put this */ -void filter_gui_add_from_message (CamelMimeMessage *msg, const char *source, int flags); +void filter_gui_add_from_message(CamelMimeMessage *msg, const char *source, int flags); /* Also easiest place for these, we should really share a global rule context for this stuff ... */ void mail_filter_rename_uri(CamelStore *store, const char *olduri, const char *newuri); diff --git a/mail/mail-session.c b/mail/mail-session.c index 5b8c2cc9b5..627447c3f7 100644 --- a/mail/mail-session.c +++ b/mail/mail-session.c @@ -667,7 +667,6 @@ mail_session_set_interactive (gboolean interactive) MAIL_SESSION (session)->interactive = interactive; if (!interactive) { - struct _pass_msg *pm; struct _user_message_msg *um; d(printf ("Gone non-interactive, checking for outstanding interactive tasks\n")); diff --git a/mail/message-list.c b/mail/message-list.c index 12ceb2e089..41ca6ff9f7 100644 --- a/mail/message-list.c +++ b/mail/message-list.c @@ -40,6 +40,7 @@ #include #include #include +#include #include #include @@ -1529,11 +1530,11 @@ ml_selection_get(GtkWidget *widget, GtkSelectionData *data, guint info, guint ti if (info & 2) { /* text/plain */ - printf("setting text/plain selection for uids\n"); + d(printf("setting text/plain selection for uids\n")); em_utils_selection_set_mailbox(data, selection->folder, selection->uids); } else { /* x-uid-list */ - printf("setting x-uid-list selection for uids\n"); + d(printf("setting x-uid-list selection for uids\n")); em_utils_selection_set_uidlist(data, selection->folder_uri, selection->uids); } } @@ -1552,8 +1553,7 @@ static void ml_selection_received(GtkWidget *widget, GtkSelectionData *data, guint time, MessageList *ml) { if (data->target != gdk_atom_intern ("x-uid-list", FALSE)) { - printf("Unknown selection received by message-list\n"); - + d(printf("Unknown selection received by message-list\n")); return; } @@ -1771,12 +1771,12 @@ ml_tree_drag_motion(ETree *tree, GdkDragContext *context, gint x, gint y, guint for (targets = context->targets; targets; targets = targets->next) { int i; - printf("atom drop '%s'\n", gdk_atom_name(targets->data)); + d(printf("atom drop '%s'\n", gdk_atom_name(targets->data))); for (i=0;idata == (void *)ml_drag_info[i].atom) actions |= ml_drag_info[i].actions; } - printf("\n"); + d(printf("\n")); actions &= context->actions; action = context->suggested_action; @@ -2036,9 +2036,9 @@ message_list_construct (MessageList *message_list) if (!construct_failed) e_tree_root_node_set_visible (message_list->tree, FALSE); - if (atk_get_root () != NULL) { - a11y = gtk_widget_get_accessible (message_list->tree); - atk_object_set_name (a11y, _("Message List")); + if (atk_get_root() != NULL) { + a11y = gtk_widget_get_accessible((GtkWidget *)message_list->tree); + atk_object_set_name(a11y, _("Message List")); } g_signal_connect((message_list->tree), "cursor_activated", -- cgit