aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNot Zed <NotZed@Ximian.com>2004-05-18 15:28:10 +0800
committerMichael Zucci <zucchi@src.gnome.org>2004-05-18 15:28:10 +0800
commit463b3e37eca3fda700e56d8cb306622074468382 (patch)
treecced56b308e044cfd51abad197fa0e876578f9f7
parent7cdc1738998f3c349ce6404f3072834fd974bcd3 (diff)
downloadgsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar.gz
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar.bz2
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar.lz
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar.xz
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.tar.zst
gsoc2013-evolution-463b3e37eca3fda700e56d8cb306622074468382.zip
don't emit new mail if its any vfolder, not just vtrash folder. #56350.
2004-05-18 Not Zed <NotZed@Ximian.com> * mail-folder-cache.c (folder_changed): don't emit new mail if its any vfolder, not just vtrash folder. #56350. * em-folder-view.c (emfv_list_done_message_selected): run enable_menu's to make sure we're up to date. #58352. ** crappy hacks for #58385. * em-folder-selection-button.c (em_folder_selection_button_clicked): leave Ok button for this selection. * em-folder-selection.c (em_select_folder): added oklabel here too. * em-folder-selector.c (em_folder_selector_new) (em_folder_selector_construct, em_folder_selector_create_new): Added oklabel- text for ok label. (em_folder_selector_create_new): Set the ok label to Create. * em-message-browser.c (emmb_set_message): don't mark message seen if user has disabled auto-mark seen feature. #58629. * em-format.c (em_format_part): if we have no content-type header, then we get no mime-type set, so assume text/plain. #58470. svn path=/trunk/; revision=25951
-rw-r--r--mail/ChangeLog27
-rw-r--r--mail/em-folder-selection-button.c2
-rw-r--r--mail/em-folder-selection.c4
-rw-r--r--mail/em-folder-selection.h2
-rw-r--r--mail/em-folder-selector.c10
-rw-r--r--mail/em-folder-selector.h4
-rw-r--r--mail/em-folder-tree.c4
-rw-r--r--mail/em-folder-view.c7
-rw-r--r--mail/em-format.c9
-rw-r--r--mail/em-message-browser.c2
-rw-r--r--mail/mail-folder-cache.c2
11 files changed, 53 insertions, 20 deletions
diff --git a/mail/ChangeLog b/mail/ChangeLog
index db4e881349..3d03229d4f 100644
--- a/mail/ChangeLog
+++ b/mail/ChangeLog
@@ -1,3 +1,30 @@
+2004-05-18 Not Zed <NotZed@Ximian.com>
+
+ * mail-folder-cache.c (folder_changed): don't emit new mail if its
+ any vfolder, not just vtrash folder. #56350.
+
+ * em-folder-view.c (emfv_list_done_message_selected): run
+ enable_menu's to make sure we're up to date. #58352.
+
+ ** crappy hacks for #58385.
+
+ * em-folder-selection-button.c
+ (em_folder_selection_button_clicked): leave Ok button for this
+ selection.
+
+ * em-folder-selection.c (em_select_folder): added oklabel here too.
+
+ * em-folder-selector.c (em_folder_selector_new)
+ (em_folder_selector_construct, em_folder_selector_create_new):
+ Added oklabel- text for ok label.
+ (em_folder_selector_create_new): Set the ok label to Create.
+
+ * em-message-browser.c (emmb_set_message): don't mark message seen
+ if user has disabled auto-mark seen feature. #58629.
+
+ * em-format.c (em_format_part): if we have no content-type header,
+ then we get no mime-type set, so assume text/plain. #58470.
+
2004-05-17 Jeffrey Stedfast <fejj@ximian.com>
* em-mailer-prefs.c: #include <gtk/gtkliststore.h>. Fixes bug
diff --git a/mail/em-folder-selection-button.c b/mail/em-folder-selection-button.c
index e898be02ba..9124918301 100644
--- a/mail/em-folder-selection-button.c
+++ b/mail/em-folder-selection-button.c
@@ -221,7 +221,7 @@ em_folder_selection_button_clicked (GtkButton *button)
emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
em_folder_tree_set_multiselect (emft, priv->multiple_select);
em_folder_tree_set_excluded(emft, EMFT_EXCLUDE_NOSELECT|EMFT_EXCLUDE_VIRTUAL|EMFT_EXCLUDE_VTRASH);
- dialog = em_folder_selector_new (emft, EM_FOLDER_SELECTOR_CAN_CREATE, priv->title, priv->caption);
+ dialog = em_folder_selector_new (emft, EM_FOLDER_SELECTOR_CAN_CREATE, priv->title, priv->caption, NULL);
if (priv->multiple_select)
em_folder_selector_set_selected_list ((EMFolderSelector *) dialog, priv->uris);
else
diff --git a/mail/em-folder-selection.c b/mail/em-folder-selection.c
index 1012514f77..acc6ea3a3f 100644
--- a/mail/em-folder-selection.c
+++ b/mail/em-folder-selection.c
@@ -54,7 +54,7 @@ emfs_selector_response(EMFolderSelector *emfs, int response, struct _select_fold
}
void
-em_select_folder (GtkWindow *parent_window, const char *title, const char *default_uri,
+em_select_folder (GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
void (*done) (const char *uri, void *user_data), void *user_data)
{
struct _select_folder_data *d;
@@ -66,7 +66,7 @@ em_select_folder (GtkWindow *parent_window, const char *title, const char *defau
emft = (EMFolderTree *) em_folder_tree_new_with_model (model);
em_folder_tree_set_excluded (emft, EMFT_EXCLUDE_NOSELECT|EMFT_EXCLUDE_VIRTUAL|EMFT_EXCLUDE_VTRASH);
- dialog = em_folder_selector_new(emft, EM_FOLDER_SELECTOR_CAN_CREATE, title, NULL);
+ dialog = em_folder_selector_new(emft, EM_FOLDER_SELECTOR_CAN_CREATE, title, NULL, oklabel);
d = g_malloc0(sizeof(*d));
d->data = user_data;
diff --git a/mail/em-folder-selection.h b/mail/em-folder-selection.h
index 5e01372436..103cf65686 100644
--- a/mail/em-folder-selection.h
+++ b/mail/em-folder-selection.h
@@ -31,7 +31,7 @@ extern "C" {
struct _GtkWindow;
-void em_select_folder (struct _GtkWindow *parent_window, const char *title, const char *default_uri,
+void em_select_folder (struct _GtkWindow *parent_window, const char *title, const char *oklabel, const char *default_uri,
void (*done)(const char *uri, void *data),
void *data);
diff --git a/mail/em-folder-selector.c b/mail/em-folder-selector.c
index 88f14705bf..d317635ee1 100644
--- a/mail/em-folder-selector.c
+++ b/mail/em-folder-selector.c
@@ -218,7 +218,7 @@ folder_activated_cb (EMFolderTree *emft, const char *path, const char *uri, EMFo
}
void
-em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text)
+em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
{
GtkWidget *label;
@@ -236,7 +236,7 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
}
gtk_dialog_add_buttons (GTK_DIALOG (emfs), GTK_STOCK_CANCEL, GTK_RESPONSE_CANCEL,
- GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
+ oklabel?oklabel:GTK_STOCK_OK, GTK_RESPONSE_OK, NULL);
gtk_dialog_set_response_sensitive (GTK_DIALOG (emfs), GTK_RESPONSE_OK, FALSE);
gtk_dialog_set_default_response (GTK_DIALOG (emfs), GTK_RESPONSE_OK);
@@ -260,12 +260,12 @@ em_folder_selector_construct (EMFolderSelector *emfs, EMFolderTree *emft, guint3
}
GtkWidget *
-em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text)
+em_folder_selector_new (EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel)
{
EMFolderSelector *emfs;
emfs = g_object_new (em_folder_selector_get_type (), NULL);
- em_folder_selector_construct (emfs, emft, flags, title, text);
+ em_folder_selector_construct (emfs, emft, flags, title, text, oklabel);
return (GtkWidget *) emfs;
}
@@ -296,7 +296,7 @@ em_folder_selector_create_new (EMFolderTree *emft, guint32 flags, const char *ti
flags &= ~EM_FOLDER_SELECTOR_CAN_CREATE;
emfs = g_object_new (em_folder_selector_get_type (), NULL);
- em_folder_selector_construct (emfs, emft, flags, title, text);
+ em_folder_selector_construct (emfs, emft, flags, title, text, _("Create"));
em_folder_tree_set_excluded(emft, EMFT_EXCLUDE_NOINFERIORS);
hbox = gtk_hbox_new (FALSE, 0);
diff --git a/mail/em-folder-selector.h b/mail/em-folder-selector.h
index d3777b6ee3..9d282dd77b 100644
--- a/mail/em-folder-selector.h
+++ b/mail/em-folder-selector.h
@@ -69,10 +69,10 @@ enum {
GType em_folder_selector_get_type (void);
-void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
+void em_folder_selector_construct (EMFolderSelector *emfs, struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
/* for selecting folders */
-GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
+GtkWidget *em_folder_selector_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text, const char *oklabel);
/* for creating folders */
GtkWidget *em_folder_selector_create_new (struct _EMFolderTree *emft, guint32 flags, const char *title, const char *text);
diff --git a/mail/em-folder-tree.c b/mail/em-folder-tree.c
index 7248b363a9..e789f5e233 100644
--- a/mail/em-folder-tree.c
+++ b/mail/em-folder-tree.c
@@ -2053,7 +2053,7 @@ emft_popup_copy (GtkWidget *item, EMFolderTree *emft)
cfd->emft = emft;
cfd->delete = FALSE;
- em_select_folder (NULL, _("Select folder"),
+ em_select_folder (NULL, _("Select folder"), _("C_opy"),
NULL, emft_popup_copy_folder_selected, cfd);
}
@@ -2066,7 +2066,7 @@ emft_popup_move (GtkWidget *item, EMFolderTree *emft)
cfd->emft = emft;
cfd->delete = TRUE;
- em_select_folder (NULL, _("Select folder"),
+ em_select_folder (NULL, _("Select folder"), _("_Move"),
NULL, emft_popup_copy_folder_selected, cfd);
}
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 8ed08b64b5..c97d54f77c 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -793,7 +793,7 @@ emfv_popup_move(GtkWidget *w, EMFolderView *emfv)
d->uids = message_list_get_selected(emfv->list);
d->delete = TRUE;
- em_select_folder ((GtkWindow *) emfv, _("Select folder"), default_xfer_messages_uri, emfv_popup_move_cb, d);
+ em_select_folder ((GtkWindow *) emfv, _("Select folder"), _("_Move"), default_xfer_messages_uri, emfv_popup_move_cb, d);
}
static void
@@ -807,7 +807,7 @@ emfv_popup_copy(GtkWidget *w, EMFolderView *emfv)
d->uids = message_list_get_selected(emfv->list);
d->delete = FALSE;
- em_select_folder ((GtkWindow *) emfv, _("Select folder"), default_xfer_messages_uri, emfv_popup_move_cb, d);
+ em_select_folder ((GtkWindow *) emfv, _("Select folder"), _("C_opy"), default_xfer_messages_uri, emfv_popup_move_cb, d);
}
static void
@@ -1905,6 +1905,7 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
if (emfv->preview == NULL) {
emfv->priv->nomarkseen = FALSE;
g_object_unref (emfv);
+ emfv_enable_menus(emfv);
return;
}
@@ -1930,6 +1931,8 @@ emfv_list_done_message_selected(CamelFolder *folder, const char *uid, CamelMimeM
g_object_unref (emfv);
emfv->priv->nomarkseen = FALSE;
+
+ emfv_enable_menus(emfv);
}
static void
diff --git a/mail/em-format.c b/mail/em-format.c
index 2ba834b9d6..9ffc37fc29 100644
--- a/mail/em-format.c
+++ b/mail/em-format.c
@@ -515,9 +515,12 @@ em_format_part(EMFormat *emf, CamelStream *stream, CamelMimePart *part)
dw = camel_medium_get_content_object((CamelMedium *)part);
mime_type = camel_data_wrapper_get_mime_type(dw);
- camel_strdown(mime_type);
- em_format_part_as(emf, stream, part, mime_type);
- g_free(mime_type);
+ if (mime_type) {
+ camel_strdown(mime_type);
+ em_format_part_as(emf, stream, part, mime_type);
+ g_free(mime_type);
+ } else
+ em_format_part_as(emf, stream, part, "text/plain");
}
static void
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index 4f3a2aaa2c..d347567acb 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -248,7 +248,7 @@ emmb_set_message(EMFolderView *emfv, const char *uid, int nomarkseen)
}
/* Well we don't know if it got displayed (yet) ... but whatever ... */
- if (!nomarkseen)
+ if (!nomarkseen && emfv->mark_seen)
camel_folder_set_message_flags(emfv->folder, uid, CAMEL_MESSAGE_SEEN, CAMEL_MESSAGE_SEEN);
}
diff --git a/mail/mail-folder-cache.c b/mail/mail-folder-cache.c
index 1803b74d15..e4d9e327e5 100644
--- a/mail/mail-folder-cache.c
+++ b/mail/mail-folder-cache.c
@@ -433,7 +433,7 @@ folder_changed (CamelObject *o, gpointer event_data, gpointer user_data)
d(printf("folder '%s' changed\n", folder->full_name));
- if (!CAMEL_IS_VTRASH_FOLDER(folder)
+ if (!CAMEL_IS_VEE_FOLDER(folder)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_OUTBOX)
&& folder != mail_component_get_folder(NULL, MAIL_COMPONENT_FOLDER_SENT)
&& changes && changes->uid_added)