Upload files to 'project_manager'
This commit is contained in:
parent
e8ba524838
commit
da1411aa48
2 changed files with 39 additions and 7 deletions
|
@ -17,6 +17,7 @@ from settings import talk
|
|||
from project_manager import pm_project
|
||||
|
||||
from studio import analytics
|
||||
from studio import story
|
||||
from studio import studio_gtk
|
||||
|
||||
#UI modules
|
||||
|
@ -92,8 +93,24 @@ def layer(win):
|
|||
|
||||
def do():
|
||||
print("configure")
|
||||
GLib.timeout_add(1, studio_gtk.run, win )
|
||||
#GLib.timeout_add(1, studio_gtk.run, win )
|
||||
analytics.save(win.current["project"], win.projects[win.current["project"]])
|
||||
story.save(win.current["project"], story.get_legacy(win.current["project"]))
|
||||
|
||||
# Makinf the set folder
|
||||
try:
|
||||
os.mkdir(win.current["project"]+"/set/")
|
||||
except:
|
||||
pass
|
||||
|
||||
# Copy the project.data to set
|
||||
try:
|
||||
f = open(win.current["project"]+"/project.progress")
|
||||
t = open(win.current["project"]+"/set/project.progress", "w")
|
||||
t.write(f.read())
|
||||
t.close()
|
||||
except:
|
||||
pass
|
||||
|
||||
UI_elements.roundrect(layer, win,
|
||||
5,
|
||||
|
@ -263,6 +280,18 @@ def project_node(layer, win, x, y, project):
|
|||
except:
|
||||
pass
|
||||
|
||||
else:
|
||||
try:
|
||||
if project not in win.projects:
|
||||
win.projects[project] = analytics.load(project)
|
||||
|
||||
nameonly = win.projects[project]["name"]
|
||||
timefraction = win.projects[project]["timepassed"]
|
||||
projectfraction = win.projects[project]["fraction"]
|
||||
except:
|
||||
pass
|
||||
|
||||
|
||||
node.set_line_width(10)
|
||||
UI_elements.roundrect(node, win,
|
||||
x-5,
|
||||
|
@ -291,8 +320,8 @@ def project_node(layer, win, x, y, project):
|
|||
node.stroke()
|
||||
|
||||
def do():
|
||||
pm_project.load(project)
|
||||
Gtk.main_quit() # Here I might do some kind a setting later
|
||||
pm_project.load(project, win)
|
||||
#Gtk.main_quit() # Here I might do some kind a setting later
|
||||
|
||||
UI_elements.roundrect(node, win,
|
||||
x-5,
|
||||
|
|
|
@ -7,6 +7,8 @@ import subprocess
|
|||
from settings import settings
|
||||
from settings import talk
|
||||
|
||||
from studio import studio_gtk
|
||||
from gi.repository import GLib
|
||||
|
||||
def new(name):
|
||||
|
||||
|
@ -101,14 +103,14 @@ def scan():
|
|||
|
||||
return ret
|
||||
|
||||
def load(path):
|
||||
def load(path, win=False):
|
||||
|
||||
#first let's figure out if it's an old Blender-Organizer
|
||||
#or a new VCStudio project.
|
||||
|
||||
#if new
|
||||
if not is_legacy(path):
|
||||
print(" Not Yet Implemented VCStudio ")
|
||||
studio_gtk.run(path, win)
|
||||
|
||||
#old organizer
|
||||
else:
|
||||
|
@ -134,7 +136,8 @@ def load(path):
|
|||
else:
|
||||
subprocess.Popen(["sh", "/tmp/run_legacy_organizer.sh"])
|
||||
|
||||
|
||||
if win:
|
||||
win.destroy()
|
||||
|
||||
def is_legacy(project):
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue