Skip to content

Conversation

@ahqsoftwares
Copy link
Contributor

This is a step further to implement tauri-apps/tauri#4489 into the main tauri crate

@ahqsoftwares ahqsoftwares requested a review from a team as a code owner October 31, 2024 08:40
@github-actions
Copy link
Contributor

github-actions bot commented Nov 4, 2024

Package Changes Through f84c710

There are 1 changes which include tao with patch

Planned Package Versions

The following package releases are the planned based on the context of changes in this pull request.

package current next
tao 0.30.5 0.30.6

Add another change file through the GitHub UI by following this link.


Read about change files or the docs at github.com/jbolda/covector

@ahqsoftwares
Copy link
Contributor Author

Fixing the macos and linux code issues...

@ahqsoftwares ahqsoftwares changed the title feat: add set_badge_count for Linux and Macos; set_overlay_icon for Windows feat: add set_badge_count for Linux; set_badge_label for Macos; set_overlay_icon for Windows Nov 4, 2024
@ahqsoftwares
Copy link
Contributor Author

What do we do about these warnings (linux)?

warning: use of deprecated associated function `gtk::glib::main_context_channel::<impl gtk::glib::MainContext>::channel`: Use an async channel, from async-channel for example, on the main context using spawn_future_local() instead --> src/platform_impl/linux/event_loop.rs:237:71 | 237 | let (window_requests_tx, window_requests_rx) = glib::MainContext::channel(Priority::default()); | ^^^^^^^ | = note: `#[warn(deprecated)]` on by default warning: use of deprecated associated function `gtk::glib::main_context_channel::<impl gtk::glib::MainContext>::channel`: Use an async channel, from async-channel for example, on the main context using spawn_future_local() instead --> src/platform_impl/linux/event_loop.rs:251:55 | 251 | let (device_tx, device_rx) = glib::MainContext::channel(glib::Priority::default()); | ^^^^^^^ warning: `tao` (lib) generated 2 warnings 
@ahqsoftwares ahqsoftwares changed the title feat: add set_badge_count for Linux; set_badge_label for Macos; set_overlay_icon for Windows feat: add set_badge_count for Linux, iOS; set_badge_label for Macos; set_overlay_icon for Windows Nov 4, 2024
@ahqsoftwares
Copy link
Contributor Author

ahqsoftwares commented Nov 5, 2024

Somehow it auto fixed idk how and why.

Found why: the window needs to have an icon set for some reason?

@ahqsoftwares
Copy link
Contributor Author

@amrbashir Why is the Icon struct needed to be cloned inside the set_overlay_icon function?

@ahqsoftwares
Copy link
Contributor Author

nvm fixed it, Basically the Icon has to be borrowed for some unknown reason

@amrbashir
Copy link
Member

nvm fixed it, Basically the Icon has to be borrowed for some unknown reason

otherwise, it will be dropped and freeed

@ahqsoftwares
Copy link
Contributor Author

nvm fixed it, Basically the Icon has to be borrowed for some unknown reason

otherwise, it will be dropped and freeed

No issue, I made it to accept a borrowed Icon

@ahqsoftwares
Copy link
Contributor Author

image
that's strange

image

@amrbashir
Copy link
Member

there is also a missing import for macOS, not sure why iOS is failing though

@ahqsoftwares
Copy link
Contributor Author

there is also a missing import for macOS, not sure why iOS is failing though

I have no idea either

@ahqsoftwares
Copy link
Contributor Author

Both the examples under cfg of macos and ios are not applying. Do you have any idea why?

@ahqsoftwares
Copy link
Contributor Author

That commit should be it

@amrbashir
Copy link
Member

Thank you

@amrbashir amrbashir merged commit 1f72c24 into tauri-apps:dev Nov 5, 2024
9 checks passed
@github-actions github-actions bot mentioned this pull request Nov 2, 2024
@ahqsoftwares
Copy link
Contributor Author

Thanks a lot, I shall also PR to tauri crate to attach those apis to the tauri app

@ahqsoftwares
Copy link
Contributor Author

ahqsoftwares commented Nov 9, 2024

@amrbashir We'll implement the overlay label for Windows under a feature in the main tauri crate (it'll need the image crate, ab_glyph and imageproc crate as pointed out by @retrouser955 to me)

@amrbashir
Copy link
Member

we already depend on image crate but I don't know, seems like it would bloat the size of the app, let's just follow what electron did which is to provide two separate methods setBadgeCount for macOS and Linux and setOverlayIcon for Windows only.

@ahqsoftwares
Copy link
Contributor Author

Sure ! I shall work on a PR tomorrow

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants