diff options
author | Andrés Ambrois <andresambrois@gmail.com> | 2010-05-23 12:02:33 (GMT) |
---|---|---|
committer | Michael Stone <michael@laptop.org> | 2010-06-24 21:03:40 (GMT) |
commit | ec4a5be19d04abde9c0d2088536f888f76c450fc (patch) | |
tree | 7eecc226ab301dc774828ed3030636a9fb75f047 | |
parent | e81e094803b2f896dc19280e2e3ab7df318e9aa5 (diff) |
Journaltoolbox: Add add_separator method for convenience.
Signed-off-by: Andrés Ambrois <andresambrois@gmail.com>
Signed-off-by: Michael Stone <michael@laptop.org>
-rw-r--r-- | main/src/jarabe/journal/journaltoolbox.py | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/main/src/jarabe/journal/journaltoolbox.py b/main/src/jarabe/journal/journaltoolbox.py index d98fe02..8e8b19a 100644 --- a/main/src/jarabe/journal/journaltoolbox.py +++ b/main/src/jarabe/journal/journaltoolbox.py @@ -153,6 +153,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) |