diff --git a/src/DBus/SystemUpdate.vala b/src/DBus/SystemUpdate.vala index 0a0633f4..aff6fcb8 100644 --- a/src/DBus/SystemUpdate.vala +++ b/src/DBus/SystemUpdate.vala @@ -5,7 +5,8 @@ public interface SystemUpdate : Object { CHECKING, AVAILABLE, DOWNLOADING, - RESTART_REQUIRED + RESTART_REQUIRED, + ERROR } public struct CurrentState { diff --git a/src/Views/OperatingSystemView.vala b/src/Views/OperatingSystemView.vala index e9437290..3f01bcd5 100644 --- a/src/Views/OperatingSystemView.vala +++ b/src/Views/OperatingSystemView.vala @@ -30,6 +30,7 @@ public class About.OperatingSystemView : Gtk.Box { private Gtk.Label updates_description; private Gtk.Revealer update_button_revealer; private Gtk.Revealer cancel_button_revealer; + private Gtk.Revealer error_button_revealer; construct { var style_provider = new Gtk.CssProvider (); @@ -161,7 +162,7 @@ public class About.OperatingSystemView : Gtk.Box { margin_end = 6, valign = CENTER }; - update_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION) + update_button.add_css_class (Granite.STYLE_CLASS_SUGGESTED_ACTION); update_button_revealer = new Gtk.Revealer () { child = update_button, @@ -175,7 +176,18 @@ public class About.OperatingSystemView : Gtk.Box { }; cancel_button_revealer = new Gtk.Revealer () { - child = update_button, + child = cancel_button, + overflow = VISIBLE, + transition_type = SLIDE_LEFT + }; + + var error_button = new Gtk.Button.with_label (_("Refresh")) { + margin_end = 6, + valign = CENTER + }; + + error_button_revealer = new Gtk.Revealer () { + child = error_button, overflow = VISIBLE, transition_type = SLIDE_LEFT }; @@ -190,6 +202,7 @@ public class About.OperatingSystemView : Gtk.Box { updates_grid.attach (updates_description, 1, 1); updates_grid.attach (update_button_revealer, 2, 0, 1, 2); updates_grid.attach (cancel_button_revealer, 3, 0, 1, 2); + updates_grid.attach (error_button_revealer, 2, 0, 1, 2); var frame = new Gtk.Frame (null) { child = updates_grid, @@ -359,6 +372,7 @@ public class About.OperatingSystemView : Gtk.Box { update_button_revealer.reveal_child = current_state.state == AVAILABLE; cancel_button_revealer.reveal_child = current_state.state == DOWNLOADING; + error_button_revealer.reveal_child = current_state.state == ERROR; switch (current_state.state) { case UP_TO_DATE: