Skip to content

Instantly share code, notes, and snippets.

@averrin
Created July 8, 2011 13:38
Show Gist options
  • Save averrin/1071843 to your computer and use it in GitHub Desktop.
Save averrin/1071843 to your computer and use it in GitHub Desktop.
Custom panel buttons
try:
import config
buttons=config.Config(file(os.path.expanduser('~/.outwiker/panel.cfg'))).buttons
for btn in buttons:
self._addTool (self.pageToolsMenu,
btn.id,
lambda event: self.codeEditor.turnText (btn.prefix, btn.postfix),
_(btn.hint1),
_(btn.hint2),
os.path.join (self.imagesDir, btn.icon))
except:
pass
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment