summaryrefslogtreecommitdiff
path: root/python.c
diff options
context:
space:
mode:
Diffstat (limited to 'python.c')
-rw-r--r--python.c13
1 files changed, 6 insertions, 7 deletions
diff --git a/python.c b/python.c
index bb44246..e353552 100644
--- a/python.c
+++ b/python.c
@@ -87,7 +87,6 @@ extern short beeper;
extern Widget menuwidgets[];
extern Display *dpy;
extern keybinding *keylist;
-extern int *appcolors;
extern int number_colors;
extern colorindex *colorlist;
extern ApplicationData appdata;
@@ -1089,11 +1088,11 @@ static PyObject *xc_getattr(PyObject *self, PyObject *args)
PyDict_SetItem(rdict, PyString_FromString("position"),
make_pair(&(TOLABEL(gelem)->position)));
PyDict_SetItem(rdict, PyString_FromString("rotation"),
- PyInt_FromLong((long)TOLABEL(gelem)->rotation));
+ PyFloat_FromDouble((double)TOLABEL(gelem)->rotation));
PyDict_SetItem(rdict, PyString_FromString("scale"),
PyFloat_FromDouble((double)TOLABEL(gelem)->scale));
- PyDict_SetItem(rdict, PyString_FromString("justify"),
- PyInt_FromLong((long)TOLABEL(gelem)->justify));
+ PyDict_SetItem(rdict, PyString_FromString("anchor"),
+ PyInt_FromLong((long)TOLABEL(gelem)->anchor));
PyDict_SetItem(rdict, PyString_FromString("pin"),
PyInt_FromLong((long)TOLABEL(gelem)->pin));
lstr = PyGetStringParts(TOLABEL(gelem)->string);
@@ -1154,7 +1153,7 @@ static PyObject *xc_getattr(PyObject *self, PyObject *args)
PyDict_SetItem(rdict, PyString_FromString("position"),
make_pair(&(TOOBJINST(gelem)->position)));
PyDict_SetItem(rdict, PyString_FromString("rotation"),
- PyInt_FromLong((long)TOOBJINST(gelem)->rotation));
+ PyFloat_FromDouble((double)TOOBJINST(gelem)->rotation));
PyDict_SetItem(rdict, PyString_FromString("scale"),
PyFloat_FromDouble((double)TOOBJINST(gelem)->scale));
PyDict_SetItem(rdict, PyString_FromString("name"),
@@ -1328,8 +1327,8 @@ static PyObject *xc_setattr(PyObject *self, PyObject *args)
switch(ELEMENTTYPE(*gelem)) {
case LABEL:
- if ((dval = PyDict_GetItemString(attrdict, "justify")) != NULL) {
- TOLABEL(gelem)->justify = PyInt_AsLong(dval);
+ if ((dval = PyDict_GetItemString(attrdict, "anchor")) != NULL) {
+ TOLABEL(gelem)->anchor = PyInt_AsLong(dval);
}
if ((dval = PyDict_GetItemString(attrdict, "string")) != NULL) {
freelabel(TOLABEL(gelem)->string);