[gnome-software/wip/kalev/unfinished-GsProgress-XXX: 2/5] mhh



commit d512e395072e5f80332ce220269fdc65a82fbf75
Author: Kalev Lember <klember redhat com>
Date:   Mon Nov 11 10:53:31 2019 +0100

    mhh

 src/gs-details-page.c  | 5 +++--
 src/gs-extras-page.c   | 2 +-
 src/gs-overview-page.c | 1 +
 src/gs-page.c          | 2 +-
 src/gs-page.h          | 1 +
 src/gs-search-page.c   | 3 ++-
 src/gs-shell.c         | 2 +-
 7 files changed, 10 insertions(+), 6 deletions(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 4d88fe88..4908edd2 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -2111,6 +2111,7 @@ static void
 gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
 {
        g_autoptr(GList) addons = NULL;
+       g_autoptr(GsProgress) progress = gs_progress_new ();
 
        /* Mark ticked addons to be installed together with the app */
        addons = gtk_container_get_children (GTK_CONTAINER (self->list_box_addons));
@@ -2130,7 +2131,7 @@ gs_details_page_app_install_button_cb (GtkWidget *widget, GsDetailsPage *self)
                return;
        }
 
-       gs_page_install_app (GS_PAGE (self), self->app, GS_SHELL_INTERACTION_FULL,
+       gs_page_install_app (GS_PAGE (self), self->app, progress, GS_SHELL_INTERACTION_FULL,
                             self->app_cancellable);
 }
 
@@ -2159,7 +2160,7 @@ gs_details_page_addon_selected_cb (GsAppAddonRow *row,
        case AS_APP_STATE_UPDATABLE_LIVE:
                if (gs_app_addon_row_get_selected (row)) {
                        g_set_object (&self->app_cancellable, gs_app_get_cancellable (addon));
-                       gs_page_install_app (GS_PAGE (self), addon, GS_SHELL_INTERACTION_FULL,
+                       gs_page_install_app (GS_PAGE (self), addon, NULL, GS_SHELL_INTERACTION_FULL,
                                             self->app_cancellable);
                } else {
                        g_set_object (&self->app_cancellable, gs_app_get_cancellable (addon));
diff --git a/src/gs-extras-page.c b/src/gs-extras-page.c
index d31ad774..5f2215ab 100644
--- a/src/gs-extras-page.c
+++ b/src/gs-extras-page.c
@@ -257,7 +257,7 @@ app_row_button_clicked_cb (GsAppRow *app_row,
        } else if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE ||
                   gs_app_get_state (app) == AS_APP_STATE_AVAILABLE_LOCAL ||
                   gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
-               gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
+               gs_page_install_app (GS_PAGE (self), app, NULL, GS_SHELL_INTERACTION_FULL,
                                     self->search_cancellable);
        } else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED) {
                gs_page_remove_app (GS_PAGE (self), app, self->search_cancellable);
diff --git a/src/gs-overview-page.c b/src/gs-overview-page.c
index d522cf86..a82f4c20 100644
--- a/src/gs-overview-page.c
+++ b/src/gs-overview-page.c
@@ -890,6 +890,7 @@ third_party_response_cb (GtkInfoBar *info_bar,
 
        if (gs_app_get_state (priv->third_party_repo) == AS_APP_STATE_AVAILABLE) {
                gs_page_install_app (GS_PAGE (self), priv->third_party_repo,
+                                    NULL,
                                     GS_SHELL_INTERACTION_FULL,
                                     priv->cancellable);
        }
diff --git a/src/gs-page.c b/src/gs-page.c
index 8ebb738d..7f0033cc 100644
--- a/src/gs-page.c
+++ b/src/gs-page.c
@@ -173,13 +173,13 @@ gs_page_set_header_end_widget (GsPage *page, GtkWidget *widget)
 void
 gs_page_install_app (GsPage *page,
                     GsApp *app,
+                    GsProgress *progress,
                     GsShellInteraction interaction,
                     GCancellable *cancellable)
 {
        GsPagePrivate *priv = gs_page_get_instance_private (page);
        GsPageHelper *helper;
        g_autoptr(GsPluginJob) plugin_job = NULL;
-       g_autoptr(GsProgress) progress = gs_progress_new ();
 
        /* probably non-free */
        if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
diff --git a/src/gs-page.h b/src/gs-page.h
index b45dbc38..410ad136 100644
--- a/src/gs-page.h
+++ b/src/gs-page.h
@@ -48,6 +48,7 @@ void           gs_page_set_header_end_widget          (GsPage         *page,
                                                         GtkWidget      *widget);
 void            gs_page_install_app                    (GsPage                 *page,
                                                         GsApp                  *app,
+                                                        GsProgress             *progress,
                                                         GsShellInteraction     interaction,
                                                         GCancellable           *cancellable);
 void            gs_page_remove_app                     (GsPage         *page,
diff --git a/src/gs-search-page.c b/src/gs-search-page.c
index c543faef..317aff2b 100644
--- a/src/gs-search-page.c
+++ b/src/gs-search-page.c
@@ -51,13 +51,14 @@ gs_search_page_app_row_clicked_cb (GsAppRow *app_row,
        GsApp *app;
        app = gs_app_row_get_app (app_row);
        if (gs_app_get_state (app) == AS_APP_STATE_AVAILABLE)
-               gs_page_install_app (GS_PAGE (self), app, GS_SHELL_INTERACTION_FULL,
+               gs_page_install_app (GS_PAGE (self), app, NULL, GS_SHELL_INTERACTION_FULL,
                                     self->cancellable);
        else if (gs_app_get_state (app) == AS_APP_STATE_INSTALLED)
                gs_page_remove_app (GS_PAGE (self), app, self->cancellable);
        else if (gs_app_get_state (app) == AS_APP_STATE_UNAVAILABLE) {
                if (gs_app_get_url (app, AS_URL_KIND_MISSING) == NULL) {
                        gs_page_install_app (GS_PAGE (self), app,
+                                            NULL,
                                             GS_SHELL_INTERACTION_FULL,
                                             self->cancellable);
                        return;
diff --git a/src/gs-shell.c b/src/gs-shell.c
index 918b794f..c5153abc 100644
--- a/src/gs-shell.c
+++ b/src/gs-shell.c
@@ -2085,7 +2085,7 @@ gs_shell_install (GsShell *shell, GsApp *app, GsShellInteraction interaction)
        gs_shell_change_mode (shell, GS_SHELL_MODE_DETAILS,
                              (gpointer) app, TRUE);
        page = GS_PAGE (g_hash_table_lookup (priv->pages, "details"));
-       gs_page_install_app (page, app, interaction, priv->cancellable);
+       gs_page_install_app (page, app, NULL, interaction, priv->cancellable);
 }
 
 void


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