[gnome-software/865-disallow-submitting-a-review-for-an-app-you-haven-t-installed] gs-details-page: Allow writing a review for installed applications only
- From: Milan Crha <mcrha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/865-disallow-submitting-a-review-for-an-app-you-haven-t-installed] gs-details-page: Allow writing a review for installed applications only
- Date: Fri, 14 May 2021 10:29:28 +0000 (UTC)
commit b6eee1261171c89543ebe7768e06075b7301231a
Author: Milan Crha <mcrha redhat com>
Date: Fri May 14 12:28:19 2021 +0200
gs-details-page: Allow writing a review for installed applications only
Do not let submit a review when the application is not installed.
Closes https://gitlab.gnome.org/GNOME/gnome-software/-/issues/865
src/gs-details-page.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
---
diff --git a/src/gs-details-page.c b/src/gs-details-page.c
index 2e56e5d81..728f0e5bb 100644
--- a/src/gs-details-page.c
+++ b/src/gs-details-page.c
@@ -1853,7 +1853,11 @@ gs_details_page_refresh_reviews (GsDetailsPage *self)
/* show the button only if the user never reviewed */
gtk_widget_set_visible (self->button_review, show_review_button);
- if (gs_plugin_loader_get_network_available (self->plugin_loader)) {
+ if (gs_app_get_state (self->app) != GS_APP_STATE_INSTALLED) {
+ gtk_widget_set_visible (self->button_review, FALSE);
+ gtk_widget_set_sensitive (self->button_review, FALSE);
+ gtk_widget_set_sensitive (self->star_eventbox, FALSE);
+ } else if (gs_plugin_loader_get_network_available (self->plugin_loader)) {
gtk_widget_set_sensitive (self->button_review, TRUE);
gtk_widget_set_sensitive (self->star_eventbox, TRUE);
gtk_widget_set_tooltip_text (self->button_review, NULL);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]