Don't use missing image icon when noti provides invalid icon name. Fixes #350
This commit is contained in:
@@ -36,10 +36,6 @@ namespace SwayNotificationCenter {
|
||||
} else if (Gtk.IconTheme.get_default ().has_icon (path)) {
|
||||
// Try as a freedesktop.org-compliant icon theme
|
||||
img.set_from_icon_name (path, Notification.icon_size);
|
||||
} else {
|
||||
img.set_from_icon_name (
|
||||
"image-missing",
|
||||
Notification.icon_size);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -651,6 +651,8 @@ namespace SwayNotificationCenter {
|
||||
}
|
||||
|
||||
private void set_icon () {
|
||||
img.clear ();
|
||||
|
||||
var image_visibility = ConfigModel.instance.image_visibility;
|
||||
if (image_visibility == ImageVisibility.NEVER) {
|
||||
img.set_visible (false);
|
||||
@@ -682,7 +684,9 @@ namespace SwayNotificationCenter {
|
||||
} else if (param.icon_data.is_initialized) {
|
||||
Functions.set_image_data (param.icon_data, img,
|
||||
notification_icon_size);
|
||||
} else {
|
||||
}
|
||||
|
||||
if (img.storage_type == Gtk.ImageType.EMPTY) {
|
||||
// Get the app icon
|
||||
Icon ? icon = null;
|
||||
if (param.desktop_entry != null) {
|
||||
|
Reference in New Issue
Block a user