Skip to content
This repository has been archived by the owner on Mar 14, 2020. It is now read-only.

Commit

Permalink
misc changes; Update to version 0.24.1;
Browse files Browse the repository at this point in the history
  • Loading branch information
twiddli committed Sep 14, 2015
1 parent d6e7a2e commit 9716bda
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions version/app.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#"""
#"""
#This file is part of Happypanda.
#Happypanda is free software: you can redistribute it and/or modify
#it under the terms of the GNU General Public License as published by
Expand Down Expand Up @@ -57,8 +57,7 @@ def __init__(self):
self.setAcceptDrops(True)
self.initUI()
self.start_up()
if not gui_constants.DEBUG:
QTimer.singleShot(3000, self._check_update)
QTimer.singleShot(3000, self._check_update)
self.setFocusPolicy(Qt.NoFocus)

def init_watchers(self):
Expand Down Expand Up @@ -320,8 +319,11 @@ def fetch_vs(self):
try:
log_d('Checking Update')
time.sleep(1.5)
r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt",
verify='cacert.pem')
if gui_constants.DEBUG:
r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt")
else:
r = requests.get("https://raw.githubusercontent.com/Pewpews/happypanda/master/VS.txt",
verify='cacert.pem')
a = r.text
vs = a.strip()
self.UPDATE_CHECK.emit(vs)
Expand All @@ -333,6 +335,7 @@ def check_update(vs):
log_i('Received version: {}\nCurrent version: {}'.format(vs, gui_constants.vs))
if vs != gui_constants.vs:
if len(vs) < 10:
self.notification_bar.begin_show()
self.notification_bar.add_text("Version {} of Happypanda is".format(vs)+
" available. Click here to update!", False)
self.notification_bar.clicked.connect(lambda: utils.open_web_link(
Expand Down

0 comments on commit 9716bda

Please sign in to comment.