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
5166de0e
Unverified
Commit
5166de0e
authored
Mar 02, 2025
by
Erik Reider
Committed by
GitHub
Mar 02, 2025
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Always unescape image and app icon paths (#518)
parent
8ed5a805
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
9 deletions
+7
-9
functions.vala
src/functions.vala
+1
-1
notiModel.vala
src/notiModel/notiModel.vala
+2
-2
notification.vala
src/notification/notification.vala
+4
-6
No files found.
src/functions.vala
View file @
5166de0e
...
...
@@ -29,7 +29,7 @@ namespace SwayNotificationCenter {
if
(
is_uri
)
uri
=
uri
.
slice
(
URI_PREFIX
.
length
,
uri
.
length
);
var
pixbuf
=
new
Gdk
.
Pixbuf
.
from_file_at_scale
(
uri
,
Uri
.
unescape_string
(
uri
)
,
icon_size
*
img
.
scale_factor
,
icon_size
*
img
.
scale_factor
,
true
);
...
...
src/notiModel/notiModel.vala
View file @
5166de0e
...
...
@@ -133,7 +133,7 @@ namespace SwayNotificationCenter {
this
.
applied_id
=
applied_id
;
this
.
app_name
=
app_name
;
this
.
replaces_id
=
replaces_id
;
this
.
app_icon
=
app_icon
;
this
.
app_icon
=
Uri
.
unescape_string
(
app_icon
)
;
this
.
summary
=
summary
;
this
.
body
=
body
;
this
.
hints
=
hints
;
...
...
@@ -237,7 +237,7 @@ namespace SwayNotificationCenter {
case
"image-path"
:
case
"image_path"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
STRING
))
{
image_path
=
hint_value
.
get_string
(
);
image_path
=
Uri
.
unescape_string
(
hint_value
.
get_string
()
);
}
break
;
case
"desktop-entry"
:
...
...
src/notification/notification.vala
View file @
5166de0e
...
...
@@ -693,8 +693,7 @@ namespace SwayNotificationCenter {
img_app_icon
.
set_pixel_size
(
app_icon_size
);
bool
img_path_is_theme_icon
=
false
;
bool
img_path_exists
=
File
.
new_for_uri
(
param
.
image_path
??
""
).
query_exists
();
bool
img_path_exists
=
File
.
new_for_uri
(
param
.
image_path
??
""
).
query_exists
();
if
(
param
.
image_path
!=
null
&&
!
img_path_exists
)
{
// Check if it's not a URI
img_path_exists
=
File
.
new_for_path
(
...
...
@@ -710,11 +709,10 @@ namespace SwayNotificationCenter {
img_path_is_theme_icon
=
img_path_exists
;
}
}
var
app_icon_exists
=
File
.
new_for_uri
(
app_icon_uri
??
""
).
query_exists
();
if
(
app_icon_uri
!=
null
&&
!
img_path
_exists
)
{
bool
app_icon_exists
=
File
.
new_for_uri
(
app_icon_uri
??
""
).
query_exists
();
if
(
app_icon_uri
!=
null
&&
!
app_icon
_exists
)
{
// Check if it's not a URI
app_icon_exists
=
File
.
new_for_path
(
app_icon_uri
??
""
).
query_exists
();
app_icon_exists
=
File
.
new_for_path
(
app_icon_uri
??
""
).
query_exists
();
}
// Get the image CSS corner radius in pixels
...
...
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