New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

1.16 breaks bold formatting #111

Closed
Smile4ever opened this Issue Oct 4, 2016 · 7 comments

Comments

Projects
None yet
5 participants
@Smile4ever

Smile4ever commented Oct 4, 2016

I just got the upgrade to MATE 1.16. Notification text between <b></b> is no longer displayed bold. Instead, the codes and the text are displayed as notification: <b>New song reported by VLC</b>. I expect the text to be New song reported by VLC without the formatting codes.

I use Manjaro Linux.

@kmyid

This comment has been minimized.

Show comment
Hide comment
@kmyid

kmyid Oct 5, 2016

I have the same problem on Arch linux

kmyid commented Oct 5, 2016

I have the same problem on Arch linux

@monsta

This comment has been minimized.

Show comment
Hide comment
@monsta

monsta Oct 5, 2016

Member

@kajzersoze: could this be a side effect of #107 and/or #110?

Member

monsta commented Oct 5, 2016

@kajzersoze: could this be a side effect of #107 and/or #110?

@Smile4ever

This comment has been minimized.

Show comment
Hide comment
@Smile4ever

Smile4ever Oct 5, 2016

f95d699 looks suspicious

f95d699 looks suspicious

@kajzersoze

This comment has been minimized.

Show comment
Hide comment
@kajzersoze

kajzersoze Oct 5, 2016

Contributor

Indeed, it's #107

Contributor

kajzersoze commented Oct 5, 2016

Indeed, it's #107

@kajzersoze

This comment has been minimized.

Show comment
Hide comment
@kajzersoze

kajzersoze Oct 5, 2016

Contributor

@monsta, problem is in g_markup_escape_text , for some reason it doesn't like <b>
I can't fix it atm, you can revert that commit along with #110 and then bold text will work, but you will then have old problem back, empty notifications when there's a & char in the string, there are also other chars which will cause empty notification to show.
For example :
$ notify-send "Test" "Test & Example"

will show just "Test" as a title but with no body (Test & Example), instead body would be empty.

I just checked the same function in gnome and it's basically the same thing :
https://github.com/GNOME/notification-daemon/blob/ea34bf17525c2fd5329e34cce1a102766f1a1e0d/src/nd-bubble.c#L616-L668

They have :

                tmp = g_markup_escape_text (body, -1);
                gtk_label_set_text (GTK_LABEL (bubble->priv->body_label), body);
                g_free (tmp);

but tmp is not used, thus g_markup_escape_text is not used, but they use gtk_label_set_text instead of gtk_label_set_markup (used in mate) and gtk_label_set_text does what g_markup_escape_text is doing, I tested all that, in any case<b> is still shown either way.
Maybe this is all confusing and the only way would be for someone to actually try this in order to understand.

I don't know how to solve this and like I said.. you can revert that commit and bold text will work but there would be other problems.
Up to you, I'm sorry 😞

Contributor

kajzersoze commented Oct 5, 2016

@monsta, problem is in g_markup_escape_text , for some reason it doesn't like <b>
I can't fix it atm, you can revert that commit along with #110 and then bold text will work, but you will then have old problem back, empty notifications when there's a & char in the string, there are also other chars which will cause empty notification to show.
For example :
$ notify-send "Test" "Test & Example"

will show just "Test" as a title but with no body (Test & Example), instead body would be empty.

I just checked the same function in gnome and it's basically the same thing :
https://github.com/GNOME/notification-daemon/blob/ea34bf17525c2fd5329e34cce1a102766f1a1e0d/src/nd-bubble.c#L616-L668

They have :

                tmp = g_markup_escape_text (body, -1);
                gtk_label_set_text (GTK_LABEL (bubble->priv->body_label), body);
                g_free (tmp);

but tmp is not used, thus g_markup_escape_text is not used, but they use gtk_label_set_text instead of gtk_label_set_markup (used in mate) and gtk_label_set_text does what g_markup_escape_text is doing, I tested all that, in any case<b> is still shown either way.
Maybe this is all confusing and the only way would be for someone to actually try this in order to understand.

I don't know how to solve this and like I said.. you can revert that commit and bold text will work but there would be other problems.
Up to you, I'm sorry 😞

@kajzersoze

This comment has been minimized.

Show comment
Hide comment
@kajzersoze

kajzersoze Oct 7, 2016

Contributor

Had some time today to play with this.. actually the way this is done in gnome works, I just tested it both with vlc and other combinations, everything seems to be working fine. So I will adjust all themes and make a PR, hopefully this will settle this issue once and for all 😃

Contributor

kajzersoze commented Oct 7, 2016

Had some time today to play with this.. actually the way this is done in gnome works, I just tested it both with vlc and other combinations, everything seems to be working fine. So I will adjust all themes and make a PR, hopefully this will settle this issue once and for all 😃

@raveit65

This comment has been minimized.

Show comment
Hide comment
@raveit65

raveit65 Oct 14, 2016

Member

merged 3fa974b
Thanks a lot
I will cherry-pick it to 1.16.

Member

raveit65 commented Oct 14, 2016

merged 3fa974b
Thanks a lot
I will cherry-pick it to 1.16.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment