Recently, while doing some experiments and playing with GTK + Python2 (Glade not included) I discovered some interesting behaviour while adding some "style" to my text, which, in fact, is some standard markup that usually is accepted by GTK as a valid input, BUT if I try to add the "mnemonic" property to the text itself while using markup too, it will throw a GTK-WARNING saying that something went wrong (Markup wasn't applied) BUT it was applied indeed!
Some images to clarify my situation:
Supposed "Problematic" line:
Label_1.set_markup_with_mnemonic('<span font_desc="Monospace 64" underline="none"> _Text </span>')
I firmly believe that this line shouldn't be a problem, because, as I've explained before, this just happens if I try to add "Mnemonics & Markup" properties at the same time, and nonetheless, it displays and works correctly.
Now, for the real question:
Is there any possible way to get rid of this useless GTK-WARNING directly from Python (Not needing to use shell features like redirecting to /dev/null, because I'm trying to make this app "shell-proof")
Or if there's a way to solve this issue?
Or either to workaround this?
Hints:
<i>
")?Nevermind, it was some kind of weird error inside the markup string.
Don't use <span font_desc=something...
Instead use <span font=something...
This way, GTK won't complain anymore. Maybe this proves that _
is used for something else in Pango's Markup code?