Skip to content

Commit

Permalink
Bugfixes on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
RandyParedis committed Feb 8, 2020
1 parent e988a68 commit 8501b5e
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 15 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ with `GraphDonkey`.
Simply type your text in the editor, enjoy its user-friendly features and see your
code come to life in the visualizer.

**Latest Release Version:** _Jack-in-a-Box_ (`v0.2.0`)<br/>
**Latest Release Version:** _Jack-in-a-Box_ (`v0.2.1`)<br/>
**Executable OS:** `Linux` and `Windows`<br>
&emsp; _(Cannot confirm other OS at this point in time)_<br>
**Author:** Randy Paredis
Expand Down
7 changes: 6 additions & 1 deletion __main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
os.mkdir(depfol)
sys.path.append(depfol)

from PyQt5 import QtWidgets
from PyQt5 import QtWidgets, QtGui
from main.extra import Constants
from main.MainWindow import MainWindow

Expand All @@ -28,6 +28,11 @@
Constants.APP_NAME + " [" + Constants.APP_VERSION_NAME + "] v" + Constants.APP_VERSION)
app.setWindowIcon(Constants.APP_ICON)

# Set the default size in case of error messages and wizards before the preferences were loaded
font = QtGui.QFontDatabase.systemFont(QtGui.QFontDatabase.GeneralFont)
font.setPointSize(11)
QtWidgets.QApplication.instance().setFont(font)

print("LAUNCING APP...")
print("GraphDonkey Version:", Constants.APP_VERSION_NAME, "(" + Constants.APP_VERSION + ")")

Expand Down
6 changes: 3 additions & 3 deletions main/MainWindow.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,9 @@ def __init__(self):
self.updateTitle()
self.setStatusBar(QtWidgets.QStatusBar())

# if len(Config.allKeys()) == 0:
wiz = WelcomeWizard()
wiz.exec_()
if len(Config.allKeys()) == 0:
wiz = WelcomeWizard()
wiz.exec_()

self.preferences = Preferences(self)
self.preferences.apply()
Expand Down
5 changes: 1 addition & 4 deletions main/Preferences.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ def rectify(self):
self.radio_ws_none.setChecked(True)
self.num_recents.setValue(int(self.preferences.value("recents", 5)))
self.font_interface.setCurrentFont(QtGui.QFont(self.preferences.value("font", defFont.family())))
self.num_font_interface.setValue(int(self.preferences.value("fontsize", 12)))
self.num_font_interface.setValue(int(self.preferences.value("fontsize", 11)))

# EDITOR
if True:
Expand Down Expand Up @@ -543,9 +543,6 @@ def applyEditor(self):
editor.setTextCursor(cursor)

def applyPlugins(self):
# TODO: Select the first plugin, BUT this gives issues on Windows:
# the font size changes (it feels as if Rich Text QLabels are not
# rendered correctly when invisible on Windows)
pll = self.pluginlist.findChildren(PluginButton)
if len(pll) > 0:
pll[0].click()
Expand Down
2 changes: 1 addition & 1 deletion main/extra/Constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
from main.extra.IOHandler import IOHandler

APP_NAME = "GraphDonkey"
APP_VERSION = "0.2.0"
APP_VERSION = "0.2.1"
APP_VERSION_NAME = "Jack-in-a-Box"
APP_ICON = QIcon(IOHandler.dir_icons("graphdonkey.svg"))

Expand Down
4 changes: 2 additions & 2 deletions main/plugins.py
Original file line number Diff line number Diff line change
Expand Up @@ -281,9 +281,9 @@ def __init__(self, plugin, update=False, parent=None):

def freeze(self):
"""Loads all requirements that are already installed."""
out = command(self.cmd + ["freeze"]).decode("utf-8").split("\n")
out = command(self.cmd + ["freeze"]).decode("utf-8").split(os.linesep)
if os.path.isdir(self.depfol):
out += command(self.cmd + ["freeze", "--path", self.depfol]).decode("utf-8").split("\n")
out += command(self.cmd + ["freeze", "--path", self.depfol]).decode("utf-8").split(os.linesep)
return set(out)

def reject(self):
Expand Down
2 changes: 1 addition & 1 deletion main/wizards/UpdateWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ def reph(bcnt, bsz, _):
name = member.filename.replace(baseName, "", 1)
if name == "": continue
loc = IOHandler.join(target, name)
if loc.endswith(os.sep):
if loc.endswith(os.sep) or loc[-1] == '/':
os.mkdir(loc)
else:
with open(loc, "wb") as outfile:
Expand Down
1 change: 1 addition & 0 deletions main/wizards/WelcomeWizard.py
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ def accept(self):
pli.exec_()

pluginloader.reload()
Config.setValue("plugin/enabled", None)

super(WelcomeWizard, self).accept()

Expand Down
1 change: 0 additions & 1 deletion text.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ Creating an rcc from a *.qrc file (example for tango icon set):
pyrcc5 -o tango.py -compress 9 tango.qrc

TODO LIST
[0.2.1] {Magical Update}
[0.2.2] {Universal Update}
- Features:
- Change case of selection (Uppercase to Lowercase and back again)
Expand Down
2 changes: 1 addition & 1 deletion wiki
Submodule wiki updated from 521732 to 063a84

0 comments on commit 8501b5e

Please sign in to comment.