- added checkboxes in Preferences -> General -> Global Preferences to switch on/off version check at application startup and also to control if the app will send anonymous statistics about FlatCAM usage to help improve FlatCAM
This commit is contained in:
@@ -88,8 +88,8 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
# Version
|
# Version
|
||||||
version = 8.901
|
version = 8.901
|
||||||
version_date = "2019/01/07"
|
version_date = "2019/01/08"
|
||||||
beta = True
|
beta = False
|
||||||
|
|
||||||
# URL for update checks and statistics
|
# URL for update checks and statistics
|
||||||
version_url = "http://flatcam.org/version"
|
version_url = "http://flatcam.org/version"
|
||||||
@@ -290,6 +290,8 @@ class App(QtCore.QObject):
|
|||||||
self.defaults_form_fields = {
|
self.defaults_form_fields = {
|
||||||
"units": self.general_defaults_form.general_group.units_radio,
|
"units": self.general_defaults_form.general_group.units_radio,
|
||||||
"global_shell_at_startup": self.general_defaults_form.general_group.shell_startup_cb,
|
"global_shell_at_startup": self.general_defaults_form.general_group.shell_startup_cb,
|
||||||
|
"global_version_check": self.general_defaults_form.general_group.version_check_cb,
|
||||||
|
"global_send_stats": self.general_defaults_form.general_group.send_stats_cb,
|
||||||
"global_gridx": self.general_defaults_form.general_group.gridx_entry,
|
"global_gridx": self.general_defaults_form.general_group.gridx_entry,
|
||||||
"global_gridy": self.general_defaults_form.general_group.gridy_entry,
|
"global_gridy": self.general_defaults_form.general_group.gridy_entry,
|
||||||
"global_plot_fill": self.general_defaults_form.general_group.pf_color_entry,
|
"global_plot_fill": self.general_defaults_form.general_group.pf_color_entry,
|
||||||
@@ -404,6 +406,8 @@ class App(QtCore.QObject):
|
|||||||
"global_serial": 0,
|
"global_serial": 0,
|
||||||
"global_stats": {},
|
"global_stats": {},
|
||||||
"units": "IN",
|
"units": "IN",
|
||||||
|
"global_version_check": True,
|
||||||
|
"global_send_stats": True,
|
||||||
"global_gridx": 1.0,
|
"global_gridx": 1.0,
|
||||||
"global_gridy": 1.0,
|
"global_gridy": 1.0,
|
||||||
"global_plot_fill": '#BBF268BF',
|
"global_plot_fill": '#BBF268BF',
|
||||||
@@ -1142,7 +1146,9 @@ class App(QtCore.QObject):
|
|||||||
###########################
|
###########################
|
||||||
|
|
||||||
# Separate thread (Not worker)
|
# Separate thread (Not worker)
|
||||||
if self.beta is False or self.beta is None:
|
# Check for updates on startup but only if the user consent and the app is not in Beta version
|
||||||
|
if (self.beta is False or self.beta is None) and \
|
||||||
|
self.general_defaults_form.general_group.version_check_cb.get_value() is True:
|
||||||
App.log.info("Checking for updates in backgroud (this is version %s)." % str(self.version))
|
App.log.info("Checking for updates in backgroud (this is version %s)." % str(self.version))
|
||||||
|
|
||||||
self.thr2 = QtCore.QThread()
|
self.thr2 = QtCore.QThread()
|
||||||
@@ -5686,11 +5692,22 @@ class App(QtCore.QObject):
|
|||||||
|
|
||||||
self.log.debug("version_check()")
|
self.log.debug("version_check()")
|
||||||
|
|
||||||
full_url = App.version_url + \
|
if self.general_defaults_form.general_group.send_stats_cb.get_value() is True:
|
||||||
"?s=" + str(self.defaults['global_serial']) + \
|
full_url = App.version_url + \
|
||||||
"&v=" + str(self.version) + \
|
"?s=" + str(self.defaults['global_serial']) + \
|
||||||
"&os=" + str(self.os) + \
|
"&v=" + str(self.version) + \
|
||||||
"&" + urllib.parse.urlencode(self.defaults["global_stats"])
|
"&os=" + str(self.os) + \
|
||||||
|
"&" + urllib.parse.urlencode(self.defaults["global_stats"])
|
||||||
|
else:
|
||||||
|
# no_stats dict; just so it won't break things on website
|
||||||
|
no_ststs_dict = {}
|
||||||
|
no_ststs_dict["global_ststs"] = {}
|
||||||
|
full_url = App.version_url + \
|
||||||
|
"?s=" + str(self.defaults['global_serial']) + \
|
||||||
|
"&v=" + str(self.version) + \
|
||||||
|
"&os=" + str(self.os) + \
|
||||||
|
"&" + urllib.parse.urlencode(no_ststs_dict["global_ststs"])
|
||||||
|
|
||||||
App.log.debug("Checking for updates @ %s" % full_url)
|
App.log.debug("Checking for updates @ %s" % full_url)
|
||||||
### Get the data
|
### Get the data
|
||||||
try:
|
try:
|
||||||
|
|||||||
@@ -909,6 +909,32 @@ class GeneralPrefGroupUI(OptionsGroupUI):
|
|||||||
"start automatically at startup."
|
"start automatically at startup."
|
||||||
)
|
)
|
||||||
|
|
||||||
|
# Version Check CB
|
||||||
|
self.version_check_label = QtWidgets.QLabel('Version Check:')
|
||||||
|
self.version_check_label.setToolTip(
|
||||||
|
"Check this box if you want to check\n"
|
||||||
|
"for a new version automatically at startup."
|
||||||
|
)
|
||||||
|
self.version_check_cb = FCCheckBox(label='')
|
||||||
|
self.version_check_cb.setToolTip(
|
||||||
|
"Check this box if you want to check\n"
|
||||||
|
"for a new version automatically at startup."
|
||||||
|
)
|
||||||
|
|
||||||
|
# Send Stats CB
|
||||||
|
self.send_stats_label = QtWidgets.QLabel('Send Stats:')
|
||||||
|
self.send_stats_label.setToolTip(
|
||||||
|
"Check this box if you agree to send anonymous\n"
|
||||||
|
"stats automatically at startup, to help improve FlatCAM."
|
||||||
|
)
|
||||||
|
self.send_stats_cb= FCCheckBox(label='')
|
||||||
|
self.send_stats_cb.setToolTip(
|
||||||
|
"Check this box if you agree to send anonymous\n"
|
||||||
|
"stats automatically at startup, to help improve FlatCAM."
|
||||||
|
)
|
||||||
|
|
||||||
|
self.ois_version_check = OptionalInputSection(self.version_check_cb, [self.send_stats_cb])
|
||||||
|
|
||||||
# Grid X Entry
|
# Grid X Entry
|
||||||
self.gridx_label = QtWidgets.QLabel('Grid X value:')
|
self.gridx_label = QtWidgets.QLabel('Grid X value:')
|
||||||
self.gridx_label.setToolTip(
|
self.gridx_label.setToolTip(
|
||||||
@@ -1151,6 +1177,9 @@ class GeneralPrefGroupUI(OptionsGroupUI):
|
|||||||
self.form_box.addRow(self.unitslabel, self.units_radio)
|
self.form_box.addRow(self.unitslabel, self.units_radio)
|
||||||
self.form_box.addRow(self.spacelabel, self.spacelabel)
|
self.form_box.addRow(self.spacelabel, self.spacelabel)
|
||||||
self.form_box.addRow(self.shell_startup_label, self.shell_startup_cb)
|
self.form_box.addRow(self.shell_startup_label, self.shell_startup_cb)
|
||||||
|
self.form_box.addRow(self.version_check_label, self.version_check_cb)
|
||||||
|
self.form_box.addRow(self.send_stats_label, self.send_stats_cb)
|
||||||
|
|
||||||
self.form_box.addRow(self.gridx_label, self.gridx_entry)
|
self.form_box.addRow(self.gridx_label, self.gridx_entry)
|
||||||
self.form_box.addRow(self.gridy_label, self.gridy_entry)
|
self.form_box.addRow(self.gridy_label, self.gridy_entry)
|
||||||
self.form_box.addRow(self.panbuttonlabel, self.pan_button_radio)
|
self.form_box.addRow(self.panbuttonlabel, self.pan_button_radio)
|
||||||
|
|||||||
@@ -9,6 +9,10 @@ CAD program, and create G-Code for Isolation routing.
|
|||||||
|
|
||||||
=================================================
|
=================================================
|
||||||
|
|
||||||
|
8.01.2019
|
||||||
|
|
||||||
|
- added checkboxes in Preferences -> General -> Global Preferences to switch on/off version check at application startup and also to control if the app will send anonymous statistics about FlatCAM usage to help improve FlatCAM
|
||||||
|
|
||||||
7.01.2019
|
7.01.2019
|
||||||
|
|
||||||
- added tooltips in Edit->Convert menu
|
- added tooltips in Edit->Convert menu
|
||||||
|
|||||||
Reference in New Issue
Block a user