Skip to content
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
Closed

1.16 breaks bold formatting #111

Smile4ever opened this issue Oct 4, 2016 · 7 comments

Comments

@Smile4ever
Copy link

@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
Copy link

@kmyid kmyid commented Oct 5, 2016

I have the same problem on Arch linux

@monsta
Copy link
Member

@monsta monsta commented Oct 5, 2016

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

@Smile4ever
Copy link
Author

@Smile4ever Smile4ever commented Oct 5, 2016

f95d699 looks suspicious

@kajzersoze
Copy link
Contributor

@kajzersoze kajzersoze commented Oct 5, 2016

Indeed, it's #107

@kajzersoze
Copy link
Contributor

@kajzersoze 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
Copy link
Contributor

@kajzersoze 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
Copy link
Member

@raveit65 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
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
5 participants
You can’t perform that action at this time.