| 469 | |
| 470 | |
| 471 | class ContextMenuSettings: |
| 472 | _instance = None |
| 473 | |
| 474 | @classmethod |
| 475 | def getInstance(cls): |
| 476 | if cls._instance is None: |
| 477 | cls._instance = ContextMenuSettings() |
| 478 | |
| 479 | return cls._instance |
| 480 | |
| 481 | def __init__(self): |
| 482 | # mode |
| 483 | # 0 - Do not show |
| 484 | # 1 - Show |
| 485 | ContextMenuDefaultSettings = { |
| 486 | "ammoPattern" : 1, |
| 487 | "changeAffectingSkills" : 1, |
| 488 | "metaSwap" : 1, |
| 489 | "project" : 1, |
| 490 | "moduleFill" : 1, |
| 491 | "spoolup" : 1, |
| 492 | "additionsCopyPaste" : 1, |
| 493 | "cargoFill" : 1, |
| 494 | } |
| 495 | |
| 496 | self.ContextMenuDefaultSettings = SettingsProvider.getInstance().getSettings("pyfaContextMenuSettings", ContextMenuDefaultSettings) |
| 497 | |
| 498 | def get(self, type): |
| 499 | return self.ContextMenuDefaultSettings[type] |
| 500 | |
| 501 | def set(self, type, value): |
| 502 | self.ContextMenuDefaultSettings[type] = value |
| 503 | |
| 504 | |
| 505 | class EOSSettings: |