Skip to content

Commit

Permalink
TrackPanel: display correct OS name (#136)
Browse files Browse the repository at this point in the history
  • Loading branch information
bobby285271 authored May 17, 2022
1 parent e78063d commit abb7a38
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/Views/TrackPanel.vala
Original file line number Diff line number Diff line change
Expand Up @@ -100,18 +100,7 @@ public class SecurityPrivacy.TrackPanel : Granite.SimpleSettingsPage {
}

private static string get_operating_system_name () {
string system = _("Your system");
try {
string contents = null;
if (FileUtils.get_contents ("/etc/os-release", out contents)) {
int start = contents.index_of ("NAME=") + "NAME=".length;
int end = contents.index_of_char ('\n');
system = contents.substring (start, end - start).replace ("\"", "");
}
} catch (FileError e) {
debug ("Could not get OS name");
}
return system;
return Environment.get_os_info (GLib.OsInfoKey.NAME) ?? _("Your system");
}

private void update_status_switch () {
Expand Down

0 comments on commit abb7a38

Please sign in to comment.