mirror of https://github.com/0intro/wmii
Fix some pygmi bugs.
This commit is contained in:
parent
e31731e8bc
commit
cee2e686db
|
@ -35,6 +35,11 @@ class Ctl(object):
|
||||||
ctl_types = {}
|
ctl_types = {}
|
||||||
ctl_hasid = False
|
ctl_hasid = False
|
||||||
|
|
||||||
|
def __eq__(self, other):
|
||||||
|
if self.ctl_hasid and isinstance(other, Ctl) and other.ctl_hasid:
|
||||||
|
return self.id == other.id
|
||||||
|
return False
|
||||||
|
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.cache = {}
|
self.cache = {}
|
||||||
|
|
||||||
|
@ -126,6 +131,8 @@ class Dir(Ctl):
|
||||||
object.
|
object.
|
||||||
"""
|
"""
|
||||||
super(Dir, self).__init__()
|
super(Dir, self).__init__()
|
||||||
|
if isinstance(id, Dir):
|
||||||
|
id = id.id
|
||||||
if id != 'sel':
|
if id != 'sel':
|
||||||
self._id = id
|
self._id = id
|
||||||
|
|
||||||
|
@ -358,11 +365,11 @@ class Tag(Dir):
|
||||||
for l in client.readlines('%s/index' % self.path)
|
for l in client.readlines('%s/index' % self.path)
|
||||||
if l]:
|
if l]:
|
||||||
if l[0] == '#':
|
if l[0] == '#':
|
||||||
if l[1] == '~':
|
m = re.match(r'(?:(\d+):)?(\d+|~)', l[1])
|
||||||
area = Area(tag=self, ord=l[1], width=l[2], height=l[3],
|
if m.group(2) == '~':
|
||||||
frames=[])
|
area = Area(tag=self, screen=m.group(1), ord=l[1], width=l[2],
|
||||||
|
height=l[3], frames=[])
|
||||||
else:
|
else:
|
||||||
m = re.match(l[1], '(?:(\d+):)?(\d+)')
|
|
||||||
area = Area(tag=self, screen=m.group(1) or 0,
|
area = Area(tag=self, screen=m.group(1) or 0,
|
||||||
ord=m.group(2), offset=l[2], width=l[3],
|
ord=m.group(2), offset=l[2], width=l[3],
|
||||||
frames=[])
|
frames=[])
|
||||||
|
|
|
@ -297,7 +297,7 @@ Actions.rehash()
|
||||||
if not os.environ.get('WMII_NOPLUGINS', ''):
|
if not os.environ.get('WMII_NOPLUGINS', ''):
|
||||||
dirs = filter(curry(os.access, _, os.R_OK),
|
dirs = filter(curry(os.access, _, os.R_OK),
|
||||||
('%s/plugins' % dir for dir in confpath))
|
('%s/plugins' % dir for dir in confpath))
|
||||||
files = filter(re.compile(r'\.py$').match,
|
files = filter(re.compile(r'\.py$').search,
|
||||||
reduce(operator.add, map(os.listdir, dirs), []))
|
reduce(operator.add, map(os.listdir, dirs), []))
|
||||||
for f in ['wmiirc_local'] + ['plugins.%s' % file[:-3] for file in files]:
|
for f in ['wmiirc_local'] + ['plugins.%s' % file[:-3] for file in files]:
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in New Issue