Linux: fix tray icon menu build with INDICATOR=1#1823
Conversation
A few menu item labels were passed as wxString instead of .mb_str(), which doesn't compile against wxWidgets 3.2. One label in the same function already did it right, the rest didn't.
|
Thanks for the PR. I had not hit this locally with make INDICATOR=1 on several distributions, including with wxWidgets 3.2.8. That is expected on builds where wx still allows the unsafe implicit wxString => const char* conversion (wxUSE_UNSAFE_WXSTRING_CONV without wxNO_UNSAFE_WXSTRING_CONV). On configurations that disable that conversion, the four bare LangString[...] arguments fail exactly as you reported, while the existing So this is a real portability fix (the inconsistency dates back to the original INDICATOR support in #815), not a general "wx 3.2 is broken" issue. Could you confirm the distribution and whether your environment defines wxNO_UNSAFE_WXSTRING_CONV (or similar)? For the record, sibling PR #1822 mentions openSUSE Tumbleweed, is that the same setup? Aside from that, the change looks good and matches the existing style. I will merge it. |
|
Confirmed on the exact box: openSUSE Tumbleweed, wxWidgets 3.2.8 ( I don't think its I rebuilt master with |
Problem
Building with
INDICATOR=1fails on wxWidgets 3.2:Four of the five tray menu labels in
ShowTaskBarIcon()pass awxStringstraight togtk_menu_item_new_with_label(), which wants aconst gchar*. The fifth (SHOW_TC/HIDE_TC) already calls.mb_str()and compiles fine.INDICATORis opt-in and off by default, so perhaps this has gone unnoticed?Change
Add the missing
.mb_str()to the other four labels. No behavior change, just makes it compile.Testing
Built with
make INDICATOR=1 WITHFUSE3=1against wxWidgets 3.2.8 and libayatana-appindicator3. Confirmed the resulting binary links against libayatana-appindicator3 and shows a working tray icon.