CVSROOT:        /cvs/gnome
Module name:    sketch
Changes by:     bherzog 05/04/23 19:47:30

Modified files:
        test           : test_doceditor.py ChangeLog 
        Sketch/Editor  : edittool.py editbezier.py context.py 
                         __init__.py 
        .              : ChangeLog 
Added files:
        test           : test_editbezier.py 

Log message:
Reactivate the bezier editing commands.
Slightly modified savannah patch #3693 (files #4468 and #4469)
by Valentin Ungureanu

* Sketch/Editor/editbezier.py (PolyBezierEditor): Add methods used
to set the sensitivity of the corresponding menu items.
(PolyBezierEditor.CanSelectAllNodes,
(PolyBezierEditor.CanOpenNodes, PolyBezierEditor.CanCloseNodes)
(PolyBezierEditor.CanSetContinuity)
(PolyBezierEditor.CanConvertSegments)
(PolyBezierEditor.CanDeleteNodes)
(PolyBezierEditor.CanInsertNodes): New methods.
(PolyBezierEditor.CloseNodes): Now use CanCloseNodes to check.

* Sketch/Editor/edittool.py: Added some PolyBezier commands
present in Skencil 0.6: cont_angle, cont_smooth, cont_symmetrical,
segments_to_lines, segments_to_curve, select_all_nodes,
delete_nodes, insert_nodes, close_nodes, open_nodes.
(EditToolInstance.CallObjectEditorMethod): New method, used to
call methods from PolyBezierEditor.
(check_polybezier_method, call_polybezier_method): New. Helpers
for the commands related to PolyBeziers.

* Sketch/Editor/context.py (Context): Add HANDLES to the forwarded
channels. This is needed to trigger the sensitivity checks for the
PolyBezier commands.

* Sketch/Editor/__init__.py: Added the commands to standard_menu
and standard_keystrokes.

* test_doceditor.py (MockGC.MultiBezierHit): New mock method.
Always returns 1 because that's all the tests need so far.

* test_doceditor.py: New tests for PolyBezierEditor
(complex_polybezier): New method that returns a polybezier
containing two paths with various segments types.
(PolyBezierOpsTest): New base class for tests involving calling
commands on a selected polybezier while EditTool is active.
(TestOpenNodesSingle, TestOpenNodesMultiple)
(TestOpenNodesWithCurvePoint): New test cases for the open_nodes
command.
(TestCloseNodes): New test case for the close_nodes command.
(TestSetContinuityAngle): New test case for the cont_angle
command.
(TestSegmentsToLinesWithNodes, TestSegmentsToLinesWithCurvePoint):
New test cases for the segments_to_lines command.
(TestSegmentsToCurveWithNodes, TestSegmentsToCurveWithCurvePoint):
new test cases for the segments_to_curve command.
(TestDeleteNodesOne, TestDeleteNodesOneClosed)
(TestDeleteNodesMultiple, TestDeleteNodesAllFromPath)
(TestDeleteNodesAll): New test cases for the delete_nodes command.
(TestInsertNodes, TestInsertNodesWithCurvePoint): New test cases
for the insert_nodes command.

* test_editbezier.py (TestPolyBezierEditor): New.  Tests for the
PolyBezierEditor methods that determine the sensitivity of the
commands.

URL : 
http://cvs.gnome.org/bonsai/cvsquery.cgi?branch=&dir=sketch&who=bherzog&date=explicit&mindate=2005-04-23%2019:46&maxdate=2005-04-23%2019:48

_______________________________________________
cvs-commits-list mailing list
cvs-commits-list@gnome.org
http://mail.gnome.org/mailman/listinfo/cvs-commits-list

Reply via email to