Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
X
ximper-shell-notification-center
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Ximper Linux
ximper-shell-notification-center
Commits
09c14e4e
Commit
09c14e4e
authored
Dec 07, 2023
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Don't use missing image icon when noti provides invalid icon name. Fixes #350
parent
5a23d5ee
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
5 deletions
+5
-5
functions.vala
src/functions.vala
+0
-4
notification.vala
src/notification/notification.vala
+5
-1
No files found.
src/functions.vala
View file @
09c14e4e
...
@@ -36,10 +36,6 @@ namespace SwayNotificationCenter {
...
@@ -36,10 +36,6 @@ namespace SwayNotificationCenter {
}
else
if
(
Gtk
.
IconTheme
.
get_default
().
has_icon
(
path
))
{
}
else
if
(
Gtk
.
IconTheme
.
get_default
().
has_icon
(
path
))
{
// Try as a freedesktop.org-compliant icon theme
// Try as a freedesktop.org-compliant icon theme
img
.
set_from_icon_name
(
path
,
Notification
.
icon_size
);
img
.
set_from_icon_name
(
path
,
Notification
.
icon_size
);
}
else
{
img
.
set_from_icon_name
(
"image-missing"
,
Notification
.
icon_size
);
}
}
}
}
...
...
src/notification/notification.vala
View file @
09c14e4e
...
@@ -651,6 +651,8 @@ namespace SwayNotificationCenter {
...
@@ -651,6 +651,8 @@ namespace SwayNotificationCenter {
}
}
private
void
set_icon
()
{
private
void
set_icon
()
{
img
.
clear
();
var
image_visibility
=
ConfigModel
.
instance
.
image_visibility
;
var
image_visibility
=
ConfigModel
.
instance
.
image_visibility
;
if
(
image_visibility
==
ImageVisibility
.
NEVER
)
{
if
(
image_visibility
==
ImageVisibility
.
NEVER
)
{
img
.
set_visible
(
false
);
img
.
set_visible
(
false
);
...
@@ -682,7 +684,9 @@ namespace SwayNotificationCenter {
...
@@ -682,7 +684,9 @@ namespace SwayNotificationCenter {
}
else
if
(
param
.
icon_data
.
is_initialized
)
{
}
else
if
(
param
.
icon_data
.
is_initialized
)
{
Functions
.
set_image_data
(
param
.
icon_data
,
img
,
Functions
.
set_image_data
(
param
.
icon_data
,
img
,
notification_icon_size
);
notification_icon_size
);
}
else
{
}
if
(
img
.
storage_type
==
Gtk
.
ImageType
.
EMPTY
)
{
// Get the app icon
// Get the app icon
Icon
?
icon
=
null
;
Icon
?
icon
=
null
;
if
(
param
.
desktop_entry
!=
null
)
{
if
(
param
.
desktop_entry
!=
null
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment