[Users] Signature position

JoHnY sylpheed at 2600.sk
Wed Nov 4 22:29:09 CET 2015


So, I was able to finally completely change the behaviour even though I haven't been coding in C for at least 10 years (and never coding anything for GTK), which I take as a personal accomplishment :-)
Anyway, for now I only fixed it for myself so that there is no option to have the signature either before or after quoted text, plus the code is not clean after all my experiments, so I won't send a patch at this time, I just want to let everyone know that if anyone is interested, I can send the patch privately. 
I'll try to cleanup the code, add the option to the settings and submit the patch later when I'll have some time.

On Sun, 1 Nov 2015 19:57:27 +0100
JoHnY <sylpheed at 2600.sk> wrote:

> The move of signature to the start of message consisted of adding
> one line (without making it an option, so no setting in
> preferences) and it works. However, I have a problem with replacing
> the signature when changing the account, now it deletes the whole
> message and quoted text. I have even replaced the whole section
> responsible for the signature replacement by the same section from
> Sylpheed source where it works fine, but it behaves the same way
> and I can't figure out why. Is there anyone willing to point me in
> the right direction? The code in question from the compose.c:
> 
>         if (replace) {
>                 GtkTextIter first_iter, start_iter, end_iter;
> 
>                 gtk_text_buffer_get_start_iter(buffer, &first_iter);
> 
>                 if (!exists || compose->sig_str[0] == '\0')
>                         found = FALSE;
>                 else
>                         found =
> gtk_text_iter_forward_to_tag_toggle(&first_iter,
> compose->signature_tag);
> 
>                 if (found) {
>                         /* include previous \n\n */
>                         gtk_text_iter_backward_chars(&first_iter,
> 1); start_iter = first_iter;
>                         end_iter = first_iter;
>                         /* skip re-start */
>                         found =
> gtk_text_iter_forward_to_tag_toggle(&end_iter,
> compose->signature_tag); found &=
> gtk_text_iter_forward_to_tag_toggle(&end_iter,
> compose->signature_tag); if (found) {
>                                 gtk_text_buffer_delete(buffer,
> &start_iter, &end_iter); iter = start_iter;
>                         }
>                 }
> 
> 
>         }
> 
> Thanks.
> Jan
> 
> On Sun, 1 Nov 2015 16:23:20 +0100
> JoHnY <sylpheed at 2600.sk> wrote:
> 
> > Well, if I was good enough at C to do it, I would do it myself
> > right away without asking. I suppose not everyone who is using
> > opensource has to be a programer. I still might try to look into
> > that and post a patch if I'll be successful, I just wanted to know
> > if I'm the only one who wants such feature.
> > 
> > Jan
> > 
> > 
> > On Sun, 1 Nov 2015 15:58:34 +0100
> > Andrej Kacian <andrej at kacian.sk> wrote:
> > 
> > > On Sun, 1 Nov 2015 13:33:08 +0100
> > > JoHnY <sylpheed at 2600.sk> wrote:
> > > 
> > > > [...] so I wanted to know if there's any chance that such a
> > > > simple feature will be implemented, as it would be just a very
> > > > simple change.
> > >                        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
> > > 
> > > We're looking forward to seeing a patch for this very simple
> > > change from you. That is, after all, how open source software
> > > works - if you have an itch, you scratch it.
> > > 
> > > Regards,
> > > -- 
> > > Andrej
> > > _______________________________________________
> > > Users mailing list
> > > Users at lists.claws-mail.org
> > > http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users
> > _______________________________________________
> > Users mailing list
> > Users at lists.claws-mail.org
> > http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users
> _______________________________________________
> Users mailing list
> Users at lists.claws-mail.org
> http://lists.claws-mail.org/cgi-bin/mailman/listinfo/users



More information about the Users mailing list