diff options
Diffstat (limited to 'composer/e-msg-composer.c')
-rw-r--r-- | composer/e-msg-composer.c | 30 |
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) { |