[Commits] [SCM] claws branch, master, updated. 3.18.0-326-g7182ba2d6

miras at claws-mail.org miras at claws-mail.org
Tue Jan 4 10:25:19 UTC 2022


The branch, master has been updated
       via  7182ba2d6d8de449e88ad4170b0beaf91249d918 (commit)
      from  9171e908bb3371ea57218ed5d726a3d090392c6b (commit)

Summary of changes:
 src/compose.c | 16 +---------------
 1 file changed, 1 insertion(+), 15 deletions(-)


- Log -----------------------------------------------------------------
commit 7182ba2d6d8de449e88ad4170b0beaf91249d918
Author: Michael Rasmussen <mir at datanom.net>
Date:   Tue Jan 4 11:25:10 2022 +0100

    Use internal function alertpanel_error instead of gtk_message_dialog
    
    Signed-off-by: Michael Rasmussen <mir at datanom.net>

diff --git a/src/compose.c b/src/compose.c
index 52a94593b..376e46b5a 100644
--- a/src/compose.c
+++ b/src/compose.c
@@ -10905,20 +10905,6 @@ static void entry_copy_clipboard(GtkWidget *entry)
 			gtk_clipboard_get(GDK_SELECTION_CLIPBOARD));
 }
 
-static void text_too_big_alert(Compose *compose, glong size) {
-        GtkDialogFlags flags = GTK_DIALOG_DESTROY_WITH_PARENT;
-        GtkMessageDialog* dialog = gtk_message_dialog_new(
-                                        GTK_WINDOW(compose->window),
-                                        flags,
-                                        GTK_MESSAGE_INFO,
-                                        GTK_BUTTONS_OK,
-                                        _("Number of pages '%d' exceeds limit '%d' for paste. Attach as file instead"),
-                                        (size / 1800),
-                                        (MAX_ALLOCA_MEM_SIZE / 1800));
-        gtk_dialog_run(GTK_DIALOG(dialog));
-        gtk_widget_destroy(GTK_WIDGET(dialog));
-}
-
 static void entry_paste_clipboard(Compose *compose, GtkWidget *entry, 
  				  gboolean wrap, GdkAtom clip, GtkTextIter *insert_place)
 {
@@ -10934,7 +10920,7 @@ static void entry_paste_clipboard(Compose *compose, GtkWidget *entry,
 
                 glong len = g_utf8_strlen(contents, -1);
                 if (len > MAX_ALLOCA_MEM_SIZE) {
-                        text_too_big_alert(compose, len);
+                        alertpanel_error(_("Number of pages '%ld' exceeds limit '%d' for paste.\nAttach as file instead."), (len / 1800), (MAX_ALLOCA_MEM_SIZE / 1800));
                         return;
                 }
 

-----------------------------------------------------------------------


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list