aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKjartan Maraas <kmaraas@gnome.org>2006-02-08 19:51:32 +0800
committerKjartan Maraas <kmaraas@src.gnome.org>2006-02-08 19:51:32 +0800
commitf6e0e26a6febd0c934a166437bb344f2dbb735a9 (patch)
treee0020bed35ced9e71df75bc9c015f844c4645707
parentea9e711fe9b31a61fa9ace5dd5d84740d216f182 (diff)
downloadgsoc2013-evolution-f6e0e26a6febd0c934a166437bb344f2dbb735a9.tar.gz
gsoc2013-evolution-f6e0e26a6febd0c934a166437bb344f2dbb735a9.tar.zst
gsoc2013-evolution-f6e0e26a6febd0c934a166437bb344f2dbb735a9.zip
s/int/guint/g for 1-bit bitfield. Remove cruft use guint for 1-bit
2006-01-09 Kjartan Maraas <kmaraas@gnome.org> * em-account-editor.h: s/int/guint/g for 1-bit bitfield. * em-composer-utils.c: (em_utils_redirect_message): Remove cruft * em-folder-tree.c: (emft_drop_target): use guint for 1-bit bitfield and rename a variable with a name clash. * em-folder-utils.c: (em_folder_utils_rename_folder): Rename var to avoid name clashes. * em-folder-view.c: guint for 1-bit bitfields. * em-folder-view.h: Same as above. * em-format-html-print.h: Again. * em-format-html.c: (efh_text_html), (efh_multipart_related): Add comments * em-format.c: (emf_multipart_alternative): Add comment about using var that is passed in rather than a local variable. * em-inline-filter.c: (emif_scan): Remove unused var. Mark code static. * em-mailer-prefs.h: guint for 1-bit bitfields. * em-migrate.c: (em_migrate_folder): mark a struct static. remove unused var * em-subscribe-editor.c: guint for 1-bit bitfield * em-utils.c: remove unused function * em-vfolder-rule.c: mark array static * importers/mail-importer.c: (decode_status): Remove unused code. Use guint for 1-bit bitfield. * mail-autofilter.c: (rule_from_message): rename a variable * mail-component.c: guint for 1-bit bitfield * mail-folder-cache.c: (update_1folder): remove unused code * mail-mt.c: mark some structs static * message-list.c: (message_list_select_uid), (ml_value_to_string), (ml_tree_value_at), (find_next_undeleted), (build_tree), (build_flat): Remove unused code and fix some format specifiers. svn path=/trunk/; revision=31448
-rw-r--r--mail/ChangeLog30
-rw-r--r--mail/em-account-editor.h2
-rw-r--r--mail/em-composer-utils.c3
-rw-r--r--mail/em-folder-browser.c2
-rw-r--r--mail/em-folder-tree.c20
-rw-r--r--mail/em-folder-utils.c8
-rw-r--r--mail/em-folder-view.c4
-rw-r--r--mail/em-folder-view.h12
-rw-r--r--mail/em-format-html-display.c10
-rw-r--r--mail/em-format-html-print.h2
-rw-r--r--mail/em-format-html.c2
-rw-r--r--mail/em-format.c3
-rw-r--r--mail/em-inline-filter.c5
-rw-r--r--mail/em-mailer-prefs.h4
-rw-r--r--mail/em-migrate.c4
-rw-r--r--mail/em-subscribe-editor.c2
-rw-r--r--mail/em-utils.c38
-rw-r--r--mail/em-vfolder-rule.c2
-rw-r--r--mail/importers/mail-importer.c5
-rw-r--r--mail/mail-autofilter.c8
-rw-r--r--mail/mail-component.c2
-rw-r--r--mail/mail-folder-cache.c5
-rw-r--r--mail/mail-mt.c8
-rw-r--r--mail/message-list.c19
-rw-r--r--mail/message-list.h3
25 files changed, 96 insertions, 107 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index dec2675a4c..71dc630219 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,33 @@
+2006-01-09 Kjartan Maraas <kmaraas@gnome.org>
+
+ * em-account-editor.h: s/int/guint/g for 1-bit bitfield.
+ * em-composer-utils.c: (em_utils_redirect_message): Remove cruft
+ * em-folder-tree.c: (emft_drop_target): use guint for 1-bit bitfield
+ and rename a variable with a name clash.
+ * em-folder-utils.c: (em_folder_utils_rename_folder): Rename var to
+ avoid name clashes.
+ * em-folder-view.c: guint for 1-bit bitfields.
+ * em-folder-view.h: Same as above.
+ * em-format-html-print.h: Again.
+ * em-format-html.c: (efh_text_html), (efh_multipart_related): Add comments
+ * em-format.c: (emf_multipart_alternative): Add comment about using var that
+ is passed in rather than a local variable.
+ * em-inline-filter.c: (emif_scan): Remove unused var. Mark code static.
+ * em-mailer-prefs.h: guint for 1-bit bitfields.
+ * em-migrate.c: (em_migrate_folder): mark a struct static. remove unused var
+ * em-subscribe-editor.c: guint for 1-bit bitfield
+ * em-utils.c: remove unused function
+ * em-vfolder-rule.c: mark array static
+ * importers/mail-importer.c: (decode_status): Remove unused code. Use guint
+ for 1-bit bitfield.
+ * mail-autofilter.c: (rule_from_message): rename a variable
+ * mail-component.c: guint for 1-bit bitfield
+ * mail-folder-cache.c: (update_1folder): remove unused code
+ * mail-mt.c: mark some structs static
+ * message-list.c: (message_list_select_uid), (ml_value_to_string),
+ (ml_tree_value_at), (find_next_undeleted), (build_tree),
+ (build_flat): Remove unused code and fix some format specifiers.
+
2006-02-08 Rajeev ramanathan <rajeevramanathan_2004@yahoo.co.in>
**Fixes #329586
diff --git a/mail/em-account-editor.h b/mail/em-account-editor.h
index 0a46aa45a9..7848f1eff1 100644
--- a/mail/em-account-editor.h
+++ b/mail/em-account-editor.h
@@ -55,7 +55,7 @@ struct _EMAccountEditor {
struct _EAccount *account; /* working account, must instant apply to this */
struct _EAccount *original; /* original account, not changed unless commit is invoked */
- int do_signature:1; /* allow editing signature */
+ guint do_signature:1; /* allow editing signature */
};
struct _EMAccountEditorClass {
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index 88269a4ccc..583c0ba3a7 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -1041,14 +1041,11 @@ void
em_utils_redirect_message (CamelMimeMessage *message)
{
EMsgComposer *composer;
- CamelDataWrapper *wrapper;
g_return_if_fail (CAMEL_IS_MIME_MESSAGE (message));
composer = redirect_get_composer (message);
- wrapper = camel_medium_get_content_object (CAMEL_MEDIUM (message));
-
gtk_widget_show (GTK_WIDGET (composer));
e_msg_composer_unset_changed (composer);
e_msg_composer_drop_editor_undo (composer);
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index 04a209a5fe..5f21ba0e91 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -1014,7 +1014,7 @@ emfb_etree_unfreeze (GtkWidget *widget, GdkEvent *event, EMFolderView *emfv)
ETableItem *item = e_tree_get_item (emfv->list->tree);
- g_object_set_data (((GnomeCanvasItem *) item)->canvas, "freeze-cursor", 0);
+ g_object_set_data (G_OBJECT (((GnomeCanvasItem *) item)->canvas), "freeze-cursor", 0);
}
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index c709165c02..a85c98bd39 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -91,8 +91,8 @@ struct _EMFolderTreePrivate {
gboolean (*excluded_func)(EMFolderTree *emft, GtkTreeModel *model, GtkTreeIter *iter, void *data);
void *excluded_data;
- int do_multiselect:1; /* multiple select mode */
- int cursor_set:1; /* set to TRUE means we or something
+ guint do_multiselect:1; /* multiple select mode */
+ guint cursor_set:1; /* set to TRUE means we or something
* else has set the cursor, otherwise
* we need to set it when we set the
* selection */
@@ -1155,15 +1155,15 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
/* Check for special sources, and vfolder stuff */
if (src_uri) {
CamelURL *url;
- char *path;
+ char *url_path;
/* FIXME: this is a total hack, but i think all we can do at present */
/* Check for dragging from special folders which can't be moved/copied */
url = camel_url_new(src_uri, NULL);
- path = url->fragment?url->fragment:url->path;
- if (path && path[0]) {
+ url_path = url->fragment?url->fragment:url->path;
+ if (url_path && url_path[0]) {
/* don't allow moving any of the the local special folders */
- if (sstore == local && is_special_local_folder (path)) {
+ if (sstore == local && is_special_local_folder (url_path)) {
GdkAtom xfolder;
camel_url_free (url);
@@ -1184,16 +1184,16 @@ emft_drop_target(EMFolderTree *emft, GdkDragContext *context, GtkTreePath *path)
}
/* don't allow copying/moving of the UNMATCHED vfolder */
- if (!strcmp (url->protocol, "vfolder") && !strcmp (path, CAMEL_UNMATCHED_NAME)) {
+ if (!strcmp (url->protocol, "vfolder") && !strcmp (url_path, CAMEL_UNMATCHED_NAME)) {
camel_url_free (url);
goto done;
}
/* don't allow copying/moving of any vTrash/vJunk folder nor maildir 'inbox' */
- if (strcmp(path, CAMEL_VTRASH_NAME) == 0
- || strcmp(path, CAMEL_VJUNK_NAME) == 0
+ if (strcmp(url_path, CAMEL_VTRASH_NAME) == 0
+ || strcmp(url_path, CAMEL_VJUNK_NAME) == 0
/* Dont allow drag from maildir 'inbox' */
- || strcmp(path, ".") == 0) {
+ || strcmp(url_path, ".") == 0) {
camel_url_free(url);
goto done;
}
diff --git a/mail/em-folder-utils.c b/mail/em-folder-utils.c
index 6578423880..ff5947bcdd 100644
--- a/mail/em-folder-utils.c
+++ b/mail/em-folder-utils.c
@@ -513,14 +513,14 @@ em_folder_utils_rename_folder (CamelFolder *folder)
} else {
CamelFolderInfo *fi;
CamelException ex;
- char *path, *p;
+ char *path, *tmp;
if (base_len > 0) {
path = g_malloc (base_len + strlen (new_name) + 2);
memcpy (path, folder->full_name, base_len);
- p = path + base_len;
- *p++ = '/';
- strcpy (p, new_name);
+ tmp = path + base_len;
+ *tmp++ = '/';
+ strcpy (tmp, new_name);
} else {
path = g_strdup (new_name);
}
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index e0a79138a9..e369bba550 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -144,8 +144,8 @@ struct _EMFolderViewPrivate {
guint seen_id;
guint setting_notify_id;
guint selected_id;
- int nomarkseen:1;
- int destroyed:1;
+ guint nomarkseen:1;
+ guint destroyed:1;
GtkWidget *invisible;
char *selection_uri;
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
index bb0471f444..87dff43634 100644
--- a/mail/em-folder-view.h
+++ b/mail/em-folder-view.h
@@ -90,18 +90,18 @@ struct _EMFolderView {
TODO: should this be on class? */
int mark_seen_timeout; /* local copy of gconf stuff */
- int mark_seen:1;
- int preview_active:1; /* is preview being used */
- int statusbar_active:1; /* should we manage the statusbar messages ourselves? */
- int hide_deleted:1;
- int list_active:1; /* we actually showing the list? */
+ guint mark_seen:1;
+ guint preview_active:1; /* is preview being used */
+ guint statusbar_active:1; /* should we manage the statusbar messages ourselves? */
+ guint hide_deleted:1;
+ guint list_active:1; /* we actually showing the list? */
};
struct _EMFolderViewClass {
GtkVBoxClass parent_class;
/* behaviour definition */
- int update_message_style:1;
+ guint update_message_style:1;
/* if used as a control, used to activate/deactivate custom menu's */
void (*activate)(EMFolderView *, struct _BonoboUIComponent *uic, int state);
diff --git a/mail/em-format-html-display.c b/mail/em-format-html-display.c
index 28ba04b6dd..4462ad8a4a 100644
--- a/mail/em-format-html-display.c
+++ b/mail/em-format-html-display.c
@@ -51,6 +51,7 @@
#include <gtk/gtkarrow.h>
#include <gtk/gtklabel.h>
#include <gtk/gtkentry.h>
+#include <gtk/gtkscrolledwindow.h>
#include <gtk/gtktogglebutton.h>
#include <gtk/gtktable.h>
#include <gtk/gtkmenu.h>
@@ -189,6 +190,7 @@ static void efhd_format_source(EMFormat *, CamelStream *, CamelMimePart *);
static void efhd_format_attachment(EMFormat *, CamelStream *, CamelMimePart *, const char *, const EMFormatHandler *);
static void efhd_format_secure(EMFormat *emf, CamelStream *stream, CamelMimePart *part, CamelCipherValidity *valid);
static void efhd_complete(EMFormat *);
+gboolean efhd_mnemonic_show_bar (GtkWidget *widget, gboolean focus, GtkWidget *efhd);
static gboolean efhd_bonobo_object(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobject);
static gboolean efhd_use_component(const char *mime_type);
@@ -2033,7 +2035,7 @@ efhd_bar_scroll_event(GtkWidget *w, GdkEventScroll *event, EMFormatHTMLDisplay *
gboolean
efhd_mnemonic_show_bar (GtkWidget *widget, gboolean focus, GtkWidget *efhd)
{
- attachment_bar_arrow_clicked (NULL, efhd);
+ attachment_bar_arrow_clicked (NULL, (EMFormatHTMLDisplay *)efhd);
return TRUE;
}
@@ -2048,7 +2050,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
priv->attachment_bar = e_attachment_bar_new(NULL);
scroll = gtk_scrolled_window_new (NULL, NULL);
- gtk_scrolled_window_set_policy (scroll, GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
+ gtk_scrolled_window_set_policy (GTK_SCROLLED_WINDOW (scroll), GTK_POLICY_NEVER, GTK_POLICY_AUTOMATIC);
((EAttachmentBar *)priv->attachment_bar)->expand = TRUE;
priv->forward = gtk_arrow_new(GTK_ARROW_RIGHT, GTK_SHADOW_NONE);
@@ -2061,7 +2063,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
atk_object_set_name (gtk_widget_get_accessible (priv->arrow), _("Toggle Attachment Bar"));
priv->label = gtk_label_new(_("No Attachment"));
- gtk_label_set_mnemonic_widget (priv->label, priv->arrow);
+ gtk_label_set_mnemonic_widget (GTK_LABEL (priv->label), priv->arrow);
save = gtk_button_new();
image = gtk_image_new_from_stock ("gtk-save", GTK_ICON_SIZE_BUTTON);
txt = gtk_label_new_with_mnemonic(_("S_ave"));
@@ -2078,7 +2080,7 @@ efhd_add_bar(EMFormatHTML *efh, GtkHTMLEmbedded *eb, EMFormatHTMLPObject *pobjec
gtk_box_pack_start ((GtkBox *)hbox2, save, FALSE, FALSE, 2);
priv->attachment_box = scroll;
- gtk_scrolled_window_set_shadow_type (scroll, GTK_SHADOW_IN);
+ gtk_scrolled_window_set_shadow_type (GTK_SCROLLED_WINDOW (scroll), GTK_SHADOW_IN);
gtk_container_add ((GtkContainer *)priv->attachment_box, priv->attachment_bar);
gtk_widget_get_size_request(priv->attachment_bar, &width, &height);
diff --git a/mail/em-format-html-print.h b/mail/em-format-html-print.h
index a7c1a4eb13..b995780563 100644
--- a/mail/em-format-html-print.h
+++ b/mail/em-format-html-print.h
@@ -22,7 +22,7 @@ struct _EMFormatHTMLPrint {
struct _GnomePrintConfig *config;
struct _EMFormatHTML *source; /* used for print_message */
- int preview:1;
+ guint preview:1;
};
struct _EMFormatHTMLPrintClass {
diff --git a/mail/em-format-html.c b/mail/em-format-html.c
index 7abb411e42..35e1d9f2da 100644
--- a/mail/em-format-html.c
+++ b/mail/em-format-html.c
@@ -825,6 +825,7 @@ static void
efh_text_html(EMFormatHTML *efh, CamelStream *stream, CamelMimePart *part, EMFormatHandler *info)
{
const char *location;
+ /* This is set but never used for anything */
EMFormatPURI *puri;
char *cid = NULL;
@@ -1029,6 +1030,7 @@ efh_multipart_related(EMFormat *emf, CamelStream *stream, CamelMimePart *part, c
CamelContentType *content_type;
const char *start;
int i, nparts, partidlen, displayid = 0;
+ /* puri is set but never used */
EMFormatPURI *puri;
struct _EMFormatHTMLJob *job;
diff --git a/mail/em-format.c b/mail/em-format.c
index 965eea48d5..7467896dac 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -1219,7 +1219,8 @@ emf_multipart_alternative(EMFormat *emf, CamelStream *stream, CamelMimePart *par
/* as per rfc, find the last part we know how to display */
nparts = camel_multipart_get_number(mp);
for (i = 0; i < nparts; i++) {
- CamelMimePart *part = camel_multipart_get_part(mp, i);
+ /* is it correct to use the passed in *part here? */
+ part = camel_multipart_get_part(mp, i);
CamelContentType *type = camel_mime_part_get_content_type (part);
char *mime_type = camel_content_type_simple (type);
diff --git a/mail/em-inline-filter.c b/mail/em-inline-filter.c
index 38cd013912..9842742341 100644
--- a/mail/em-inline-filter.c
+++ b/mail/em-inline-filter.c
@@ -104,7 +104,8 @@ enum {
EMIF_PGPSIGNED,
EMIF_PGPENCRYPTED,
};
-const struct {
+
+static const struct {
const char *name;
CamelTransferEncoding type;
int plain:1;
@@ -249,7 +250,7 @@ emif_scan(CamelMimeFilter *f, char *in, size_t len, int final)
data_start = inptr;
emif->state = EMIF_PLAIN;
} else {
- int len, linelen;
+ int linelen;
/* check the length byte matches the data, if not, output what we have and re-scan this line */
len = ((start[0] - ' ') & 077);
diff --git a/mail/em-mailer-prefs.h b/mail/em-mailer-prefs.h
index 3a5f444b51..7f38c3a164 100644
--- a/mail/em-mailer-prefs.h
+++ b/mail/em-mailer-prefs.h
@@ -57,8 +57,8 @@ typedef struct _EMMailerPrefsHeader EMMailerPrefsHeader;
struct _EMMailerPrefsHeader {
char *name;
- int enabled:1;
- int is_default:1;
+ guint enabled:1;
+ guint is_default:1;
};
struct _EMMailerPrefs {
diff --git a/mail/em-migrate.c b/mail/em-migrate.c
index f5ae170683..86524b153c 100644
--- a/mail/em-migrate.c
+++ b/mail/em-migrate.c
@@ -1045,7 +1045,7 @@ static e_gconf_map_list_t gconf_remap_list[] = {
{ 0 },
};
-struct {
+static struct {
char *label;
char *colour;
} label_default[5] = {
@@ -1633,7 +1633,7 @@ em_migrate_folder(EMMigrateSession *session, const char *dirname, const char *fu
size_t slen, dlen;
FILE *fp;
char *p;
- int i, mode;
+ int mode;
g_string_printf (src, "%s/%s", uri + 5, name);
mbox_build_filename (dest, ((CamelService *)session->store)->url->path, full_name);
diff --git a/mail/em-subscribe-editor.c b/mail/em-subscribe-editor.c
index 71e52a5e29..25227e4c83 100644
--- a/mail/em-subscribe-editor.c
+++ b/mail/em-subscribe-editor.c
@@ -114,7 +114,7 @@ struct _EMSubscribe {
/* working variables at runtime */
int selected_count;
int selected_subscribed_count;
- gboolean subscribed_state:1; /* for setting the selection*/
+ guint subscribed_state:1; /* for setting the selection*/
};
typedef struct _EMSubscribeNode EMSubscribeNode;
diff --git a/mail/em-utils.c b/mail/em-utils.c
index ccc93ea224..eed1a3b49a 100644
--- a/mail/em-utils.c
+++ b/mail/em-utils.c
@@ -136,44 +136,6 @@ em_utils_prompt_user(GtkWindow *parent, const char *promptkey, const char *tag,
return button == GTK_RESPONSE_YES;
}
-
-char *
-em_utils_temp_save_attachments (GSList *attachments)
-{
- char *path = NULL;
- GSList *selected;
-
- path = e_mkdtemp("evolution-attachments-XXXXXX");
-
- for ( selected = attachments; selected != NULL; selected = selected->next) {
- const char *file_name;
- char *safe_name = NULL;
- char *file_path;
- CamelMimePart *part = (CamelMimePart *)((EAttachment *)selected->data)->body;
-
- file_name = camel_mime_part_get_filename(part);
- if (file_name == NULL) {
- file_name = _("attachment");
- } else {
- safe_name = g_strdup(file_name);
- e_filename_make_safe(safe_name);
- file_name = safe_name;
- }
-
- file_path = g_build_filename (path, file_name, NULL);
-
- if (!g_file_test(file_path, (G_FILE_TEST_EXISTS)))
- mail_save_part(part, file_path, NULL, NULL);
- else
- g_warning ("Could not save %s. File already exists", file_path);
-
- g_free (file_path);
- g_free (safe_name);
- }
-
- return path;
-}
-
/**
* em_utils_uids_copy:
* @uids: array of uids
diff --git a/mail/em-vfolder-rule.c b/mail/em-vfolder-rule.c
index 88d61204e8..4452ca5c72 100644
--- a/mail/em-vfolder-rule.c
+++ b/mail/em-vfolder-rule.c
@@ -55,7 +55,7 @@ static void em_vfolder_rule_init(EMVFolderRule *vr);
static void em_vfolder_rule_finalise(GObject *obj);
/* DO NOT internationalise these strings */
-const char *with_names[] = {
+static const char *with_names[] = {
"specific",
"local",
"remote_active",
diff --git a/mail/importers/mail-importer.c b/mail/importers/mail-importer.c
index 04c8f5b907..753c1eb754 100644
--- a/mail/importers/mail-importer.c
+++ b/mail/importers/mail-importer.c
@@ -163,12 +163,11 @@ static guint32
decode_status(const char *status)
{
const char *p;
- char c;
guint32 flags = 0;
int i;
p = status;
- while ((c = *p++)) {
+ while ((*p++)) {
for (i=0;i<sizeof(status_flags)/sizeof(status_flags[0]);i++)
if (status_flags[i].tag == *p)
flags |= status_flags[i].flag;
@@ -357,7 +356,7 @@ struct _import_folders_data {
MailImporterSpecial *special_folders;
CamelOperation *cancel;
- int elmfmt:1;
+ guint elmfmt:1;
};
static void
diff --git a/mail/mail-autofilter.c b/mail/mail-autofilter.c
index f02c8134de..e492fd4df9 100644
--- a/mail/mail-autofilter.c
+++ b/mail/mail-autofilter.c
@@ -271,14 +271,14 @@ rule_from_message (FilterRule *rule, RuleContext *context, CamelMimeMessage *msg
if (flags & AUTO_FROM) {
const CamelInternetAddress *from;
int i;
- const char *name, *addr;
+ const char *name, *address;
char *namestr;
from = camel_mime_message_get_from (msg);
- for (i = 0; from && camel_internet_address_get (from, i, &name, &addr); i++) {
- rule_add_sender(context, rule, addr);
+ for (i = 0; from && camel_internet_address_get (from, i, &name, &address); i++) {
+ rule_add_sender(context, rule, address);
if (name == NULL || name[0] == '\0')
- name = addr;
+ name = address;
namestr = g_strdup_printf(_("Mail from %s"), name);
filter_rule_set_name (rule, namestr);
g_free (namestr);
diff --git a/mail/mail-component.c b/mail/mail-component.c
index e6eb247b37..c6c6298a1c 100644
--- a/mail/mail-component.c
+++ b/mail/mail-component.c
@@ -113,7 +113,7 @@ struct _store_info {
void *done_data;
int ref_count:31;
- int removed:1;
+ guint removed:1;
};
struct _MailComponentPrivate {
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index c0b3d361f9..53e42512c0 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -340,14 +340,11 @@ free_folder_info(struct _folder_info *mfi)
static void
update_1folder(struct _folder_info *mfi, int new, CamelFolderInfo *info)
{
- struct _store_info *si;
struct _folder_update *up;
CamelFolder *folder;
int unread = -1;
int deleted;
- si = mfi->store_info;
-
folder = mfi->folder;
if (folder) {
d(printf("update 1 folder '%s'\n", folder->full_name));
@@ -758,7 +755,7 @@ struct _update_data {
struct _update_data *prev;
int id; /* id for cancellation */
- int cancel:1; /* also tells us we're cancelled */
+ guint cancel:1; /* also tells us we're cancelled */
void (*done)(CamelStore *store, CamelFolderInfo *info, void *data);
void *data;
diff --git a/mail/mail-mt.c b/mail/mail-mt.c
index ae2ba5b590..130b030e55 100644
--- a/mail/mail-mt.c
+++ b/mail/mail-mt.c
@@ -690,7 +690,7 @@ idle_async_event(void *mm)
return FALSE;
}
-struct _mail_msg_op async_event_op = {
+static struct _mail_msg_op async_event_op = {
NULL,
do_async_event,
NULL,
@@ -832,7 +832,7 @@ do_call(struct _mail_msg *mm)
}
}
-struct _mail_msg_op mail_call_op = {
+static struct _mail_msg_op mail_call_op = {
NULL,
do_call,
NULL,
@@ -882,7 +882,7 @@ static void do_set_busy(struct _mail_msg *mm)
set_stop(busy_state > 0);
}
-struct _mail_msg_op set_busy_op = {
+static struct _mail_msg_op set_busy_op = {
NULL,
do_set_busy,
NULL,
@@ -1015,7 +1015,7 @@ do_op_status_free (struct _mail_msg *mm)
g_free (m->what);
}
-struct _mail_msg_op op_status_op = {
+static struct _mail_msg_op op_status_op = {
NULL,
do_op_status,
NULL,
diff --git a/mail/message-list.c b/mail/message-list.c
index ef42be46e6..a59f2080c8 100644
--- a/mail/message-list.c
+++ b/mail/message-list.c
@@ -177,7 +177,7 @@ struct _EMailAddress {
typedef struct _EMailAddress EMailAddress;
#endif /* SMART_ADDRESS_COMPARE */
-G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE);
+G_DEFINE_TYPE (MessageList, message_list, E_TREE_SCROLLED_TYPE)
static void on_cursor_activated_cmd (ETree *tree, int row, ETreePath path, gpointer user_data);
static void on_selection_changed_cmd(ETree *tree, MessageList *ml);
@@ -641,10 +641,6 @@ message_list_select_uid (MessageList *message_list, const char *uid)
node = g_hash_table_lookup (message_list->uid_nodemap, uid);
if (node) {
- CamelMessageInfo *info;
-
- info = get_message_info (message_list, node);
-
/* This will emit a changed signal that we'll pick up */
e_tree_set_cursor (message_list->tree, node);
} else {
@@ -1042,7 +1038,7 @@ ml_value_to_string (ETreeModel *etm, int col, const void *value, void *data)
case COL_DELETED:
case COL_UNREAD:
case COL_FOLLOWUP_FLAG_STATUS:
- return g_strdup_printf ("%d", GPOINTER_TO_UINT(value));
+ return g_strdup_printf ("%u", GPOINTER_TO_UINT(value));
case COL_SENT:
case COL_RECEIVED:
@@ -1168,7 +1164,6 @@ ml_tree_value_at (ETreeModel *etm, ETreePath path, int col, void *model_data)
return GINT_TO_POINTER (1);
else
return GINT_TO_POINTER (0);
- break;
case COL_FLAGGED:
return GINT_TO_POINTER ((camel_message_info_flags(msg_info) & CAMEL_MESSAGE_FLAGGED) != 0);
case COL_SCORE: {
@@ -2196,8 +2191,6 @@ find_next_undeleted (MessageList *ml)
vrow ++;
while (vrow < last) {
- CamelMessageInfo *info;
-
node = e_tree_node_at_row (et, vrow);
info = get_message_info (ml, node);
if (info && (camel_message_info_flags(info) & check) == 0) {
@@ -2223,7 +2216,9 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
{
int row = 0;
ETreeModel *etm = ml->model;
+#ifndef BROKEN_ETREE
ETreePath *top;
+#endif
char *saveuid = NULL;
#ifdef BROKEN_ETREE
GPtrArray *selected;
@@ -2250,8 +2245,8 @@ build_tree (MessageList *ml, CamelFolderThread *thread, CamelFolderChangeInfo *c
if (ml->cursor_uid)
saveuid = find_next_undeleted(ml);
- top = e_tree_model_node_get_first_child(etm, ml->tree_root);
#ifndef BROKEN_ETREE
+ top = e_tree_model_node_get_first_child(etm, ml->tree_root);
if (top == NULL || changes == NULL) {
#else
selected = message_list_get_selected(ml);
@@ -2550,7 +2545,6 @@ static void
build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
{
ETreeModel *etm = ml->model;
- ETreePath node;
char *saveuid = NULL;
int i;
#ifdef BROKEN_ETREE
@@ -2577,6 +2571,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
e_tree_memory_freeze(E_TREE_MEMORY(etm));
clear_tree (ml);
for (i = 0; i < summary->len; i++) {
+ ETreePath node;
CamelMessageInfo *info = summary->pdata[i];
node = e_tree_memory_node_insert(E_TREE_MEMORY(etm), ml->tree_root, -1, info);
@@ -2592,7 +2587,7 @@ build_flat (MessageList *ml, GPtrArray *summary, CamelFolderChangeInfo *changes)
#endif
if (saveuid) {
- ETreePath *node = g_hash_table_lookup(ml->uid_nodemap, saveuid);
+ ETreePath node = g_hash_table_lookup(ml->uid_nodemap, saveuid);
if (node == NULL) {
g_free (ml->cursor_uid);
ml->cursor_uid = NULL;
diff --git a/mail/message-list.h b/mail/message-list.h
index 57f365025b..301f2327f8 100644
--- a/mail/message-list.h
+++ b/mail/message-list.h
@@ -214,6 +214,9 @@ void message_list_hide_uids (MessageList *ml, GPtrArray *uids);
void message_list_hide_clear (MessageList *ml);
void message_list_set_threaded (MessageList *ml, gboolean threaded);
+void message_list_set_threaded_expand_all (MessageList *ml);
+void message_list_set_threaded_collapse_all (MessageList *ml);
+
void message_list_set_hidedeleted (MessageList *ml, gboolean hidedeleted);
void message_list_set_search (MessageList *ml, const char *search);