From c437ab007ca7c1f852703ceb580ea1b628acbd8a Mon Sep 17 00:00:00 2001 From: Mark Ganson TheMarkster <39143564+mwganson@users.noreply.github.com> Date: Fri, 17 Jul 2020 19:34:38 -0500 Subject: [PATCH] move preprocessor directives back to column 1 --- src/Gui/ApplicationPy.cpp | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/src/Gui/ApplicationPy.cpp b/src/Gui/ApplicationPy.cpp index acd4add1ac..f9cb9166aa 100644 --- a/src/Gui/ApplicationPy.cpp +++ b/src/Gui/ApplicationPy.cpp @@ -1346,21 +1346,21 @@ PyObject* Application::sGetCommandInfo(PyObject * /*self*/, PyObject *args) const char* pixMapTxt = cmd->getPixmap(); std::string shortcutTxt = action->shortcut().toString().toStdString(); - #if PY_MAJOR_VERSION >= 3 - PyObject* strMenuTxt = PyUnicode_FromString(menuTxt ? menuTxt : ""); - PyObject* strTooltipTxt = PyUnicode_FromString(tooltipTxt ? tooltipTxt : ""); - PyObject* strWhatsThisTxt = PyUnicode_FromString(whatsThisTxt ? whatsThisTxt : ""); - PyObject* strStatustipTxt = PyUnicode_FromString(statustipTxt ? statustipTxt : ""); - PyObject* strPixMapTxt = PyUnicode_FromString(pixMapTxt ? pixMapTxt : ""); - PyObject* strShortcutTxt = PyUnicode_FromString(!shortcutTxt.empty() ? shortcutTxt.c_str() : ""); - #else - PyObject* strMenuTxt = PyString_FromString(menuTxt ? menuTxt : ""); - PyObject* strTooltipTxt = PyString_FromString(tooltipTxt ? tooltipTxt : ""); - PyObject* strWhatsThisTxt = PyString_FromString(whatsThisTxt ? whatsThisTxt : ""); - PyObject* strStatustipTxt = PyString_FromString(statustipTxt ? statustipTxt : ""); - PyObject* strPixMapTxt = PyString_FromString(pixMapTxt ? pixMapTxt : ""); - PyObject* strShortcutTxt = PyString_FromString(!shortcutTxt.empty() ? shortcutTxt.c_str() : ""); - #endif +#if PY_MAJOR_VERSION >= 3 + PyObject* strMenuTxt = PyUnicode_FromString(menuTxt ? menuTxt : ""); + PyObject* strTooltipTxt = PyUnicode_FromString(tooltipTxt ? tooltipTxt : ""); + PyObject* strWhatsThisTxt = PyUnicode_FromString(whatsThisTxt ? whatsThisTxt : ""); + PyObject* strStatustipTxt = PyUnicode_FromString(statustipTxt ? statustipTxt : ""); + PyObject* strPixMapTxt = PyUnicode_FromString(pixMapTxt ? pixMapTxt : ""); + PyObject* strShortcutTxt = PyUnicode_FromString(!shortcutTxt.empty() ? shortcutTxt.c_str() : "") +#else + PyObject* strMenuTxt = PyString_FromString(menuTxt ? menuTxt : ""); + PyObject* strTooltipTxt = PyString_FromString(tooltipTxt ? tooltipTxt : ""); + PyObject* strWhatsThisTxt = PyString_FromString(whatsThisTxt ? whatsThisTxt : ""); + PyObject* strStatustipTxt = PyString_FromString(statustipTxt ? statustipTxt : ""); + PyObject* strPixMapTxt = PyString_FromString(pixMapTxt ? pixMapTxt : ""); + PyObject* strShortcutTxt = PyString_FromString(!shortcutTxt.empty() ? shortcutTxt.c_str() : ""); +#endif PyList_SetItem(pyList, 0, strMenuTxt); PyList_SetItem(pyList, 1, strTooltipTxt); PyList_SetItem(pyList, 2, strWhatsThisTxt);