[Xfce4-commits] r30204 - pyxfce/branches/4.6/panel

Danny Milosavljevic dannym at xfce.org
Mon Jul 6 18:44:10 CEST 2009


Author: dannym
Date: 2009-07-06 16:44:10 +0000 (Mon, 06 Jul 2009)
New Revision: 30204

Modified:
   pyxfce/branches/4.6/panel/arrow_button.c
   pyxfce/branches/4.6/panel/enums.c
   pyxfce/branches/4.6/panel/enums.override
   pyxfce/branches/4.6/panel/external_plugin.c
   pyxfce/branches/4.6/panel/itembar.c
   pyxfce/branches/4.6/panel/itembar.defs
   pyxfce/branches/4.6/panel/plugin_iface.c
   pyxfce/branches/4.6/panel/plugin_iface.defs
   pyxfce/branches/4.6/panel/plugin_iface.override
   pyxfce/branches/4.6/panel/window.c
   pyxfce/branches/4.6/panel/window.override
Log:
pyxfce 4.6: fix enum handling; update to PyGTK 2.14.

Modified: pyxfce/branches/4.6/panel/arrow_button.c
===================================================================
--- pyxfce/branches/4.6/panel/arrow_button.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/arrow_button.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -24,7 +24,7 @@
 
 
 /* ---------- forward type declarations ---------- */
-PyTypeObject PyXfceArrowButton_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfceArrowButton_Type;
 
 #line 30 "arrow_button.c"
 
@@ -39,9 +39,9 @@
     PyObject *py_type = NULL;
     GtkArrowType type;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfceArrowButton.__init__", kwlist, &py_type))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfceArrowButton.__init__", kwlist, &py_type))
         return -1;
-    if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gint *)&type))
+    if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gpointer)&type))
         return -1;
     self->obj = (GObject *)xfce_arrow_button_new(type);
 
@@ -60,11 +60,13 @@
     PyObject *py_type = NULL;
     GtkArrowType type;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfceArrowButton.set_arrow_type", kwlist, &py_type))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfceArrowButton.set_arrow_type", kwlist, &py_type))
         return NULL;
-    if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gint *)&type))
+    if (pyg_enum_get_value(GTK_TYPE_ARROW_TYPE, py_type, (gpointer)&type))
         return NULL;
+    
     xfce_arrow_button_set_arrow_type(XFCE_ARROW_BUTTON(self->obj), type);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -74,55 +76,59 @@
 {
     gint ret;
 
+    
     ret = xfce_arrow_button_get_arrow_type(XFCE_ARROW_BUTTON(self->obj));
+    
     return pyg_enum_from_gtype(GTK_TYPE_ARROW_TYPE, ret);
 }
 
-static PyMethodDef _PyXfceArrowButton_methods[] = {
-    { "set_arrow_type", (PyCFunction)_wrap_xfce_arrow_button_set_arrow_type, METH_VARARGS|METH_KEYWORDS },
-    { "get_arrow_type", (PyCFunction)_wrap_xfce_arrow_button_get_arrow_type, METH_NOARGS },
-    { NULL, NULL, 0 }
+static const PyMethodDef _PyXfceArrowButton_methods[] = {
+    { "set_arrow_type", (PyCFunction)_wrap_xfce_arrow_button_set_arrow_type, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_arrow_type", (PyCFunction)_wrap_xfce_arrow_button_get_arrow_type, METH_NOARGS,
+      NULL },
+    { NULL, NULL, 0, NULL }
 };
 
-PyTypeObject PyXfceArrowButton_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfceArrowButton_Type = {
     PyObject_HEAD_INIT(NULL)
-    0,					/* ob_size */
-    "arrowbutton.ArrowButton",			/* tp_name */
-    sizeof(PyGObject),	        /* tp_basicsize */
-    0,					/* tp_itemsize */
+    0,                                 /* ob_size */
+    "arrowbutton.ArrowButton",                   /* tp_name */
+    sizeof(PyGObject),          /* tp_basicsize */
+    0,                                 /* tp_itemsize */
     /* methods */
-    (destructor)0,	/* tp_dealloc */
-    (printfunc)0,			/* tp_print */
-    (getattrfunc)0,	/* tp_getattr */
-    (setattrfunc)0,	/* tp_setattr */
-    (cmpfunc)0,		/* tp_compare */
-    (reprfunc)0,		/* tp_repr */
+    (destructor)0,        /* tp_dealloc */
+    (printfunc)0,                      /* tp_print */
+    (getattrfunc)0,       /* tp_getattr */
+    (setattrfunc)0,       /* tp_setattr */
+    (cmpfunc)0,           /* tp_compare */
+    (reprfunc)0,             /* tp_repr */
     (PyNumberMethods*)0,     /* tp_as_number */
     (PySequenceMethods*)0, /* tp_as_sequence */
     (PyMappingMethods*)0,   /* tp_as_mapping */
-    (hashfunc)0,		/* tp_hash */
-    (ternaryfunc)0,		/* tp_call */
-    (reprfunc)0,		/* tp_str */
-    (getattrofunc)0,	/* tp_getattro */
-    (setattrofunc)0,	/* tp_setattro */
-    (PyBufferProcs*)0,	/* tp_as_buffer */
+    (hashfunc)0,             /* tp_hash */
+    (ternaryfunc)0,          /* tp_call */
+    (reprfunc)0,              /* tp_str */
+    (getattrofunc)0,     /* tp_getattro */
+    (setattrofunc)0,     /* tp_setattro */
+    (PyBufferProcs*)0,  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
-    NULL, 				/* Documentation string */
-    (traverseproc)0,	/* tp_traverse */
-    (inquiry)0,		/* tp_clear */
-    (richcmpfunc)0,	/* tp_richcompare */
+    NULL,                        /* Documentation string */
+    (traverseproc)0,     /* tp_traverse */
+    (inquiry)0,             /* tp_clear */
+    (richcmpfunc)0,   /* tp_richcompare */
     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
-    (getiterfunc)0,		/* tp_iter */
-    (iternextfunc)0,	/* tp_iternext */
-    _PyXfceArrowButton_methods,			/* tp_methods */
-    0,					/* tp_members */
-    0,		       	/* tp_getset */
-    NULL,				/* tp_base */
-    NULL,				/* tp_dict */
-    (descrgetfunc)0,	/* tp_descr_get */
-    (descrsetfunc)0,	/* tp_descr_set */
+    (getiterfunc)0,          /* tp_iter */
+    (iternextfunc)0,     /* tp_iternext */
+    (struct PyMethodDef*)_PyXfceArrowButton_methods, /* tp_methods */
+    (struct PyMemberDef*)0,              /* tp_members */
+    (struct PyGetSetDef*)0,  /* tp_getset */
+    NULL,                              /* tp_base */
+    NULL,                              /* tp_dict */
+    (descrgetfunc)0,    /* tp_descr_get */
+    (descrsetfunc)0,    /* tp_descr_set */
     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
-    (initproc)_wrap_xfce_arrow_button_new,		/* tp_init */
+    (initproc)_wrap_xfce_arrow_button_new,             /* tp_init */
     (allocfunc)0,           /* tp_alloc */
     (newfunc)0,               /* tp_new */
     (freefunc)0,             /* tp_free */
@@ -133,8 +139,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pyarrow_button_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pyarrow_button_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 /* initialise stuff extension classes */
@@ -144,41 +150,37 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
-        _PyGtkToggleButton_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "ToggleButton");
+        _PyGtkToggleButton_Type = (PyTypeObject *)PyObject_GetAttrString(module, "ToggleButton");
         if (_PyGtkToggleButton_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name ToggleButton from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 183 "arrow_button.c"
+#line 185 "arrow_button.c"
     pygobject_register_class(d, "XfceArrowButton", XFCE_TYPE_ARROW_BUTTON, &PyXfceArrowButton_Type, Py_BuildValue("(O)", &PyGtkToggleButton_Type));
 }

Modified: pyxfce/branches/4.6/panel/enums.c
===================================================================
--- pyxfce/branches/4.6/panel/enums.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/enums.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -8,7 +8,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-enums.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 
@@ -30,8 +30,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pyenums_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pyenums_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 
@@ -40,6 +40,9 @@
 void
 pyenums_add_constants(PyObject *module, const gchar *strip_prefix)
 {
+#ifdef VERSION
+    PyModule_AddStringConstant(module, "__version__", VERSION);
+#endif
   pyg_enum_add(module, "ScreenPosition", strip_prefix, XFCE_TYPE_SCREEN_POSITION);
 
   if (PyErr_Occurred())
@@ -53,34 +56,30 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 86 "enums.c"
+#line 85 "enums.c"
 }

Modified: pyxfce/branches/4.6/panel/enums.override
===================================================================
--- pyxfce/branches/4.6/panel/enums.override	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/enums.override	2009-07-06 16:44:10 UTC (rev 30204)
@@ -6,7 +6,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-enums.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 

Modified: pyxfce/branches/4.6/panel/external_plugin.c
===================================================================
--- pyxfce/branches/4.6/panel/external_plugin.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/external_plugin.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -77,7 +77,7 @@
 
 
 /* ---------- forward type declarations ---------- */
-PyTypeObject PyXfceExternalPanelPlugin_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfceExternalPanelPlugin_Type;
 
 #line 83 "external_plugin.c"
 
@@ -111,45 +111,45 @@
 #line 112 "external_plugin.c"
 
 
-PyTypeObject PyXfceExternalPanelPlugin_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfceExternalPanelPlugin_Type = {
     PyObject_HEAD_INIT(NULL)
-    0,					/* ob_size */
-    "external.ExternalPanelPlugin",			/* tp_name */
-    sizeof(PyGObject),	        /* tp_basicsize */
-    0,					/* tp_itemsize */
+    0,                                 /* ob_size */
+    "external.ExternalPanelPlugin",                   /* tp_name */
+    sizeof(PyGObject),          /* tp_basicsize */
+    0,                                 /* tp_itemsize */
     /* methods */
-    (destructor)0,	/* tp_dealloc */
-    (printfunc)0,			/* tp_print */
-    (getattrfunc)0,	/* tp_getattr */
-    (setattrfunc)0,	/* tp_setattr */
-    (cmpfunc)0,		/* tp_compare */
-    (reprfunc)0,		/* tp_repr */
+    (destructor)0,        /* tp_dealloc */
+    (printfunc)0,                      /* tp_print */
+    (getattrfunc)0,       /* tp_getattr */
+    (setattrfunc)0,       /* tp_setattr */
+    (cmpfunc)0,           /* tp_compare */
+    (reprfunc)0,             /* tp_repr */
     (PyNumberMethods*)0,     /* tp_as_number */
     (PySequenceMethods*)0, /* tp_as_sequence */
     (PyMappingMethods*)0,   /* tp_as_mapping */
-    (hashfunc)0,		/* tp_hash */
-    (ternaryfunc)0,		/* tp_call */
-    (reprfunc)0,		/* tp_str */
-    (getattrofunc)0,	/* tp_getattro */
-    (setattrofunc)0,	/* tp_setattro */
-    (PyBufferProcs*)0,	/* tp_as_buffer */
+    (hashfunc)0,             /* tp_hash */
+    (ternaryfunc)0,          /* tp_call */
+    (reprfunc)0,              /* tp_str */
+    (getattrofunc)0,     /* tp_getattro */
+    (setattrofunc)0,     /* tp_setattro */
+    (PyBufferProcs*)0,  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
-    NULL, 				/* Documentation string */
-    (traverseproc)0,	/* tp_traverse */
-    (inquiry)0,		/* tp_clear */
-    (richcmpfunc)0,	/* tp_richcompare */
+    NULL,                        /* Documentation string */
+    (traverseproc)0,     /* tp_traverse */
+    (inquiry)0,             /* tp_clear */
+    (richcmpfunc)0,   /* tp_richcompare */
     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
-    (getiterfunc)0,		/* tp_iter */
-    (iternextfunc)0,	/* tp_iternext */
-    NULL,			/* tp_methods */
-    0,					/* tp_members */
-    0,		       	/* tp_getset */
-    NULL,				/* tp_base */
-    NULL,				/* tp_dict */
-    (descrgetfunc)0,	/* tp_descr_get */
-    (descrsetfunc)0,	/* tp_descr_set */
+    (getiterfunc)0,          /* tp_iter */
+    (iternextfunc)0,     /* tp_iternext */
+    (struct PyMethodDef*)NULL, /* tp_methods */
+    (struct PyMemberDef*)0,              /* tp_members */
+    (struct PyGetSetDef*)0,  /* tp_getset */
+    NULL,                              /* tp_base */
+    NULL,                              /* tp_dict */
+    (descrgetfunc)0,    /* tp_descr_get */
+    (descrsetfunc)0,    /* tp_descr_set */
     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
-    (initproc)_wrap_xfce_external_panel_plugin_new,		/* tp_init */
+    (initproc)_wrap_xfce_external_panel_plugin_new,             /* tp_init */
     (allocfunc)0,           /* tp_alloc */
     (newfunc)0,               /* tp_new */
     (freefunc)0,             /* tp_free */
@@ -160,8 +160,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pyexternal_plugin_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pyexternal_plugin_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 /* initialise stuff extension classes */
@@ -171,41 +171,37 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
-        _PyGtkPlug_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Plug");
+        _PyGtkPlug_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Plug");
         if (_PyGtkPlug_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Plug from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 210 "external_plugin.c"
+#line 206 "external_plugin.c"
     pygobject_register_class(d, "XfceExternalPanelPlugin", XFCE_TYPE_EXTERNAL_PANEL_PLUGIN, &PyXfceExternalPanelPlugin_Type, Py_BuildValue("(OO)", &PyGtkPlug_Type, &PyXfcePanelPlugin_Type));
 }

Modified: pyxfce/branches/4.6/panel/itembar.c
===================================================================
--- pyxfce/branches/4.6/panel/itembar.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/itembar.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -24,7 +24,7 @@
 
 
 /* ---------- forward type declarations ---------- */
-PyTypeObject PyXfceItembar_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfceItembar_Type;
 
 #line 30 "itembar.c"
 
@@ -39,9 +39,9 @@
     GtkOrientation orientation;
     PyObject *py_orientation = NULL;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfceItembar.__init__", kwlist, &py_orientation))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfceItembar.__init__", kwlist, &py_orientation))
         return -1;
-    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gint *)&orientation))
+    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gpointer)&orientation))
         return -1;
     self->obj = (GObject *)xfce_itembar_new(orientation);
 
@@ -54,17 +54,49 @@
 }
 
 static PyObject *
+_wrap_xfce_itembar_set_maximum_size(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "size", NULL };
+    int size;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfceItembar.set_maximum_size", kwlist, &size))
+        return NULL;
+    
+    xfce_itembar_set_maximum_size(XFCE_ITEMBAR(self->obj), size);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
+_wrap_xfce_itembar_set_allow_expand(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "allow", NULL };
+    int allow;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfceItembar.set_allow_expand", kwlist, &allow))
+        return NULL;
+    
+    xfce_itembar_set_allow_expand(XFCE_ITEMBAR(self->obj), allow);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static PyObject *
 _wrap_xfce_itembar_set_orientation(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
     static char *kwlist[] = { "orientation", NULL };
     GtkOrientation orientation;
     PyObject *py_orientation = NULL;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfceItembar.set_orientation", kwlist, &py_orientation))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfceItembar.set_orientation", kwlist, &py_orientation))
         return NULL;
-    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gint *)&orientation))
+    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gpointer)&orientation))
         return NULL;
+    
     xfce_itembar_set_orientation(XFCE_ITEMBAR(self->obj), orientation);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -74,7 +106,9 @@
 {
     gint ret;
 
+    
     ret = xfce_itembar_get_orientation(XFCE_ITEMBAR(self->obj));
+    
     return pyg_enum_from_gtype(GTK_TYPE_ORIENTATION, ret);
 }
 
@@ -85,9 +119,11 @@
     PyGObject *item;
     int position;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i:XfceItembar.insert", kwlist, &PyGtkWidget_Type, &item, &position))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!i:XfceItembar.insert", kwlist, &PyGtkWidget_Type, &item, &position))
         return NULL;
+    
     xfce_itembar_insert(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj), position);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -98,9 +134,11 @@
     static char *kwlist[] = { "item", NULL };
     PyGObject *item;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfceItembar.append", kwlist, &PyGtkWidget_Type, &item))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfceItembar.append", kwlist, &PyGtkWidget_Type, &item))
         return NULL;
+    
     xfce_itembar_append(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -111,9 +149,11 @@
     static char *kwlist[] = { "item", NULL };
     PyGObject *item;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfceItembar.prepend", kwlist, &PyGtkWidget_Type, &item))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfceItembar.prepend", kwlist, &PyGtkWidget_Type, &item))
         return NULL;
+    
     xfce_itembar_prepend(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -125,9 +165,11 @@
     PyGObject *item;
     int position;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i:XfceItembar.reorder_child", kwlist, &PyGtkWidget_Type, &item, &position))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!i:XfceItembar.reorder_child", kwlist, &PyGtkWidget_Type, &item, &position))
         return NULL;
+    
     xfce_itembar_reorder_child(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj), position);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -139,9 +181,11 @@
     PyGObject *item;
     int expand;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!i:XfceItembar.set_child_expand", kwlist, &PyGtkWidget_Type, &item, &expand))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!i:XfceItembar.set_child_expand", kwlist, &PyGtkWidget_Type, &item, &expand))
         return NULL;
+    
     xfce_itembar_set_child_expand(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj), expand);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -153,9 +197,11 @@
     PyGObject *item;
     int ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfceItembar.get_child_expand", kwlist, &PyGtkWidget_Type, &item))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfceItembar.get_child_expand", kwlist, &PyGtkWidget_Type, &item))
         return NULL;
+    
     ret = xfce_itembar_get_child_expand(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj));
+    
     return PyBool_FromLong(ret);
 
 }
@@ -165,7 +211,9 @@
 {
     int ret;
 
+    
     ret = xfce_itembar_get_n_items(XFCE_ITEMBAR(self->obj));
+    
     return PyInt_FromLong(ret);
 }
 
@@ -176,9 +224,11 @@
     PyGObject *item;
     int ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfceItembar.get_item_index", kwlist, &PyGtkWidget_Type, &item))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfceItembar.get_item_index", kwlist, &PyGtkWidget_Type, &item))
         return NULL;
+    
     ret = xfce_itembar_get_item_index(XFCE_ITEMBAR(self->obj), GTK_WIDGET(item->obj));
+    
     return PyInt_FromLong(ret);
 }
 
@@ -189,9 +239,11 @@
     int n;
     GtkWidget *ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:XfceItembar.get_nth_item", kwlist, &n))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfceItembar.get_nth_item", kwlist, &n))
         return NULL;
+    
     ret = xfce_itembar_get_nth_item(XFCE_ITEMBAR(self->obj), n);
+    
     /* pygobject_new handles NULL checking */
     return pygobject_new((GObject *)ret);
 }
@@ -199,7 +251,9 @@
 static PyObject *
 _wrap_xfce_itembar_raise_event_window(PyGObject *self)
 {
+    
     xfce_itembar_raise_event_window(XFCE_ITEMBAR(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -207,7 +261,9 @@
 static PyObject *
 _wrap_xfce_itembar_lower_event_window(PyGObject *self)
 {
+    
     xfce_itembar_lower_event_window(XFCE_ITEMBAR(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -217,7 +273,9 @@
 {
     int ret;
 
+    
     ret = xfce_itembar_event_window_is_raised(XFCE_ITEMBAR(self->obj));
+    
     return PyBool_FromLong(ret);
 
 }
@@ -229,9 +287,11 @@
     int x, y;
     GtkWidget *ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:XfceItembar.get_item_at_point", kwlist, &x, &y))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ii:XfceItembar.get_item_at_point", kwlist, &x, &y))
         return NULL;
+    
     ret = xfce_itembar_get_item_at_point(XFCE_ITEMBAR(self->obj), x, y);
+    
     /* pygobject_new handles NULL checking */
     return pygobject_new((GObject *)ret);
 }
@@ -242,71 +302,93 @@
     static char *kwlist[] = { "x", "y", NULL };
     int x, y, ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "ii:XfceItembar.get_drop_index", kwlist, &x, &y))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"ii:XfceItembar.get_drop_index", kwlist, &x, &y))
         return NULL;
+    
     ret = xfce_itembar_get_drop_index(XFCE_ITEMBAR(self->obj), x, y);
+    
     return PyInt_FromLong(ret);
 }
 
-static PyMethodDef _PyXfceItembar_methods[] = {
-    { "set_orientation", (PyCFunction)_wrap_xfce_itembar_set_orientation, METH_VARARGS|METH_KEYWORDS },
-    { "get_orientation", (PyCFunction)_wrap_xfce_itembar_get_orientation, METH_NOARGS },
-    { "insert", (PyCFunction)_wrap_xfce_itembar_insert, METH_VARARGS|METH_KEYWORDS },
-    { "append", (PyCFunction)_wrap_xfce_itembar_append, METH_VARARGS|METH_KEYWORDS },
-    { "prepend", (PyCFunction)_wrap_xfce_itembar_prepend, METH_VARARGS|METH_KEYWORDS },
-    { "reorder_child", (PyCFunction)_wrap_xfce_itembar_reorder_child, METH_VARARGS|METH_KEYWORDS },
-    { "set_child_expand", (PyCFunction)_wrap_xfce_itembar_set_child_expand, METH_VARARGS|METH_KEYWORDS },
-    { "get_child_expand", (PyCFunction)_wrap_xfce_itembar_get_child_expand, METH_VARARGS|METH_KEYWORDS },
-    { "get_n_items", (PyCFunction)_wrap_xfce_itembar_get_n_items, METH_NOARGS },
-    { "get_item_index", (PyCFunction)_wrap_xfce_itembar_get_item_index, METH_VARARGS|METH_KEYWORDS },
-    { "get_nth_item", (PyCFunction)_wrap_xfce_itembar_get_nth_item, METH_VARARGS|METH_KEYWORDS },
-    { "raise_event_window", (PyCFunction)_wrap_xfce_itembar_raise_event_window, METH_NOARGS },
-    { "lower_event_window", (PyCFunction)_wrap_xfce_itembar_lower_event_window, METH_NOARGS },
-    { "event_window_is_raised", (PyCFunction)_wrap_xfce_itembar_event_window_is_raised, METH_NOARGS },
-    { "get_item_at_point", (PyCFunction)_wrap_xfce_itembar_get_item_at_point, METH_VARARGS|METH_KEYWORDS },
-    { "get_drop_index", (PyCFunction)_wrap_xfce_itembar_get_drop_index, METH_VARARGS|METH_KEYWORDS },
-    { NULL, NULL, 0 }
+static const PyMethodDef _PyXfceItembar_methods[] = {
+    { "set_maximum_size", (PyCFunction)_wrap_xfce_itembar_set_maximum_size, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "set_allow_expand", (PyCFunction)_wrap_xfce_itembar_set_allow_expand, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "set_orientation", (PyCFunction)_wrap_xfce_itembar_set_orientation, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_orientation", (PyCFunction)_wrap_xfce_itembar_get_orientation, METH_NOARGS,
+      NULL },
+    { "insert", (PyCFunction)_wrap_xfce_itembar_insert, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "append", (PyCFunction)_wrap_xfce_itembar_append, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "prepend", (PyCFunction)_wrap_xfce_itembar_prepend, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "reorder_child", (PyCFunction)_wrap_xfce_itembar_reorder_child, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "set_child_expand", (PyCFunction)_wrap_xfce_itembar_set_child_expand, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_child_expand", (PyCFunction)_wrap_xfce_itembar_get_child_expand, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_n_items", (PyCFunction)_wrap_xfce_itembar_get_n_items, METH_NOARGS,
+      NULL },
+    { "get_item_index", (PyCFunction)_wrap_xfce_itembar_get_item_index, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_nth_item", (PyCFunction)_wrap_xfce_itembar_get_nth_item, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "raise_event_window", (PyCFunction)_wrap_xfce_itembar_raise_event_window, METH_NOARGS,
+      NULL },
+    { "lower_event_window", (PyCFunction)_wrap_xfce_itembar_lower_event_window, METH_NOARGS,
+      NULL },
+    { "event_window_is_raised", (PyCFunction)_wrap_xfce_itembar_event_window_is_raised, METH_NOARGS,
+      NULL },
+    { "get_item_at_point", (PyCFunction)_wrap_xfce_itembar_get_item_at_point, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_drop_index", (PyCFunction)_wrap_xfce_itembar_get_drop_index, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { NULL, NULL, 0, NULL }
 };
 
-PyTypeObject PyXfceItembar_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfceItembar_Type = {
     PyObject_HEAD_INIT(NULL)
-    0,					/* ob_size */
-    "itembar.Itembar",			/* tp_name */
-    sizeof(PyGObject),	        /* tp_basicsize */
-    0,					/* tp_itemsize */
+    0,                                 /* ob_size */
+    "itembar.Itembar",                   /* tp_name */
+    sizeof(PyGObject),          /* tp_basicsize */
+    0,                                 /* tp_itemsize */
     /* methods */
-    (destructor)0,	/* tp_dealloc */
-    (printfunc)0,			/* tp_print */
-    (getattrfunc)0,	/* tp_getattr */
-    (setattrfunc)0,	/* tp_setattr */
-    (cmpfunc)0,		/* tp_compare */
-    (reprfunc)0,		/* tp_repr */
+    (destructor)0,        /* tp_dealloc */
+    (printfunc)0,                      /* tp_print */
+    (getattrfunc)0,       /* tp_getattr */
+    (setattrfunc)0,       /* tp_setattr */
+    (cmpfunc)0,           /* tp_compare */
+    (reprfunc)0,             /* tp_repr */
     (PyNumberMethods*)0,     /* tp_as_number */
     (PySequenceMethods*)0, /* tp_as_sequence */
     (PyMappingMethods*)0,   /* tp_as_mapping */
-    (hashfunc)0,		/* tp_hash */
-    (ternaryfunc)0,		/* tp_call */
-    (reprfunc)0,		/* tp_str */
-    (getattrofunc)0,	/* tp_getattro */
-    (setattrofunc)0,	/* tp_setattro */
-    (PyBufferProcs*)0,	/* tp_as_buffer */
+    (hashfunc)0,             /* tp_hash */
+    (ternaryfunc)0,          /* tp_call */
+    (reprfunc)0,              /* tp_str */
+    (getattrofunc)0,     /* tp_getattro */
+    (setattrofunc)0,     /* tp_setattro */
+    (PyBufferProcs*)0,  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
-    NULL, 				/* Documentation string */
-    (traverseproc)0,	/* tp_traverse */
-    (inquiry)0,		/* tp_clear */
-    (richcmpfunc)0,	/* tp_richcompare */
+    NULL,                        /* Documentation string */
+    (traverseproc)0,     /* tp_traverse */
+    (inquiry)0,             /* tp_clear */
+    (richcmpfunc)0,   /* tp_richcompare */
     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
-    (getiterfunc)0,		/* tp_iter */
-    (iternextfunc)0,	/* tp_iternext */
-    _PyXfceItembar_methods,			/* tp_methods */
-    0,					/* tp_members */
-    0,		       	/* tp_getset */
-    NULL,				/* tp_base */
-    NULL,				/* tp_dict */
-    (descrgetfunc)0,	/* tp_descr_get */
-    (descrsetfunc)0,	/* tp_descr_set */
+    (getiterfunc)0,          /* tp_iter */
+    (iternextfunc)0,     /* tp_iternext */
+    (struct PyMethodDef*)_PyXfceItembar_methods, /* tp_methods */
+    (struct PyMemberDef*)0,              /* tp_members */
+    (struct PyGetSetDef*)0,  /* tp_getset */
+    NULL,                              /* tp_base */
+    NULL,                              /* tp_dict */
+    (descrgetfunc)0,    /* tp_descr_get */
+    (descrsetfunc)0,    /* tp_descr_set */
     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
-    (initproc)_wrap_xfce_itembar_new,		/* tp_init */
+    (initproc)_wrap_xfce_itembar_new,             /* tp_init */
     (allocfunc)0,           /* tp_alloc */
     (newfunc)0,               /* tp_new */
     (freefunc)0,             /* tp_free */
@@ -317,8 +399,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pyitembar_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pyitembar_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 /* initialise stuff extension classes */
@@ -328,41 +410,37 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
-        _PyGtkContainer_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Container");
+        _PyGtkContainer_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Container");
         if (_PyGtkContainer_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Container from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 367 "itembar.c"
+#line 445 "itembar.c"
     pygobject_register_class(d, "XfceItembar", XFCE_TYPE_ITEMBAR, &PyXfceItembar_Type, Py_BuildValue("(O)", &PyGtkContainer_Type));
 }

Modified: pyxfce/branches/4.6/panel/itembar.defs
===================================================================
--- pyxfce/branches/4.6/panel/itembar.defs	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/itembar.defs	2009-07-06 16:44:10 UTC (rev 30204)
@@ -10,7 +10,7 @@
 ;; Enumerations and flags ...
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-itembar.h
+;; From xfce-itembar.h
 
 (define-function xfce_itembar_get_type
   (c-name "xfce_itembar_get_type")
@@ -26,6 +26,24 @@
   )
 )
 
+(define-method set_maximum_size
+  (of-object "XfceItembar")
+  (c-name "xfce_itembar_set_maximum_size")
+  (return-type "none")
+  (parameters
+    '("gint" "size")
+  )
+)
+
+(define-method set_allow_expand
+  (of-object "XfceItembar")
+  (c-name "xfce_itembar_set_allow_expand")
+  (return-type "none")
+  (parameters
+    '("gboolean" "allow")
+  )
+)
+
 (define-method set_orientation
   (of-object "XfceItembar")
   (c-name "xfce_itembar_set_orientation")
@@ -47,7 +65,7 @@
   (return-type "none")
   (parameters
     '("GtkWidget*" "item")
-    '("int" "position")
+    '("gint" "position")
   )
 )
 
@@ -75,7 +93,7 @@
   (return-type "none")
   (parameters
     '("GtkWidget*" "item")
-    '("int" "position")
+    '("gint" "position")
   )
 )
 
@@ -101,13 +119,13 @@
 (define-method get_n_items
   (of-object "XfceItembar")
   (c-name "xfce_itembar_get_n_items")
-  (return-type "int")
+  (return-type "gint")
 )
 
 (define-method get_item_index
   (of-object "XfceItembar")
   (c-name "xfce_itembar_get_item_index")
-  (return-type "int")
+  (return-type "gint")
   (parameters
     '("GtkWidget*" "item")
   )
@@ -118,7 +136,7 @@
   (c-name "xfce_itembar_get_nth_item")
   (return-type "GtkWidget*")
   (parameters
-    '("int" "n")
+    '("gint" "n")
   )
 )
 
@@ -145,18 +163,18 @@
   (c-name "xfce_itembar_get_item_at_point")
   (return-type "GtkWidget*")
   (parameters
-    '("int" "x")
-    '("int" "y")
+    '("gint" "x")
+    '("gint" "y")
   )
 )
 
 (define-method get_drop_index
   (of-object "XfceItembar")
   (c-name "xfce_itembar_get_drop_index")
-  (return-type "int")
+  (return-type "gint")
   (parameters
-    '("int" "x")
-    '("int" "y")
+    '("gint" "x")
+    '("gint" "y")
   )
 )
 

Modified: pyxfce/branches/4.6/panel/plugin_iface.c
===================================================================
--- pyxfce/branches/4.6/panel/plugin_iface.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/plugin_iface.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -8,7 +8,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-plugin-iface.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 
@@ -27,7 +27,7 @@
 
 
 /* ---------- forward type declarations ---------- */
-PyTypeObject PyXfcePanelPlugin_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfcePanelPlugin_Type;
 
 #line 33 "plugin_iface.c"
 
