aboutsummaryrefslogtreecommitdiffstats
path: root/widgets
diff options
context:
space:
mode:
authorChristopher James Lahey <clahey@ximian.com>2001-10-29 20:24:38 +0800
committerChris Lahey <clahey@src.gnome.org>2001-10-29 20:24:38 +0800
commite3e57f4defa9cb92362a096e5ccb000ffa210be3 (patch)
tree475c0e633e72e5be072b7c34cbe6c4acbcaf409a /widgets
parente8c8a7a088ab4c3bbafc21076d7e96419b976430 (diff)
downloadgsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar.gz
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar.bz2
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar.lz
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar.xz
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.tar.zst
gsoc2013-evolution-e3e57f4defa9cb92362a096e5ccb000ffa210be3.zip
Set text->revert = NULL here. (e_text_cancel_editing): Only revert if
2001-10-29 Christopher James Lahey <clahey@ximian.com> * gal/e-text/e-text.c (e_text_stop_editing): Set text->revert = NULL here. (e_text_cancel_editing): Only revert if text->revert is non-null. svn path=/trunk/; revision=14334
Diffstat (limited to 'widgets')
-rw-r--r--widgets/text/e-text.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/widgets/text/e-text.c b/widgets/text/e-text.c
index bbcb0ec227..6911a5da57 100644
--- a/widgets/text/e-text.c
+++ b/widgets/text/e-text.c
@@ -3065,6 +3065,7 @@ start_editing (EText *text)
if (text->editing)
return;
+ g_free (text->revert);
text->revert = g_strdup (text->text);
text->editing = TRUE;
@@ -3091,6 +3092,7 @@ e_text_stop_editing (EText *text)
return;
g_free (text->revert);
+ text->revert = NULL;
text->editing = FALSE;
if ( (!text->default_cursor_shown) && (!text->draw_borders) ) {
@@ -3107,7 +3109,8 @@ e_text_stop_editing (EText *text)
void
e_text_cancel_editing (EText *text)
{
- e_text_model_set_text(text->model, text->revert);
+ if (text->revert)
+ e_text_model_set_text(text->model, text->revert);
e_text_stop_editing (text);
}