summaryrefslogtreecommitdiffstats
path: root/superkaramba/src/task_python.cpp
diff options
context:
space:
mode:
authorDavid C. Rankin <trin@3111skyline.com>2014-09-27 11:36:51 -0500
committerTimothy Pearson <kb9vqf@pearsoncomputing.net>2014-09-27 11:36:51 -0500
commit36230c0b5d872388449b20d46d39a9e66a017714 (patch)
treeb6f776f011ca59208d33d314ccb8ffdea65a91a8 /superkaramba/src/task_python.cpp
parenta594faa6526f7b3259319bc706d88aacd0fd0286 (diff)
downloadtdeutils-36230c0b5d872388449b20d46d39a9e66a017714.tar.gz
tdeutils-36230c0b5d872388449b20d46d39a9e66a017714.zip
Add Python >= v3 support to SuperKaramba
Diffstat (limited to 'superkaramba/src/task_python.cpp')
-rw-r--r--superkaramba/src/task_python.cpp44
1 files changed, 22 insertions, 22 deletions
diff --git a/superkaramba/src/task_python.cpp b/superkaramba/src/task_python.cpp
index 4b81f26..e8d1d3e 100644
--- a/superkaramba/src/task_python.cpp
+++ b/superkaramba/src/task_python.cpp
@@ -143,50 +143,50 @@ PyObject* getTaskInfo(long widget, long ctask)
//Task Name
if (currTask->name() != NULL)
{
- PyList_Append(pList, PyString_FromString(currTask->name().latin1()));
+ PyList_Append(pList, PyBytes_FromString(currTask->name().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
//Icon Name
if (currTask->iconName() != NULL)
{
- PyList_Append(pList, PyString_FromString(currTask->iconName().latin1()));
+ PyList_Append(pList, PyBytes_FromString(currTask->iconName().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
//Class Name
if (currTask->className() != NULL)
{
- PyList_Append(pList, PyString_FromString(currTask->className().latin1()));
+ PyList_Append(pList, PyBytes_FromString(currTask->className().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
// Desktop this task is on
- PyList_Append(pList, PyInt_FromLong(currTask->desktop()));
+ PyList_Append(pList, PyLong_FromLong(currTask->desktop()));
// is it maximized?
- PyList_Append(pList, PyInt_FromLong(currTask->isMaximized()));
+ PyList_Append(pList, PyLong_FromLong(currTask->isMaximized()));
// is it iconified?
- PyList_Append(pList, PyInt_FromLong(currTask->isIconified()));
+ PyList_Append(pList, PyLong_FromLong(currTask->isIconified()));
// is it shaded?
- PyList_Append(pList, PyInt_FromLong(currTask->isShaded()));
+ PyList_Append(pList, PyLong_FromLong(currTask->isShaded()));
// is it focused?
- PyList_Append(pList, PyInt_FromLong(currTask->isActive()));
+ PyList_Append(pList, PyLong_FromLong(currTask->isActive()));
// a reference back to itself
- PyList_Append(pList, PyInt_FromLong((long)currTask));
+ PyList_Append(pList, PyLong_FromLong((long)currTask));
return pList;
@@ -235,35 +235,35 @@ PyObject* getStartupInfo(long widget, long cstartup)
//Startup Name
if (startup -> text() != NULL)
{
- PyList_Append(pList, PyString_FromString(startup -> text().latin1()));
+ PyList_Append(pList, PyBytes_FromString(startup -> text().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
//Icon Name
if (startup -> icon() != NULL)
{
- PyList_Append(pList, PyString_FromString(startup -> icon().latin1()));
+ PyList_Append(pList, PyBytes_FromString(startup -> icon().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
//Executable Name
if (startup -> bin() != NULL)
{
- PyList_Append(pList, PyString_FromString(startup -> bin().latin1()));
+ PyList_Append(pList, PyBytes_FromString(startup -> bin().latin1()));
}
else
{
- PyList_Append(pList, PyString_FromString(""));
+ PyList_Append(pList, PyBytes_FromString(""));
}
// a reference back to itself
- PyList_Append(pList, PyInt_FromLong((long) startup));
+ PyList_Append(pList, PyLong_FromLong((long) startup));
return pList;
@@ -300,7 +300,7 @@ PyObject* getTaskNames(long widget)
const char* tmp = task->name().latin1();
if(tmp == 0)
continue;
- pString = PyString_FromString(tmp);
+ pString = PyBytes_FromString(tmp);
if(pString)
PyList_Append(pList, pString);
}
@@ -329,7 +329,7 @@ PyObject* getTaskList(long widget)
Task* task;
for (task = taskList.first(); task; task = taskList.next())
{
- pString = PyInt_FromLong((long)task);
+ pString = PyLong_FromLong((long)task);
PyList_Append(pList, pString);
}
return pList;
@@ -358,7 +358,7 @@ PyObject* getStartupList(long widget)
for (startup = startupList.first(); startup; startup = startupList.next())
{
- pString = PyInt_FromLong((long) startup);
+ pString = PyLong_FromLong((long) startup);
PyList_Append(pList, pString);
}
return pList;