Commit Graph

123 Commits

Author SHA1 Message Date
50f3324c10 Added watch mode 2023-11-21 20:14:34 +00:00
SamJakob
ac40694691
Fix theming and confirm loss UI 2023-11-08 17:33:19 +00:00
Cas Cremers
e9578bcffd Updating some obsolete URLs. 2023-02-12 23:08:29 +01:00
Cas Cremers
a87453f84a Further documentation updates wrt email addresses and URLs. 2020-10-28 08:53:49 +01:00
Cas Cremers
6f51ad8b2a Updated copyright year to 2020. 2020-10-28 08:43:08 +01:00
Cas Cremers
7c5bdc431c Fixing some wxPython4 errors for highlighting spdl errors. 2020-10-27 23:46:03 +01:00
Cas Cremers
8843e48bfc Python3 refix. 2020-10-27 23:38:58 +01:00
Cas Cremers
85d646b133 Further wxPython4 fixes. 2020-10-27 23:38:48 +01:00
Cas Cremers
9dd73c2e38 wxPython4 fix. 2020-10-27 23:34:25 +01:00
Cas Cremers
d6fbaed188 Fixing wxPython4 change. 2020-10-27 23:34:11 +01:00
Cas Cremers
1e46eb3751 Upgrading further parts to wxPython4. 2020-10-27 22:11:24 +01:00
Cas Cremers
38a0fba212 Further Python3 fixes. 2020-10-27 22:10:55 +01:00
Cas Cremers
3a6041ccac Conversion to python3, using 2to3. 2020-10-27 22:09:03 +01:00
Cas Cremers
eecf68dc98 Fixing obsolete constants usage for wxPython. 2020-02-25 22:50:08 +01:00
Thomas Fleming
44e5e340be Fix deprecated class usage and function calls. 2020-02-25 22:50:08 +01:00
Cas Cremers
6f881d0b54 Removing deprecated and unneeded wxpython construction. 2019-01-03 22:53:53 +01:00
Christophe Kamphaus
faf6c57069 Added a new-file command with standard new-file keyboard shortcut 2016-02-28 23:33:18 +01:00
Christophe Kamphaus
53de782d3c Changed default filename to empty string
When trying to save a new file it opens the save-as dialog
2016-02-28 23:24:20 +01:00
Christophe Kamphaus
b386274738 Added standard keyboard shortcuts for opening and saving files 2016-02-28 23:21:24 +01:00
Christophe Kamphaus
94f7b2ce43 Added standard keyboard shortcuts for closing windows 2016-02-28 23:18:21 +01:00
Cas Cremers
ba513ea45d Fixing small wxPython error. 2014-07-14 16:56:48 +01:00
Cas Cremers
b6517dd41e BUGFIX: Fixing font selection commands for wxPython.
The previous way of selecting fonts was an obsolete hack. Some recent versions of wxPython
ran into problems. Now updated to reflect the correct wxPython font selection conventions.

Bug report and fix suggestion by S. Dismore.
2014-01-31 11:31:41 +00:00
Cas Cremers
a20f3760e7 Updating URLs. 2013-12-23 13:11:48 +00:00
Cas Cremers
c9b1d08f4f Hack for Windows users to compensate for Graphviz "feature".
Recent versions of Graphviz no longer set the PATH variable on Windows.
Hence Scyther can fail to find dot.exe even though Graphviz was appropriately
installed.

This patch is a hack to try and locate dot.exe in the more common locations.
We currently have a hardcoded search through:

  C:\Program Files\Graphviz*
  C:\Program Files (x86)\Graphviz*

This is clearly fragile. Obviously, nobody should be solving Graphviz' problem
in such an ugly way. Change drives or languages and it stops working.

Until Graphviz provides at least an alternative environment variable (GVPATH?)
this hack will help the bulk of our users to get things up and running smoothly.
2013-12-09 14:24:57 +00:00
Cas Cremers
d06247fcfe Updating time stamps for next release. 2013-10-05 23:56:12 +01:00
Cas Cremers
fe364fbe9d GUI: Canceling verification now also kills back-end thread.
Previously, pressing 'cancel' in the verification window would leave a dangling scyther backend process.
Now the process gets correctly killed.

The following changes enable this:
- External processes are no longer invoked through the shell (otherwise they are subprocesses of the shell and cannot be reliably killed cross-platform).
- The 'safeCommand' procedure now has a hook for passing opened Popen objects.
- The GUI stores and kills the Popen objects on cancel or window close.

To do: an alternative interface for this in 'safeCommand' could expose a 'killMe' method through a callback; this might be cleaner in the long term.
2013-06-30 23:14:28 +02:00
Cas Cremers
9e13d07b6e BUGFIX: Invoking Scyther scripts from non-standard directories or using symlinks should work consistently now.
Before, we were using both __file__ as well as sys.argv[0] to determine the base directory
for Scyther, and we were not taking symlinks into account.

