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
ae5d1d56
Verified
Commit
ae5d1d56
authored
Mar 21, 2026
by
Kirill Unitsaev
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
main: fix double D-Bus name ownership for control center interface
parent
26f89959
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
16 deletions
+15
-16
main.vala
src/main.vala
+15
-16
No files found.
src/main.vala
View file @
ae5d1d56
...
@@ -42,6 +42,8 @@ namespace XimperShellNotificationCenter {
...
@@ -42,6 +42,8 @@ namespace XimperShellNotificationCenter {
public
signal
void
config_reload
(
ConfigModel
?
old_config
,
ConfigModel
new_config
);
public
signal
void
config_reload
(
ConfigModel
?
old_config
,
ConfigModel
new_config
);
private
BusNameOwnerFlags
bus_name_flags
=
BusNameOwnerFlags
.
NONE
;
public
NotificationCenter
(
bool
replace
)
{
public
NotificationCenter
(
bool
replace
)
{
Object
(
Object
(
application_id
:
"ru.ximperlinux.shell.NotificationCenter"
,
application_id
:
"ru.ximperlinux.shell.NotificationCenter"
,
...
@@ -50,6 +52,10 @@ namespace XimperShellNotificationCenter {
...
@@ -50,6 +52,10 @@ namespace XimperShellNotificationCenter {
|
(
replace
?
ApplicationFlags
.
REPLACE
:
0
)
|
(
replace
?
ApplicationFlags
.
REPLACE
:
0
)
);
);
if
(
replace
)
{
bus_name_flags
=
BusNameOwnerFlags
.
REPLACE
;
}
try
{
try
{
register
();
register
();
if
(
get_is_remote
())
{
if
(
get_is_remote
())
{
...
@@ -107,7 +113,7 @@ namespace XimperShellNotificationCenter {
...
@@ -107,7 +113,7 @@ namespace XimperShellNotificationCenter {
// Notification Daemon
// Notification Daemon
Bus
.
own_name_on_connection
(
conn
,
Bus
.
own_name_on_connection
(
conn
,
"org.freedesktop.Notifications"
,
"org.freedesktop.Notifications"
,
BusNameOwnerFlags
.
NONE
,
bus_name_flags
,
()
=>
{
()
=>
{
try
{
try
{
conn
.
register_object
(
"/org/freedesktop/Notifications"
,
noti_daemon
);
conn
.
register_object
(
"/org/freedesktop/Notifications"
,
noti_daemon
);
...
@@ -126,21 +132,14 @@ namespace XimperShellNotificationCenter {
...
@@ -126,21 +132,14 @@ namespace XimperShellNotificationCenter {
yield
;
yield
;
// Ximper Shell Notification Center Daemon
// Ximper Shell Notification Center Daemon
Bus
.
own_name_on_connection
(
conn
,
// Name is already owned by GApplication via register()
"ru.ximperlinux.shell.NotificationCenter"
,
try
{
BusNameOwnerFlags
.
NONE
,
conn
.
register_object
(
()
=>
{
"/ru/ximperlinux/shell/NotificationCenter"
,
try
{
ximper_shell_notification_center_daemon
);
conn
.
register_object
(
"/ru/ximperlinux/shell/NotificationCenter"
,
ximper_shell_notification_center_daemon
);
}
catch
(
Error
e
)
{
init
.
callback
();
error
(
"Could not register CC service: \"%s\""
,
e
.
message
);
}
catch
(
Error
e
)
{
}
error
(
"Could not register CC service: \"%s\""
,
e
.
message
);
}
},
()
=>
{
error
(
"Could not acquire Ximper Shell Notification Center name!"
);
});
yield
;
xdg_activation
=
new
XdgActivationHelper
();
xdg_activation
=
new
XdgActivationHelper
();
...
...
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