From 46041fa10403b1a00d395f0fde4f7534f76f902c Mon Sep 17 00:00:00 2001 From: alby128 Date: Thu, 5 Oct 2017 10:07:03 +0200 Subject: [PATCH] Fixed datetime for existing installations --- resources/third-party-notices.rtf | 28 ++++++++++++++++++++-------- syncplay/ui/GuiConfiguration.py | 2 ++ syncplay/ui/gui.py | 4 ++-- 3 files changed, 24 insertions(+), 10 deletions(-) diff --git a/resources/third-party-notices.rtf b/resources/third-party-notices.rtf index 129b285..492a24a 100644 --- a/resources/third-party-notices.rtf +++ b/resources/third-party-notices.rtf @@ -8,6 +8,22 @@ \f0\fs24 \cf0 Syncplay relies on the following softwares, in compliance with their licenses. \ \ +\b Qt.py +\b0 \ +\ +Copyright (c) 2016 Marcus Ottosson\ +\ +Permission is hereby granted, free of charge, to any person obtaining a copy\ +of this software and associated documentation files (the "Software"), to deal\ +in the Software without restriction, including without limitation the rights\ +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ +copies of the Software, and to permit persons to whom the Software is\ +furnished to do so, subject to the following conditions:\ +\ +The above copyright notice and this permission notice shall be included in all\ +copies or substantial portions of the Software.\ +\ + \b PySide\ \b0 \ @@ -97,8 +113,7 @@ The above copyright notice and this permission notice shall be\ included in all copies or substantial portions of the Software.\ \b \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 Qt 4\ +Qt 4\ \ \b0 Copyright (C) 2015 The Qt Company Ltd.\ @@ -119,8 +134,7 @@ along with this program. If not, see \ \pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 \b \cf0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 appnope\ +appnope\ \b0 \ Copyright (c) 2013, Min Ragan-Kelley\ @@ -143,11 +157,9 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.\ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\b \cf0 \ -\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\pardirnatural\partightenfactor0 -\cf0 PyObjC\ +\b \ +PyObjC\ \b0 \ Copyright 2002, 2003 - Bill Bumgarner, Ronald Oussoren, Steve Majewski, Lele Gaifax, et.al.\ diff --git a/syncplay/ui/GuiConfiguration.py b/syncplay/ui/GuiConfiguration.py index 54844bd..a29b553 100755 --- a/syncplay/ui/GuiConfiguration.py +++ b/syncplay/ui/GuiConfiguration.py @@ -281,6 +281,8 @@ class ConfigDialog(QtWidgets.QDialog): self.lastCheckedForUpdates = settings.value("lastChecked", None) if self.lastCheckedForUpdates: if self.config["lastCheckedForUpdates"] is not None and self.config["lastCheckedForUpdates"] is not "": + if type(self.lastCheckedForUpdates).__name__ is 'datetime': + self.lastCheckedForUpdates = QDateTime.fromString(self.lastCheckedForUpdates.strftime('%Y-%m-%d %H:%M:%S'),'yyyy-MM-dd hh:mm:ss') if self.lastCheckedForUpdates.toPython() > datetime.strptime(self.config["lastCheckedForUpdates"], "%Y-%m-%d %H:%M:%S.%f"): self.config["lastCheckedForUpdates"] = self.lastCheckedForUpdates.toString("yyyy-MM-d HH:mm:ss.z") else: diff --git a/syncplay/ui/gui.py b/syncplay/ui/gui.py index a60918b..db6e570 100755 --- a/syncplay/ui/gui.py +++ b/syncplay/ui/gui.py @@ -1,5 +1,5 @@ from syncplay.vendor import Qt -from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, IsPySide, IsPySide2 +from syncplay.vendor.Qt import QtWidgets, QtGui, __binding__, __binding_version__, IsPySide, IsPySide2 from syncplay.vendor.Qt.QtCore import Qt, QSettings, QSize, QPoint, QUrl, QLine, QDateTime if IsPySide2: from PySide2.QtCore import QStandardPaths @@ -105,7 +105,7 @@ class AboutDialog(QtWidgets.QDialog): nameLabel.setFont(QtGui.QFont("Helvetica", 20)) linkLabel = QtWidgets.QLabel("
syncplay.pl
") linkLabel.setOpenExternalLinks(True) - versionLabel = QtWidgets.QLabel("
Version v" + version + " release " + release_number + "
") + versionLabel = QtWidgets.QLabel("
Version v" + version + " release " + release_number + " on " + __binding__ + "
") licenseLabel = QtWidgets.QLabel("

Copyright © 2017 Syncplay

Licensed under the Apache License, Version 2.0

") aboutIconPixmap = QtGui.QPixmap(self.resourcespath + u"syncplay.png") aboutIconLabel = QtWidgets.QLabel()