[gnome-notes/169-selecting-send-this-note-does-not-open-an-email-application] share: Add a fake "to address" email



commit bb6c0a88257de5a324a2a95b6bc651e5ee08b9c8
Author: Isaque Galdino <igaldino gmail com>
Date:   Fri Apr 23 09:52:00 2021 -0300

    share: Add a fake "to address" email
    
    This fixes #169 issue.
    
    Notes was not throwing any issue when communicating with dbus to send
    the email using org.freedesktop.portal.Email interface.
    
    As I'm running F33, it got the dbus issue through ABRT (this is one
    service I use to hate but this time it saved me a lot of analysis time).
    
    After installing the debuginfo package for xdg-desktop-portal-gtk:
    
    ```
    sudo dnf debuginfo-install xdg-desktop-portal-gtk
    ```
    
    and checking the coredump utility:
    
    ```
    coredumpctl gdb
    ```
    
    I was able to see the issue in:
    
    ```
    Program terminated with signal SIGSEGV, Segmentation fault.
    #0  0x00005562308d40cf in compose_mail_mailto (error=0x0,
        attachments=0x7ffed0291b28,
        body=<optimized out>, subject=<optimized out>, bcc=0x0, cc=0x0,
        addrs=0x0, info=0x556231685380) at src/email.c:50
    50        for (i = 0; addrs[i]; i++)
    (gdb) bt
    #0  0x00005562308d40cf in compose_mail_mailto
        (error=0x0, attachments=0x7ffed0291b28, body=<optimized out>,
        subject=<optimized out>, bcc=0x0, cc=0x0, addrs=0x0,
        info=0x556231685380) at src/email.c:50
    #1  compose_mail
        (error=0x0, attachments=0x7ffed0291b28, body=<optimized out>,
        subject=<optimized out>, bcc=0x0, cc=0x0, addrs=0x0) at
        src/email.c:116
    #2  handle_compose_email
        (object=<optimized out>, invocation=0x556231693ae0,
        arg_handle=<optimized out>, arg_app_id=<optimized out>,
        arg_parent_window=<optimized out>, arg_options=<optimized out>) at
        src/email.c:174
    ```
    
    So, in https://github.com/flatpak/xdg-desktop-portal-gtk/blob/master/src/email.c#L50
    I noticed it was expecting an "address" parameter to be provided.

 src/bjb-share.c | 1 +
 1 file changed, 1 insertion(+)
---
diff --git a/src/bjb-share.c b/src/bjb-share.c
index 6ed45bc..e22a61d 100644
--- a/src/bjb-share.c
+++ b/src/bjb-share.c
@@ -57,6 +57,7 @@ on_email_note_callback (BijiNoteObj *note)
     }
 
   arraybuilder = g_variant_builder_new (G_VARIANT_TYPE ("a{sv}"));
+  g_variant_builder_add (arraybuilder, "{sv}", "address", g_variant_new_string ("to email com"));
   g_variant_builder_add (arraybuilder, "{sv}", "subject", g_variant_new_string (title_mail));
   g_variant_builder_add (arraybuilder, "{sv}", "body", g_variant_new_string (text_mail));
 


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