[gnome-software] trivial: Don't assert when removing an updatable application



commit afe2312b59bf4a7502464898642467fb71ef4534
Author: Richard Hughes <richard hughsie com>
Date:   Sun Oct 27 20:00:27 2013 +0000

    trivial: Don't assert when removing an updatable application
    
    We use UNKNOWN to force the state machine into a known state.

 src/gs-shell-details.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 83eda48..e57ed76 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -118,6 +118,7 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
                 * is in the process of being installed */
                gtk_button_set_label (GTK_BUTTON (widget), _("Installing"));
                break;
+       case GS_APP_STATE_UNKNOWN:
        case GS_APP_STATE_INSTALLED:
        case GS_APP_STATE_REMOVING:
        case GS_APP_STATE_UPDATABLE:
@@ -160,6 +161,7 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
                case GS_APP_STATE_AVAILABLE:
                case GS_APP_STATE_INSTALLING:
                case GS_APP_STATE_UNAVAILABLE:
+               case GS_APP_STATE_UNKNOWN:
                        gtk_widget_set_visible (widget, FALSE);
                        break;
                default:
@@ -176,6 +178,7 @@ gs_shell_details_refresh (GsShellDetails *shell_details)
                gtk_spinner_stop (GTK_SPINNER (widget));
        } else {
                switch (state) {
+               case GS_APP_STATE_UNKNOWN:
                case GS_APP_STATE_INSTALLED:
                case GS_APP_STATE_AVAILABLE:
                case GS_APP_STATE_QUEUED:


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]