aboutsummaryrefslogtreecommitdiffstats
path: root/mail
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@redhat.com>2009-05-22 01:06:45 +0800
committerMatthew Barnes <mbarnes@redhat.com>2009-05-22 01:06:45 +0800
commit84c2e3735ce6e4df88142e86446f9179b6e341e4 (patch)
tree7e6d2043810d0c37ee2581f0783095aefdec1e1b /mail
parentaaa180af5abef44bb3e3d3c3c5968ca191a3dbda (diff)
parent2914345f9672559fed0ad88d2841ea4801d8d244 (diff)
downloadgsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.gz
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.tar.zst
gsoc2013-evolution-84c2e3735ce6e4df88142e86446f9179b6e341e4.zip
Merge branch 'master' into kill-bonobo
Conflicts: addressbook/gui/component/addressbook-view.c addressbook/gui/component/component-factory.c addressbook/gui/component/eab-composer-util.h addressbook/gui/widgets/Makefile.am addressbook/gui/widgets/e-addressbook-model.c addressbook/gui/widgets/e-addressbook-view.c addressbook/gui/widgets/e-addressbook-view.h addressbook/gui/widgets/eab-gui-util.c addressbook/gui/widgets/eab-gui-util.h addressbook/gui/widgets/eab-menu.h addressbook/gui/widgets/eab-popup.h calendar/gui/calendar-component.c calendar/gui/e-cal-event.h calendar/gui/e-calendar-table.c calendar/gui/e-calendar-view.c calendar/gui/e-calendar-view.h calendar/gui/e-memo-table.c calendar/gui/memos-component.c calendar/gui/tasks-component.c composer/e-composer-header-table.c composer/e-composer-private.h composer/e-msg-composer.c composer/e-msg-composer.h composer/evolution-composer.ui configure.ac data/icons/Makefile.am em-format/em-format.c em-format/em-format.h mail/Makefile.am mail/e-mail-shell-migrate.c mail/e-searching-tokenizer.c mail/e-searching-tokenizer.h mail/em-composer-utils.c mail/em-composer-utils.h mail/em-folder-browser.c mail/em-folder-tree-model.c mail/em-folder-view.c mail/em-format-html-display.c mail/em-format-html-display.h mail/em-mailer-prefs.c mail/em-message-browser.c plugins/vcard-inline/Makefile.am plugins/vcard-inline/org-gnome-vcard-inline.eplug.xml plugins/vcard-inline/vcard-inline.c shell/e-component-registry.h shell/e-shell-window.c shell/es-menu.h widgets/misc/e-filter-bar.c widgets/misc/e-filter-bar.h widgets/misc/e-search-bar.c widgets/misc/e-search-bar.h
Diffstat (limited to 'mail')
-rw-r--r--mail/em-composer-utils.c25
-rw-r--r--mail/em-folder-browser.c26
-rw-r--r--mail/em-folder-view.c1
-rw-r--r--mail/em-folder-view.h3
-rw-r--r--mail/evolution-mail.schemas.in62
5 files changed, 63 insertions, 54 deletions
diff --git a/mail/em-composer-utils.c b/mail/em-composer-utils.c
index bf6834b278..20193465a3 100644
--- a/mail/em-composer-utils.c
+++ b/mail/em-composer-utils.c
@@ -672,13 +672,18 @@ create_new_composer (const char *subject, const char *fromuri)
EAccount *account = NULL;
composer = e_msg_composer_new ();
- if (composer == NULL)
- return NULL;
+ table = e_msg_composer_get_header_table (composer);
- if (fromuri)
- account = mail_config_get_account_by_source_url (fromuri);
+ if (fromuri != NULL) {
+ GList *list;
+
+ account = mail_config_get_account_by_source_url(fromuri);
+
+ list = g_list_prepend (NULL, (gpointer) fromuri);
+ e_composer_header_table_set_post_to_list (table, list);
+ g_list_free (list);
+ }
- table = e_msg_composer_get_header_table (composer);
e_composer_header_table_set_account (table, account);
e_composer_header_table_set_subject (table, subject);
@@ -1701,18 +1706,12 @@ reply_get_composer (CamelMimeMessage *message, EAccount *account,
g_return_val_if_fail (to == NULL || CAMEL_IS_INTERNET_ADDRESS (to), NULL);
g_return_val_if_fail (cc == NULL || CAMEL_IS_INTERNET_ADDRESS (cc), NULL);
+ composer = e_msg_composer_new ();
+
/* construct the tov/ccv */
tov = em_utils_camel_address_to_destination (to);
ccv = em_utils_camel_address_to_destination (cc);
- if (tov || ccv) {
- if (postto && camel_address_length((CamelAddress *)postto))
- composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL_POST);
- else
- composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_MAIL);
- } else
- composer = e_msg_composer_new_with_type (E_MSG_COMPOSER_POST);
-
/* Set the subject of the new message. */
if ((subject = (char *) camel_mime_message_get_subject (message))) {
if (g_ascii_strncasecmp (subject, "Re: ", 4) != 0)
diff --git a/mail/em-folder-browser.c b/mail/em-folder-browser.c
index de4d48a77f..989206ae36 100644
--- a/mail/em-folder-browser.c
+++ b/mail/em-folder-browser.c
@@ -72,6 +72,7 @@
#include "e-util/e-error.h"
#include "e-util/e-util-private.h"
#include "e-util/e-util-labels.h"
+#include "e-mail-search-bar.h"
#include "em-utils.h"
#include "em-composer-utils.h"
#include "em-format-html-display.h"
@@ -99,6 +100,7 @@ CamelStore *vfolder_store; /* the 1 static vfolder store */
struct _EMFolderBrowserPrivate {
GtkWidget *preview; /* container for message display */
GtkWidget *scroll;
+ GtkWidget *search_bar;
GtkWidget *subscribe_editor;
@@ -156,7 +158,6 @@ static const EMFolderViewEnable emfb_enable_map[] = {
{ "FolderRename", EM_POPUP_SELECT_FOLDER },
{ "FolderRefresh", EM_POPUP_SELECT_FOLDER },
{ "ChangeFolderProperties", EM_POPUP_SELECT_FOLDER },
- { "MailPost", EM_POPUP_SELECT_FOLDER },
{ "MessageMarkAllAsRead", EM_POPUP_SELECT_FOLDER },
{ "ViewHideSelected", EM_POPUP_SELECT_MANY },
{ "ViewThreadsCollapseAll", EM_FOLDER_VIEW_SELECT_THREADED},
@@ -209,7 +210,6 @@ static ESearchBarItem emfb_search_scope_items[] = {
E_FILTERBAR_CURRENT_FOLDER,
E_FILTERBAR_CURRENT_ACCOUNT,
E_FILTERBAR_ALL_ACCOUNTS,
- E_FILTERBAR_CURRENT_MESSAGE,
{ NULL, -1, 0 }
};
@@ -241,6 +241,7 @@ emfb_init(GObject *o)
EMFolderBrowser *emfb = (EMFolderBrowser *)o;
RuleContext *search_context = mail_component_peek_search_context (mail_component_peek ());
struct _EMFolderBrowserPrivate *p;
+ GtkWidget *html;
EMEvent *eme;
EMEventTargetFolderBrowser *target;
@@ -325,6 +326,10 @@ emfb_init(GObject *o)
// gtk_paned_pack2 (GTK_PANED (emfb->vpane), p->preview, TRUE, FALSE);
// gtk_widget_show(p->preview);
+ g_signal_connect_swapped (
+ p->search_bar, "changed",
+ G_CALLBACK (em_format_redraw), emfb->view.preview);
+
/** @HookPoint-EMFolderBrower: Folder Browser
* @Id: emfb.created
* @Class: org.gnome.evolution.mail.events:1.0
@@ -386,7 +391,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if ((emfb->view.preview_active ^ state) == 0
|| emfb->view.list == NULL) {
if (state && emfb->priv->scope_restricted && emfb->view.list->cursor_uid && *(emfb->view.list->cursor_uid)) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
}
@@ -408,7 +412,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
if (emfb->view.list->cursor_uid) {
char *uid = g_alloca(strlen(emfb->view.list->cursor_uid)+1);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
strcpy(uid, emfb->view.list->cursor_uid);
em_folder_view_set_message(&emfb->view, uid, FALSE);
@@ -424,7 +427,6 @@ void em_folder_browser_show_preview(EMFolderBrowser *emfb, gboolean state)
emfb->view.displayed_uid = NULL;
gtk_widget_hide(emfb->priv->preview);
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
/*
mail_display_set_message (emfb->mail_display, NULL, NULL, NULL);
@@ -618,18 +620,6 @@ emfb_search_search_activated(ESearchBar *esb, EMFolderBrowser *emfb)
id = e_search_bar_get_search_scope (esb);
switch (id) {
- case E_FILTERBAR_CURRENT_MESSAGE_ID:
- word = e_search_bar_get_text (esb);
- if ( word && *word ) {
- gtk_widget_set_sensitive (esb->option_button, FALSE);
- em_format_html_display_search_with (emfb->view.preview, word);
- } else {
- em_format_html_display_search_close (emfb->view.preview);
- }
- g_free (word);
- return;
- break;
-
case E_FILTERBAR_CURRENT_FOLDER_ID:
g_object_get (esb, "query", &search_word, NULL);
break;
@@ -825,10 +815,8 @@ emfb_list_message_selected (MessageList *ml, const char *uid, EMFolderBrowser *e
return;
if (uid && *uid && emfb->priv->scope_restricted && emfb->view.preview_active) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, TRUE);
emfb->priv->scope_restricted = FALSE;
} else if ( !(uid && *uid) && !emfb->priv->scope_restricted) {
- e_search_bar_scope_enable ((ESearchBar *)emfb->search, E_FILTERBAR_CURRENT_MESSAGE_ID, FALSE);
emfb->priv->scope_restricted = TRUE;
}
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 5bea7c8e19..8da3b5dc98 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -144,7 +144,6 @@ static const EMFolderViewEnable emfv_enable_map[] = {
{ "MessageFollowUpClear", EM_POPUP_SELECT_MANY|EM_POPUP_SELECT_FLAG_CLEAR },
// { "MessageMove", EM_POPUP_SELECT_MANY },
// { "MessageOpen", EM_POPUP_SELECT_MANY },
-// { "MessagePostReply", EM_POPUP_SELECT_ONE },
// { "MessageReplyAll", EM_POPUP_SELECT_ONE },
// { "MessageReplyList", EM_POPUP_SELECT_ONE|EM_POPUP_SELECT_MAILING_LIST },
// { "MessageReplySender", EM_POPUP_SELECT_ONE },
diff --git a/mail/em-folder-view.h b/mail/em-folder-view.h
index 77178aaf38..70c6c4335e 100644
--- a/mail/em-folder-view.h
+++ b/mail/em-folder-view.h
@@ -124,6 +124,8 @@ struct _EMFolderViewClass {
void (*set_folder)(EMFolderView *emfv, struct _CamelFolder *folder, const char *uri);
void (*set_message)(EMFolderView *emfv, const char *uid, int nomarkseen);
+ void (*show_search_bar)(EMFolderView *emfv);
+
/* Signals */
void (*on_url)(EMFolderView *emfv, const char *uri, const char *nice_uri);
@@ -156,6 +158,7 @@ guint32 em_folder_view_disable_mask(EMFolderView *emfv);
void em_folder_view_set_statusbar(EMFolderView *emfv, gboolean statusbar);
void em_folder_view_set_hide_deleted(EMFolderView *emfv, gboolean status);
void em_folder_view_setup_view_instance (EMFolderView *emfv);
+void em_folder_view_show_search_bar (EMFolderView *emfv);
G_END_DECLS
diff --git a/mail/evolution-mail.schemas.in b/mail/evolution-mail.schemas.in
index 621417eb9b..e0895c330c 100644
--- a/mail/evolution-mail.schemas.in
+++ b/mail/evolution-mail.schemas.in
@@ -116,71 +116,91 @@
</schema>
<schema>
- <key>/schemas/apps/evolution/mail/composer/view/From</key>
- <applyto>/apps/evolution/mail/composer/view/From</applyto>
+ <key>/schemas/apps/evolution/mail/composer/show_mail_bcc</key>
+ <applyto>/apps/evolution/mail/composer/show_mail_bcc</applyto>
+ <owner>evolution-mail</owner>
+ <type>bool</type>
+ <default>false</default>
+ <locale name="C">
+ <short>Show "Bcc" field when sending a mail message</short>
+ <long>
+ Show the "Bcc" field when sending a mail message. This is
+ controlled from the View menu when a mail account is chosen.
+ </long>
+ </locale>
+ </schema>
+
+ <schema>
+ <key>/schemas/apps/evolution/mail/composer/show_mail_cc</key>
+ <applyto>/apps/evolution/mail/composer/show_mail_cc</applyto>
<owner>evolution-mail</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
- <short>View/From menu item is checked</short>
+ <short>Show "Cc" field when sending a mail message</short>
<long>
- View/From menu item is checked.
+ Show the "Cc" field when sending a mail message. This is
+ controlled from the View menu when a mail account is chosen.
</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/evolution/mail/composer/view/PostTo</key>
- <applyto>/apps/evolution/mail/composer/view/PostTo</applyto>
+ <key>/schemas/apps/evolution/mail/composer/show_mail_from</key>
+ <applyto>/apps/evolution/mail/composer/show_mail_from</applyto>
<owner>evolution-mail</owner>
<type>bool</type>
<default>true</default>
<locale name="C">
- <short>View/PostTo menu item is checked</short>
+ <short>Show "From" field when sending a mail message</short>
<long>
- View/PostTo menu item is checked.
+ Show the "From" field when sending a mail message. This is
+ controlled from the View menu when a mail account is chosen.
</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/evolution/mail/composer/view/ReplyTo</key>
- <applyto>/apps/evolution/mail/composer/view/ReplyTo</applyto>
+ <key>/schemas/apps/evolution/mail/composer/show_mail_reply_to</key>
+ <applyto>/apps/evolution/mail/composer/show_mail_reply_to</applyto>
<owner>evolution-mail</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
- <short>View/ReplyTo menu item is checked</short>
+ <short>Show "Reply To" field when sending a mail message</short>
<long>
- View/ReplyTo menu item is checked.
+ Show the "Reply To" field when sending a mail message. This
+ is controlled from the View menu when a mail account is chosen.
</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/evolution/mail/composer/view/Cc</key>
- <applyto>/apps/evolution/mail/composer/view/Cc</applyto>
+ <key>/schemas/apps/evolution/mail/composer/show_post_from</key>
+ <applyto>/apps/evolution/mail/composer/show_post_from</applyto>
<owner>evolution-mail</owner>
<type>bool</type>
- <default>false</default>
+ <default>true</default>
<locale name="C">
- <short>View/Cc menu item is checked</short>
+ <short>Show "From" field when posting to a newsgroup</short>
<long>
- View/Cc menu item is checked.
+ Show the "From" field when posting to a newsgroup. This is
+ controlled from the View menu when a news account is chosen.
</long>
</locale>
</schema>
<schema>
- <key>/schemas/apps/evolution/mail/composer/view/Bcc</key>
- <applyto>/apps/evolution/mail/composer/view/Bcc</applyto>
+ <key>/schemas/apps/evolution/mail/composer/show_post_reply_to</key>
+ <applyto>/apps/evolution/mail/composer/show_post_reply_to</applyto>
<owner>evolution-mail</owner>
<type>bool</type>
<default>false</default>
<locale name="C">
- <short>View/Bcc menu item is checked</short>
+ <short>Show "Reply To" field when posting to a newsgroup</short>
<long>
- View/Bcc menu item is checked.
+ Show the "Reply To" field when posting to a newsgroup. This
+ is controlled from the View menu when a news account is chosen.
</long>
</locale>
</schema>