Skip to content

Commit

Permalink
Minor fixes to version comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
Rexeh committed Dec 8, 2023
1 parent 4a4b4b9 commit 9e1aab4
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
5 changes: 2 additions & 3 deletions joystick_diagrams/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,11 @@ def __init__(self, *args, **kwargs):
self.dcs_profiles_list.clear()
self.jg_profile_list.clear()
self.application_information_textbrowser.clear()
self.donate_button.clicked.connect(self.open_version_window)
self.discord_button.clicked.connect(
lambda: QtGui.QDesktopServices.openUrl(QtCore.QUrl("https://discord.gg/G8nRUS2"))
)
self.version_checked = self.version_check()

self.donate_button.hide()
# DCS UI Setup
self.dcs_selected_directory_label.setText("")
self.dcs_parser_instance = None
Expand All @@ -62,7 +61,7 @@ def __init__(self, *args, **kwargs):
def version_check(self):
check = version.performn_version_check()

if check:
if not check:
self.open_version_window()

return check
Expand Down
6 changes: 4 additions & 2 deletions joystick_diagrams/classes/version/version.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

_LOGGER = logging.getLogger(__name__)

VERSION = "2.0-ALPHA"
VERSION = "2.0 ALPHA" # Format Major.Minor
VERSION_SERVER = "https://www.joystick-diagrams.com/"
TEMPLATE_DIR = "./templates"
MANIFEST_DIR = "./"
Expand All @@ -30,7 +30,9 @@ class JoystickDiagramVersion:

# Temporary EQ override as templates are not yet integrated to avoid incorrect version checks
def __eq__(self, other):
return self.version == other.version
me = float(self.version.split()[0])
other = float(other.version.split()[0])
return me >= other


