| [1104] | 1 | #!/usr/bin/env python |
|---|
| 2 | # -*- coding: utf-8 -*- |
|---|
| 3 | # |
|---|
| [2975] | 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> |
|---|
| [1104] | 8 | # Cleber Rodrigues <cleber.gnu@gmail.com> |
|---|
| 9 | # |
|---|
| 10 | # This program is free software; you can redistribute it and/or modify |
|---|
| 11 | # it under the terms of the GNU General Public License as published by |
|---|
| 12 | # the Free Software Foundation; either version 2 of the License, or |
|---|
| 13 | # (at your option) any later version. |
|---|
| 14 | # |
|---|
| 15 | # This program is distributed in the hope that it will be useful, |
|---|
| 16 | # but WITHOUT ANY WARRANTY; without even the implied warranty of |
|---|
| 17 | # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
|---|
| 18 | # GNU General Public License for more details. |
|---|
| 19 | # |
|---|
| 20 | # You should have received a copy of the GNU General Public License |
|---|
| 21 | # along with this program; if not, write to the Free Software |
|---|
| 22 | # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
|---|
| [433] | 23 | """ |
|---|
| 24 | higwidgets/higprogressbars.py |
|---|
| 25 | |
|---|
| 26 | progress bars classes |
|---|
| 27 | """ |
|---|
| 28 | |
|---|
| 29 | __all__ = ['HIGLabeledProgressBar'] |
|---|
| 30 | |
|---|
| 31 | import gtk |
|---|
| 32 | |
|---|
| 33 | from higboxes import HIGHBox |
|---|
| 34 | |
|---|
| 35 | class HIGLabeledProgressBar(HIGHBox): |
|---|
| 36 | def __init__(self, label=None): |
|---|
| 37 | HIGHBox.__init__(self) |
|---|
| 38 | if label: |
|---|
| 39 | self.label = HIGEntryLabel(label) |
|---|
| 40 | self.pack_label(self.label) |
|---|
| 41 | self.progress_bar = gtk.ProgressBar() |
|---|
| 42 | self.progress_bar.set_size_request(80, 16) |
|---|
| 43 | self.pack_label(self.progress_bar) |
|---|
| 44 | |
|---|
| [2975] | 45 | def show(self): |
|---|
| [433] | 46 | HIGHBox.show_all(self) |
|---|