[balsa/gtk3] Provide a parent for the quote-parts dialog



commit e851f458fead7a85b6234537665d5395b56522c3
Author: Peter Bloomfield <PeterBloomfield bellsouth net>
Date:   Wed Apr 1 19:33:07 2015 -0400

    Provide a parent for the quote-parts dialog
    
        * src/sendmsg-window.c (quote_parts_select_dlg),
        (collect_for_quote), (quote_body): add a cancel button and
        provide a parent for the quote-parts dialog.

 ChangeLog            |    6 ++++++
 src/sendmsg-window.c |   13 +++++++++----
 2 files changed, 15 insertions(+), 4 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index b2d3852..03c379b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2015-04-01  Peter Bloomfield  <pbloomfield bellsouth net>
+
+       * src/sendmsg-window.c (quote_parts_select_dlg),
+       (collect_for_quote), (quote_body): add a cancel button and
+       provide a parent for the quote-parts dialog.
+
 2015-03-30  Peter Bloomfield  <pbloomfield bellsouth net>
 
        Clean up store-address dialog
diff --git a/src/sendmsg-window.c b/src/sendmsg-window.c
index f3f76af..b017b81 100644
--- a/src/sendmsg-window.c
+++ b/src/sendmsg-window.c
@@ -3379,6 +3379,7 @@ quote_parts_select_dlg(GtkTreeStore *tree_store, GtkWindow * parent)
                                         GTK_DIALOG_DESTROY_WITH_PARENT |
                                          GTK_DIALOG_USE_HEADER_BAR,
                                         _("_OK"), GTK_RESPONSE_OK,
+                                        _("_Cancel"), GTK_RESPONSE_CANCEL,
                                         NULL);
 #if HAVE_MACOSX_DESKTOP
     libbalsa_macosx_menu_for_parent(dialog, parent);
@@ -3458,8 +3459,12 @@ tree_find_single_part(GtkTreeModel *model, GtkTreePath *path, GtkTreeIter *iter,
 }
 
 static GString *
-collect_for_quote(LibBalsaMessageBody *root, gchar * reply_prefix_str,
-                 gint llen, gboolean ignore_html, gboolean flow)
+collect_for_quote(BalsaSendmsg        * bsmsg,
+                  LibBalsaMessageBody * root,
+                  gchar               * reply_prefix_str,
+                  gint                  llen,
+                  gboolean              ignore_html,
+                  gboolean              flow)
 {
     GtkTreeStore * tree_store;
     gint text_bodies;
@@ -3490,7 +3495,7 @@ collect_for_quote(LibBalsaMessageBody *root, gchar * reply_prefix_str,
            q_body = process_mime_part(message, this_body, reply_prefix_str,
                                       llen, FALSE, flow);
     } else if (text_bodies > 1) {
-       if (quote_parts_select_dlg(tree_store, NULL)) {
+       if (quote_parts_select_dlg(tree_store, GTK_WINDOW(bsmsg->window))) {
            GtkTreeIter iter;
 
            q_body = g_string_new("");
@@ -3602,7 +3607,7 @@ quote_body(BalsaSendmsg * bsmsg, LibBalsaMessageHeaders *headers,
 
        /* scan the message and collect text parts which might be included
         * in the reply */
-       body = collect_for_quote(root,
+       body = collect_for_quote(bsmsg, root,
                                 qtype == QUOTE_ALL ? balsa_app.quote_str : NULL,
                                 bsmsg->flow ? -1 : balsa_app.wraplength,
                                 balsa_app.reply_strip_html, bsmsg->flow);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]