Skip to content

set label#17

Draft
brandonros wants to merge 6 commits into
olback:masterfrom
brandonros:set_label
Draft

set label#17
brandonros wants to merge 6 commits into
olback:masterfrom
brandonros:set_label

Conversation

@brandonros

Copy link
Copy Markdown

No description provided.

@brandonros

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

Leksat commented Sep 4, 2022

Copy link
Copy Markdown

@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

Leksat commented Sep 4, 2022

Copy link
Copy Markdown

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

Leksat commented Sep 12, 2022

Copy link
Copy Markdown

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.

2 participants