aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2008-12-20 12:13:39 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2008-12-20 12:13:39 +0800
commit780c042e12aa71bfa3498d3976d28a63aafb259e (patch)
tree6d7068c84b3420d0e1b40f64762596133b7e4b99
parent2a771c37303b4d56e7c7462c1e7dec68b4508293 (diff)
downloadgsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar.gz
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar.bz2
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar.lz
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar.xz
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.tar.zst
gsoc2013-evolution-780c042e12aa71bfa3498d3976d28a63aafb259e.zip
Committing progress. About to try something radical...
svn path=/branches/kill-bonobo/; revision=36919
-rw-r--r--mail/e-mail-shell-view-actions.c73
-rw-r--r--mail/em-folder-view.c80
-rw-r--r--mail/em-message-browser.c2
3 files changed, 106 insertions, 49 deletions
diff --git a/mail/e-mail-shell-view-actions.c b/mail/e-mail-shell-view-actions.c
index da4ba4b081..83131c2a92 100644
--- a/mail/e-mail-shell-view-actions.c
+++ b/mail/e-mail-shell-view-actions.c
@@ -66,8 +66,15 @@ static void
action_mail_caret_mode_cb (GtkToggleAction *action,
EMailShellView *mail_shell_view)
{
- /* FIXME */
- g_print ("Action: %s\n", gtk_action_get_name (GTK_ACTION (action)));
+ EMailShellContent *mail_shell_content;
+ EMFormatHTMLDisplay *format;
+ gboolean active;
+
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ format = e_mail_shell_content_get_preview_format (mail_shell_content);
+ active = gtk_toggle_action_get_active (action);
+
+ em_format_html_display_set_caret_mode (format, active);
}
static void
@@ -258,24 +265,74 @@ static void
action_mail_flag_clear_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
- /* FIXME */
- g_print ("Action: %s\n", gtk_action_get_name (GTK_ACTION (action)));
+ EMailShellContent *mail_shell_content;
+ EMFormatHTMLDisplay *format;
+ EMFolderView *folder_view;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ GPtrArray *uids;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ folder_view = e_mail_shell_content_get_folder_view (mail_shell_content);
+ format = e_mail_shell_content_get_preview_format (mail_shell_content);
+
+ uids = message_list_get_selected (folder_view->list);
+
+ em_utils_flag_for_followup_clear (
+ GTK_WIDGET (shell_window), folder_view->folder, uids);
+
+ em_format_redraw ((EMFormat *) format);
}
static void
action_mail_flag_completed_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
- /* FIXME */
- g_print ("Action: %s\n", gtk_action_get_name (GTK_ACTION (action)));
+ EMailShellContent *mail_shell_content;
+ EMFormatHTMLDisplay *format;
+ EMFolderView *folder_view;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ GPtrArray *uids;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ folder_view = e_mail_shell_content_get_folder_view (mail_shell_content);
+ format = e_mail_shell_content_get_preview_format (mail_shell_content);
+
+ uids = message_list_get_selected (folder_view->list);
+
+ em_utils_flag_for_followup_completed (
+ GTK_WIDGET (shell_window), folder_view->folder, uids);
+
+ em_format_redraw ((EMFormat *) format);
}
static void
action_mail_flag_for_followup_cb (GtkAction *action,
EMailShellView *mail_shell_view)
{
- /* FIXME */
- g_print ("Action: %s\n", gtk_action_get_name (GTK_ACTION (action)));
+ EMailShellContent *mail_shell_content;
+ EMFolderView *folder_view;
+ EShellWindow *shell_window;
+ EShellView *shell_view;
+ GPtrArray *uids;
+
+ shell_view = E_SHELL_VIEW (mail_shell_view);
+ shell_window = e_shell_view_get_shell_window (shell_view);
+
+ mail_shell_content = mail_shell_view->priv->mail_shell_content;
+ folder_view = e_mail_shell_content_get_folder_view (mail_shell_content);
+
+ uids = message_list_get_selected (folder_view->list);
+
+ em_utils_flag_for_followup (
+ GTK_WIDGET (shell_window), folder_view->folder, uids);
}
static void
diff --git a/mail/em-folder-view.c b/mail/em-folder-view.c
index 8b624934a3..b129d3fba6 100644
--- a/mail/em-folder-view.c
+++ b/mail/em-folder-view.c
@@ -773,39 +773,39 @@ emfv_popup_source(EPopup *ep, EPopupItem *pitem, void *data)
// em_utils_forward_messages (emfv->folder, uids, emfv->folder_uri);
//}
-static void
-emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids = message_list_get_selected(emfv->list);
-
- em_utils_flag_for_followup((GtkWidget *)emfv, emfv->folder, uids);
-}
-
-static void
-emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids;
-
- uids = message_list_get_selected(emfv->list);
- em_utils_flag_for_followup_completed((GtkWidget *)emfv, emfv->folder, uids);
-
- if (emfv->preview)
- em_format_redraw (emfv->preview);
-}
-
-static void
-emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data)
-{
- EMFolderView *emfv = data;
- GPtrArray *uids = message_list_get_selected(emfv->list);
+//static void
+//emfv_popup_flag_followup(EPopup *ep, EPopupItem *pitem, void *data)
+//{
+// EMFolderView *emfv = data;
+// GPtrArray *uids = message_list_get_selected(emfv->list);
+//
+// em_utils_flag_for_followup((GtkWidget *)emfv, emfv->folder, uids);
+//}
- em_utils_flag_for_followup_clear((GtkWidget *)emfv, emfv->folder, uids);
+//static void
+//emfv_popup_flag_completed(EPopup *ep, EPopupItem *pitem, void *data)
+//{
+// EMFolderView *emfv = data;
+// GPtrArray *uids;
+//
+// uids = message_list_get_selected(emfv->list);
+// em_utils_flag_for_followup_completed((GtkWidget *)emfv, emfv->folder, uids);
+//
+// if (emfv->preview)
+// em_format_redraw (emfv->preview);
+//}
- if (emfv->preview)
- em_format_redraw (emfv->preview);
-}
+//static void
+//emfv_popup_flag_clear(EPopup *ep, EPopupItem *pitem, void *data)
+//{
+// EMFolderView *emfv = data;
+// GPtrArray *uids = message_list_get_selected(emfv->list);
+//
+// em_utils_flag_for_followup_clear((GtkWidget *)emfv, emfv->folder, uids);
+//
+// if (emfv->preview)
+// em_format_redraw (emfv->preview);
+//}
//static void
//emfv_popup_mark_read(EPopup *ep, EPopupItem *pitem, void *data)
@@ -1183,7 +1183,7 @@ static EPopupItem emfv_popup_items[] = {
// { E_POPUP_ITEM, "50.emfv.03", N_("Mark as Un_important"), emfv_popup_mark_unimportant, NULL, NULL, EM_POPUP_SELECT_MARK_UNIMPORTANT|EM_FOLDER_VIEW_SELECT_LISTONLY },
// { E_POPUP_ITEM, "50.emfv.04", N_("Mark as _Junk"), emfv_popup_mark_junk, NULL, "mail-mark-junk", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_JUNK },
// { E_POPUP_ITEM, "50.emfv.05", N_("Mark as _Not Junk"), emfv_popup_mark_nojunk, NULL, "mail-mark-notjunk", EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY|EM_POPUP_SELECT_NOT_JUNK },
- { E_POPUP_ITEM, "50.emfv.06", N_("Mark for Follo_w Up..."), emfv_popup_flag_followup, NULL, "stock_mail-flag-for-followup", EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_FOLDER_VIEW_SELECT_LISTONLY },
+// { E_POPUP_ITEM, "50.emfv.06", N_("Mark for Follo_w Up..."), emfv_popup_flag_followup, NULL, "stock_mail-flag-for-followup", EM_POPUP_SELECT_FLAG_FOLLOWUP|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_SUBMENU, "60.label.00", N_("_Label"), NULL, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_ITEM, "60.label.00/00.label", N_("_None"), emfv_popup_label_clear, NULL, NULL, EM_POPUP_SELECT_MANY|EM_FOLDER_VIEW_SELECT_LISTONLY },
@@ -1193,8 +1193,8 @@ static EPopupItem emfv_popup_items[] = {
{ E_POPUP_BAR, "70.emfv.06", NULL, NULL, NULL, NULL },
- { E_POPUP_ITEM, "70.emfv.07", N_("Fla_g Completed"), emfv_popup_flag_completed, NULL, "stock_mail-flag-for-followup-done", EM_POPUP_SELECT_FLAG_COMPLETED|EM_FOLDER_VIEW_SELECT_LISTONLY },
- { E_POPUP_ITEM, "70.emfv.08", N_("Cl_ear Flag"), emfv_popup_flag_clear, NULL, NULL, EM_POPUP_SELECT_FLAG_CLEAR|EM_FOLDER_VIEW_SELECT_LISTONLY },
+// { E_POPUP_ITEM, "70.emfv.07", N_("Fla_g Completed"), emfv_popup_flag_completed, NULL, "stock_mail-flag-for-followup-done", EM_POPUP_SELECT_FLAG_COMPLETED|EM_FOLDER_VIEW_SELECT_LISTONLY },
+// { E_POPUP_ITEM, "70.emfv.08", N_("Cl_ear Flag"), emfv_popup_flag_clear, NULL, NULL, EM_POPUP_SELECT_FLAG_CLEAR|EM_FOLDER_VIEW_SELECT_LISTONLY },
{ E_POPUP_BAR, "90.filter", NULL, NULL, NULL, NULL },
{ E_POPUP_SUBMENU, "90.filter.00", N_("Crea_te Rule From Message"), NULL, NULL, NULL, EM_POPUP_SELECT_ONE|EM_FOLDER_VIEW_SELECT_LISTONLY },
@@ -1370,9 +1370,9 @@ from(BonoboUIComponent *uid, void *data, const char *path) \
//EMFV_MAP_CALLBACK(emfv_message_mark_nojunk, emfv_popup_mark_nojunk)
EMFV_MAP_CALLBACK(emfv_message_delete, emfv_popup_delete)
//EMFV_MAP_CALLBACK(emfv_message_undelete, emfv_popup_undelete)
-EMFV_MAP_CALLBACK(emfv_message_followup_flag, emfv_popup_flag_followup)
-EMFV_MAP_CALLBACK(emfv_message_followup_clear, emfv_popup_flag_clear)
-EMFV_MAP_CALLBACK(emfv_message_followup_completed, emfv_popup_flag_completed)
+//EMFV_MAP_CALLBACK(emfv_message_followup_flag, emfv_popup_flag_followup)
+//EMFV_MAP_CALLBACK(emfv_message_followup_clear, emfv_popup_flag_clear)
+//EMFV_MAP_CALLBACK(emfv_message_followup_completed, emfv_popup_flag_completed)
EMFV_MAP_CALLBACK(emfv_message_open, emfv_popup_open)
//EMFV_MAP_CALLBACK(emfv_message_edit, emfv_popup_edit)
//EMFV_MAP_CALLBACK(emfv_message_saveas, emfv_popup_saveas)
@@ -1904,9 +1904,9 @@ static BonoboUIVerb emfv_message_verbs[] = {
// BONOBO_UI_UNSAFE_VERB ("MessageMarkAsUnimportant", emfv_message_mark_unimportant),
// BONOBO_UI_UNSAFE_VERB ("MessageMarkAsJunk", emfv_message_mark_junk),
// BONOBO_UI_UNSAFE_VERB ("MessageMarkAsNotJunk", emfv_message_mark_nojunk),
- BONOBO_UI_UNSAFE_VERB ("MessageFollowUpFlag", emfv_message_followup_flag),
- BONOBO_UI_UNSAFE_VERB ("MessageFollowUpComplete", emfv_message_followup_completed),
- BONOBO_UI_UNSAFE_VERB ("MessageFollowUpClear", emfv_message_followup_clear),
+// BONOBO_UI_UNSAFE_VERB ("MessageFollowUpFlag", emfv_message_followup_flag),
+// BONOBO_UI_UNSAFE_VERB ("MessageFollowUpComplete", emfv_message_followup_completed),
+// BONOBO_UI_UNSAFE_VERB ("MessageFollowUpClear", emfv_message_followup_clear),
// BONOBO_UI_UNSAFE_VERB ("MessageMove", emfv_message_move),
BONOBO_UI_UNSAFE_VERB ("MessageOpen", emfv_message_open),
// BONOBO_UI_UNSAFE_VERB ("MessagePostReply", emfv_message_post_reply),
diff --git a/mail/em-message-browser.c b/mail/em-message-browser.c
index 8b3ff99152..c3a427f601 100644
--- a/mail/em-message-browser.c
+++ b/mail/em-message-browser.c
@@ -96,7 +96,7 @@ emmb_set_message (EMFolderView *emfv,
folder_view_class = EM_FOLDER_VIEW_CLASS (parent_class);
folder_view_class->set_message (emfv, uid, nomarkseen);
- if (uid == NULL) {
+ f (uid == NULL) {
gtk_widget_destroy (GTK_WIDGET (emfv));
return;
}