(self, event)
| 873 | self.charChanged(event) |
| 874 | |
| 875 | def charChanged(self, event): |
| 876 | sChar = Character.getInstance() |
| 877 | sEsi = Esi.getInstance() |
| 878 | |
| 879 | activeChar = self.charEditor.entityEditor.getActiveEntity() |
| 880 | |
| 881 | if event and event.EventType == GE.EVT_SSO_LOGIN.typeId and hasattr(event, 'character'): |
| 882 | # Automatically assign the character that was just logged into |
| 883 | sChar.setSsoCharacter(activeChar.ID, event.character.ID) |
| 884 | |
| 885 | sso = sChar.getSsoCharacter(activeChar.ID) |
| 886 | |
| 887 | self.fetchButton.Enable(sso is not None) |
| 888 | |
| 889 | ssoChars = sEsi.getSsoCharacters() |
| 890 | |
| 891 | self.charChoice.Clear() |
| 892 | |
| 893 | noneID = self.charChoice.Append(_t("None"), None) |
| 894 | |
| 895 | for char in ssoChars: |
| 896 | currId = self.charChoice.Append(char.characterDisplay, char.ID) |
| 897 | |
| 898 | if sso is not None and char.ID == sso.ID: |
| 899 | self.charChoice.SetSelection(currId) |
| 900 | |
| 901 | if sso is None: |
| 902 | self.charChoice.SetSelection(noneID) |
| 903 | |
| 904 | # |
| 905 | # if chars: |
| 906 | # for charName in chars: |
| 907 | # self.charChoice.Append(charName) |
| 908 | # self.charChoice.SetStringSelection(char) |
| 909 | # else: |
| 910 | # self.charChoice.Append("No characters...", 0) |
| 911 | # self.charChoice.SetSelection(0) |
| 912 | # |
| 913 | if activeChar.name in ("All 0", "All 5"): |
| 914 | self.Enable(False) |
| 915 | self.stDisabledTip.Show() |
| 916 | self.Layout() |
| 917 | else: |
| 918 | self.Enable() |
| 919 | self.stDisabledTip.Hide() |
| 920 | self.Layout() |
| 921 | |
| 922 | if event is not None: |
| 923 | event.Skip() |
| 924 | |
| 925 | @staticmethod |
| 926 | def fetchCallback(e=None): |
no test coverage detected