Skip to content

Commit

Permalink
Merge branch 'master' into lenemter/sync-display-settings
Browse files Browse the repository at this point in the history
  • Loading branch information
lenemter authored Jan 29, 2024
2 parents 83418d7 + 5dddde8 commit a1c5155
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 35 deletions.
5 changes: 5 additions & 0 deletions data/io.elementary.settings-daemon.gschema.xml
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@
</schema>

<schema path="/io/elementary/settings-daemon/system-update/" id="io.elementary.settings-daemon.system-update">
<key type="b" name="automatic-updates">
<default>false</default>
<summary>Automatic updates</summary>
<description>Whether to automatically download updates</description>
</key>
<key type="x" name="last-refresh-time">
<default>0</default>
<summary>When updates were last refreshed</summary>
Expand Down
6 changes: 3 additions & 3 deletions data/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -24,13 +24,13 @@ act_interfacesdir = act_dep.get_variable('interfacesdir', pkgconfig_define: ['da

meson.add_install_script(
symlink,
join_paths(dbus_interfaces_dir, 'io.elementary.SettingsDaemon.AccountsService.xml'),
join_paths(act_interfacesdir, 'io.elementary.SettingsDaemon.AccountsService.xml'),
dbus_interfaces_dir / 'io.elementary.SettingsDaemon.AccountsService.xml',
act_interfacesdir / 'io.elementary.SettingsDaemon.AccountsService.xml',
)

install_data(
'io.elementary.settings-daemon.gschema.xml',
install_dir: join_paths(datadir, 'glib-2.0', 'schemas')
install_dir: datadir / 'glib-2.0' / 'schemas'
)

i18n.merge_file(
Expand Down
8 changes: 5 additions & 3 deletions meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,11 @@ project('io.elementary.settings-daemon',
'c', 'vala',
version: '1.3.1',
license: 'GPL3',
meson_version: '>=0.58.0'
meson_version: '>=0.59.0'
)

gnome = import('gnome')

fwupd_dep = dependency('fwupd')
gio_dep = dependency ('gio-2.0')
glib_dep = dependency('glib-2.0')
Expand Down Expand Up @@ -45,11 +47,11 @@ config_dep = declare_dependency(
include_directories: include_directories('.')
)

symlink = join_paths(meson.current_source_dir (), 'meson', 'create-symlink.sh')
symlink = meson.current_source_dir () / 'meson' / 'create-symlink.sh'

subdir('data')
subdir('po')
subdir('src')
subdir('settings-portal')

meson.add_install_script('meson/post_install.py')
gnome.post_install(glib_compile_schemas: true, gtk_update_icon_cache: true, update_desktop_database: true)
19 changes: 0 additions & 19 deletions meson/post_install.py

This file was deleted.

14 changes: 6 additions & 8 deletions po/ru.po
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@ msgstr ""
"Project-Id-Version: extra\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2024-01-28 22:41+0000\n"
"PO-Revision-Date: 2024-01-28 22:41+0000\n"
"PO-Revision-Date: 2024-01-29 04:55+0000\n"
"Last-Translator: lenemter <lenemter@gmail.com>\n"
"Language-Team: Russian <https://l10n.elementary.io/projects/desktop/settings-"
"daemon/ru/>\n"
"Language-Team: Russian <https://l10n.elementary.io/projects/desktop/"
"settings-daemon/ru/>\n"
"Language: ru\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && n"
"%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"Plural-Forms: nplurals=3; plural=n%10==1 && n%100!=11 ? 0 : n%10>=2 && "
"n%10<=4 && (n%100<10 || n%100>=20) ? 1 : 2;\n"
"X-Generator: Weblate 5.0.2\n"

#: data/settings-daemon.metainfo.xml.in:10
Expand Down Expand Up @@ -114,10 +114,8 @@ msgid "Update available"
msgstr "Доступны обновления"

#: src/Backends/SystemUpdate.vala:128
#, fuzzy
#| msgid "A system update is available"
msgid "A system security update is available"
msgstr "Доступны обновления системы"
msgstr "Доступны обновления безопасности"

#: src/Backends/SystemUpdate.vala:132
msgid "A system update is available"
Expand Down
9 changes: 7 additions & 2 deletions src/Backends/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,13 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {
package_info
};

update_state (AVAILABLE);

if (!force && settings.get_boolean ("automatic-updates")) {
update.begin ();
return;
}

if (notify) {
var notification = new Notification (_("Update available"));
notification.set_default_action (Application.ACTION_PREFIX + Application.SHOW_UPDATES_ACTION);
Expand All @@ -135,8 +142,6 @@ public class SettingsDaemon.Backends.SystemUpdate : Object {

GLib.Application.get_default ().send_notification (NOTIFICATION_ID, notification);
}

update_state (AVAILABLE);
} catch (Error e) {
warning ("Failed to get available updates: %s", e.message);
update_state (UP_TO_DATE);
Expand Down

0 comments on commit a1c5155

Please sign in to comment.