[gnome-software/wip/rancell/reviews-3-18] Use rating when clicking on stars to start review
- From: Robert Ancell <rancell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gnome-software/wip/rancell/reviews-3-18] Use rating when clicking on stars to start review
- Date: Thu, 14 Jan 2016 08:26:11 +0000 (UTC)
commit 6bfd7010ce6639af8524ff4a2f8e1f1135aad293
Author: Robert Ancell <robert ancell canonical com>
Date: Thu Jan 14 21:25:34 2016 +1300
Use rating when clicking on stars to start review
src/gs-app-review-dialog.c | 6 ++++++
src/gs-app-review-dialog.h | 2 ++
src/gs-shell-details.c | 1 +
3 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/gs-app-review-dialog.c b/src/gs-app-review-dialog.c
index e145719..8114930 100644
--- a/src/gs-app-review-dialog.c
+++ b/src/gs-app-review-dialog.c
@@ -45,6 +45,12 @@ gs_app_review_dialog_get_rating (GsAppReviewDialog *dialog)
return gs_star_widget_get_rating (GS_STAR_WIDGET (dialog->star));
}
+void
+gs_app_review_dialog_set_rating (GsAppReviewDialog *dialog, gint rating)
+{
+ gs_star_widget_set_rating (GS_STAR_WIDGET (dialog->star), GS_APP_RATING_KIND_USER, rating);
+}
+
const gchar *
gs_app_review_dialog_get_summary (GsAppReviewDialog *dialog)
{
diff --git a/src/gs-app-review-dialog.h b/src/gs-app-review-dialog.h
index ff82a33..59ff2ba 100644
--- a/src/gs-app-review-dialog.h
+++ b/src/gs-app-review-dialog.h
@@ -32,6 +32,8 @@ G_DECLARE_FINAL_TYPE (GsAppReviewDialog, gs_app_review_dialog, GS, APP_REVIEW_DI
GtkWidget *gs_app_review_dialog_new (void);
gint gs_app_review_dialog_get_rating (GsAppReviewDialog *dialog);
+void gs_app_review_dialog_set_rating (GsAppReviewDialog *dialog,
+ gint rating);
const gchar *gs_app_review_dialog_get_summary (GsAppReviewDialog *dialog);
gchar *gs_app_review_dialog_get_text (GsAppReviewDialog *dialog);
diff --git a/src/gs-shell-details.c b/src/gs-shell-details.c
index 3f1f146..0d98e31 100644
--- a/src/gs-shell-details.c
+++ b/src/gs-shell-details.c
@@ -1245,6 +1245,7 @@ gs_shell_details_rating_changed_cb (GsStarWidget *star,
GtkResponseType response;
dialog = gs_app_review_dialog_new ();
+ gs_app_review_dialog_set_rating (GS_APP_REVIEW_DIALOG (dialog), rating);
gtk_window_set_transient_for (GTK_WINDOW (dialog), gs_shell_get_window (self->shell));
response = gtk_dialog_run (GTK_DIALOG (dialog));
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]