aboutsummaryrefslogtreecommitdiffstats
path: root/composer/e-msg-composer.c
diff options
context:
space:
mode:
authorMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 02:02:22 +0800
committerMatthew Barnes <mbarnes@src.gnome.org>2009-02-01 02:02:22 +0800
commitcd5ff486fb02451645f8b4b39608edca2da5e4a2 (patch)
tree5aff2bff0e48bc3333ff1fc3fdb619c4c34fdbd2 /composer/e-msg-composer.c
parent70fce0bbb0712dc70a15c481c0b65d68a98a4ff7 (diff)
downloadgsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.gz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.bz2
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.lz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.xz
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.tar.zst
gsoc2013-evolution-cd5ff486fb02451645f8b4b39608edca2da5e4a2.zip
Let the mailer handle composer printing.
Start roughing in the mailer search bar. svn path=/branches/kill-bonobo/; revision=37199
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r--composer/e-msg-composer.c30
1 files changed, 28 insertions, 2 deletions
diff --git a/composer/e-msg-composer.c b/composer/e-msg-composer.c
index dee28d0691..8eb72649ac 100644
--- a/composer/e-msg-composer.c
+++ b/composer/e-msg-composer.c
@@ -132,6 +132,7 @@ typedef enum {
enum {
SEND,
SAVE_DRAFT,
+ PRINT,
LAST_SIGNAL
};
@@ -2695,7 +2696,7 @@ msg_composer_class_init (EMsgComposerClass *class)
signals[SEND] = g_signal_new (
"send",
- E_TYPE_MSG_COMPOSER,
+ G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
@@ -2703,11 +2704,20 @@ msg_composer_class_init (EMsgComposerClass *class)
signals[SAVE_DRAFT] = g_signal_new (
"save-draft",
- E_TYPE_MSG_COMPOSER,
+ G_OBJECT_CLASS_TYPE (class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL,
g_cclosure_marshal_VOID__VOID,
G_TYPE_NONE, 0);
+
+ signals[PRINT] = g_signal_new (
+ "print",
+ G_OBJECT_CLASS_TYPE (class),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__ENUM,
+ G_TYPE_NONE, 1,
+ GTK_TYPE_PRINT_OPERATION_ACTION);
}
static void
@@ -3785,6 +3795,22 @@ e_msg_composer_save_draft (EMsgComposer *composer)
e_composer_autosave_set_saved (composer, FALSE);
}
+/**
+ * e_msg_composer_print:
+ * @composer: an #EMsgComposer
+ * @action: the print action to start
+ *
+ * Print the message in @composer.
+ **/
+void
+e_msg_composer_print (EMsgComposer *composer,
+ GtkPrintOperationAction action)
+{
+ g_return_if_fail (E_IS_MSG_COMPOSER (composer));
+
+ g_signal_emit (composer, signals[PRINT], 0, action);
+}
+
static GList *
add_recipients (GList *list, const gchar *recips)
{