@@ -38,11 +38,16 @@
 static PyObject *
 _wrap_xfce_panel_plugin_get_name(PyGObject *self)
 {
-    const gchar *ret;
+    gchar *ret;
 
+    
     ret = xfce_panel_plugin_get_name(XFCE_PANEL_PLUGIN(self->obj));
-    if (ret)
-        return PyString_FromString(ret);
+    
+    if (ret) {
+        PyObject *py_ret = PyString_FromString(ret);
+        g_free(ret);
+        return py_ret;
+    }
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -50,11 +55,16 @@
 static PyObject *
 _wrap_xfce_panel_plugin_get_id(PyGObject *self)
 {
-    const gchar *ret;
+    gchar *ret;
 
+    
     ret = xfce_panel_plugin_get_id(XFCE_PANEL_PLUGIN(self->obj));
-    if (ret)
-        return PyString_FromString(ret);
+    
+    if (ret) {
+        PyObject *py_ret = PyString_FromString(ret);
+        g_free(ret);
+        return py_ret;
+    }
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -62,11 +72,16 @@
 static PyObject *
 _wrap_xfce_panel_plugin_get_display_name(PyGObject *self)
 {
-    const gchar *ret;
+    gchar *ret;
 
+    
     ret = xfce_panel_plugin_get_display_name(XFCE_PANEL_PLUGIN(self->obj));
-    if (ret)
-        return PyString_FromString(ret);
+    
+    if (ret) {
+        PyObject *py_ret = PyString_FromString(ret);
+        g_free(ret);
+        return py_ret;
+    }
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -76,7 +91,9 @@
 {
     int ret;
 
+    
     ret = xfce_panel_plugin_get_size(XFCE_PANEL_PLUGIN(self->obj));
+    
     return PyInt_FromLong(ret);
 }
 
@@ -85,7 +102,9 @@
 {
     gint ret;
 
+    
     ret = xfce_panel_plugin_get_screen_position(XFCE_PANEL_PLUGIN(self->obj));
+    
     return pyg_enum_from_gtype(XFCE_TYPE_SCREEN_POSITION, ret);
 }
 
@@ -95,9 +114,11 @@
     static char *kwlist[] = { "expand", NULL };
     int expand;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:XfcePanelPlugin.set_expand", kwlist, &expand))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfcePanelPlugin.set_expand", kwlist, &expand))
         return NULL;
+    
     xfce_panel_plugin_set_expand(XFCE_PANEL_PLUGIN(self->obj), expand);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -107,7 +128,9 @@
 {
     int ret;
 
+    
     ret = xfce_panel_plugin_get_expand(XFCE_PANEL_PLUGIN(self->obj));
+    
     return PyBool_FromLong(ret);
 
 }
@@ -117,7 +140,9 @@
 {
     gint ret;
 
+    
     ret = xfce_panel_plugin_get_orientation(XFCE_PANEL_PLUGIN(self->obj));
+    
     return pyg_enum_from_gtype(GTK_TYPE_ORIENTATION, ret);
 }
 
@@ -127,9 +152,11 @@
     static char *kwlist[] = { "widget", NULL };
     PyGObject *widget;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfcePanelPlugin.add_action_widget", kwlist, &PyGtkWidget_Type, &widget))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfcePanelPlugin.add_action_widget", kwlist, &PyGtkWidget_Type, &widget))
         return NULL;
+    
     xfce_panel_plugin_add_action_widget(XFCE_PANEL_PLUGIN(self->obj), GTK_WIDGET(widget->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -140,9 +167,11 @@
     static char *kwlist[] = { "item", NULL };
     PyGObject *item;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfcePanelPlugin.menu_insert_item", kwlist, &PyGtkMenuItem_Type, &item))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfcePanelPlugin.menu_insert_item", kwlist, &PyGtkMenuItem_Type, &item))
         return NULL;
