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

Add support for image-data #211

Merged
merged 4 commits into from Jul 15, 2021

Conversation

bluesabre
Copy link
Sponsor Member

Expands image support to match the notification server.

  • Adds support for image_path (Spec version 1.1 of image-path)
  • Adds support for image-data (>= 1.2), image_data (= 1.1), and icon_data (< 1.1)

Since image-data is sent as raw image data, this branch writes a temp file with the image and references it. When the notification is dismissed, the temp file is removed.

Some opportunities for improvement:

  • Write the temp file to ~/.cache so it's in a user-private location. Does GLib have something for generating a temp filename within the cache data folder?
  • Scale temp files to the max possible dimensions we might use to have minimal disk impact... 48px at 3x ... 144px?

Please let me know if this is something we're interested in and if this is an appropriate direction.

image

Copy link
Member

@danirabbit danirabbit left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to work as expected. I think we can save optimizations for a point release. Nice work :)

@danirabbit danirabbit merged commit 31b5a94 into elementary:master Jul 15, 2021
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