2011-11-13 [colin] 3.7.10cvs85
authorColin Leroy <colin@colino.net>
Sun, 13 Nov 2011 14:09:03 +0000 (14:09 +0000)
committerColin Leroy <colin@colino.net>
Sun, 13 Nov 2011 14:09:03 +0000 (14:09 +0000)
* src/compose.c
Make compose windows printable

ChangeLog
PATCHSETS
configure.ac
src/compose.c

index fabcae0..0f80f87 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2011-11-13 [colin]     3.7.10cvs85
+
+       * src/compose.c
+               Make compose windows printable
+
 2011-11-11 [colin]     3.7.10cvs84
 
        * configure.ac
index 67236fa..a494449 100644 (file)
--- a/PATCHSETS
+++ b/PATCHSETS
 ( cvs diff -u -r 1.204.2.204 -r 1.204.2.205 src/prefs_common.c;  ) > 3.7.10cvs82.patchset
 ( cvs diff -u -r 1.274.2.335 -r 1.274.2.336 src/mainwindow.c;  cvs diff -u -r 1.83.2.179 -r 1.83.2.180 src/mimeview.c;  cvs diff -u -r 1.20.2.34 -r 1.20.2.35 src/mimeview.h;  cvs diff -u -r 1.395.2.437 -r 1.395.2.438 src/summaryview.c;  ) > 3.7.10cvs83.patchset
 ( cvs diff -u -r 1.654.2.4364 -r 1.654.2.4365 configure.ac;  ) > 3.7.10cvs84.patchset
+( cvs diff -u -r 1.382.2.593 -r 1.382.2.594 src/compose.c;  ) > 3.7.10cvs85.patchset
index 807b99a..6c4fa35 100644 (file)
@@ -12,7 +12,7 @@ MINOR_VERSION=7
 MICRO_VERSION=10
 INTERFACE_AGE=0
 BINARY_AGE=0
-EXTRA_VERSION=84
+EXTRA_VERSION=85
 EXTRA_RELEASE=
 EXTRA_GTK2_VERSION=
 
index 38bccc6..45a8bce 100644 (file)
@@ -381,6 +381,8 @@ static void compose_insert_sig_cb   (GtkAction      *action,
 
 static void compose_close_cb           (GtkAction      *action,
                                         gpointer        data);
+static void compose_print_cb           (GtkAction      *action,
+                                        gpointer        data);
 
 static void compose_set_encoding_cb    (GtkAction      *action, GtkRadioAction *current, gpointer data);
 
@@ -569,6 +571,8 @@ static GtkActionEntry compose_entries[] =
        /* {"Message/---",              NULL, "---" }, */
        {"Message/Save",                NULL, N_("_Save"), "<control>S", NULL, G_CALLBACK(compose_save_cb) }, /*COMPOSE_KEEP_EDITING*/
        /* {"Message/---",              NULL, "---" }, */
+       {"Message/Print",               NULL, N_("_Print"), NULL, NULL, G_CALLBACK(compose_print_cb) },
+       /* {"Message/---",              NULL, "---" }, */
        {"Message/Close",               NULL, N_("_Close"), "<control>W", NULL, G_CALLBACK(compose_close_cb) },
 
 /* Edit menu */
@@ -7191,6 +7195,8 @@ static Compose *compose_create(PrefsAccount *account,
        MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator2", "Message/---", GTK_UI_MANAGER_SEPARATOR)
        MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Save", "Message/Save", GTK_UI_MANAGER_MENUITEM)
        MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator3", "Message/---", GTK_UI_MANAGER_SEPARATOR)
+       MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Print", "Message/Print", GTK_UI_MANAGER_MENUITEM)
+       MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Separator4", "Message/---", GTK_UI_MANAGER_SEPARATOR)
        MENUITEM_ADDUI_MANAGER(compose->ui_manager, "/Menu/Message", "Close", "Message/Close", GTK_UI_MANAGER_MENUITEM)
 
 /* Edit menu */
@@ -9821,6 +9827,15 @@ static void compose_close_cb(GtkAction *action, gpointer data)
        compose_close(compose);
 }
 
+static void compose_print_cb(GtkAction *action, gpointer data)
+{
+       Compose *compose = (Compose *) data;
+
+       compose_draft((gpointer)compose, COMPOSE_AUTO_SAVE);
+       if (compose->targetinfo)
+               messageview_print(compose->targetinfo, FALSE, -1, -1, 0);
+}
+
 static void compose_set_encoding_cb(GtkAction *action, GtkRadioAction *current, gpointer data)
 {
        gboolean active = gtk_toggle_action_get_active (GTK_TOGGLE_ACTION (current));