aboutsummaryrefslogtreecommitdiffstats
path: root/mail/message-list.c
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 /mail/message-list.c
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
Diffstat (limited to 'mail/message-list.c')
-rw-r--r--mail/message-list.c19
1 files changed, 7 insertions, 12 deletions
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;