[evolution/webkit-composer: 205/210] Only change composer mode when user hits OK (Lose formatting) button.
- From: Matthew Barnes <mbarnes src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/webkit-composer: 205/210] Only change composer mode when user hits OK (Lose formatting) button.
- Date: Mon, 8 Jul 2013 01:03:03 +0000 (UTC)
commit 091c09016c7525674a0230d8c78d2a16acd7d06c
Author: Tomas Popela <tpopela redhat com>
Date: Thu Jun 27 13:59:10 2013 +0200
Only change composer mode when user hits OK (Lose formatting) button.
We were changing the composer mode also on GTK_RESPONSE_DELETE_EVENT,
i.e. when user hits Escape key.
e-util/e-editor-widget.c | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/e-util/e-editor-widget.c b/e-util/e-editor-widget.c
index d620af4..e65225e 100644
--- a/e-util/e-editor-widget.c
+++ b/e-util/e-editor-widget.c
@@ -1473,6 +1473,7 @@ e_editor_widget_set_html_mode (EEditorWidget *widget,
gboolean html_mode)
{
gboolean changing = FALSE;
+ gint result;
g_return_if_fail (E_IS_EDITOR_WIDGET (widget));
@@ -1499,13 +1500,15 @@ e_editor_widget_set_html_mode (EEditorWidget *widget,
_("_Lose formatting"), GTK_RESPONSE_OK,
NULL);
- if (gtk_dialog_run (GTK_DIALOG (dialog)) == GTK_RESPONSE_CANCEL) {
+ result = gtk_dialog_run (GTK_DIALOG (dialog));
+
+ if (result == GTK_RESPONSE_OK) {
+ changing = TRUE;
+ } else {
gtk_widget_destroy (dialog);
/* Nothing has changed, but notify anyway */
g_object_notify (G_OBJECT (widget), "html-mode");
return;
- } else {
- changing = TRUE;
}
gtk_widget_destroy (dialog);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]