112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
def update_paths(self):
r = {}
for btn, cmd in conf.specbuttons.items():
# replace "gtk." to "gtk-"
if re.match("^gtk\.\w+", btn, re.I):
btn = re.sub("[._]+", "-", btn).lower()
# not /path or gtk-
elif not re.match("^/|\./|gtk-", btn):
path = self.locate(btn)
if path:
btn = path
else:
log.WARN("Extra button icon '%s' could not be found" % btn)
r[btn] = cmd
conf.specbuttons = r
|
|
|
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
|
def update_paths(self):
r = {}
for btn, cmd in conf.specbuttons.items():
# replace "gtk." to "gtk-"
if re.match("^gtk\.\w+", btn, re.I):
btn = re.sub("[._]+", "-", btn).lower()
# not /path or gtk-
elif not re.match("^(/|\./|gtk-|\w:[\\\\/])", btn):
path = self.locate(btn)
if path:
btn = path
else:
log.WARN("Extra button icon '%s' could not be found" % btn)
r[btn] = cmd
conf.specbuttons = r
|