def _checkAtom(self): """Checks if menu item is atom menu class """ session = core.Kernel.session() self._skin = "MenuItem" self._color = "#ffffff" if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.atom_command], sc.SC_CONST): self.atom = True self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.atom_command) # check if it is a question command if sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.question_command], sc.SC_CONST): self.question = True self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.question_command) return elif sc_utils.checkIncToSets(session, self._getScAddr(), [keynodes.ui.noatom_command], sc.SC_CONST): self.atom = False self._icon_name = sc_utils.getImageIdentifier(session, keynodes.ui.noatom_command) return else: #object self.atom = False self.question = False return global logManager logManager.logWarning("Unknown atom class for a menu item '%s'" % self.getCaption())
def updateUserData(self): """ This function updates current user info @return: None """ kernel = core.Kernel.getSingleton() session = kernel.session() currentUserNode = sc_utils.getCurentUserNode(session) name = sc_utils.getUserName(session, currentUserNode) password = sc_utils.getUserPassword(session, currentUserNode) icon = sc_utils.getImageIdentifier(session, currentUserNode) self._curentUser = User(name, password, icon)
def updateUserData(self): """ This function updates current user info @return: None """ kernel = core.Kernel.getSingleton() session = kernel.session() currentUserNode = sc_utils.getCurentUserNode(session) name = sc_utils.getUserName(session,currentUserNode) password = sc_utils.getUserPassword(session,currentUserNode) icon = sc_utils.getImageIdentifier(session,currentUserNode) self._curentUser = User(name,password,icon)