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

set label #17

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from
Draft

set label #17

wants to merge 6 commits into from

Conversation

brandonros
Copy link

No description provided.

@brandonros
Copy link
Author

@olback any reason why this isn't working? also not sure how to update the title (if we do get this call working) after we call .display because it seems to block the whole thread with no way to issue a callback/event?

@Leksat
Copy link

Leksat commented Sep 4, 2022

@brandonros I have found a way to make it work: Leksat@980f0d2
Basically, we need to update the title on the status bar, not on the menu nor on the menu item.

@Leksat
Copy link

Leksat commented Sep 4, 2022

after we call .display because it seems to block the whole thread

In my fork, the .display is not blocking. Yet I'm struggling to change the menu label from a Tauri event listener. Getting error[E0277]: `*mut objc::runtime::Object` cannot be sent between threads safely. My Rust knowledge is very very limited to solve this puzzle 😬

@Leksat
Copy link

Leksat commented Sep 12, 2022

error[E0277]: *mut objc::runtime::Object cannot be sent between threads safely

I solved this by

  • adding unsafe impl Send for TrayItem {} to my tray-item-rs fork (commit)
  • using UnsafeCell to pass the TrayItem variable to a Tauri event handler (code)

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.

None yet

2 participants