Changeset - d6a729e3c31d
[Not reviewed]
default
0 1 0
Drew Perttula - 18 years ago 2007-06-15 16:51:26
drewp@bigasterisk.com
all windows appear on current desktop
1 file changed with 8 insertions and 1 deletions:
0 comments (0 inline, 0 general)
light9/uihelpers.py
Show inline comments
 
@@ -46,18 +46,25 @@ def toplevelat(name, existingtoplevel=No
 
        windowlocations[name]=f.read() # file has no newline
 
    except:
 
        # it's ok if there's no saved geometry
 
        pass
 

	
 
    if name in windowlocations:
 
        tl.geometry(windowlocations[name])
 
        tl.geometry(positionOnCurrentDesktop(windowlocations[name]))
 

	
 
    tl._toplevelat_funcid = tl.bind("<Configure>",lambda ev,tl=tl,name=name: toplevel_savegeometry(tl,name))
 

	
 
    return tl
 

	
 
def positionOnCurrentDesktop(xform, screenWidth=1920, screenHeight=1440):
 
    size, x, y = xform.split('+')
 
    x = int(x) % 1920
 
    y = int(y) % 1440
 
    return "%s+%s+%s" % (size, x, y)
 
    
 

	
 
def toggle_slider(s):
 
    if s.get() == 0:
 
        s.set(100)
 
    else:
 
        s.set(0)
 

	
0 comments (0 inline, 0 general)