diff options
author | Jim Evins <evins@snaught.com> | 2009-12-22 22:57:17 -0500 |
---|---|---|
committer | Jim Evins <evins@snaught.com> | 2009-12-22 22:57:17 -0500 |
commit | 73b70cb6f49f732eb826f145cd1c229f707abc7f (patch) | |
tree | 70fd260ea8ef9b5c40b6067ff88dec5544a59ede /src/view-text.c | |
parent | ab665830afa2c549d3b3d76a5a3f20affcc69f57 (diff) |
Added undo/redo feature
Checkpoint the label state before each user initiated change. These
checkpoint states are kept on an undo stack. As the user pops items
from the undo stack, the current state is pushed onto a redo stack.
Diffstat (limited to 'src/view-text.c')
-rw-r--r-- | src/view-text.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/src/view-text.c b/src/view-text.c index 569a8c3..9668b79 100644 --- a/src/view-text.c +++ b/src/view-text.c @@ -96,11 +96,11 @@ gl_view_text_create_button_press_event (glView *view, gl_label_unselect_all (view->label); - object = gl_label_text_new (view->label); - gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y); + object = gl_label_text_new (view->label, TRUE); + gl_label_object_set_position (GL_LABEL_OBJECT(object), x, y, FALSE); lines = gl_text_node_lines_new_from_text (_("Text")); - gl_label_text_set_lines (GL_LABEL_TEXT(object), lines); + gl_label_text_set_lines (GL_LABEL_TEXT(object), lines, FALSE); view->create_object = GL_LABEL_OBJECT (object); view->create_x0 = x; @@ -116,7 +116,7 @@ gl_view_text_create_motion_event (glView *view, gdouble x, gdouble y) { - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y, FALSE); } @@ -128,7 +128,7 @@ gl_view_text_create_button_release_event (glView *view, gdouble x, gdouble y) { - gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y); + gl_label_object_set_position (GL_LABEL_OBJECT(view->create_object), x, y, FALSE); } |