From 43ec69520ee5a111594f9ccb5060586defa80f5c Mon Sep 17 00:00:00 2001 From: Gary Martin Date: Tue, 08 Sep 2009 13:40:39 +0000 Subject: Removed redundant ListsPalette code from widgets.py. --- diff --git a/widgets.py b/widgets.py index 0317ad0..67d2e46 100644 --- a/widgets.py +++ b/widgets.py @@ -227,52 +227,6 @@ class AbiButton(RadioToolButton): finally: self.handler_unblock(self._toggled_handler) -class ListsPalette(RadioPalette): - def __init__(self, abi): - RadioPalette.__init__(self) - - def append(icon_name, tooltip, do_abi_cb, on_abi_cb): - button = AbiButton(abi, 'style-name', do_abi_cb, on_abi_cb) - button.show() - button.props.icon_name = icon_name - button.props.group = group - RadioPalette.append(self, button, tooltip) - return button - - group = None - - group = append('list-none', _('Normal'), - lambda: - abi.set_style('Normal'), - lambda abi, style: - style not in ['Bullet List', - 'Dashed List', - 'Numbered List', - 'Lower Case List', - 'Upper Case List']) - - append('list-bullet', _('Bullet List'), - lambda: abi.set_style('Bullet List'), - lambda abi, style: style == 'Bullet List') - - append('list-dashed', _('Dashed List'), - lambda: abi.set_style('Dashed List'), - lambda abi, style: style == 'Dashed List') - - append('list-numbered', _('Numbered List'), - lambda: abi.set_style('Numbered List'), - lambda abi, style: style == 'Numbered List') - - append('list-lower-case', _('Lower Case List'), - lambda: abi.set_style('Lower Case List'), - lambda abi, style: style == 'Lower Case List') - - append('list-upper-case', _('Upper Case List'), - lambda: abi.set_style('Upper Case List'), - lambda abi, style: style == 'Upper Case List') - - self.show_all() - class ExportButton(ToolButton): _EXPORT_FORMATS = [{'mime_type' : 'application/rtf', 'title' : _('Rich Text (RTF)'), -- cgit v0.9.1