[evolution/wip/webkit-composer: 204/262] Only change composer mode when user hits OK (Lose formatting) button.
- From: Tomas Popela <tpopela src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [evolution/wip/webkit-composer: 204/262] Only change composer mode when user hits OK (Lose formatting) button.
- Date: Thu, 16 Jan 2014 10:05:01 +0000 (UTC)
commit e9b993b321df421ace8f2c9d5ef10abe5edf6644
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]