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
fd056811
Commit
fd056811
authored
Oct 07, 2025
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Print more information in the debug log
parent
5e30c19e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
42 additions
and
30 deletions
+42
-30
notiModel.vala
src/notiModel/notiModel.vala
+42
-30
No files found.
src/notiModel/notiModel.vala
View file @
fd056811
...
@@ -222,12 +222,16 @@ namespace SwayNotificationCenter {
...
@@ -222,12 +222,16 @@ namespace SwayNotificationCenter {
Variant
hint_value
=
hints
[
hint
];
Variant
hint_value
=
hints
[
hint
];
switch
(
hint
)
{
switch
(
hint
)
{
case
"SWAYNC_NO_SCRIPT"
:
case
"SWAYNC_NO_SCRIPT"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
swaync_no_script
=
hint_value
.
get_int32
()
==
1
;
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
swaync_no_script
=
hint_value
.
get_boolean
();
swaync_no_script
=
hint_value
.
get_boolean
();
}
}
break
;
break
;
case
"SWAYNC_BYPASS_DND"
:
case
"SWAYNC_BYPASS_DND"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
swaync_bypass_dnd
=
hint_value
.
get_int32
()
==
1
;
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
swaync_bypass_dnd
=
hint_value
.
get_boolean
();
swaync_bypass_dnd
=
hint_value
.
get_boolean
();
}
}
break
;
break
;
...
@@ -245,7 +249,9 @@ namespace SwayNotificationCenter {
...
@@ -245,7 +249,9 @@ namespace SwayNotificationCenter {
}
}
break
;
break
;
case
"action-icons"
:
case
"action-icons"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
action_icons
=
hint_value
.
get_int32
()
==
1
;
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
action_icons
=
hint_value
.
get_boolean
();
action_icons
=
hint_value
.
get_boolean
();
}
}
break
;
break
;
...
@@ -299,15 +305,17 @@ namespace SwayNotificationCenter {
...
@@ -299,15 +305,17 @@ namespace SwayNotificationCenter {
}
}
break
;
break
;
case
"resident"
:
case
"resident"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
resident
=
hint_value
.
get_int32
()
==
1
;
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
resident
=
hint_value
.
get_boolean
();
resident
=
hint_value
.
get_boolean
();
}
}
break
;
break
;
case
"transient"
:
case
"transient"
:
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
transient
=
hint_value
.
get_boolean
();
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
transient
=
hint_value
.
get_int32
()
==
1
;
transient
=
hint_value
.
get_int32
()
==
1
;
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
transient
=
hint_value
.
get_boolean
();
}
}
break
;
break
;
case
"urgency"
:
case
"urgency"
:
...
@@ -355,16 +363,16 @@ namespace SwayNotificationCenter {
...
@@ -355,16 +363,16 @@ namespace SwayNotificationCenter {
}
}
public
string
to_string
()
{
public
string
to_string
()
{
var
params
=
new
HashTable
<
string
,
string
?>
(
str_hash
,
str_equal
);
var
params
=
new
OrderedHashTable
<
string
?>
(
);
params
.
se
t
(
"applied_id"
,
applied_id
.
to_string
());
params
.
inser
t
(
"applied_id"
,
applied_id
.
to_string
());
params
.
se
t
(
"app_name"
,
app_name
);
params
.
inser
t
(
"app_name"
,
app_name
);
params
.
se
t
(
"replaces_id"
,
replaces_id
.
to_string
());
params
.
inser
t
(
"replaces_id"
,
replaces_id
.
to_string
());
params
.
se
t
(
"app_icon"
,
app_icon
);
params
.
inser
t
(
"app_icon"
,
app_icon
);
params
.
se
t
(
"default_action"
,
default_action
==
null
params
.
inser
t
(
"default_action"
,
default_action
==
null
?
null
:
default_action
.
to_string
());
?
null
:
default_action
.
to_string
());
params
.
se
t
(
"summary"
,
summary
);
params
.
inser
t
(
"summary"
,
summary
);
params
.
se
t
(
"body"
,
"\t"
+
body
);
params
.
inser
t
(
"body"
,
"\t"
+
body
);
string
[]
_hints
=
{};
string
[]
_hints
=
{};
foreach
(
var
key
in
hints
.
get_keys
())
{
foreach
(
var
key
in
hints
.
get_keys
())
{
Variant
v
=
hints
[
key
];
Variant
v
=
hints
[
key
];
...
@@ -374,26 +382,30 @@ namespace SwayNotificationCenter {
...
@@ -374,26 +382,30 @@ namespace SwayNotificationCenter {
}
}
_hints
+=
"\n\t%s: %s"
.
printf
(
key
,
data
);
_hints
+=
"\n\t%s: %s"
.
printf
(
key
,
data
);
}
}
params
.
set
(
"hints"
,
string
.
joinv
(
""
,
_hints
));
params
.
insert
(
"hints"
,
string
.
joinv
(
""
,
_hints
));
params
.
set
(
"expire_timeout"
,
expire_timeout
.
to_string
());
params
.
insert
(
"expire_timeout"
,
expire_timeout
.
to_string
());
params
.
set
(
"time"
,
"\t"
+
time
.
to_string
());
params
.
insert
(
"time"
,
"\t"
+
time
.
to_string
());
params
.
insert
(
"found desktop file"
,
(
desktop_app_info
!=
null
).
to_string
());
params
.
insert
(
"applied app_id"
,
name_id
);
params
.
insert
(
"display name"
,
display_name
);
params
.
set
(
"action_icons"
,
action_icons
.
to_string
());
params
.
insert
(
"action_icons"
,
action_icons
.
to_string
());
params
.
set
(
"image_data"
,
image_data
.
is_initialized
.
to_string
());
params
.
insert
(
"image_data"
,
image_data
.
is_initialized
.
to_string
());
params
.
set
(
"icon_data"
,
icon_data
.
is_initialized
.
to_string
());
params
.
insert
(
"icon_data"
,
icon_data
.
is_initialized
.
to_string
());
params
.
set
(
"image_path"
,
image_path
);
params
.
insert
(
"image_path"
,
image_path
);
params
.
set
(
"desktop_entry"
,
desktop_entry
);
params
.
insert
(
"desktop_entry"
,
desktop_entry
);
params
.
set
(
"category"
,
category
);
params
.
insert
(
"category"
,
category
);
params
.
set
(
"sound_name"
,
sound_name
);
params
.
insert
(
"sound_name"
,
sound_name
);
params
.
set
(
"sound_file"
,
sound_file
);
params
.
insert
(
"sound_file"
,
sound_file
);
params
.
set
(
"resident"
,
resident
.
to_string
());
params
.
insert
(
"resident"
,
resident
.
to_string
());
params
.
set
(
"urgency"
,
urgency
.
to_string
());
params
.
insert
(
"transient"
,
transient
.
to_string
());
params
.
insert
(
"urgency"
,
urgency
.
to_string
());
string
[]
_actions
=
{};
string
[]
_actions
=
{};
foreach
(
var
_action
in
actions
.
data
)
{
foreach
(
var
_action
in
actions
.
data
)
{
_actions
+=
"\n\t"
+
_action
.
to_string
();
_actions
+=
"\n\t"
+
_action
.
to_string
();
}
}
params
.
se
t
(
"actions"
,
string
.
joinv
(
""
,
_actions
));
params
.
inser
t
(
"actions"
,
string
.
joinv
(
""
,
_actions
));
params
.
se
t
(
"inline-reply"
,
inline_reply
==
null
params
.
inser
t
(
"inline-reply"
,
inline_reply
==
null
?
null
:
inline_reply
.
to_string
());
?
null
:
inline_reply
.
to_string
());
string
[]
result
=
{};
string
[]
result
=
{};
...
...
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