aboutsummaryrefslogtreecommitdiffstats
path: root/mail/mail-ops.c
diff options
context:
space:
mode:
authorJeffrey Stedfast <fejj@helixcode.com>2000-08-09 09:09:55 +0800
committerJeffrey Stedfast <fejj@src.gnome.org>2000-08-09 09:09:55 +0800
commitb9a9cd3a8699c350dc6746c595e4de3e030545c4 (patch)
tree525676e7afd76aa1babe4fdf6dfe8ab8d16a1feb /mail/mail-ops.c
parent4b65801638f2d6b4cfefb9cc13966a7557e2f946 (diff)
downloadgsoc2013-evolution-b9a9cd3a8699c350dc6746c595e4de3e030545c4.tar.gz
gsoc2013-evolution-b9a9cd3a8699c350dc6746c595e4de3e030545c4.tar.zst
gsoc2013-evolution-b9a9cd3a8699c350dc6746c595e4de3e030545c4.zip
New convenience function with params of a normal Gtk callback function. We
2000-08-08 Jeffrey Stedfast <fejj@helixcode.com> * mail-ops.c (view_msg): New convenience function with params of a normal Gtk callback function. We also now create a new FolderBrowser object so that the message-view window isn't tied to the display in the main window (view_message): Now calls view_msg (this function is a bonobo callback and can't be used with gtk widgets) (edit_msg): Same idea as view_msg() (edit_message): Again, same as view_message() * message-list.c (on_right_click): Callback for creating an e-popup-menu (message_list_init): Added a right_click event to trigger a pop-up menu to be displayed svn path=/trunk/; revision=4619
Diffstat (limited to 'mail/mail-ops.c')
-rw-r--r--mail/mail-ops.c37
1 files changed, 26 insertions, 11 deletions
diff --git a/mail/mail-ops.c b/mail/mail-ops.c
index 70d0c0b82d..be8fd3ee5d 100644
--- a/mail/mail-ops.c
+++ b/mail/mail-ops.c
@@ -720,13 +720,13 @@ reply (FolderBrowser *fb, gboolean to_all)
}
void
-reply_to_sender (GtkWidget *button, gpointer user_data)
+reply_to_sender (GtkWidget *widget, gpointer user_data)
{
reply (FOLDER_BROWSER (user_data), FALSE);
}
void
-reply_to_all (GtkWidget *button, gpointer user_data)
+reply_to_all (GtkWidget *widget, gpointer user_data)
{
reply (FOLDER_BROWSER (user_data), TRUE);
}
@@ -739,7 +739,7 @@ attach_msg (MessageList *ml, const char *uid, gpointer data)
CamelMimePart *part;
const char *subject;
char *desc;
-
+
message = camel_folder_get_message (ml->folder, uid, NULL);
if (!message)
return;
@@ -748,23 +748,23 @@ attach_msg (MessageList *ml, const char *uid, gpointer data)
desc = g_strdup_printf ("Forwarded message - %s", subject);
else
desc = g_strdup ("Forwarded message");
-
+
part = camel_mime_part_new ();
camel_mime_part_set_disposition (part, "inline");
camel_mime_part_set_description (part, desc);
camel_medium_set_content_object (CAMEL_MEDIUM (part),
CAMEL_DATA_WRAPPER (message));
camel_mime_part_set_content_type (part, "message/rfc822");
-
+
e_msg_composer_attach (composer, part);
-
+
gtk_object_unref (GTK_OBJECT (part));
gtk_object_unref (GTK_OBJECT (message));
g_free (desc);
}
void
-forward_msg (GtkWidget *button, gpointer user_data)
+forward_msg (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
EMsgComposer *composer;
@@ -818,7 +818,7 @@ real_move_msg (MessageList *ml, const char *uid, gpointer user_data)
}
void
-move_msg (GtkWidget *button, gpointer user_data)
+move_msg (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = user_data;
MessageList *ml = fb->message_list;
@@ -894,7 +894,7 @@ real_edit_msg (MessageList *ml, const char *uid, gpointer user_data)
}
void
-edit_message (BonoboUIHandler *uih, void *user_data, const char *path)
+edit_msg (GtkWidget *widget, gpointer user_data)
{
FolderBrowser *fb = FOLDER_BROWSER (user_data);
MessageList *ml = fb->message_list;
@@ -918,6 +918,12 @@ edit_message (BonoboUIHandler *uih, void *user_data, const char *path)
}
}
+void
+edit_message (BonoboUIHandler *uih, void *user_data, const char *path)
+{
+ edit_msg (NULL, user_data);
+}
+
static void
real_delete_msg (MessageList *ml, const char *uid, gpointer user_data)
{
@@ -1094,16 +1100,20 @@ real_view_msg (MessageList *ml, const char *uid, gpointer user_data)
}
void
-view_message (BonoboUIHandler *uih, void *user_data, const char *path)
+view_msg (GtkWidget *widget, gpointer user_data)
{
struct view_msg_data data;
FolderBrowser *fb = user_data;
+ FolderBrowser *folder_browser;
CamelException ex;
MessageList *ml;
camel_exception_init (&ex);
- data.fb = fb;
+ folder_browser = FOLDER_BROWSER (folder_browser_new ());
+ folder_browser_set_uri (folder_browser, fb->uri);
+
+ data.fb = folder_browser;
data.ex = &ex;
ml = fb->message_list;
@@ -1115,3 +1125,8 @@ view_message (BonoboUIHandler *uih, void *user_data, const char *path)
}
}
+void
+view_message (BonoboUIHandler *uih, void *user_data, const char *path)
+{
+ view_msg (NULL, user_data);
+}