소스 검색

remove: Draw-GUI btn

micha 11 달 전
부모
커밋
fb0c58b7c3
3개의 변경된 파일42개의 추가작업 그리고 9개의 파일을 삭제
  1. 28 2
      _LibreLightDesk.py
  2. 7 7
      tkgui/draw.py
  3. 7 0
      tksdl/fix.py

+ 28 - 2
_LibreLightDesk.py

@@ -1715,6 +1715,7 @@ class MASTER():
         
         self.setup_elem = {} # Elem_Container()
         self.setup_cmd  = ["SAVE\nSHOW","LOAD\nSHOW","NEW\nSHOW","SAVE\nSHOW AS","SAVE &\nRESTART","DRAW\nGUI","PRO\nMODE"]
+        self.setup_cmd  = ["SAVE\nSHOW","LOAD\nSHOW","NEW\nSHOW","SAVE\nSHOW AS","SAVE &\nRESTART","PRO\nMODE"]
 
         self.fx_main = Elem_Container()
         self.fx_main.commands =["REC-FX","FX OFF","\n"]
@@ -3062,10 +3063,10 @@ if __run_main:
     data.append({"text":"CONFIG"})
     data.append({"text":"SDL-MIDI"})
     data.append({"text":"CLOCK"})
+    data.append({"text":"RAY-DMX"})
     data.append({"text":"SDL-DMX"})
     data.append({"text":"SDL-VPU"})
-    data.append({"text":"RAY-DMX"})
-    data.append({"text":"---"})
+    data.append({"text":"SDL-OSZI"})
     data.append({"text":"---"})
     data.append({"text":"---"})
     data.append({"text":"- DEMO -"})
@@ -3165,6 +3166,31 @@ if __run_main:
     cls = sdl_config #: None #GUI_CONF
     cb_ok = None
 
+    c = window_create_sdl_buffer(args=args,cls=cls,data=data,cb_ok=cb_ok,gui=master,scroll=1)
+    window_manager.new(None,name,wcb=c)
+    if libwin.split_window_show(pos_list,_filter=name):
+        window_manager.top(name)
+
+    # =======================================================================
+    #python3 /opt/LibreLight/Xdesk/vpu/watchdog_vpu.py -single
+    name="SDL-OSZI"
+    def sdl_config():
+        cmd="python3 /opt/LibreLight/ASP/monitor/oszi_grid.py" 
+        print(cmd)
+
+        def xyz123(cmd):
+            os.system(cmd)
+        thread.start_new_thread(xyz123,(cmd,))
+        return [None,None,None]
+    args = {"title":name,"master":0,"width":W1,"height":H1,"left":L1,"top":TOP}
+    geo = libwin.split_window_position(pos_list,name)
+    if geo:
+        args.update(geo)
+
+    data = []
+    cls = sdl_config #: None #GUI_CONF
+    cb_ok = None
+
     c = window_create_sdl_buffer(args=args,cls=cls,data=data,cb_ok=cb_ok,gui=master,scroll=1)
     window_manager.new(None,name,wcb=c)
     if libwin.split_window_show(pos_list,_filter=name):

+ 7 - 7
tkgui/draw.py

@@ -611,11 +611,11 @@ def draw_setup(gui,xframe,data):
         ok = 0
         
         if comm == "SAVE\nSHOW":
-            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=4,height=2)
+            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=6,height=2)
             myTip = Hovertip(b,'Strg + S ')
             ok = 1
         elif comm == "LOAD\nSHOW" and pro_mode:
-            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=4,height=2)
+            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=6,height=2)
             ok = 1
         elif comm == "SAVE\nSHOW AS" and pro_mode:
             b = tk.Button(frame,bg="lightgrey", text=str(comm),width=6,height=2)
@@ -624,10 +624,10 @@ def draw_setup(gui,xframe,data):
             b = tk.Button(frame,bg="lightgrey", text=str(comm),width=6,height=2)
             ok = 1
         elif comm == "NEW\nSHOW" and pro_mode:
-            b = tk.Button(frame,bg="lightgreen", text=str(comm),width=5,height=2)
+            b = tk.Button(frame,bg="lightgreen", text=str(comm),width=6,height=2)
             ok = 1
         elif comm == "DRAW\nGUI" and pro_mode:
-            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=5,height=2)
+            b = tk.Button(frame,bg="lightgrey", text=str(comm),width=6,height=2)
             ok = 1
         elif comm == "PRO\nMODE":
             bg="lightgrey"
@@ -635,14 +635,14 @@ def draw_setup(gui,xframe,data):
             if pro_mode:
                 bg="green"
                 comm = "EASY\nMODE"
-            b = tk.Button(frame,bg=bg, text=str(comm),width=5,height=2)
+            b = tk.Button(frame,bg=bg, text=str(comm),width=6,height=2)
             ok = 1
 
         elif pro_mode:
-            b = tk.Button(frame,bg="grey", text=str(comm),width=4,height=2)
+            b = tk.Button(frame,bg="grey", text=str(comm),width=6,height=2)
             ok = 1
         else: #empty
-            b = tk.Button(frame,bg="grey", text="",width=5,height=2)
+            b = tk.Button(frame,bg="grey", text="",width=6,height=2)
 
         if comm not in gui.commands.elem:
             gui.setup_elem[comm] = b

+ 7 - 0
tksdl/fix.py

@@ -149,7 +149,14 @@ def read_dmx():
     return dmx
             
 def read_fix(dmx):
+    global mc
     y=mc.get("fix")#cmd)
+    if y is None:
+        print("==== "*10)
+        print("error -- read_fix(dmx) mc.get('fix') return",y)
+        print()
+        mc = memcache.Client(['127.0.0.1:11211'], debug=0)
+        return {}
     key=y.keys()
     key = list(key)
     key.sort()