Move Image/Icon logic to Notification class #140
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is all getting pretty complicated and #123 would make it even more complicated. This branch moves more of the image/icon logic to
Notificationso thatBubblecan be pretty straightforward. It also makes fallbacks more straightforward to implementprimary_icon. Notification server clients try to either give us a gicon from appinfo, an icon name, or a path to an icon. All of these can be handled by GIcon, so this lets us set a single property instead of having Bubble try to create an image by null checking several propertiesimage. There are two ways clients could try to set an image: file path or (in the future) image data. This letsBubblecheck for a single property to see if aMaskedImagehas been created or not.dialog-informationfallback is now handled in Notification only instead of both inBubbleandNotificationimage_pathto null sinceBubbleonly checks for aMaskedImage