By using the inspect module, we can consistently pick the current frame and derive
the file from that, then use realpath to strip symlinks.
2013-05-01 14:16:12 +02:00
Cas Cremers
10c62a6863 BUGFIX: Opening files was not always performing as expected. Fixed now. 2012-10-02 13:42:48 +02:00
Cas Cremers
9b0915441f Synchronising MPA branch with compromise branch where possible. 2012-04-25 17:03:51 +02:00
Cas Cremers
1cbe9826ac Updated dates. 2012-04-24 13:56:51 +02:00
Cas Cremers
30006b732a Fix Python 3 deprecated issues that cannot be resolved by 2to3. 2012-04-23 15:02:06 +02:00
Cas Cremers
b6ab044cd6 BUGFIX: 'Default' color not known to newer wxPython versions.
The statement was redundant anyway.
2012-04-09 21:14:41 +02:00
Cas Cremers
d1b334765b Updated image construction code to also use subprocess.Popen. 2010-05-16 00:13:33 +02:00
Cas Cremers
2a2a087cf6 GUI BUGFIX: On some file systems, problems with case-insensitivity and name clash between sys module and local. 2009-04-30 15:06:28 +02:00
Cas Cremers
e3268bb8e5 GUI: Added a large set of possible output formats to the right-click menu.
To do: We still need better error handling.
- File exists: overwrite?
- Write failed popup.
- Check for empty file at the end (what if dot does not support this particular
  output format?)
2008-08-29 12:05:06 +02:00
Cas Cremers
63471c5053 Code cleanup for GUI code. 2008-08-29 12:05:06 +02:00
Cas Cremers
8471f13da3 Added 'prune' switch support in GUI.
Allows to use the 'stop at first attack' feature of the backend.
2008-08-29 12:05:00 +02:00
Cas Cremers
b352044f92 BUGFIX: PIL is tested at the start of the program.
Previously, one would get one void verification result before Scyther detected
PIL was not working. Now nothing is wasted.
2008-08-26 21:52:00 +02:00
Cas Cremers
a020cffec7 GUI: Added popup menu to save graphviz (.dot) data.
A long requested feature was the option to print graphs more nicely.
This is a solution for knowledgeable users: the dot data is more basic
and can be converted in various ways.

TODO: Simple image export.
2008-08-26 17:35:38 +02:00
Cas Cremers
76bf6328b6 Nicer crash handling for PIL problem with a warning etc. 2008-08-21 21:57:22 +02:00
Cas Cremers
feb3827ba1 BUGFIX: Fixed crash on some include file cases.
Reported by ETH students last year: if you include a file, where the file has an
error in a line with a number higher than the original, the Python code crashes.

This is a *patch* only because the real underlying problem is that error reporting
does not take include commands into account, and does not propagate any
file names.
2008-07-31 17:37:20 +02:00
Cas Cremers
9605d5e772 Introduced "all attacks" switch in GUI, and a bugfix.
Passing the '--all-attacks' switch to the backend was not working. The reason
was the hack to get Vista working hardcoded cutting to the last attack found.

In the long term, this needs to be cleaned up, and cutting should be moved back
nicely to the Scyther C code where it used to work. Once done, switches.useAttackBuffer
can be set back to true.

BUGFIX: When cutting attacks/patterns, counts are no longer exact.
2008-07-30 00:14:10 +02:00
Cas Cremers
870d1c2f41 BUGFIX: PIL no longer works on my Feisty machines: PIL disabled.
Currently, both my Feisty Ubuntu's have stopped working with the GUI of
Scyther. So to be on the safe side, PIL is disabled for now, until I've
resolved the problem.

The error is the following:

---------------------------------------------------------------------------
Traceback (most recent call last):
  File "/home/cas/src/scyther-dev/gui/Gui/Scytherthread.py", line 351, in onViewButton
    w = Attackwindow.AttackWindow(btn.claim)
  File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 176, in __init__
    self.CreateInteriorWindowComponents()
  File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 209, in CreateInteriorWindowComponents
    dp = AttackDisplay(self, self, attacks[0])
  File "/home/cas/src/scyther-dev/gui/Gui/Attackwindow.py", line 73, in __init__
    self.original = Image.open(filename)
  File "/usr/lib/python2.5/site-packages/PIL/Image.py", line 1912, in open
    return factory(fp, filename)
  File "/usr/lib/python2.5/site-packages/PIL/ImageFile.py", line 82, in __init__
    self._open()
  File "/usr/lib/python2.5/site-packages/PIL/EpsImagePlugin.py", line 277, in _open
    raise IOError, "cannot determine EPS bounding box"
IOError: cannot determine EPS bounding box
---------------------------------------------------------------------------

Great. Bounding boxes in eps again.
2007-11-13 20:51:20 +01:00
Cas Cremers
44f89d8e78 Added GPL 2 notice in the 'about' box. 2007-06-11 14:20:53 +02:00
Cas Cremers
f901951e4b Added GPL 2 to the Python scripts. 2007-06-11 14:12:33 +02:00
Cas Cremers
d5ba325233 Workaround for strange wxPython display error.
Since a while, wxPython has been refusing to correctly display strings with a dash in them in the staticText object. Given a string "xx-yy", only "xx" is displayed. This caused some problems for protocols with dashes in their protocol names. I've worked around it by replacing all occurrences of "-" by "_".
2007-05-29 16:39:25 +02:00
Cas Cremers
b80de55289 Merge branch 'testing' of cas@roivas.shape9.nl:/export/git/scyther into reverting-b7 2007-05-21 13:48:56 +02:00
Cas Cremers
38a5d04c8c - Fix to the reverter. 2007-05-21 13:32:57 +02:00
Cas Cremers
38f1bffcef - Reverted version of beta7 for testing. 2007-05-21 13:29:33 +02:00
Cas Cremers
db78f91af1 Fixed version information updates of both the compiled code as well as the Gui. 2007-05-20 16:14:40 +02:00