Upload files to 'project_manager'

This commit is contained in:
Jeison Yehuda Amihud (Blender Dumbass) 2020-12-01 17:34:36 +00:00
parent c756d96f23
commit ae196afd98
4 changed files with 68 additions and 16 deletions

View file

@ -78,7 +78,8 @@ def run():
win.update = {"versions":{}}
win.projects = {}
if not settings.read("Username"):
settings.write("Username", "VCStudio-User")
# Cashed tables
win.color = UI_color.get_table()

View file

@ -17,6 +17,7 @@ from settings import talk
from project_manager import pm_project
from studio import analytics
from studio import studio_gtk
#UI modules
from UI import UI_elements
@ -91,7 +92,9 @@ def layer(win):
def do():
print("configure")
GLib.timeout_add(1, studio_gtk.run, win )
UI_elements.roundrect(layer, win,
5,
110,

View file

@ -90,6 +90,41 @@ def layer(win):
current_Y = 0 # The max scroll value
# Username
UI_elements.image(layer, win, "settings/themes/"\
+win.settings["Theme"]+"/icons/user.png",
win.current["w"]/2-240,
110 + current_Y + win.scroll["pm_settings"],
40,
40)
UI_elements.text(layer, win, "Username_setting",
win.current["w"]/2-190,
110 + current_Y + win.scroll["pm_settings"],
420,
40,
set_text=win.settings["Username"])
if win.text["Username_setting"]["text"] != win.settings["Username"]:
def do():
win.settings["Username"] = win.text["Username_setting"]["text"]
settings.write("Username", win.settings["Username"])
UI_elements.roundrect(layer, win,
win.current["w"]/2-240+430,
110 + current_Y + win.scroll["pm_settings"],
40,
40,
10,
button=do,
icon="ok",
tip=talk.text("checked"))
current_Y += 50
# Preparing lists.
if "settings_lists" not in win.current:
@ -116,24 +151,31 @@ def layer(win):
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(win.current["w"]/2-180,
current_Y + win.scroll["pm_settings"] + 140)
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(win.settings["Language"])
current_Y += 50
if win.current["settings_lists"]["languages_open"]:
for lang in win.current["settings_lists"]["languages"]:
if lang != win.settings["Language"]:
UI_color.set(layer, win, "button_active")
layer.move_to(win.current["w"]/2-227, 102 + current_Y + win.scroll["pm_settings"])
layer.line_to(win.current["w"]/2-227, 152 + current_Y + win.scroll["pm_settings"])
layer.stroke()
def do():
win.settings["Language"] = lang
settings.write("Language", lang)
win.current["settings_lists"]["languages_open"] = False
UI_elements.roundrect(layer, win,
win.current["w"]/2-200,
win.current["w"]/2-220,
110 + current_Y + win.scroll["pm_settings"],
410,
430,
40,
10,
button=do,
@ -143,17 +185,17 @@ def layer(win):
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(win.current["w"]/2-140,
current_Y + win.scroll["pm_settings"] + 140)
layer.move_to(win.current["w"]/2-150,
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(lang)
current_Y += 50
# BLUR
blur_ok = False
blur_ok = "unchecked"
if win.settings["Blur"]:
blur_ok = "ok"
blur_ok = "checked"
def do():
win.settings["Blur"] = not win.settings["Blur"]
@ -172,15 +214,15 @@ def layer(win):
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(win.current["w"]/2-180,
current_Y + win.scroll["pm_settings"] + 140)
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(talk.text("Blur"))
current_Y += 50
if win.settings["Blur"]:
ablur_ok = False
ablur_ok = "unchecked"
if win.settings["Auto_De-Blur"]:
ablur_ok = "ok"
ablur_ok = "checked"
def do():
win.settings["Auto_De-Blur"] = not win.settings["Auto_De-Blur"]
@ -199,7 +241,7 @@ def layer(win):
UI_color.set(layer, win, "text_normal")
layer.set_font_size(20)
layer.move_to(win.current["w"]/2-180,
current_Y + win.scroll["pm_settings"] + 140)
current_Y + win.scroll["pm_settings"] + 135)
layer.show_text(talk.text("Auto_De-Blur"))

View file

@ -181,9 +181,15 @@ def layer(win):
if is_open:
for filename in files:
UI_color.set(layer, win, "button_active")
layer.move_to(win.current["w"]/2-227, 102 + current_Y + win.scroll["pm_update"])
layer.line_to(win.current["w"]/2-227, 152 + current_Y + win.scroll["pm_update"])
layer.stroke()
UI_color.set(layer, win, "text_normal")
layer.set_font_size(15)
layer.move_to(win.current["w"]/2-180,
layer.move_to(win.current["w"]/2-210,
current_Y + win.scroll["pm_update"] + 140)
layer.show_text(str(filename))
@ -193,9 +199,9 @@ def layer(win):
os.system("xdg-open "+gitlink+filename)
UI_elements.roundrect(layer, win,
win.current["w"]/2-200,
win.current["w"]/2-220,
110 + current_Y + win.scroll["pm_update"],
410,
430,
40,
10,
button=do,