| 1 | #!/usr/bin/env python |
|---|
| 2 | # -*- coding: utf-8 -*- |
|---|
| 3 | # |
|---|
| 4 | # Copyright (C) 2005-2006 Insecure.Com LLC. |
|---|
| 5 | # Copyright (C) 2007-2008 Adriano Monteiro Marques |
|---|
| 6 | # |
|---|
| 7 | # Author: Adriano Monteiro Marques <adriano@umitproject.org> |
|---|
| 8 | # Cleber Rodrigues <cleber.gnu@gmail.com> |
|---|
| 9 | # |
|---|
| 10 | # This library is free software; you can redistribute it and/or modify |
|---|
| 11 | # it under the terms of the GNU Lesser General Public License as published |
|---|
| 12 | # by the Free Software Foundation; either version 2.1 of the License, or |
|---|
| 13 | # (at your option) any later version. |
|---|
| 14 | # |
|---|
| 15 | # This library is distributed in the hope that it will be useful, but |
|---|
| 16 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
|---|
| 17 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
|---|
| 18 | # License for more details. |
|---|
| 19 | # |
|---|
| 20 | # You should have received a copy of the GNU Lesser General Public License |
|---|
| 21 | # along with this library; if not, write to the Free Software Foundation, |
|---|
| 22 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 23 | |
|---|
| 24 | """ |
|---|
| 25 | higwidgets/higexpanders.py |
|---|
| 26 | |
|---|
| 27 | expanders related classes |
|---|
| 28 | """ |
|---|
| 29 | |
|---|
| 30 | __all__ = ['HIGExpander'] |
|---|
| 31 | |
|---|
| 32 | import gtk |
|---|
| 33 | |
|---|
| 34 | from higwidgets.higboxes import HIGHBox, hig_box_space_holder |
|---|
| 35 | |
|---|
| 36 | class HIGExpander(gtk.Expander): |
|---|
| 37 | def __init__(self, label): |
|---|
| 38 | gtk.Expander.__init__(self) |
|---|
| 39 | |
|---|
| 40 | self.set_use_markup(True) |
|---|
| 41 | self.set_label(label) |
|---|
| 42 | |
|---|
| 43 | self.hbox = HIGHBox() |
|---|
| 44 | self.hbox.set_border_width(5) |
|---|
| 45 | self.hbox._pack_noexpand_nofill(hig_box_space_holder()) |
|---|
| 46 | |
|---|
| 47 | self.add(self.hbox) |
|---|
| 48 | |
|---|
| 49 | def get_container(self): |
|---|
| 50 | return self.hbox |
|---|