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
94f0a435
Commit
94f0a435
authored
Aug 20, 2022
by
Erik Reider
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed all unnecessary GLib namespace prefixes
parent
3bed6d4f
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
23 additions
and
23 deletions
+23
-23
client.vala
src/client.vala
+4
-4
interfaces.vala
src/controlCenter/widgets/mpris/interfaces.vala
+1
-1
mpris_player.vala
src/controlCenter/widgets/mpris/mpris_player.vala
+1
-1
functions.vala
src/functions.vala
+5
-5
notiModel.vala
src/notiModel/notiModel.vala
+12
-12
No files found.
src/client.vala
View file @
94f0a435
...
...
@@ -5,7 +5,7 @@ public struct SwayncDaemonData {
}
[DBus (name = "org.erikreider.swaync.cc")]
interface
CcDaemon
:
GLib
.
Object
{
interface
CcDaemon
:
Object
{
public
abstract
bool
reload_css
()
throws
Error
;
...
...
@@ -171,7 +171,7 @@ public int command_line (string[] args) {
Bus
.
watch_name
(
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
GLib
.
BusNameWatcherFlags
.
NONE
,
BusNameWatcherFlags
.
NONE
,
print_subscribe
,
print_subscribe
);
loop
.
run
();
...
...
@@ -183,7 +183,7 @@ public int command_line (string[] args) {
Bus
.
watch_name
(
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
GLib
.
BusNameWatcherFlags
.
NONE
,
BusNameWatcherFlags
.
NONE
,
print_subscribe_waybar
,
print_subscribe_waybar
);
loop
.
run
();
...
...
@@ -228,7 +228,7 @@ public int main (string[] args) {
Bus
.
watch_name
(
BusType
.
SESSION
,
"org.erikreider.swaync.cc"
,
GLib
.
BusNameWatcherFlags
.
NONE
,
BusNameWatcherFlags
.
NONE
,
(
conn
,
name
,
name_owner
)
=>
{
if
(
try_connect
(
args
)
==
0
)
loop
.
quit
();
},
...
...
src/controlCenter/widgets/mpris/interfaces.vala
View file @
94f0a435
...
...
@@ -90,7 +90,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
[
DBus
(
name
=
"org.freedesktop.DBus"
)]
public
interface
DBusInterface
:
Object
{
public
abstract
string
[]
list_names
()
throws
GLib
.
Error
;
public
abstract
string
[]
list_names
()
throws
Error
;
public
signal
void
name_owner_changed
(
string
name
,
string
old_owner
,
string
new_owner
);
...
...
src/controlCenter/widgets/mpris/mpris_player.vala
View file @
94f0a435
...
...
@@ -280,7 +280,7 @@ namespace SwayNotificationCenter.Widgets.Mpris {
}
}
// Get the app icon
GLib
.
Icon
?
icon
=
null
;
Icon
?
icon
=
null
;
if
(
desktop_entry
is
DesktopAppInfo
)
{
icon
=
desktop_entry
.
get_icon
();
}
...
...
src/functions.vala
View file @
94f0a435
...
...
@@ -105,11 +105,11 @@ namespace SwayNotificationCenter {
}
if
(!
only_system
)
{
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
GLib
.
Environment
.
get_user_config_dir
(),
Environment
.
get_user_config_dir
(),
"swaync/style.css"
);
}
foreach
(
var
path
in
GLib
.
Environment
.
get_system_config_dirs
())
{
foreach
(
var
path
in
Environment
.
get_system_config_dirs
())
{
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
path
,
"swaync/style.css"
);
}
...
...
@@ -139,9 +139,9 @@ namespace SwayNotificationCenter {
paths
+=
custom_path
;
}
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
GLib
.
Environment
.
get_user_config_dir
(),
Environment
.
get_user_config_dir
(),
"swaync/config.json"
);
foreach
(
var
path
in
GLib
.
Environment
.
get_system_config_dirs
())
{
foreach
(
var
path
in
Environment
.
get_system_config_dirs
())
{
paths
+=
Path
.
build_path
(
Path
.
DIR_SEPARATOR
.
to_string
(),
path
,
"swaync/config.json"
);
}
...
...
@@ -167,7 +167,7 @@ namespace SwayNotificationCenter {
string
img
=
all
[
1
];
// Replaces "~/" with $HOME
if
(
img
.
index_of
(
"~/"
,
0
)
==
0
)
{
img
=
GLib
.
Environment
.
get_home_dir
()
+
img
=
Environment
.
get_home_dir
()
+
img
.
slice
(
1
,
img
.
length
);
}
return
img
;
...
...
src/notiModel/notiModel.vala
View file @
94f0a435
...
...
@@ -128,7 +128,7 @@ namespace SwayNotificationCenter {
this
.
body
=
body
;
this
.
hints
=
hints
;
this
.
expire_timeout
=
expire_timeout
;
this
.
time
=
(
int64
)
(
GLib
.
get_real_time
()
*
0.000001
);
this
.
time
=
(
int64
)
(
get_real_time
()
*
0.000001
);
this
.
replaces
=
false
;
this
.
has_synch
=
false
;
...
...
@@ -161,12 +161,12 @@ namespace SwayNotificationCenter {
Variant
hint_value
=
hints
[
hint
];
switch
(
hint
)
{
case
"SWAYNC_NO_SCRIPT"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
swaync_no_script
=
hint_value
.
get_boolean
();
}
break
;
case
"value"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
INT32
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
this
.
has_synch
=
true
;
value
=
hint_value
.
get_int32
();
}
...
...
@@ -174,12 +174,12 @@ namespace SwayNotificationCenter {
case
"synchronous"
:
case
"private-synchronous"
:
case
"x-canonical-private-synchronous"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
STRING
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
STRING
))
{
synchronous
=
hint_value
.
get_string
();
}
break
;
case
"action-icons"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
action_icons
=
hint_value
.
get_boolean
();
}
break
;
...
...
@@ -208,34 +208,34 @@ namespace SwayNotificationCenter {
break
;
case
"image-path"
:
case
"image_path"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
STRING
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
STRING
))
{
image_path
=
hint_value
.
get_string
();
}
break
;
case
"desktop-entry"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
STRING
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
STRING
))
{
desktop_entry
=
hint_value
.
get_string
();
}
break
;
case
"category"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
STRING
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
STRING
))
{
category
=
hint_value
.
get_string
();
}
break
;
case
"resident"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
resident
=
hint_value
.
get_boolean
();
}
break
;
case
"transient"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
BOOLEAN
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
BOOLEAN
))
{
transient
=
hint_value
.
get_boolean
();
}
else
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
INT32
))
{
}
else
if
(
hint_value
.
is_of_type
(
VariantType
.
INT32
))
{
transient
=
hint_value
.
get_int32
()
==
1
;
}
break
;
case
"urgency"
:
if
(
hint_value
.
is_of_type
(
GLib
.
VariantType
.
BYTE
))
{
if
(
hint_value
.
is_of_type
(
VariantType
.
BYTE
))
{
urgency
=
UrgencyLevels
.
from_value
(
hint_value
.
get_byte
());
}
break
;
...
...
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