Skip to content

Commit 6571359

Browse files
meisenzahlcassidyjames
andauthoredJan 6, 2022
Apply suggestions from code review
Co-authored-by: Cassidy James Blaede <cassidy@elementary.io>
1 parent 9bb46f1 commit 6571359

File tree

4 files changed

+12
-12
lines changed

4 files changed

+12
-12
lines changed
 

‎data/io.elementary.appcenter.gschema.xml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,10 +41,10 @@
4141
<summary>Unix UTC time of last cache refresh</summary>
4242
<description>Used to determine when AppCenter last refreshed its caches and checked for package updates</description>
4343
</key>
44-
<key type="b" name="automatically-install-flatpak-updates">
44+
<key type="b" name="automatic-updates">
4545
<default>false</default>
46-
<summary>Automatically install Flatpak updates</summary>
47-
<description>Whether to automatically install updates to curated Flatpaks</description>
46+
<summary>Automatic updates</summary>
47+
<description>Whether to automatically install updates to curated Flatpak apps</description>
4848
</key>
4949
</schema>
5050
</schemalist>

‎src/Core/Client.vala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,7 +167,7 @@ public class AppCenterCore.Client : Object {
167167
});
168168

169169
if (nm.get_network_available ()) {
170-
if (last_cache_update_is_old && AppCenter.App.settings.get_boolean ("automatically-install-flatpak-updates")) {
170+
if (last_cache_update_is_old && AppCenter.App.settings.get_boolean ("automatic-updates")) {
171171
yield refresh_updates ();
172172
debug ("Update Flatpaks");
173173
var installed_apps = yield FlatpakBackend.get_default ().get_installed_applications (cancellable);

‎src/Core/UpdateManager.vala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ public class AppCenterCore.UpdateManager : Object {
102102
debug ("Added %s to app updates", flatpak_update);
103103
apps_with_updates.add (appcenter_package);
104104

105-
if (!(AppCenter.App.settings.get_boolean ("automatically-install-flatpak-updates") && appcenter_package.is_native)) {
105+
if (!(AppCenter.App.settings.get_boolean ("automatic-updates") && appcenter_package.is_native)) {
106106
count++;
107107
}
108108

@@ -128,7 +128,7 @@ public class AppCenterCore.UpdateManager : Object {
128128
continue;
129129
}
130130

131-
if (!AppCenter.App.settings.get_boolean ("automatically-install-flatpak-updates")) {
131+
if (!AppCenter.App.settings.get_boolean ("automatic-updates")) {
132132
os_count++;
133133
}
134134

‎src/MainWindow.vala

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -214,12 +214,12 @@ public class AppCenter.MainWindow : Hdy.ApplicationWindow {
214214

215215
spinner = new Gtk.Spinner ();
216216

217-
var automatically_install_flatpak_updates_button = new Granite.SwitchModelButton (_("Automatic Updates")) {
217+
var automatic_updates_button = new Granite.SwitchModelButton (_("Automatic Updates")) {
218218
description = _("Automatically install updates to curated apps")
219219
};
220220

221-
automatically_install_flatpak_updates_button.notify["active"].connect (() => {
222-
if (automatically_install_flatpak_updates_button.active) {
221+
automatic_updates_button.notify["active"].connect (() => {
222+
if (automatic_updates_button.active) {
223223
AppCenterCore.Client.get_default ().update_cache.begin (true);
224224
} else {
225225
AppCenterCore.Client.get_default ().cancel_updates (true);
@@ -234,7 +234,7 @@ public class AppCenter.MainWindow : Hdy.ApplicationWindow {
234234
row_spacing = 6
235235
};
236236

237-
menu_popover_grid.add (automatically_install_flatpak_updates_button);
237+
menu_popover_grid.add (automatic_updates_button);
238238

239239
menu_popover_grid.show_all ();
240240

@@ -290,8 +290,8 @@ public class AppCenter.MainWindow : Hdy.ApplicationWindow {
290290
App.settings.get ("window-position", "(ii)", out window_x, out window_y);
291291
App.settings.get ("window-size", "(ii)", out window_width, out window_height);
292292
App.settings.bind (
293-
"automatically-install-flatpak-updates",
294-
automatically_install_flatpak_updates_button,
293+
"automatic-updates",
294+
automatic_updates_button,
295295
"active",
296296
SettingsBindFlags.DEFAULT
297297
);

0 commit comments

Comments
 (0)