Skip to content

Linux: fix tray icon menu build with INDICATOR=1#1823

Open
ElCruncharino wants to merge 1 commit into
veracrypt:masterfrom
ElCruncharino:fix/indicator-build
Open

Linux: fix tray icon menu build with INDICATOR=1#1823
ElCruncharino wants to merge 1 commit into
veracrypt:masterfrom
ElCruncharino:fix/indicator-build

Conversation

@ElCruncharino

Copy link
Copy Markdown

Problem

Building with INDICATOR=1 fails on wxWidgets 3.2:

Forms/MainFrame.cpp:1630:134: error: cannot convert 'wxString' to 'const gchar*'

Four of the five tray menu labels in ShowTaskBarIcon() pass a wxString straight to gtk_menu_item_new_with_label(), which wants a const gchar*. The fifth (SHOW_TC/HIDE_TC) already calls .mb_str() and compiles fine. INDICATOR is 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=1 against wxWidgets 3.2.8 and libayatana-appindicator3. Confirmed the resulting binary links against libayatana-appindicator3 and shows a working tray icon.

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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant