[pygobject] [gi-overrides] let user set the proper property names in Gtk.Table
- From: John Palmieri <johnp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pygobject] [gi-overrides] let user set the proper property names in Gtk.Table
- Date: Mon, 14 Feb 2011 21:50:22 +0000 (UTC)
commit d491c369e049ab726f09002af0462391d5c2f3ec
Author: John (J5) Palmieri <johnp redhat com>
Date: Mon Feb 14 15:07:11 2011 -0500
[gi-overrides] let user set the proper property names in Gtk.Table
* the old override added a columns and rows parameters to the Table constuctor
to be in sync with PyGtk.
* The GTK properties are n_columns and n_rows
* support both
gi/overrides/Gtk.py | 8 ++++++++
1 files changed, 8 insertions(+), 0 deletions(-)
---
diff --git a/gi/overrides/Gtk.py b/gi/overrides/Gtk.py
index 6c22829..f33b6e0 100644
--- a/gi/overrides/Gtk.py
+++ b/gi/overrides/Gtk.py
@@ -1143,6 +1143,14 @@ __all__.append('Adjustment')
class Table(Gtk.Table, Container):
def __init__(self, rows=1, columns=1, homogeneous=False, **kwds):
+ if 'n_rows' in kwds:
+ rows = n_rows
+ del(kwds[n_rows])
+
+ if 'n_columns' in kwds:
+ columns = n_columns
+ del(kwds[n_columns])
+
Gtk.Table.__init__(self, n_rows=rows, n_columns=columns, homogeneous=homogeneous, **kwds)
def attach(self, child, left_attach, right_attach, top_attach, bottom_attach, xoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, yoptions=Gtk.AttachOptions.EXPAND|Gtk.AttachOptions.FILL, xpadding=0, ypadding=0):
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]