diff options
author | Marc Maurer <uwog@uwog.net> | 2007-03-01 22:29:14 (GMT) |
---|---|---|
committer | Marc Maurer <uwog@uwog.net> | 2007-03-01 22:29:14 (GMT) |
commit | 31db38c1e23eda5cae3dcf5cf62c85988ff26beb (patch) | |
tree | 460e0bf2afbd70366560ec24b3837c433b4ad948 /toolbar.py | |
parent | 0feb85dae279dea37b5c443cc29f59173e215fe9 (diff) |
Initial table support widget
Diffstat (limited to 'toolbar.py')
-rw-r--r-- | toolbar.py | 16 |
1 files changed, 16 insertions, 0 deletions
@@ -18,6 +18,8 @@ import logging import gtk import pango +import abiword +import hippo from sugar.graphics.toolbar import Toolbar from sugar.graphics.iconbutton import IconButton @@ -79,6 +81,17 @@ class AbiToolbar(): self._abiword_canvas.connect("right-align", self._isRightAlign_cb) toolbar.append(self._align_right) + self._table = abiword.TableCreator() + self._table.set_labels("Table", "Cancel") + self._table.show() + #self._tableCreate.label().hide() + + tableContainer = hippo.CanvasWidget() + tableContainer.props.widget = self._table; + self._table_id = self._table.connect("selected", self._table_cb) + #self._table_id = self._abiword_canvas.connect("table-state", self._tableState) + toolbar.append(tableContainer) + # def _insert_separator(self): # separator = gtk.SeparatorToolItem() # separator.set_draw(True) @@ -148,3 +161,6 @@ class AbiToolbar(): def _isRightAlign_cb(self, abi, b): print "isRightAlign",b # self.setToggleButtonState(self._align_right,b,self._align_right_id) + + def _table_cb(self, abi, rows, cols): + self._abiword_canvas.insert_table(rows,cols) |