[gnome-software/wip/rancell/paid] Make purchase button work from search results



commit ba6fcad1e82ddbd7da6c0b68ef6c07c32abacc82
Author: Robert Ancell <robert ancell canonical com>
Date:   Fri May 6 16:17:47 2016 +1200

    Make purchase button work from search results

 src/gs-shell-search.c |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/gs-shell-search.c b/src/gs-shell-search.c
index a3ef887..87818a8 100644
--- a/src/gs-shell-search.c
+++ b/src/gs-shell-search.c
@@ -70,8 +70,11 @@ gs_shell_search_app_row_clicked_cb (GsAppRow *app_row,
                                    GsShellSearch *self)
 {
        GsApp *app;
+
        app = gs_app_row_get_app (app_row);
-       if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
+       if (gs_app_get_state (app) == AS_APP_STATE_PURCHASABLE)
+               gs_page_purchase_app (GS_PAGE (self), app);
+       else if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
                gs_page_install_app (GS_PAGE (self), app);
        else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
                gs_page_remove_app (GS_PAGE (self), app);


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