+    
     xfce_panel_plugin_menu_insert_item(XFCE_PANEL_PLUGIN(self->obj), GTK_MENU_ITEM(item->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -150,7 +179,9 @@
 static PyObject *
 _wrap_xfce_panel_plugin_menu_show_about(PyGObject *self)
 {
+    
     xfce_panel_plugin_menu_show_about(XFCE_PANEL_PLUGIN(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -158,7 +189,9 @@
 static PyObject *
 _wrap_xfce_panel_plugin_menu_show_configure(PyGObject *self)
 {
+    
     xfce_panel_plugin_menu_show_configure(XFCE_PANEL_PLUGIN(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -166,7 +199,9 @@
 static PyObject *
 _wrap_xfce_panel_plugin_block_menu(PyGObject *self)
 {
+    
     xfce_panel_plugin_block_menu(XFCE_PANEL_PLUGIN(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -174,7 +209,9 @@
 static PyObject *
 _wrap_xfce_panel_plugin_unblock_menu(PyGObject *self)
 {
+    
     xfce_panel_plugin_unblock_menu(XFCE_PANEL_PLUGIN(self->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -185,19 +222,34 @@
     static char *kwlist[] = { "menu", NULL };
     PyGObject *menu;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfcePanelPlugin.register_menu", kwlist, &PyGtkMenu_Type, &menu))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfcePanelPlugin.register_menu", kwlist, &PyGtkMenu_Type, &menu))
         return NULL;
+    
     xfce_panel_plugin_register_menu(XFCE_PANEL_PLUGIN(self->obj), GTK_MENU(menu->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
 
 static PyObject *
+_wrap_xfce_panel_plugin_arrow_type(PyGObject *self)
+{
+    gint ret;
+
+    
+    ret = xfce_panel_plugin_arrow_type(XFCE_PANEL_PLUGIN(self->obj));
+    
+    return pyg_enum_from_gtype(GTK_TYPE_ARROW_TYPE, ret);
+}
+
+static PyObject *
 _wrap_xfce_panel_plugin_lookup_rc_file(PyGObject *self)
 {
     gchar *ret;
 
+    
     ret = xfce_panel_plugin_lookup_rc_file(XFCE_PANEL_PLUGIN(self->obj));
+    
     if (ret) {
         PyObject *py_ret = PyString_FromString(ret);
         g_free(ret);
@@ -214,9 +266,11 @@
     int create;
     gchar *ret;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:XfcePanelPlugin.save_location", kwlist, &create))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfcePanelPlugin.save_location", kwlist, &create))
         return NULL;
+    
     ret = xfce_panel_plugin_save_location(XFCE_PANEL_PLUGIN(self->obj), create);
+    
     if (ret) {
         PyObject *py_ret = PyString_FromString(ret);
         g_free(ret);
@@ -232,74 +286,113 @@
     static char *kwlist[] = { "widget", NULL };
     PyGObject *widget;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O!:XfcePanelPlugin.focus_widget", kwlist, &PyGtkWidget_Type, &widget))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O!:XfcePanelPlugin.focus_widget", kwlist, &PyGtkWidget_Type, &widget))
         return NULL;
+    
     xfce_panel_plugin_focus_widget(XFCE_PANEL_PLUGIN(self->obj), GTK_WIDGET(widget->obj));
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
 
-static PyMethodDef _PyXfcePanelPlugin_methods[] = {
-    { "get_name", (PyCFunction)_wrap_xfce_panel_plugin_get_name, METH_NOARGS },
-    { "get_id", (PyCFunction)_wrap_xfce_panel_plugin_get_id, METH_NOARGS },
-    { "get_display_name", (PyCFunction)_wrap_xfce_panel_plugin_get_display_name, METH_NOARGS },
-    { "get_size", (PyCFunction)_wrap_xfce_panel_plugin_get_size, METH_NOARGS },
-    { "get_screen_position", (PyCFunction)_wrap_xfce_panel_plugin_get_screen_position, METH_NOARGS },
-    { "set_expand", (PyCFunction)_wrap_xfce_panel_plugin_set_expand, METH_VARARGS|METH_KEYWORDS },
-    { "get_expand", (PyCFunction)_wrap_xfce_panel_plugin_get_expand, METH_NOARGS },
-    { "get_orientation", (PyCFunction)_wrap_xfce_panel_plugin_get_orientation, METH_NOARGS },
-    { "add_action_widget", (PyCFunction)_wrap_xfce_panel_plugin_add_action_widget, METH_VARARGS|METH_KEYWORDS },
-    { "menu_insert_item", (PyCFunction)_wrap_xfce_panel_plugin_menu_insert_item, METH_VARARGS|METH_KEYWORDS },
-    { "menu_show_about", (PyCFunction)_wrap_xfce_panel_plugin_menu_show_about, METH_NOARGS },
-    { "menu_show_configure", (PyCFunction)_wrap_xfce_panel_plugin_menu_show_configure, METH_NOARGS },
-    { "block_menu", (PyCFunction)_wrap_xfce_panel_plugin_block_menu, METH_NOARGS },
-    { "unblock_menu", (PyCFunction)_wrap_xfce_panel_plugin_unblock_menu, METH_NOARGS },
-    { "register_menu", (PyCFunction)_wrap_xfce_panel_plugin_register_menu, METH_VARARGS|METH_KEYWORDS },
-    { "lookup_rc_file", (PyCFunction)_wrap_xfce_panel_plugin_lookup_rc_file, METH_NOARGS },
-    { "save_location", (PyCFunction)_wrap_xfce_panel_plugin_save_location, METH_VARARGS|METH_KEYWORDS },
-    { "focus_widget", (PyCFunction)_wrap_xfce_panel_plugin_focus_widget, METH_VARARGS|METH_KEYWORDS },
-    { NULL, NULL, 0 }
+static PyObject *
+_wrap_xfce_panel_plugin_set_panel_hidden(PyGObject *self, PyObject *args, PyObject *kwargs)
+{
+    static char *kwlist[] = { "hidden", NULL };
+    int hidden;
+
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfcePanelPlugin.set_panel_hidden", kwlist, &hidden))
+        return NULL;
+    
+    xfce_panel_plugin_set_panel_hidden(XFCE_PANEL_PLUGIN(self->obj), hidden);
+    
+    Py_INCREF(Py_None);
+    return Py_None;
+}
+
+static const PyMethodDef _PyXfcePanelPlugin_methods[] = {
+    { "get_name", (PyCFunction)_wrap_xfce_panel_plugin_get_name, METH_NOARGS,
+      NULL },
+    { "get_id", (PyCFunction)_wrap_xfce_panel_plugin_get_id, METH_NOARGS,
+      NULL },
+    { "get_display_name", (PyCFunction)_wrap_xfce_panel_plugin_get_display_name, METH_NOARGS,
+      NULL },
+    { "get_size", (PyCFunction)_wrap_xfce_panel_plugin_get_size, METH_NOARGS,
+      NULL },
+    { "get_screen_position", (PyCFunction)_wrap_xfce_panel_plugin_get_screen_position, METH_NOARGS,
+      NULL },
+    { "set_expand", (PyCFunction)_wrap_xfce_panel_plugin_set_expand, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_expand", (PyCFunction)_wrap_xfce_panel_plugin_get_expand, METH_NOARGS,
+      NULL },
+    { "get_orientation", (PyCFunction)_wrap_xfce_panel_plugin_get_orientation, METH_NOARGS,
+      NULL },
+    { "add_action_widget", (PyCFunction)_wrap_xfce_panel_plugin_add_action_widget, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "menu_insert_item", (PyCFunction)_wrap_xfce_panel_plugin_menu_insert_item, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "menu_show_about", (PyCFunction)_wrap_xfce_panel_plugin_menu_show_about, METH_NOARGS,
+      NULL },
+    { "menu_show_configure", (PyCFunction)_wrap_xfce_panel_plugin_menu_show_configure, METH_NOARGS,
+      NULL },
+    { "block_menu", (PyCFunction)_wrap_xfce_panel_plugin_block_menu, METH_NOARGS,
+      NULL },
+    { "unblock_menu", (PyCFunction)_wrap_xfce_panel_plugin_unblock_menu, METH_NOARGS,
+      NULL },
+    { "register_menu", (PyCFunction)_wrap_xfce_panel_plugin_register_menu, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "arrow_type", (PyCFunction)_wrap_xfce_panel_plugin_arrow_type, METH_NOARGS,
+      NULL },
+    { "lookup_rc_file", (PyCFunction)_wrap_xfce_panel_plugin_lookup_rc_file, METH_NOARGS,
+      NULL },
+    { "save_location", (PyCFunction)_wrap_xfce_panel_plugin_save_location, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "focus_widget", (PyCFunction)_wrap_xfce_panel_plugin_focus_widget, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "set_panel_hidden", (PyCFunction)_wrap_xfce_panel_plugin_set_panel_hidden, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { NULL, NULL, 0, NULL }
 };
 
-PyTypeObject PyXfcePanelPlugin_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfcePanelPlugin_Type = {
     PyObject_HEAD_INIT(NULL)
-    0,					/* ob_size */
-    "pluginiface.PanelPlugin",			/* tp_name */
-    sizeof(PyObject),	        /* tp_basicsize */
-    0,					/* tp_itemsize */
+    0,                                 /* ob_size */
+    "pluginiface.PanelPlugin",                   /* tp_name */
+    sizeof(PyObject),          /* tp_basicsize */
+    0,                                 /* tp_itemsize */
     /* methods */
-    (destructor)0,	/* tp_dealloc */
-    (printfunc)0,			/* tp_print */
-    (getattrfunc)0,	/* tp_getattr */
-    (setattrfunc)0,	/* tp_setattr */
-    (cmpfunc)0,		/* tp_compare */
-    (reprfunc)0,		/* tp_repr */
+    (destructor)0,        /* tp_dealloc */
+    (printfunc)0,                      /* tp_print */
+    (getattrfunc)0,       /* tp_getattr */
+    (setattrfunc)0,       /* tp_setattr */
+    (cmpfunc)0,           /* tp_compare */
+    (reprfunc)0,             /* tp_repr */
     (PyNumberMethods*)0,     /* tp_as_number */
     (PySequenceMethods*)0, /* tp_as_sequence */
     (PyMappingMethods*)0,   /* tp_as_mapping */
-    (hashfunc)0,		/* tp_hash */
-    (ternaryfunc)0,		/* tp_call */
-    (reprfunc)0,		/* tp_str */
-    (getattrofunc)0,	/* tp_getattro */
-    (setattrofunc)0,	/* tp_setattro */
-    (PyBufferProcs*)0,	/* tp_as_buffer */
+    (hashfunc)0,             /* tp_hash */
+    (ternaryfunc)0,          /* tp_call */
+    (reprfunc)0,              /* tp_str */
+    (getattrofunc)0,     /* tp_getattro */
+    (setattrofunc)0,     /* tp_setattro */
+    (PyBufferProcs*)0,  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
-    NULL, 				/* Documentation string */
-    (traverseproc)0,	/* tp_traverse */
-    (inquiry)0,		/* tp_clear */
-    (richcmpfunc)0,	/* tp_richcompare */
+    NULL,                        /* Documentation string */
+    (traverseproc)0,     /* tp_traverse */
+    (inquiry)0,             /* tp_clear */
+    (richcmpfunc)0,   /* tp_richcompare */
     0,             /* tp_weaklistoffset */
-    (getiterfunc)0,		/* tp_iter */
-    (iternextfunc)0,	/* tp_iternext */
-    _PyXfcePanelPlugin_methods,			/* tp_methods */
-    0,					/* tp_members */
-    0,		       	/* tp_getset */
-    NULL,				/* tp_base */
-    NULL,				/* tp_dict */
-    (descrgetfunc)0,	/* tp_descr_get */
-    (descrsetfunc)0,	/* tp_descr_set */
+    (getiterfunc)0,          /* tp_iter */
+    (iternextfunc)0,     /* tp_iternext */
+    (struct PyMethodDef*)_PyXfcePanelPlugin_methods, /* tp_methods */
+    (struct PyMemberDef*)0,              /* tp_members */
+    (struct PyGetSetDef*)0,  /* tp_getset */
+    NULL,                              /* tp_base */
+    NULL,                              /* tp_dict */
+    (descrgetfunc)0,    /* tp_descr_get */
+    (descrsetfunc)0,    /* tp_descr_set */
     0,                 /* tp_dictoffset */
-    (initproc)0,		/* tp_init */
+    (initproc)0,             /* tp_init */
     (allocfunc)0,           /* tp_alloc */
     (newfunc)0,               /* tp_new */
     (freefunc)0,             /* tp_free */
@@ -310,8 +403,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pyplugin_iface_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pyplugin_iface_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 /* initialise stuff extension classes */
@@ -321,47 +414,43 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
-        _PyGtkMenuItem_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "MenuItem");
+        _PyGtkMenuItem_Type = (PyTypeObject *)PyObject_GetAttrString(module, "MenuItem");
         if (_PyGtkMenuItem_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name MenuItem from gtk");
-            return;
+            return ;
         }
-        _PyGtkMenu_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Menu");
+        _PyGtkMenu_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Menu");
         if (_PyGtkMenu_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Menu from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 366 "plugin_iface.c"
+#line 455 "plugin_iface.c"
     pyg_register_interface(d, "PanelPlugin", XFCE_TYPE_PANEL_PLUGIN, &PyXfcePanelPlugin_Type);
 }

Modified: pyxfce/branches/4.6/panel/plugin_iface.defs
===================================================================
--- pyxfce/branches/4.6/panel/plugin_iface.defs	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/plugin_iface.defs	2009-07-06 16:44:10 UTC (rev 30204)
@@ -9,7 +9,7 @@
 ;; Enumerations and flags ...
 
 
-;; From /usr/local/include/xfce4/libxfce4panel/xfce-panel-plugin-iface.h
+;; From xfce-panel-plugin-iface.h
 
 (define-function xfce_panel_plugin_get_type
   (c-name "xfce_panel_plugin_get_type")
@@ -19,25 +19,25 @@
 (define-method get_name
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_get_name")
-  (return-type "const-char*")
+  (return-type "gchar*")
 )
 
 (define-method get_id
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_get_id")
-  (return-type "const-char*")
+  (return-type "gchar*")
 )
 
 (define-method get_display_name
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_get_display_name")
-  (return-type "const-char*")
+  (return-type "gchar*")
 )
 
 (define-method get_size
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_get_size")
-  (return-type "int")
+  (return-type "gint")
 )
 
 (define-method get_screen_position
@@ -118,16 +118,46 @@
   )
 )
 
+(define-method arrow_type
+  (of-object "XfcePanelPlugin")
+  (c-name "xfce_panel_plugin_arrow_type")
+  (return-type "GtkArrowType")
+)
+
+(define-method position_widget
+  (of-object "XfcePanelPlugin")
+  (c-name "xfce_panel_plugin_position_widget")
+  (return-type "none")
+  (parameters
+    '("GtkWidget*" "menu_widget")
+    '("GtkWidget*" "attach_widget")
+    '("gint*" "x")
+    '("gint*" "y")
+  )
+)
+
+(define-function xfce_panel_plugin_position_menu
+  (c-name "xfce_panel_plugin_position_menu")
+  (return-type "none")
+  (parameters
+    '("GtkMenu*" "menu")
+    '("gint*" "x")
+    '("gint*" "y")
+    '("gboolean*" "push_in")
+    '("gpointer" "panel_plugin")
+  )
+)
+
 (define-method lookup_rc_file
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_lookup_rc_file")
-  (return-type "char*")
+  (return-type "gchar*")
 )
 
 (define-method save_location
   (of-object "XfcePanelPlugin")
   (c-name "xfce_panel_plugin_save_location")
-  (return-type "char*")
+  (return-type "gchar*")
   (parameters
     '("gboolean" "create")
   )
@@ -142,4 +172,13 @@
   )
 )
 
+(define-method set_panel_hidden
+  (of-object "XfcePanelPlugin")
+  (c-name "xfce_panel_plugin_set_panel_hidden")
+  (return-type "none")
+  (parameters
+    '("gboolean" "hidden")
+  )
+)
 
+

Modified: pyxfce/branches/4.6/panel/plugin_iface.override
===================================================================
--- pyxfce/branches/4.6/panel/plugin_iface.override	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/plugin_iface.override	2009-07-06 16:44:10 UTC (rev 30204)
@@ -6,7 +6,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-plugin-iface.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 

Modified: pyxfce/branches/4.6/panel/window.c
===================================================================
--- pyxfce/branches/4.6/panel/window.c	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/window.c	2009-07-06 16:44:10 UTC (rev 30204)
@@ -8,7 +8,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-window.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 
@@ -25,7 +25,7 @@
 
 
 /* ---------- forward type declarations ---------- */
-PyTypeObject PyXfcePanelWindow_Type;
+PyTypeObject G_GNUC_INTERNAL PyXfcePanelWindow_Type;
 
 #line 31 "window.c"
 
@@ -38,20 +38,21 @@
 {
     static char* kwlist[] = { NULL };
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, ":support.PanelWindow.__init__", kwlist))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,
+                                     ":support.PanelWindow.__init__",
+                                     kwlist))
         return -1;
 
     pygobject_constructv(self, 0, NULL);
-
     if (!self->obj) {
-        PyErr_SetString(PyExc_RuntimeError, "could not create %(typename)s object");
+        PyErr_SetString(
+            PyExc_RuntimeError, 
+            "could not create support.PanelWindow object");
         return -1;
     }
-
     return 0;
 }
 
-
 static PyObject *
 _wrap_xfce_panel_window_set_orientation(PyGObject *self, PyObject *args, PyObject *kwargs)
 {
@@ -59,11 +60,13 @@
     GtkOrientation orientation;
     PyObject *py_orientation = NULL;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfcePanelWindow.set_orientation", kwlist, &py_orientation))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfcePanelWindow.set_orientation", kwlist, &py_orientation))
         return NULL;
-    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gint *)&orientation))
+    if (pyg_enum_get_value(GTK_TYPE_ORIENTATION, py_orientation, (gpointer)&orientation))
         return NULL;
+    
     xfce_panel_window_set_orientation(XFCE_PANEL_WINDOW(self->obj), orientation);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -73,7 +76,9 @@
 {
     gint ret;
 
+    
     ret = xfce_panel_window_get_orientation(XFCE_PANEL_WINDOW(self->obj));
+    
     return pyg_enum_from_gtype(GTK_TYPE_ORIENTATION, ret);
 }
 
@@ -84,11 +89,13 @@
     PyObject *py_handle_style = NULL;
     XfceHandleStyle handle_style;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O:XfcePanelWindow.set_handle_style", kwlist, &py_handle_style))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"O:XfcePanelWindow.set_handle_style", kwlist, &py_handle_style))
         return NULL;
-    if (pyg_enum_get_value(XFCE_TYPE_HANDLE_STYLE, py_handle_style, (gint *)&handle_style))
+    if (pyg_enum_get_value(XFCE_TYPE_HANDLE_STYLE, py_handle_style, (gpointer)&handle_style))
         return NULL;
+    
     xfce_panel_window_set_handle_style(XFCE_PANEL_WINDOW(self->obj), handle_style);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -98,7 +105,9 @@
 {
     gint ret;
 
+    
     ret = xfce_panel_window_get_handle_style(XFCE_PANEL_WINDOW(self->obj));
+    
     return pyg_enum_from_gtype(XFCE_TYPE_HANDLE_STYLE, ret);
 }
 
@@ -108,9 +117,11 @@
     static char *kwlist[] = { "top_border", "bottom_border", "left_border", "right_border", NULL };
     int top_border, bottom_border, left_border, right_border;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "iiii:XfcePanelWindow.set_show_border", kwlist, &top_border, &bottom_border, &left_border, &right_border))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"iiii:XfcePanelWindow.set_show_border", kwlist, &top_border, &bottom_border, &left_border, &right_border))
         return NULL;
+    
     xfce_panel_window_set_show_border(XFCE_PANEL_WINDOW(self->obj), top_border, bottom_border, left_border, right_border);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -121,9 +132,11 @@
     static char *kwlist[] = { "movable", NULL };
     int movable;
 
-    if (!PyArg_ParseTupleAndKeywords(args, kwargs, "i:XfcePanelWindow.set_movable", kwlist, &movable))
+    if (!PyArg_ParseTupleAndKeywords(args, kwargs,"i:XfcePanelWindow.set_movable", kwlist, &movable))
         return NULL;
+    
     xfce_panel_window_set_movable(XFCE_PANEL_WINDOW(self->obj), movable);
+    
     Py_INCREF(Py_None);
     return Py_None;
 }
@@ -133,61 +146,70 @@
 {
     int ret;
 
+    
     ret = xfce_panel_window_get_movable(XFCE_PANEL_WINDOW(self->obj));
+    
     return PyBool_FromLong(ret);
 
 }
 
-static PyMethodDef _PyXfcePanelWindow_methods[] = {
-    { "set_orientation", (PyCFunction)_wrap_xfce_panel_window_set_orientation, METH_VARARGS|METH_KEYWORDS },
-    { "get_orientation", (PyCFunction)_wrap_xfce_panel_window_get_orientation, METH_NOARGS },
-    { "set_handle_style", (PyCFunction)_wrap_xfce_panel_window_set_handle_style, METH_VARARGS|METH_KEYWORDS },
-    { "get_handle_style", (PyCFunction)_wrap_xfce_panel_window_get_handle_style, METH_NOARGS },
-    { "set_show_border", (PyCFunction)_wrap_xfce_panel_window_set_show_border, METH_VARARGS|METH_KEYWORDS },
-    { "set_movable", (PyCFunction)_wrap_xfce_panel_window_set_movable, METH_VARARGS|METH_KEYWORDS },
-    { "get_movable", (PyCFunction)_wrap_xfce_panel_window_get_movable, METH_NOARGS },
-    { NULL, NULL, 0 }
+static const PyMethodDef _PyXfcePanelWindow_methods[] = {
+    { "set_orientation", (PyCFunction)_wrap_xfce_panel_window_set_orientation, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_orientation", (PyCFunction)_wrap_xfce_panel_window_get_orientation, METH_NOARGS,
+      NULL },
+    { "set_handle_style", (PyCFunction)_wrap_xfce_panel_window_set_handle_style, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_handle_style", (PyCFunction)_wrap_xfce_panel_window_get_handle_style, METH_NOARGS,
+      NULL },
+    { "set_show_border", (PyCFunction)_wrap_xfce_panel_window_set_show_border, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "set_movable", (PyCFunction)_wrap_xfce_panel_window_set_movable, METH_VARARGS|METH_KEYWORDS,
+      NULL },
+    { "get_movable", (PyCFunction)_wrap_xfce_panel_window_get_movable, METH_NOARGS,
+      NULL },
+    { NULL, NULL, 0, NULL }
 };
 
-PyTypeObject PyXfcePanelWindow_Type = {
+PyTypeObject G_GNUC_INTERNAL PyXfcePanelWindow_Type = {
     PyObject_HEAD_INIT(NULL)
-    0,					/* ob_size */
-    "support.PanelWindow",			/* tp_name */
-    sizeof(PyGObject),	        /* tp_basicsize */
-    0,					/* tp_itemsize */
+    0,                                 /* ob_size */
+    "support.PanelWindow",                   /* tp_name */
+    sizeof(PyGObject),          /* tp_basicsize */
+    0,                                 /* tp_itemsize */
     /* methods */
-    (destructor)0,	/* tp_dealloc */
-    (printfunc)0,			/* tp_print */
-    (getattrfunc)0,	/* tp_getattr */
-    (setattrfunc)0,	/* tp_setattr */
-    (cmpfunc)0,		/* tp_compare */
-    (reprfunc)0,		/* tp_repr */
+    (destructor)0,        /* tp_dealloc */
+    (printfunc)0,                      /* tp_print */
+    (getattrfunc)0,       /* tp_getattr */
+    (setattrfunc)0,       /* tp_setattr */
+    (cmpfunc)0,           /* tp_compare */
+    (reprfunc)0,             /* tp_repr */
     (PyNumberMethods*)0,     /* tp_as_number */
     (PySequenceMethods*)0, /* tp_as_sequence */
     (PyMappingMethods*)0,   /* tp_as_mapping */
-    (hashfunc)0,		/* tp_hash */
-    (ternaryfunc)0,		/* tp_call */
-    (reprfunc)0,		/* tp_str */
-    (getattrofunc)0,	/* tp_getattro */
-    (setattrofunc)0,	/* tp_setattro */
-    (PyBufferProcs*)0,	/* tp_as_buffer */
+    (hashfunc)0,             /* tp_hash */
+    (ternaryfunc)0,          /* tp_call */
+    (reprfunc)0,              /* tp_str */
+    (getattrofunc)0,     /* tp_getattro */
+    (setattrofunc)0,     /* tp_setattro */
+    (PyBufferProcs*)0,  /* tp_as_buffer */
     Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE,                      /* tp_flags */
-    NULL, 				/* Documentation string */
-    (traverseproc)0,	/* tp_traverse */
-    (inquiry)0,		/* tp_clear */
-    (richcmpfunc)0,	/* tp_richcompare */
+    NULL,                        /* Documentation string */
+    (traverseproc)0,     /* tp_traverse */
+    (inquiry)0,             /* tp_clear */
+    (richcmpfunc)0,   /* tp_richcompare */
     offsetof(PyGObject, weakreflist),             /* tp_weaklistoffset */
-    (getiterfunc)0,		/* tp_iter */
-    (iternextfunc)0,	/* tp_iternext */
-    _PyXfcePanelWindow_methods,			/* tp_methods */
-    0,					/* tp_members */
-    0,		       	/* tp_getset */
-    NULL,				/* tp_base */
-    NULL,				/* tp_dict */
-    (descrgetfunc)0,	/* tp_descr_get */
-    (descrsetfunc)0,	/* tp_descr_set */
+    (getiterfunc)0,          /* tp_iter */
+    (iternextfunc)0,     /* tp_iternext */
+    (struct PyMethodDef*)_PyXfcePanelWindow_methods, /* tp_methods */
+    (struct PyMemberDef*)0,              /* tp_members */
+    (struct PyGetSetDef*)0,  /* tp_getset */
+    NULL,                              /* tp_base */
+    NULL,                              /* tp_dict */
+    (descrgetfunc)0,    /* tp_descr_get */
+    (descrsetfunc)0,    /* tp_descr_set */
     offsetof(PyGObject, inst_dict),                 /* tp_dictoffset */
-    (initproc)_wrap_xfce_panel_window_new,		/* tp_init */
+    (initproc)_wrap_xfce_panel_window_new,             /* tp_init */
     (allocfunc)0,           /* tp_alloc */
     (newfunc)0,               /* tp_new */
     (freefunc)0,             /* tp_free */
@@ -198,8 +220,8 @@
 
 /* ----------- functions ----------- */
 
-PyMethodDef pywindow_functions[] = {
-    { NULL, NULL, 0 }
+const PyMethodDef pywindow_functions[] = {
+    { NULL, NULL, 0, NULL }
 };
 
 
@@ -208,6 +230,9 @@
 void
 pywindow_add_constants(PyObject *module, const gchar *strip_prefix)
 {
+#ifdef VERSION
+    PyModule_AddStringConstant(module, "__version__", VERSION);
+#endif
   pyg_enum_add(module, "HandleStyle", strip_prefix, XFCE_TYPE_HANDLE_STYLE);
 
   if (PyErr_Occurred())
@@ -221,42 +246,38 @@
     PyObject *module;
 
     if ((module = PyImport_ImportModule("gobject")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGObject_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "GObject");
+        _PyGObject_Type = (PyTypeObject *)PyObject_GetAttrString(module, "GObject");
         if (_PyGObject_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name GObject from gobject");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gobject");
-        return;
+        return ;
     }
     if ((module = PyImport_ImportModule("gtk")) != NULL) {
-        PyObject *moddict = PyModule_GetDict(module);
-
-        _PyGtkWidget_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Widget");
+        _PyGtkWidget_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Widget");
         if (_PyGtkWidget_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Widget from gtk");
-            return;
+            return ;
         }
-        _PyGtkWindow_Type = (PyTypeObject *)PyDict_GetItemString(moddict, "Window");
+        _PyGtkWindow_Type = (PyTypeObject *)PyObject_GetAttrString(module, "Window");
         if (_PyGtkWindow_Type == NULL) {
             PyErr_SetString(PyExc_ImportError,
                 "cannot import name Window from gtk");
-            return;
+            return ;
         }
     } else {
         PyErr_SetString(PyExc_ImportError,
             "could not import gtk");
-        return;
+        return ;
     }
 
 
-#line 260 "window.c"
+#line 281 "window.c"
     pygobject_register_class(d, "XfcePanelWindow", XFCE_TYPE_PANEL_WINDOW, &PyXfcePanelWindow_Type, Py_BuildValue("(O)", &PyGtkWindow_Type));
     pyg_set_object_has_new_constructor(XFCE_TYPE_PANEL_WINDOW);
 }

Modified: pyxfce/branches/4.6/panel/window.override
===================================================================
--- pyxfce/branches/4.6/panel/window.override	2009-07-06 08:19:26 UTC (rev 30203)
+++ pyxfce/branches/4.6/panel/window.override	2009-07-06 16:44:10 UTC (rev 30204)
@@ -6,7 +6,7 @@
 #include "pygobject.h"
 #include <gtk/gtk.h>
 #include <libxfce4panel/xfce-panel-window.h>
-#include <libxfce4panel/xfce-panel-enum-types.h>
+#include <libxfce4panel/libxfce4panel-enum-types.h>
 
 extern PyTypeObject PyGtkWidget_Type;
 




More information about the Xfce4-commits mailing list