[beryl-commits] r2208 - trunk/beryl-settings-2
quinn at server.beryl-project.org
quinn at server.beryl-project.org
Mon Jan 1 11:45:51 CET 2007
Author: quinn
Date: 2007-01-01 10:45:51 +0000 (Mon, 01 Jan 2007)
New Revision: 2208
Modified:
trunk/beryl-settings-2/main.py
Log:
add show inactive plugins toggle
sort plugins
(both in bindings list)
Modified: trunk/beryl-settings-2/main.py
===================================================================
--- trunk/beryl-settings-2/main.py 2007-01-01 10:31:11 UTC (rev 2207)
+++ trunk/beryl-settings-2/main.py 2007-01-01 10:45:51 UTC (rev 2208)
@@ -87,12 +87,28 @@
gobject.TYPE_STRING, #Button binding
gobject.TYPE_BOOLEAN, #button enabled
gobject.TYPE_STRING, #plugin name
- gobject.TYPE_STRING #setting name
+ gobject.TYPE_STRING, #setting name
+ gobject.TYPE_BOOLEAN, #visibility
)
-def MakeBindingsList():
+def UpdateBindingsList(ShowHidden):
global GenStore
- for p in Ctx.Plugins:
+ GenStore.clear()
+ s=Ctx.Plugins
+ for p in range(0,len(s)):
+ if (s[p].Name=='_'):
+ nn=s[0]
+ s[0]=s[p]
+ s[p]=nn
+ for p in range(1,len(s)-1):
+ for q in range(p+1,len(s)):
+ if (s[p].ShortDesc>s[q].ShortDesc):
+ nn=s[p]
+ s[p]=s[q]
+ s[q]=nn
+ for p in s:
+ if (not (ShowHidden or Aps.Value.__contains__(p.Name) or p.Name=='_')):
+ continue
hasany=False
for m in p.Settings:
if (m.Type=='Binding' and (m.Restrictions[0] or m.Restrictions[1])):
@@ -127,12 +143,17 @@
mv1=m.Value[1]
GenStore.set(SIter,0,m.ShortDesc,1,mv0,2,m.Restrictions[0],
3,mv1,4,m.Restrictions[1],5,p.Name,6,m.Name)
+
+def hideshowclick(wid):
+ UpdateBindingsList(wid.props.active)
+
+def MakeBindingsList():
genview=gtk.TreeView(GenStore)
genview.insert_column_with_attributes(0,"Name",gtk.CellRendererText(),text=0)
- genview.insert_column_with_attributes(1,"Key",gtk.CellRendererText(),text=1,enabled=2)
- genview.insert_column_with_attributes(2,"Button",gtk.CellRendererText(),text=3,enabled=4)
+ genview.insert_column_with_attributes(1,"Key",gtk.CellRendererText(),text=1,editable=2)
+ genview.insert_column_with_attributes(2,"Button",gtk.CellRendererText(),text=3,editable=4)
cont=gtk.ScrolledWindow()
- cont.props.height_request=300
+ cont.props.height_request=250
cont.props.hscrollbar_policy=gtk.POLICY_NEVER
cont.add(genview)
return cont
@@ -387,7 +408,12 @@
for j in c.SubGroups:
if (j.Name == '__keymouse'):
hasany=True
- gvb.pack_start(MakeBindingsList())
+ hideshowall=gtk.CheckButton("Show Inactive Plugins")
+ hideshowall.props.active=False
+ UpdateBindingsList(False)
+ hideshowall.connect("clicked",hideshowclick)
+ gvb.pack_start(hideshowall,False,False)
+ gvb.pack_start(MakeBindingsList(),True,True)
continue
ommm=gvb
exp=None
More information about the commits
mailing list