summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorracarr <racarr>2007-01-22 22:18:20 +0000
committerracarr <racarr>2007-01-22 22:18:20 +0000
commiteeca42aca54d61ef9af79a293be0a62c0e56cb6a (patch)
tree444aa7fa4278161904d5aab675295db46e264d52
parent7260a6c7a6b45686d954b405c40002d4772e8be4 (diff)
downloadberyl-settings-simple-eeca42aca54d61ef9af79a293be0a62c0e56cb6a.tar.gz
beryl-settings-simple-eeca42aca54d61ef9af79a293be0a62c0e56cb6a.tar.bz2
Revert 3001...don't have time to go through and fix things it breaks right now
-rwxr-xr-xsrc/beryl-settings-simple.in442
1 files changed, 221 insertions, 221 deletions
diff --git a/src/beryl-settings-simple.in b/src/beryl-settings-simple.in
index e38404d..a30e742 100755
--- a/src/beryl-settings-simple.in
+++ b/src/beryl-settings-simple.in
@@ -17,10 +17,10 @@
-import gobject, berylsettings, os, gettext, pygtk, gtk
+import gobject,berylsettings,os,gettext,pygtk,gtk
import gtk.gdk
-_ = gettext.gettext
-gdk = gtk.gdk
+_=gettext.gettext
+gdk=gtk.gdk
APP = 'beryl-settings-simple'
DIR = 'locale'
@@ -32,18 +32,18 @@ gettext.textdomain(APP)
_ = gettext.gettext
-DATADIR = "@prefix@/share"
-IMAGEDIR = "@prefix@/share/bsm--/"
-PREFIX = "@prefix@"
-VERSION = "0.2.0-svn"
+DATADIR="@prefix@/share"
+IMAGEDIR="@prefix@/share/bsm--/"
+PREFIX="@prefix@"
+VERSION="@VERSION@"
class SettingsManager:
- def destroy(self, widget, data = None):
+ def destroy(self,widget,data=None):
gtk.main_quit()
- def delete_event(self, widget, event, data = None):
+ def delete_event(self,widget,event,data=None):
return False
def setdefs(self):
@@ -51,149 +51,149 @@ class SettingsManager:
for setting in plugin.Settings:
setting.ResetToDefault()
- def scaleChanged(self, widget, data, event = None):
+ def scaleChanged(self,widget,data,event=None):
print "Setting value %s" % widget.value
- descriptions = [_("Slow and steady wins the race\n"), _("Easy on the eyes, but still fun\n"), _("Not too much, but a bit zippy\n"), _("For the special effects lover\n"), _("Hollywood got nothing\n")]
- pixmaps = [IMAGEDIR+"/blue_1.png", IMAGEDIR+"/green_2.png", IMAGEDIR+"/yellow_3.png", IMAGEDIR+"/orange_4.png", IMAGEDIR+"/red_5.png"]
- data[0].set_from_pixbuf(gdk.pixbuf_new_from_file_at_size(pixmaps[int(widget.value)-1], 32, 32))
- data[1].set_markup("<i>%s</i>"%(descriptions[int(widget.value)-1], ))
+ descriptions=[_("Slow and steady wins the race\n"),_("Easy on the eyes, but still fun\n"),_("Not too much, but a bit zippy\n"),_("For the special effects lover\n"),_("Hollywood got nothing\n")]
+ pixmaps=[IMAGEDIR+"/blue_1.png",IMAGEDIR+"/green_2.png",IMAGEDIR+"/yellow_3.png",IMAGEDIR+"/orange_4.png",IMAGEDIR+"/red_5.png"]
+ data[0].set_from_pixbuf(gdk.pixbuf_new_from_file_at_size(pixmaps[int(widget.value)-1],32,32))
+ data[1].set_markup("<i>%s</i>"%(descriptions[int(widget.value)-1],))
home = os.getenv("HOME")
- r = open(home+'/.beryl/scale', 'r')
- if(float(r.read()) == widget.value):
+ r=open(home+'/.beryl/scale','r')
+ if(float(r.read())==widget.value):
return
- f = open(home+'/.beryl/scale', 'w')
+ f=open(home+'/.beryl/scale','w')
f.write(str(widget.value))
f.close()
- if widget.value == 1:
+ if widget.value==1:
self.setdefs()
self.level1()
- if widget.value == 2:
+ if widget.value==2:
self.setdefs()
self.level2()
- if widget.value == 3:
+ if widget.value==3:
self.setdefs()
self.level3()
- if widget.value == 4:
+ if widget.value==4:
self.setdefs()
self.level4()
- if widget.value == 5:
+ if widget.value==5:
self.setdefs()
self.level5()
self.Ctx.Write()
berylsettings.send_reload()
def level1(self):
- self.Ctx.Import(IMAGEDIR+"/level1.Profile", True)
+ self.Ctx.Import(IMAGEDIR+"/level1.Profile",True)
def level2(self):
- self.Ctx.Import(IMAGEDIR+"/level2.Profile", True)
+ self.Ctx.Import(IMAGEDIR+"/level2.Profile",True)
def level3(self):
- self.Ctx.Import(IMAGEDIR+"/level3.Profile", True)
+ self.Ctx.Import(IMAGEDIR+"/level3.Profile",True)
def level4(self):
- self.Ctx.Import(IMAGEDIR+"/level4.Profile", True)
+ self.Ctx.Import(IMAGEDIR+"/level4.Profile",True)
def level5(self):
- self.Ctx.Import(IMAGEDIR+"/level5.Profile", True)
+ self.Ctx.Import(IMAGEDIR+"/level5.Profile",True)
- def updateBools(self, widget, data = None):
+ def updateBools(self,widget,data=None):
print "Toggle"
- if data == 0:
+ if data==0:
- self.opacify.Setting("____plugin_enabled").Value = not self.opacify.Setting("____plugin_enabled").Value
- if data == 1:
- self.annotate.Setting("____plugin_enabled").Value = not self.opacify.Setting("____plugin_enabled").Value
- if data == 2:
+ self.opacify.Setting("____plugin_enabled").Value=not self.opacify.Setting("____plugin_enabled").Value
+ if data==1:
+ self.annotate.Setting("____plugin_enabled").Value=not self.opacify.Setting("____plugin_enabled").Value
+ if data==2:
if widget.get_active():
- self.resize.Setting("resize_mode").Value = self.resize.Setting("resize_mode").Restrictions[0]
+ self.resize.Setting("resize_mode").Value=self.resize.Setting("resize_mode").Restrictions[0]
else:
- self.resize.Setting("resize_mode").Value = self.resize.Setting("resize_mode").Restrictions[3]
+ self.resize.Setting("resize_mode").Value=self.resize.Setting("resize_mode").Restrictions[3]
self.Ctx.Write()
berylsettings.send_reload()
- def numDesktops(self, widget, data = None):
- self.core.Setting("size").Value = (widget.get_value_as_int())
+ def numDesktops(self,widget,data=None):
+ self.core.Setting("size").Value=(widget.get_value_as_int())
self.Ctx.Write()
berylsettings.send_reload()
- def reloadImages(self, widget, data = None):
- if data == 0:
- et = self.cube.Setting("images_top").Value
- eb = self.cube.Setting("images_bottom").Value
- et[0] = widget.get_text()
- eb[0] = widget.get_text()
- self.cube.Setting("images_top").Value = et
- self.cube.Setting("images_bottom").Value = eb
- if data == 1:
+ def reloadImages(self,widget,data=None):
+ if data==0:
+ et=self.cube.Setting("images_top").Value
+ eb=self.cube.Setting("images_bottom").Value
+ et[0]=widget.get_text()
+ eb[0]=widget.get_text()
+ self.cube.Setting("images_top").Value=et
+ self.cube.Setting("images_bottom").Value=eb
+ if data==1:
if widget.get_text():
- self.cube.Setting("skydome").Value = True
+ self.cube.Setting("skydome").Value=True
- self.cube.Setting("skydome_image").Value = widget.get_text()
+ self.cube.Setting("skydome_image").Value=widget.get_text()
else:
- self.cube.Setting("skydome").Value = False
+ self.cube.Setting("skydome").Value=False
self.Ctx.Write()
berylsettings.send_reload()
- def reloadAnimation(self, animation, widget):
+ def reloadAnimation(self,animation,widget):
print animation
- animations = self.animation.Setting(animation).Restrictions
- self.animation.Setting(animation).Value = animations[widget.get_active()]
+ animations=self.animation.Setting(animation).Restrictions
+ self.animation.Setting(animation).Value=animations[widget.get_active()]
self.Ctx.Write()
berylsettings.send_reload()
- def reloadAnimations(self, widget, data = None):
+ def reloadAnimations(self,widget,data=None):
- if data == 0:
- self.reloadAnimation("create1_effect", widget)
- if data == 1:
- self.reloadAnimation("close1_effect", widget)
- if data == 2:
- self.reloadAnimation("minimize_effect", widget)
- if data == 3:
- self.reloadAnimation("unminimize_effect", widget)
+ if data==0:
+ self.reloadAnimation("create1_effect",widget)
+ if data==1:
+ self.reloadAnimation("close1_effect",widget)
+ if data==2:
+ self.reloadAnimation("minimize_effect",widget)
+ if data==3:
+ self.reloadAnimation("unminimize_effect",widget)
- def getSet(self, corner):
- actions = ("initiate", "initiate_app", "initiate_all", "initiate_current_head")
- i = 0
+ def getSet(self,corner):
+ actions=("initiate","initiate_app","initiate_all","initiate_current_head")
+ i=0
while i < 4:
- val = self.scale.Setting(actions[i]).Value
+ val=self.scale.Setting(actions[i]).Value
if val[3].count(corner) > 0:
return i+1
- i += 1
+ i+=1
return 0
- def clearCorners(self, corner):
- actions = ("No", "initiate", "initiate_app", "initiate_all", "initiate_current_head")
- i = 1
+ def clearCorners(self,corner):
+ actions=("No","initiate","initiate_app","initiate_all","initiate_current_head")
+ i=1
while i < 5:
- val = self.scale.Setting(actions[i]).Value
+ val=self.scale.Setting(actions[i]).Value
if val[3].count(corner) > 0:
- val = (val[0], val[1], val[2], [])
- self.scale.Setting(actions[i]).Value = val
- i += 1
+ val=(val[0],val[1],val[2],[])
+ self.scale.Setting(actions[i]).Value=val
+ i+=1
- def setCorner(self, corner, widget):
+ def setCorner(self,corner,widget):
print corner
action = widget.get_active()
- actions = ("No", "initiate", "initiate_app", "initiate_all", "initiate_current_head")
- set = self.scale.Setting(actions[action])
+ actions= ("No","initiate","initiate_app","initiate_all","initiate_current_head")
+ set=self.scale.Setting(actions[action])
self.clearCorners(corner)
- set.Value = (set.Value[0], set.Value[1], set.Value[2], [corner])
+ set.Value=(set.Value[0],set.Value[1],set.Value[2],[corner])
- def cornerSet(self, widget, data = None):
+ def cornerSet(self,widget,data=None):
scaleOpts = ("No Action", "Initiate ", "Current App", "All workspaces", "Current head" )
- actions = ("No", "initiate", "initiate_app", "initiate_all", "initiate_current_head")
+ actions= ("No","initiate","initiate_app","initiate_all","initiate_current_head")
action = widget.get_active()
- data -= 1
- corners = ("TopLeft", "TopRight", "BottomLeft", "BottomRight")
+ data-=1
+ corners=("TopLeft","TopRight","BottomLeft","BottomRight")
if action == 0:
print "clear"
self.clearCorners(corners[data])
@@ -202,145 +202,145 @@ class SettingsManager:
berylsettings.send_reload()
return;
- self.setCorner(corners[data], widget)
+ self.setCorner(corners[data],widget)
self.Ctx.Write()
berylsettings.send_reload()
- def draw_advanced(self, widget = None, data = None):
+ def draw_advanced(self,widget=None,data=None):
for widget in self.windowBox.get_children():
self.windowBox.remove(widget)
- topBox = gtk.HBox()
- anims = (_(" Create"), _(" Close"), _(" Minimize"), _("Restore "))
- animBox = gtk.VBox(spacing = 5)
+ topBox=gtk.HBox()
+ anims=(_(" Create"),_(" Close"),_(" Minimize"),_("Restore "))
+ animBox=gtk.VBox(spacing=5)
- self.windowBox.pack_start(topBox, False, False)
- topBox.pack_start(animBox, False, False)
+ self.windowBox.pack_start(topBox,False,False)
+ topBox.pack_start(animBox,False,False)
- animLabel = gtk.Label()
+ animLabel=gtk.Label()
animLabel.set_markup(_("<b>Animations:</b>"))
- animBox.pack_start(animLabel, False, False, padding = 10)
- animsettings = ("create1_effect", "close1_effect", "minimize_effect", "unminimize_effect")
- i = 0
+ animBox.pack_start(animLabel,False,False,padding=10)
+ animsettings=("create1_effect","close1_effect","minimize_effect","unminimize_effect")
+ i=0
for animation in anims:
- animOverride = gtk.HBox()
+ animOverride=gtk.HBox()
animOverride.show()
- animBox.pack_start(animOverride, False, False, padding = 3)
+ animBox.pack_start(animOverride,False,False,padding=3)
name = gtk.Label()
name.set_markup(animation)
name.show()
- animOverride.pack_start(name, False, False, padding = 10)
- combo = gtk.combo_box_new_text()
+ animOverride.pack_start(name,False,False,padding=10)
+ combo=gtk.combo_box_new_text()
for anim in self.animation.Setting(animsettings[i]).Restrictions:
combo.append_text(anim)
- combo.connect("changed", self.reloadAnimations, i)
+ combo.connect("changed",self.reloadAnimations,i)
combo.set_active(self.animation.Setting(animsettings[i]).Restrictions.index( self.animation.Setting(animsettings[i]).Value ))
- i += 1
+ i+=1
combo.show()
- animOverride.pack_start(combo, padding = 20)
- animicon = gtk.Image()
- animbuf = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/beryl-settings-section-animation.svg", 80, 80)
+ animOverride.pack_start(combo,padding=20)
+ animicon=gtk.Image()
+ animbuf=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/beryl-settings-section-animation.svg",80,80)
animicon.set_from_pixbuf(animbuf)
animicon.show()
- vsep = gtk.VSeparator()
+ vsep=gtk.VSeparator()
vsep.show()
- animBox.pack_start(animicon, False, False)
+ animBox.pack_start(animicon,False,False)
- topBox.pack_start(vsep, False, False, padding = 10)
+ topBox.pack_start(vsep,False,False,padding=10)
- cubeBox = gtk.VBox(spacing = 5)
+ cubeBox=gtk.VBox(spacing=5)
- topBox.pack_start(cubeBox, False, False)
+ topBox.pack_start(cubeBox,False,False)
- cubeLabel = gtk.Label()
+ cubeLabel=gtk.Label()
cubeLabel.set_markup("<b>Desktop Cube:</b>")
cubeLabel.show()
- cubeBox.pack_start(cubeLabel, False, False, padding = 10)
- i = 0
- for n in (_("Cap Image "), _("Skydome Image")):
- settingBox = gtk.HBox()
+ cubeBox.pack_start(cubeLabel,False,False,padding=10)
+ i=0
+ for n in (_("Cap Image "),_("Skydome Image")):
+ settingBox=gtk.HBox()
settingBox.show()
- cubeBox.pack_start(settingBox, False, False, padding = 3)
- name = gtk.Label()
+ cubeBox.pack_start(settingBox,False,False,padding=3)
+ name=gtk.Label()
name.set_markup(n)
name.show()
- settingBox.pack_start(name, False, False, padding = 10)
- entry = gtk.Entry()
+ settingBox.pack_start(name,False,False,padding=10)
+ entry=gtk.Entry()
entry.show()
- entry.connect("changed", self.reloadImages, i)
- settingBox.pack_start(entry, False, False, padding = 20)
- if i == 0:
+ entry.connect("changed",self.reloadImages,i)
+ settingBox.pack_start(entry,False,False,padding=20)
+ if i==0:
entry.set_text(self.cube.Setting("images_top").Value[0])
- if i == 1:
+ if i==1:
if self.cube.Setting("skydome").Value:
entry.set_text(self.cube.Setting("skydome_image").Value)
- i += 1
+ i+=1
- spin = gtk.SpinButton(gtk.Adjustment(value = 1, lower = 1, upper = 32, step_incr = 1, page_incr = 4), 1, 0)
+ spin=gtk.SpinButton(gtk.Adjustment(value=1,lower=1,upper=32,step_incr=1,page_incr=4),1,0)
spin.show()
- spin.connect("changed", self.numDesktops, None)
- settingBox = gtk.HBox()
+ spin.connect("changed",self.numDesktops,None)
+ settingBox=gtk.HBox()
settingBox.show()
- cubeBox.pack_start(settingBox, False, False, padding = 3)
- name = gtk.Label()
+ cubeBox.pack_start(settingBox,False,False,padding=3)
+ name=gtk.Label()
name.set_markup(_("Number of desktops "))
name.show()
- settingBox.pack_start(name, False, False, padding = 10)
- settingBox.pack_start(spin, False, False)
+ settingBox.pack_start(name,False,False,padding=10)
+ settingBox.pack_start(spin,False,False)
- cubeicon = gtk.Image()
- cubebuf = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/beryl-settings-section-cube.svg", 80, 80)
+ cubeicon=gtk.Image()
+ cubebuf=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/beryl-settings-section-cube.svg",80,80)
cubeicon.set_from_pixbuf(cubebuf)
cubeicon.show()
- cubeBox.pack_start(cubeicon, False, False, padding = 42)
+ cubeBox.pack_start(cubeicon,False,False,padding=42)
- hsep = gtk.HSeparator()
+ hsep=gtk.HSeparator()
hsep.show()
- bottomBox = gtk.HBox()
+ bottomBox=gtk.HBox()
self.windowBox.pack_start(hsep)
- self.windowBox.pack_start(bottomBox, False, False)
+ self.windowBox.pack_start(bottomBox,False,False)
- i = 0
- for checkbox in (_("Opacify"), _("Draw on screen"), _("Classic resize")):
- check = gtk.CheckButton(checkbox)
+ i=0
+ for checkbox in (_("Opacify"),_("Draw on screen"),_("Classic resize")):
+ check=gtk.CheckButton(checkbox)
check.show()
- check.connect("clicked", self.updateBools, i)
- bottomBox.pack_start(check, False, False, padding = 35)
- if i == 0:
+ check.connect("clicked",self.updateBools,i)
+ bottomBox.pack_start(check,False,False,padding=35)
+ if i==0:
check.set_active(self.opacify.Setting("____plugin_enabled").Value)
- if i == 1:
+ if i==1:
check.set_active(self.annotate.Setting("____plugin_enabled").Value)
- if i == 2:
- check.set_active(self.resize.Setting("resize_mode").Value == "Normal")
- i += 1
+ if i==2:
+ check.set_active(self.resize.Setting("resize_mode").Value=="Normal")
+ i+=1
- buttonBox = gtk.VBox()
+ buttonBox=gtk.VBox()
buttonBox.show()
- buttonImage = gtk.Image()
- buttonPix = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/display.svg", 30, 30)
+ buttonImage=gtk.Image()
+ buttonPix=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/display.svg",30,30)
buttonImage.set_from_pixbuf(buttonPix)
buttonImage.show()
- l = gtk.Label()
- l.set_markup(_("<b>Main</b>"))
+ l=gtk.Label()
+ l.set_markup(_(" <b>Main</b> "))
l.show()
- buttonBox.pack_start(buttonImage, False, False)
- buttonBox.pack_start(l, False, False)
+ buttonBox.pack_start(buttonImage,False,False)
+ buttonBox.pack_start(l,False,False)
spin.set_value ( self.core.Setting("size").Value )
- buttonEvent = gtk.EventBox()
+ buttonEvent=gtk.EventBox()
buttonEvent.add(buttonBox)
@@ -348,7 +348,7 @@ class SettingsManager:
buttonEvent.connect("button_press_event", self.show_basic)
- bottomBox.pack_end(buttonEvent, False, False, padding = 5)
+ bottomBox.pack_end(buttonEvent,False,False,padding=5)
self.window.add(self.windowBox)
self.windowBox.show()
bottomBox.show()
@@ -356,12 +356,12 @@ class SettingsManager:
cubeBox.show()
topBox.show()
animLabel.show()
- def show_basic(self, widget = None, data = None):
+ def show_basic(self,widget=None,data=None):
home = os.getenv("HOME")
for widget in self.windowBox.get_children():
self.windowBox.remove(widget)
effectBox = gtk.VBox()
- self.windowBox.pack_start(effectBox, False, False)
+ self.windowBox.pack_start(effectBox,False,False)
effectLabelBox = gtk.HBox()
@@ -370,142 +370,142 @@ class SettingsManager:
el = gtk.Label()
el.set_markup(_("<b>Effects level</b>"))
- effectLabelBox.pack_start(el, False, False)
- elimg = gtk.Image()
- elimgbuf = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/list-add.svg", 32, 32)
+ effectLabelBox.pack_start(el,False,False)
+ elimg=gtk.Image()
+ elimgbuf=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/list-add.svg",32,32)
elimg.set_from_pixbuf(elimgbuf)
- h = gtk.HSeparator()
+ h=gtk.HSeparator()
h.show()
- effectLabelBox.pack_start(h, True, True, padding = 10)
- effectLabelBox.pack_end(elimg, False, False)
+ effectLabelBox.pack_start(h,True,True,padding=10)
+ effectLabelBox.pack_end(elimg,False,False)
- effectBox.pack_start(effectLabelBox, False, False)
+ effectBox.pack_start(effectLabelBox,False,False)
- adj = gtk.Adjustment(value = 1, lower = 1, upper = 5, step_incr = 1)
+ adj=gtk.Adjustment(value=1,lower=1,upper=5,step_incr=1)
effectScale = gtk.HScale(adj)
effectScale.set_digits(0)
effectScaleLabel = gtk.Label()
try:
home = os.getenv("HOME")
- f = open(home+'/.beryl/scale', 'r')
- val = (f.read())
+ f=open(home+'/.beryl/scale','r')
+ val=(f.read())
adj.set_value(float(val))
except: pass
- self.scaleChanged(adj, (elimg, effectScaleLabel))
+ self.scaleChanged(adj,(elimg,effectScaleLabel))
- f = open(home+'/.beryl/scale', 'r')
- val = (f.read())
+ f=open(home+'/.beryl/scale','r')
+ val=(f.read())
adj.set_value(float(val))
- adj.connect("value_changed", self.scaleChanged, (elimg, effectScaleLabel))
+ adj.connect("value_changed",self.scaleChanged,(elimg,effectScaleLabel))
- effectBox.pack_start(effectScale, False, False)
- effectBox.pack_start(effectScaleLabel, False, False)
+ effectBox.pack_start(effectScale,False,False)
+ effectBox.pack_start(effectScaleLabel,False,False)
- hotcornersBox = gtk.VBox()
+ hotcornersBox=gtk.VBox()
- hcLabel = gtk.Label()
+ hcLabel=gtk.Label()
hcLabel.set_markup(_("<b>Hotcorners</b>"))
hcLabel.show()
- hotcornersBox.pack_start(hcLabel, False, False, padding = 5)
+ hotcornersBox.pack_start(hcLabel,False,False,padding=5)
- self.windowBox.pack_start(hotcornersBox, False, False)
+ self.windowBox.pack_start(hotcornersBox,False,False)
scaleOpts = (_("No Action"), _("Initiate "), _("Current App"), _("All workspaces"), _("Current head") )
upperHotcorners = gtk.HBox()
- combo1 = gtk.combo_box_new_text()
+ combo1=gtk.combo_box_new_text()
for scale in scaleOpts:
combo1.append_text(scale)
- combo1.connect("changed", self.cornerSet, 1)
- combo2 = gtk.combo_box_new_text()
+ combo1.connect("changed",self.cornerSet,1)
+ combo2=gtk.combo_box_new_text()
for scale in scaleOpts:
combo2.append_text(scale)
combo1.show()
combo2.show()
- combo2.connect("changed", self.cornerSet, 2)
- upperHotcorners.pack_start(combo1, False, False, padding = 20)
- upperHotcorners.pack_end(combo2, False, False, padding = 20)
+ combo2.connect("changed",self.cornerSet,2)
+ upperHotcorners.pack_start(combo1,False,False,padding=20)
+ upperHotcorners.pack_end(combo2,False,False,padding=20)
- hotcornersBox.pack_start(upperHotcorners, False, False)
+ hotcornersBox.pack_start(upperHotcorners,False,False)
- imageHotcornersBox = gtk.HBox()
+ imageHotcornersBox=gtk.HBox()
- hotcornerImage = gtk.Image()
- hotcornerPix = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/hotcorners_racarr.svg", 130, 130)
+ hotcornerImage=gtk.Image()
+ hotcornerPix=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/hotcorners_racarr.svg",130,130)
hotcornerImage.set_from_pixbuf(hotcornerPix)
- imageHotcornersBox.pack_start(hotcornerImage, False, False, padding = 230)
+ imageHotcornersBox.pack_start(hotcornerImage,False,False,padding=230)
- hotcornersBox.pack_start(imageHotcornersBox, False, False, padding = 10)
+ hotcornersBox.pack_start(imageHotcornersBox,False,False,padding=10)
lowerHotcorners = gtk.HBox()
- lcombo1 = gtk.combo_box_new_text()
- lcombo2 = gtk.combo_box_new_text()
+ lcombo1=gtk.combo_box_new_text()
+ lcombo2=gtk.combo_box_new_text()
lcombo1.show()
lcombo2.show()
- lcombo1.connect("changed", self.cornerSet, 3)
- lcombo2.connect("changed", self.cornerSet, 4)
+ lcombo1.connect("changed",self.cornerSet,3)
+ lcombo2.connect("changed",self.cornerSet,4)
for scale in scaleOpts:
lcombo1.append_text(scale)
lcombo2.append_text(scale)
- lowerHotcorners.pack_start(lcombo1, False, False, padding = 20)
- lowerHotcorners.pack_end(lcombo2, False, False, padding = 20)
+ lowerHotcorners.pack_start(lcombo1,False,False,padding=20)
+ lowerHotcorners.pack_end(lcombo2,False,False,padding=20)
- hotcornersBox.pack_start(lowerHotcorners, False, False)
+ hotcornersBox.pack_start(lowerHotcorners,False,False)
- buttonBox = gtk.HBox()
+ buttonBox=gtk.HBox()
combo1.set_active(self.getSet('TopLeft'))
combo2.set_active(self.getSet('TopRight'))
lcombo1.set_active(self.getSet('BottomLeft'))
lcombo2.set_active(self.getSet('BottomRight'))
- buttonSmallBox = gtk.VBox()
- buttonImage = gtk.Image()
- buttonPix = gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/applications-development.svg", 30, 30)
+ buttonSmallBox=gtk.VBox()
+ buttonImage=gtk.Image()
+ buttonPix=gdk.pixbuf_new_from_file_at_size(IMAGEDIR+"/applications-development.svg",30,30)
buttonImage.set_from_pixbuf(buttonPix)
- buttonSmallBox.pack_start(buttonImage, False, False)
+ buttonSmallBox.pack_start(buttonImage,False,False)
- buttonLabel = gtk.Label()
+ buttonLabel=gtk.Label()
buttonLabel.set_markup(_(" <b>Advanced</b> "))
- buttonEventBox = gtk.EventBox()
+ buttonEventBox=gtk.EventBox()
- buttonSmallBox.pack_start(buttonLabel, False, False)
+ buttonSmallBox.pack_start(buttonLabel,False,False)
- hs = gtk.HSeparator()
+ hs=gtk.HSeparator()
hs.show()
- buttonBox.pack_start(hs, True, True, padding = 10)
+ buttonBox.pack_start(hs,True,True,padding=10)
buttonEventBox.add(buttonSmallBox)
buttonEventBox.connect("button_press_event", self.draw_advanced)
buttonEventBox.show()
- buttonBox.pack_end(buttonEventBox, False, False)
+ buttonBox.pack_end(buttonEventBox,False,False)
- self.windowBox.pack_start(buttonBox, False, False, padding = 5)
+ self.windowBox.pack_start(buttonBox,False,False,padding=5)
self.windowBox.show()
- toshow = (buttonLabel, buttonBox, effectBox, buttonImage, buttonSmallBox, lowerHotcorners, elimg, imageHotcornersBox, hotcornerImage, upperHotcorners, hotcornersBox, el, self.window, effectLabelBox, effectScale, effectScaleLabel, self.windowBox)
+ toshow=(buttonLabel,buttonBox,effectBox,buttonImage,buttonSmallBox,lowerHotcorners,elimg,imageHotcornersBox,hotcornerImage,upperHotcorners,hotcornersBox,el,self.window,effectLabelBox,effectScale,effectScaleLabel,self.windowBox)
for widg in toshow:
widg.show()
def __init__(self):
- home = os.getenv("HOME")
+ home=os.getenv("HOME")
if not os.path.exists(home+'/.beryl/scale'):
- f = open(home+'/.beryl/scale', 'w')
+ f=open(home+'/.beryl/scale','w')
f.write('3.0')
f.close()
- self.window = gtk.Window(gtk.WINDOW_TOPLEVEL)
- self.window.connect("delete_event", self.delete_event)
- self.window.connect("destroy", self.destroy)
+ self.window=gtk.Window(gtk.WINDOW_TOPLEVEL)
+ self.window.connect("delete_event",self.delete_event)
+ self.window.connect("destroy",self.destroy)
self.window.set_border_width(0)
self.window.set_title("BSM--")
self.window.set_icon (gdk.pixbuf_new_from_file(IMAGEDIR+"beryl-settings.svg"))
@@ -513,26 +513,26 @@ class SettingsManager:
self.windowBox = gtk.VBox()
- self.Ctx = berylsettings.Context()
+ self.Ctx=berylsettings.Context()
self.Ctx.Read()
try:
- self.annotate = self.Ctx.Plugin("annotate")
- self.resize = self.Ctx.Plugin("resize")
- self.scale = self.Ctx.Plugin("scale")
- self.animation = self.Ctx.Plugin("animation")
- self.opacify = self.Ctx.Plugin("opacify")
- self.cube = self.Ctx.Plugin("cube")
- self.core = self.Ctx.Plugin("_")
+ self.annotate=self.Ctx.Plugin("annotate")
+ self.resize=self.Ctx.Plugin("resize")
+ self.scale=self.Ctx.Plugin("scale")
+ self.animation=self.Ctx.Plugin("animation")
+ self.opacify=self.Ctx.Plugin("opacify")
+ self.cube=self.Ctx.Plugin("cube")
+ self.core=self.Ctx.Plugin("_")
except:
print "Couldn't load plugins"
self.window.add(self.windowBox)
self.show_basic()
- self.window.set_size_request(self.window.get_size()[0]+10, self.window.get_size()[1]+100)
+ self.window.set_size_request(self.window.get_size()[0]+10,self.window.get_size()[1]+100)
print self.window.get_size()
def main(self):
gtk.main()
-if __name__ == "__main__":
+if __name__=="__main__":
settings = SettingsManager()
settings.main()