[gnome-software] Fix details page's update button action



commit c3a6a04d7cba68a4a5b45667c39407c1204f24d1
Author: Joaquim Rocha <jrocha endlessm com>
Date:   Wed Aug 17 12:43:48 2016 +0200

    Fix details page's update button action
    
    It was always calling the install_app function instead of the
    update_app.

 src/gs-shell-details.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index f7f8e0c..a57fc4d 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1556,6 +1556,12 @@ gs_shell_details_app_install_button_cb (GtkWidget *widget, GsShellDetails *self)
        }
 
        g_set_object (&self->cancellable, cancellable);
+
+       if (gs_app_get_state (self->app) == AS_APP_STATE_UPDATABLE_LIVE) {
+               gs_page_update_app (GS_PAGE (self), self->app, self->cancellable);
+               return;
+       }
+
        gs_page_install_app (GS_PAGE (self), self->app, self->cancellable);
 }
 


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