Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OperatingSystemView: use urgent icon if updates contain security #292

Merged
merged 7 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Install Dependencies
run: |
apt update
apt install -y meson libadwaita-1-dev libfwupd-dev libgranite-7-dev libgtk-4-dev libgtop2-dev libgudev-1.0-dev libudisks2-dev libswitchboard-3-dev libappstream-dev valac
apt install -y meson libadwaita-1-dev libfwupd-dev libgranite-7-dev libgtk-4-dev libgtop2-dev libgudev-1.0-dev libudisks2-dev libswitchboard-3-dev libappstream-dev libpackagekit-glib2-dev valac
- name: Build
env:
DESTDIR: out
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ You'll need the following dependencies:
* libudisks2-dev
* libadwaita-1-dev
* libappstream-dev
* libpackagekit-glib2-dev
* meson
* valac
* switcheroo-control (at runtime)
Expand Down
1 change: 1 addition & 0 deletions src/DBus/SystemUpdate.vala
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ public interface SystemUpdate : Object {
public struct UpdateDetails {
string[] packages;
int size;
Pk.Info[] info;
}

public signal void state_changed ();
Expand Down
6 changes: 6 additions & 0 deletions src/Views/OperatingSystemView.vala
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,12 @@ public class About.OperatingSystemView : Gtk.Box {
details.packages.length
).printf (details.packages.length);

foreach (unowned var info in details.info) {
danirabbit marked this conversation as resolved.
Show resolved Hide resolved
if (info == SECURITY) {
updates_image.icon_name = "software-update-urgent";
}
}

packages.splice (0, packages.get_n_items (), details.packages);
} catch (Error e) {
updates_description.label = _("Unable to determine number of updates");
Expand Down
1 change: 1 addition & 0 deletions src/meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ shared_module(
dependency('gtk4'),
dependency('libadwaita-1'),
dependency('libgtop-2.0'),
dependency('packagekit-glib2'),
dependency('gudev-1.0'),
dependency('udisks2'),
appstream_dep,
Expand Down
Loading