Skip to content

Commit d119854

Browse files
authored
Merge branch 'main' into lenemter/move-close-reason
2 parents 8100ec7 + b39f66f commit d119854

File tree

8 files changed

+45
-48
lines changed

8 files changed

+45
-48
lines changed

po/extra/be.po

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: 2025-07-28 13:55+0000\n"
12-
"Last-Translator: lenify <[email protected]>\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
12+
"Last-Translator: anonymous <[email protected]>\n"
1313
"Language-Team: Belarusian <https://l10n.elementaryos.org/projects/desktop/"
1414
"notifications-extra/be/>\n"
1515
"Language: be\n"
@@ -34,7 +34,7 @@ msgstr "Сервер апавяшчэнняў для Pantheon"
3434

3535
#: data/notifications.metainfo.xml.in:30
3636
msgid "elementary, Inc."
37-
msgstr ""
37+
msgstr "elementary, Inc."
3838

3939
#: data/notifications.metainfo.xml.in:38 data/notifications.metainfo.xml.in:50
4040
#: data/notifications.metainfo.xml.in:63 data/notifications.metainfo.xml.in:78

po/extra/ie.po

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,13 +8,16 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
12-
"Last-Translator: Automatically generated\n"
13-
"Language-Team: none\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
12+
"Last-Translator: anonymous <[email protected]>\n"
13+
"Language-Team: Occidental <https://l10n.elementaryos.org/projects/desktop/"
14+
"notifications-extra/ie/>\n"
1415
"Language: ie\n"
1516
"MIME-Version: 1.0\n"
1617
"Content-Type: text/plain; charset=UTF-8\n"
1718
"Content-Transfer-Encoding: 8bit\n"
19+
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20+
"X-Generator: Weblate 5.11.4\n"
1821

1922
#: data/notifications.metainfo.xml.in:10
2023
msgid "Notifications"
@@ -30,7 +33,7 @@ msgstr ""
3033

3134
#: data/notifications.metainfo.xml.in:30
3235
msgid "elementary, Inc."
33-
msgstr ""
36+
msgstr "elementary, Inc."
3437

3538
#: data/notifications.metainfo.xml.in:38 data/notifications.metainfo.xml.in:50
3639
#: data/notifications.metainfo.xml.in:63 data/notifications.metainfo.xml.in:78

po/extra/nb.po

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: 2023-07-08 01:10+0000\n"
12-
"Last-Translator: Allan Nordhøy <[email protected]>\n"
13-
"Language-Team: Norwegian Bokmål <https://l10n.elementary.io/projects/desktop/"
14-
"notifications-extra/nb/>\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
12+
"Last-Translator: anonymous <[email protected]>\n"
13+
"Language-Team: Norwegian Bokmål <https://l10n.elementaryos.org/projects/"
14+
"desktop/notifications-extra/nb/>\n"
1515
"Language: nb\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 4.17\n"
20+
"X-Generator: Weblate 5.11.4\n"
2121

2222
#: data/notifications.metainfo.xml.in:10
2323
msgid "Notifications"
@@ -32,7 +32,6 @@ msgid "A notification server for Pantheon"
3232
msgstr ""
3333

3434
#: data/notifications.metainfo.xml.in:30
35-
#, fuzzy
3635
msgid "elementary, Inc."
3736
msgstr "elementary, Inc."
3837

po/extra/sco.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: 2025-04-16 14:55+0000\n"
12-
"Last-Translator: Ben Gordon Agnew <[email protected]>\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
12+
"Last-Translator: anonymous <[email protected]>\n"
1313
"Language-Team: Scots <https://l10n.elementaryos.org/projects/desktop/"
1414
"notifications-extra/sco/>\n"
1515
"Language: sco\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 5.10.4\n"
20+
"X-Generator: Weblate 5.11.4\n"
2121

2222
#: data/notifications.metainfo.xml.in:10
2323
msgid "Notifications"
@@ -33,7 +33,7 @@ msgstr ""
3333

3434
#: data/notifications.metainfo.xml.in:30
3535
msgid "elementary, Inc."
36-
msgstr ""
36+
msgstr "elementary, Inc."
3737

3838
#: data/notifications.metainfo.xml.in:38 data/notifications.metainfo.xml.in:50
3939
#: data/notifications.metainfo.xml.in:63 data/notifications.metainfo.xml.in:78

po/extra/szl.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,17 +8,17 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: 2024-08-07 18:17+0000\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
1212
"Last-Translator: anonymous <[email protected]>\n"
13-
"Language-Team: Silesian <https://l10n.elementary.io/projects/desktop/"
13+
"Language-Team: Silesian <https://l10n.elementaryos.org/projects/desktop/"
1414
"notifications-extra/szl/>\n"
1515
"Language: szl\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=3; plural=n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
2020
"|| n%100>=20) ? 1 : 2;\n"
21-
"X-Generator: Weblate 5.6.2\n"
21+
"X-Generator: Weblate 5.11.4\n"
2222

2323
#: data/notifications.metainfo.xml.in:10
2424
msgid "Notifications"
@@ -34,7 +34,7 @@ msgstr ""
3434

3535
#: data/notifications.metainfo.xml.in:30
3636
msgid "elementary, Inc."
37-
msgstr ""
37+
msgstr "elementary, Inc."
3838

3939
#: data/notifications.metainfo.xml.in:38 data/notifications.metainfo.xml.in:50
4040
#: data/notifications.metainfo.xml.in:63 data/notifications.metainfo.xml.in:78