class VersionEncode(json.JSONEncoder):
Expand Down
2 changes: 1 addition & 1 deletion version_manifest.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"version": "2.0-ALPHA", "template_hashes": {"CH Fighterstick USB.svg": "ecb58ae3850233772d06a97deb09a33585a6311526fd608204a202e9e06a03a4", "CH Pro Throttle USB.svg": "a85b52eb622d5c28c15364ae4882ce8e589364154a486aea94d53c52770ae917", "HOTAS Warthog Throttle.svg": "ec06478e328471c3dd1081ddb9722d15b06f3c7581d4a43ee5b302de108e4f84", "T.16000M Joystick Left.svg": "9fa8059b9cbecc96033522a3e3307590bb425a6f74b2218ad3bc9aacd764b313", "T.16000M Joystick.svg": "0a893b46544d15253838402cb88d91a3513e793cd2ec742e572291b551ae1951", "TotalControls_Device_1.svg": "4493b84ec00e9a3c3d5ed5bb2252ff3d1c0f43062628074c64afb7c61f1f2ea4", "TotalControls_Device_2.svg": "75273c53282b7aeddbdcc604d63a4162fb8484dcbfdda60ac06ad89a28601d2a", "TWCS Throttle.svg": "128e972df307a9a3236253ecd1299925d1faf569c74cc5f1de3304d162b8ba88", "VKB-Sim Gladiator NXT L.svg": "11f07941223e5349015874f89308b0c0cdba93667dec6cf83ee2f0b8cfc676ed", "VKB-Sim Gladiator NXT R.svg": "5a435f2a9d4b2b021c968771e4a1fb44274ebbcc9b56b5e2ca847a72ee49e526", "VPC Constellation ALPHA R.svg": "ad9cdec0ac1b6acda10913ace837e05a7732a46c10d684baafd04a634bba5cba", "VPC Control Panel #1.svg": "6926094d565b60b4e2e9df7a6957d32e5df41854933f9bb5ae2254ad4737d48f", "VPC Stick MT-50CM.svg": "0602a7b529a194545c45881d98ae3feec21f9084ffbe1aee57d650c77a40212e", "VPC Stick VFX.svg": "33e343e77d4ce72e641343def9c8ee3710ab960bc79d0cdf894decb0cfc494ab", "VPC Stick WarBRD.svg": "c16aac95e6140284ca84ef6637c075befa9aadafb1bd034edb1b7f440f779da8", "VPC Throttle MT-50 CM2.svg": "6445aa8a920890674d8ab9dc0367277afcbb93e9f2b2bb7b31118390c45d6149", "X52_H.O.T.A.S..svg": "a8f9b5efd10942e0cd8354bf0c3b085fdf8532c11b691021906513df305bb4d6", "X56 H.O.T.A.S. Stick.svg": "6a1398ffbd02b51396286967fb8c8ddb795fbb2e9600060214b72af2d2ef6eb5", "X56 H.O.T.A.S. Throttle.svg": "b0d43840a9d8392d4ddb6f7cb1d80c7a4a83a3e3d0d2848d8c4aab7c68ccd70c"}}
{"version": "2.0 ALPHA", "template_hashes": {"CH Fighterstick USB.svg": "ecb58ae3850233772d06a97deb09a33585a6311526fd608204a202e9e06a03a4", "CH Pro Throttle USB.svg": "a85b52eb622d5c28c15364ae4882ce8e589364154a486aea94d53c52770ae917", "HOTAS Warthog Throttle.svg": "ec06478e328471c3dd1081ddb9722d15b06f3c7581d4a43ee5b302de108e4f84", "T.16000M Joystick Left.svg": "9fa8059b9cbecc96033522a3e3307590bb425a6f74b2218ad3bc9aacd764b313", "T.16000M Joystick.svg": "0a893b46544d15253838402cb88d91a3513e793cd2ec742e572291b551ae1951", "TotalControls_Device_1.svg": "4493b84ec00e9a3c3d5ed5bb2252ff3d1c0f43062628074c64afb7c61f1f2ea4", "TotalControls_Device_2.svg": "75273c53282b7aeddbdcc604d63a4162fb8484dcbfdda60ac06ad89a28601d2a", "TWCS Throttle.svg": "128e972df307a9a3236253ecd1299925d1faf569c74cc5f1de3304d162b8ba88", "VKB-Sim Gladiator NXT L.svg": "11f07941223e5349015874f89308b0c0cdba93667dec6cf83ee2f0b8cfc676ed", "VKB-Sim Gladiator NXT R.svg": "5a435f2a9d4b2b021c968771e4a1fb44274ebbcc9b56b5e2ca847a72ee49e526", "VPC Constellation ALPHA R.svg": "ad9cdec0ac1b6acda10913ace837e05a7732a46c10d684baafd04a634bba5cba", "VPC Control Panel #1.svg": "6926094d565b60b4e2e9df7a6957d32e5df41854933f9bb5ae2254ad4737d48f", "VPC Stick MT-50CM.svg": "0602a7b529a194545c45881d98ae3feec21f9084ffbe1aee57d650c77a40212e", "VPC Stick VFX.svg": "33e343e77d4ce72e641343def9c8ee3710ab960bc79d0cdf894decb0cfc494ab", "VPC Stick WarBRD.svg": "c16aac95e6140284ca84ef6637c075befa9aadafb1bd034edb1b7f440f779da8", "VPC Throttle MT-50 CM2.svg": "6445aa8a920890674d8ab9dc0367277afcbb93e9f2b2bb7b31118390c45d6149", "X52_H.O.T.A.S..svg": "a8f9b5efd10942e0cd8354bf0c3b085fdf8532c11b691021906513df305bb4d6", "X56 H.O.T.A.S. Stick.svg": "6a1398ffbd02b51396286967fb8c8ddb795fbb2e9600060214b72af2d2ef6eb5", "X56 H.O.T.A.S. Throttle.svg": "b0d43840a9d8392d4ddb6f7cb1d80c7a4a83a3e3d0d2848d8c4aab7c68ccd70c"}}

0 comments on commit 9e1aab4

Please sign in to comment.