| 1 | #!/usr/bin/env python |
|---|
| 2 | # -*- coding: utf-8 -*- |
|---|
| 3 | |
|---|
| 4 | # Copyright (C) 2005 Insecure.Com LLC. |
|---|
| 5 | # |
|---|
| 6 | # Author: Adriano Monteiro Marques <py.adriano@gmail.com> |
|---|
| 7 | # Cleber Rodrigues <cleber.gnu@gmail.com> |
|---|
| 8 | # |
|---|
| 9 | # This library is free software; you can redistribute it and/or modify |
|---|
| 10 | # it under the terms of the GNU Lesser General Public License as published |
|---|
| 11 | # by the Free Software Foundation; either version 2.1 of the License, or |
|---|
| 12 | # (at your option) any later version. |
|---|
| 13 | # |
|---|
| 14 | # This library is distributed in the hope that it will be useful, but |
|---|
| 15 | # WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY |
|---|
| 16 | # or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public |
|---|
| 17 | # License for more details. |
|---|
| 18 | # |
|---|
| 19 | # You should have received a copy of the GNU Lesser General Public License |
|---|
| 20 | # along with this library; if not, write to the Free Software Foundation, |
|---|
| 21 | # Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA |
|---|
| 22 | |
|---|
| 23 | """ |
|---|
| 24 | higwidgets/higlogindialog.py |
|---|
| 25 | |
|---|
| 26 | a basic login/authentication dialog |
|---|
| 27 | """ |
|---|
| 28 | |
|---|
| 29 | __all__ = ['HIGTable'] |
|---|
| 30 | |
|---|
| 31 | import gtk |
|---|
| 32 | |
|---|
| 33 | #from higlabels import * |
|---|
| 34 | #from higentries import * |
|---|
| 35 | |
|---|
| 36 | class HIGTable(gtk.Table): |
|---|
| 37 | """ |
|---|
| 38 | A HIGFied table |
|---|
| 39 | """ |
|---|
| 40 | |
|---|
| 41 | # TODO: |
|---|
| 42 | # - Automatic position packing, |
|---|
| 43 | # - Gereric attach function that detects the widget type |
|---|
| 44 | |
|---|
| 45 | def __init__(self, rows=1, columns=1, homogeneous=False): |
|---|
| 46 | gtk.Table.__init__(self, rows, columns, homogeneous) |
|---|
| 47 | self.set_row_spacings(6) |
|---|
| 48 | self.set_col_spacings(12) |
|---|
| 49 | |
|---|
| 50 | self.rows = rows |
|---|
| 51 | self.columns = columns |
|---|
| 52 | |
|---|
| 53 | def attach_label(self, widget, x0, x, y0, y): |
|---|
| 54 | self.attach(widget, x0, x, y0, y, xoptions=gtk.FILL) |
|---|
| 55 | |
|---|
| 56 | def attach_entry(self, widget, x0, x, y0, y): |
|---|
| 57 | self.attach(widget, x0, x, y0, y, xoptions=gtk.FILL|gtk.EXPAND) |
|---|