Implementing Error Catching System

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2021-05-10 19:54:49 +00:00
parent 932e44e9c6
commit f153edc9d5
2 changed files with 156 additions and 146 deletions

View file

@ -26,6 +26,9 @@ from project_manager import update_reader
from project_manager import pm_installUpdatesLayer
from project_manager import pm_settingsLayer
from troubleshooter import error_notify
# UI modules
from UI import UI_testing
from UI import UI_color
@ -146,6 +149,8 @@ def pmdrawing(pmdrawing, main_layer, win):
# be used in such an application. But to hell with it. I did the same on the
# Blender-Organizer altho with way less cairo. And it works well enought.
try:
# FPS counter
win.fFPS = datetime.datetime.now()
win.tFPS = win.fFPS - win.sFPS
@ -293,6 +298,10 @@ def pmdrawing(pmdrawing, main_layer, win):
# Refreshing the frame automatically
pmdrawing.queue_draw()
except:
Gtk.main_quit()
error_notify.show()
# This program will have things like mouse and keyboard input. And this setup
@ -336,6 +345,7 @@ def key_press(widget, event, win):
win.current["keys"].append(event.keyval)
win.current["key_letter"] = event.string
def key_release(widget, event, win):
try:
win.current["keys"].remove(event.keyval)

View file

@ -143,7 +143,7 @@ def layer(win):
def after(win, var):
pass
studio_dialogs.help(win, "help", after, SEARCH=talk.text("readme"))
studio_dialogs.help(win, "help", after, SEARCH=talk.text("documentation_project_manager"))
UI_elements.roundrect(layer, win,
5,