Skip to content

Commit

Permalink
Minor bugfix
Browse files Browse the repository at this point in the history
  • Loading branch information
irgolic committed Jun 7, 2019
1 parent 0b88a99 commit 74be9ca
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 4 additions & 3 deletions Orange/canvas/application/canvasmain.py
Original file line number Diff line number Diff line change
Expand Up @@ -390,7 +390,8 @@ def setup_notifications(self):
settings = config.settings()

# If run for the fifth time, prompt short survey
show_survey = settings["startup/show-survey"] and (settings["startup/launch-count"] >= 5)
show_survey = settings["startup/show-short-survey"] and \
settings["startup/launch-count"] >= 5
if show_survey:
surveyDialogButtons = NotificationWidget.Ok | NotificationWidget.Close
surveyDialog = NotificationWidget(parent=self.scheme_widget,
Expand All @@ -404,9 +405,9 @@ def handle_survey_response(button):
if surveyDialog.buttonRole(button) == NotificationWidget.AcceptRole:
success = QDesktopServices.openUrl(
QUrl("https://orange.biolab.si/survey/short.html"))
settings["startup/show-survey"] = not success
settings["startup/show-short-survey"] = not success
elif surveyDialog.buttonRole(button) == NotificationWidget.RejectRole:
settings["startup/show-survey"] = False
settings["startup/show-short-survey"] = False

surveyDialog.clicked.connect(handle_survey_response)

Expand Down
3 changes: 3 additions & 0 deletions Orange/canvas/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ def init():
("startup/latest-skipped-version", str, "",
"Latest skipped Orange update"),

("startup/show-short-survey", bool, True,
"Has the user not been asked to take a short survey yet"),

("stylesheet", str, "orange",
"QSS stylesheet to use"),

Expand Down

0 comments on commit 74be9ca

Please sign in to comment.