[Sugar-devel] [PATCH v1 03/10] Journaltoolbox: Add add_separator method for convenience.
Andrés Ambrois
andresambrois at gmail.com
Sun May 23 08:02:33 EDT 2010
Signed-off-by: Andrés Ambrois <andresambrois at gmail.com>
---
src/jarabe/journal/journaltoolbox.py | 11 +++++++++++
1 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/src/jarabe/journal/journaltoolbox.py b/src/jarabe/journal/journaltoolbox.py
index 61671bc..7466461 100644
--- a/src/jarabe/journal/journaltoolbox.py
+++ b/src/jarabe/journal/journaltoolbox.py
@@ -154,6 +154,17 @@ class SearchToolbar(gtk.Toolbar):
with_search.connect('changed', self._combo_changed_cb)
return with_search
+ def _add_separator(self, expand=False):
+ separator = gtk.SeparatorToolItem()
+ separator.props.draw = False
+ if expand:
+ separator.set_expand(True)
+ else:
+ separator.set_size_request(style.GRID_CELL_SIZE,
+ style.GRID_CELL_SIZE)
+ self.insert(separator, -1)
+ separator.show()
+
def _add_widget(self, widget, expand=False):
tool_item = gtk.ToolItem()
tool_item.set_expand(expand)
--
1.6.3.3
More information about the Sugar-devel
mailing list