po/extra/uz.po

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,16 @@ msgstr ""
88
"Project-Id-Version: extra\n"
99
"Report-Msgid-Bugs-To: \n"
1010
"POT-Creation-Date: 2025-10-05 17:49+0000\n"
11-
"PO-Revision-Date: 2025-01-11 04:16+0000\n"
11+
"PO-Revision-Date: 2025-10-06 17:55+0000\n"
1212
"Last-Translator: anonymous <[email protected]>\n"
13-
"Language-Team: Uzbek <https://l10n.elementary.io/projects/desktop/"
13+
"Language-Team: Uzbek <https://l10n.elementaryos.org/projects/desktop/"
1414
"notifications-extra/uz/>\n"
1515
"Language: uz\n"
1616
"MIME-Version: 1.0\n"
1717
"Content-Type: text/plain; charset=UTF-8\n"
1818
"Content-Transfer-Encoding: 8bit\n"
1919
"Plural-Forms: nplurals=2; plural=n != 1;\n"
20-
"X-Generator: Weblate 5.9.2\n"
20+
"X-Generator: Weblate 5.11.4\n"
2121

2222
#: data/notifications.metainfo.xml.in:10
2323
msgid "Notifications"
@@ -33,7 +33,7 @@ msgstr ""
3333

3434
#: data/notifications.metainfo.xml.in:30
3535
msgid "elementary, Inc."
36-
msgstr ""
36+
msgstr "elementary Inc."
3737

3838
#: data/notifications.metainfo.xml.in:38 data/notifications.metainfo.xml.in:50
3939
#: data/notifications.metainfo.xml.in:63 data/notifications.metainfo.xml.in:78

src/Application.vala

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
*/
2020

2121
public class Notifications.Application : Gtk.Application {
22+
public static Settings settings = new Settings ("io.elementary.notifications");
23+
2224
public Application () {
2325
Object (
2426
application_id: "io.elementary.notifications",
@@ -30,7 +32,7 @@ public class Notifications.Application : Gtk.Application {
3032
try {
3133
new Notifications.Server (connection);
3234
} catch (Error e) {
33-
Error.prefix_literal (out e, "Registring notification server failed: ");
35+
Error.prefix_literal (out e, "Registering notification server failed: ");
3436
throw e;
3537
}
3638

@@ -62,12 +64,22 @@ public class Notifications.Application : Gtk.Application {
6264
dbus_flags,
6365
() => hold (),
6466
(conn, name) => {
65-
critical ("Could not aquire bus: %s", name);
67+
critical ("Could not acquire bus: %s", name);
6668
name_lost ();
6769
}
6870
);
6971
}
7072

73+
public static void play_sound (string sound_name) {
74+
Canberra.Proplist props;
75+
Canberra.Proplist.create (out props);
76+
77+
props.sets (Canberra.PROP_CANBERRA_CACHE_CONTROL, "volatile");
78+
props.sets (Canberra.PROP_EVENT_ID, sound_name);
79+
80+
CanberraGtk4.context_get ().play_full (0, props);
81+
}
82+
7183
public static int main (string[] args) {
7284
var app = new Application ();
7385
return app.run (args);

src/DBus.vala

Lines changed: 4 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,10 @@ public class Notifications.Server : Object {
1818
private Gee.Map<uint32, Bubble?> bubbles;
1919
private Confirmation? confirmation;
2020

21-
private Settings settings;
22-
2321
private uint action_group_id;
2422
private uint server_id;
2523

2624
public Server (DBusConnection connection) throws Error {
27-
settings = new Settings ("io.elementary.notifications");
2825
bubbles = new Gee.HashMap<uint32, Bubble?> ();
2926
action_group = new Fdo.ActionGroup (this);
3027

@@ -137,10 +134,10 @@ public class Notifications.Server : Object {
137134
notification.buttons.add ({ label, action_name });
138135
}
139136

140-
if (!settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) {
137+
if (!Application.settings.get_boolean ("do-not-disturb") || notification.priority == GLib.NotificationPriority.URGENT) {
141138
var app_settings = new Settings.with_path (
142139
"io.elementary.notifications.applications",
143-
settings.path.concat ("applications", "/", notification.app_id, "/")
140+
Application.settings.path.concat ("applications", "/", notification.app_id, "/")
144141
);
145142

146143
if (app_settings.get_boolean ("bubbles")) {
@@ -171,7 +168,7 @@ public class Notifications.Server : Object {
171168
sound = category_to_sound_name (hints["category"].get_string ());
172169
}
173170

174-
send_sound (sound);
171+
Application.play_sound (sound);
175172
}
176173
}
177174
}
@@ -192,7 +189,7 @@ public class Notifications.Server : Object {
192189
// consistency it should. So we make it emit the default one.
193190
var confirmation_type = hints.lookup (X_CANONICAL_PRIVATE_SYNCHRONOUS).get_string ();
194191
if (confirmation_type == "indicator-sound") {
195-
send_sound ("audio-volume-change");
192+
Application.play_sound ("audio-volume-change");
196193
}
197194

198195
if (confirmation == null) {
@@ -212,20 +209,6 @@ public class Notifications.Server : Object {
212209
confirmation.present ();
213210
}
214211

215-
private void send_sound (string sound_name) {
216-
if (sound_name == "") {
217-
return;
218-
}
219-
220-
Canberra.Proplist props;
221-
Canberra.Proplist.create (out props);
222-
223-
props.sets (Canberra.PROP_CANBERRA_CACHE_CONTROL, "volatile");
224-
props.sets (Canberra.PROP_EVENT_ID, sound_name);
225-
226-
CanberraGtk4.context_get ().play_full (0, props);
227-
}
228-
229212
static unowned string category_to_sound_name (string category) {
230213
unowned string sound;
231214

0 commit comments

Comments
 (0)