Event fired when import from clipboard button is clicked
(self, event)
| 336 | pass |
| 337 | |
| 338 | def importPatterns(self, event): |
| 339 | """Event fired when import from clipboard button is clicked""" |
| 340 | |
| 341 | text = fromClipboard() |
| 342 | if text: |
| 343 | sTR = TargetProfile.getInstance() |
| 344 | try: |
| 345 | sTR.importPatterns(text) |
| 346 | self.stNotice.SetLabel(_t("Profiles successfully imported from clipboard")) |
| 347 | except ImportError as e: |
| 348 | pyfalog.error(e) |
| 349 | self.stNotice.SetLabel(str(e)) |
| 350 | except (KeyboardInterrupt, SystemExit): |
| 351 | raise |
| 352 | except Exception as e: |
| 353 | msg = _t("Could not import from clipboard:") |
| 354 | pyfalog.warning(msg) |
| 355 | pyfalog.error(e) |
| 356 | self.stNotice.SetLabel(msg) |
| 357 | finally: |
| 358 | self.entityEditor.refreshEntityList() |
| 359 | else: |
| 360 | self.stNotice.SetLabel(_t("Could not import from clipboard")) |
| 361 | |
| 362 | def exportPatterns(self, event): |
| 363 | """Event fired when export to clipboard button is clicked""" |
nothing calls this directly
no test coverage detected