diff options
author | Johan Dahlin <zilch@src.gnome.org> | 2003-06-06 00:16:38 +0000 |
---|---|---|
committer | Johan Dahlin <zilch@src.gnome.org> | 2003-06-06 00:16:38 +0000 |
commit | c656da0fc291c4b29b2a942a60237963af9a4a76 (patch) | |
tree | d85c1b1f8d21fc29d32458f00fc087e2471c4197 | |
parent | 16b425f89526b4eda653d75c1a9a461444dd1adc (diff) | |
download | pygtk-c656da0fc291c4b29b2a942a60237963af9a4a76.tar.gz |
Undeprecate, add keywords. Based upon patch by kohler@icir.org, fixes
* gtk/gtk.override (_wrap_gtk_adjustment_set_all): Undeprecate,
add keywords. Based upon patch by kohler@icir.org, fixes #105220
* gtk/gtk-extrafuncs.defs (set_all): Undeprecate.
-rw-r--r-- | ChangeLog | 9 | ||||
-rw-r--r-- | gtk/gtk-extrafuncs.defs | 1 | ||||
-rw-r--r-- | gtk/gtk.override | 23 |
3 files changed, 23 insertions, 10 deletions
@@ -1,11 +1,18 @@ 2003-06-05 Johan Dahlin <jdahlin@async.com.br> + * gtk/gtk.override (_wrap_gtk_adjustment_set_all): Undeprecate, + add keywords. Based upon patch by kohler@icir.org, fixes #105220 + + * gtk/gtk-extrafuncs.defs (set_all): Undeprecate. + * gtk/gtk*.override: New files, splitted out from gtk.override + Fixes #103613 * gtk/Makefile.am (EXTRA_DIST): Add *.override here * codegen/override.py (Overrides.__parse_override): Added - "include" keyword, to be able to include files in override files + "include" keyword, to be able to include files in override files. + Fixes #103611 2003-06-02 James Henstridge <james@daa.com.au> diff --git a/gtk/gtk-extrafuncs.defs b/gtk/gtk-extrafuncs.defs index a006e962..8db8e8fc 100644 --- a/gtk/gtk-extrafuncs.defs +++ b/gtk/gtk-extrafuncs.defs @@ -48,7 +48,6 @@ '("gfloat" "page_increment") '("gfloat" "page_size") ) - (deprecated "use individual setters") ) ;; PyGtkTreeModel diff --git a/gtk/gtk.override b/gtk/gtk.override index 2ffcf910..06db1fc9 100644 --- a/gtk/gtk.override +++ b/gtk/gtk.override @@ -2925,9 +2925,12 @@ _wrap_gtk_adjustment__set_page_size(PyGObject *self, PyObject *value, %% override gtk_adjustment_set_all kwargs static PyObject * -_wrap_gtk_adjustment_set_all(PyGObject *self, PyObject *args, +_wrap_gtk_adjustment_set_all(PyGObject *self, + PyObject *args, PyObject *kwargs) { + static char *kwlist[] = { "value", "lower", "upper", "step_increment", + "page_increment", "page_size", NULL }; GtkAdjustment *adj = GTK_ADJUSTMENT(self->obj); double *value = &adj->value, *lower = &adj->lower, *upper = &adj->upper; double *step_increment = &adj->step_increment; @@ -2938,11 +2941,11 @@ _wrap_gtk_adjustment_set_all(PyGObject *self, PyObject *args, double old_page_increment = *page_increment; double old_page_size = *page_size; - if (PyErr_Warn(PyExc_DeprecationWarning, "use individual setters") < 0) - return NULL; - if (!PyArg_ParseTuple(args, "|dddddd:gtk_adjustment_set_all", - value, lower, upper, step_increment, - page_increment, page_size)) { + if (!PyArg_ParseTupleAndKeywords(args, kwargs, + "|dddddd:gtk_adjustment_set_all", + kwlist, + value, lower, upper, step_increment, + page_increment, page_size)) { adj->value = old_value; adj->lower = old_lower; adj->upper = old_upper; @@ -2951,9 +2954,13 @@ _wrap_gtk_adjustment_set_all(PyGObject *self, PyObject *args, adj->page_size = old_page_size; return NULL; } - if (PyTuple_Size(args) > 0) + + if (adj->value != old_value) gtk_adjustment_value_changed(adj); - if (PyTuple_Size(args) > 1) + if (adj->lower != old_lower || adj->upper != old_upper + || adj->step_increment != old_step_increment + || adj->page_increment != old_page_increment + || adj->page_size != old_page_size) gtk_adjustment_changed(adj); Py_INCREF(Py_None); |