diff options
author | Milan Crha <mcrha@redhat.com> | 2012-05-03 20:43:32 +0800 |
---|---|---|
committer | Milan Crha <mcrha@redhat.com> | 2012-05-03 20:43:32 +0800 |
commit | f25826211b007a615118f9b583a66d7027eddeac (patch) | |
tree | 2060a8fc197fe369dda2dd58f7c88029f4f88b0f /widgets/misc | |
parent | a195cd1e79d3226011935f3d238579cc8009d92d (diff) | |
download | gsoc2013-evolution-f25826211b007a615118f9b583a66d7027eddeac.tar.gz gsoc2013-evolution-f25826211b007a615118f9b583a66d7027eddeac.tar.zst gsoc2013-evolution-f25826211b007a615118f9b583a66d7027eddeac.zip |
Bug #669463 - HTML signature opens in editor as Plain text
Diffstat (limited to 'widgets/misc')
-rw-r--r-- | widgets/misc/e-signature-editor.c | 48 | ||||
-rw-r--r-- | widgets/misc/e-signature-editor.h | 5 | ||||
-rw-r--r-- | widgets/misc/e-signature-manager.c | 2 |
3 files changed, 54 insertions, 1 deletions
diff --git a/widgets/misc/e-signature-editor.c b/widgets/misc/e-signature-editor.c index 0ddfb8d513..93b2e1d0b9 100644 --- a/widgets/misc/e-signature-editor.c +++ b/widgets/misc/e-signature-editor.c @@ -40,7 +40,8 @@ enum { PROP_0, PROP_FOCUS_TRACKER, - PROP_SIGNATURE + PROP_SIGNATURE, + PROP_EDITING_OLD }; struct _ESignatureEditorPrivate { @@ -49,6 +50,7 @@ struct _ESignatureEditorPrivate { ESignature *signature; GtkWidget *entry; gchar *original_name; + gboolean editing_old; }; static const gchar *ui = @@ -254,6 +256,12 @@ signature_editor_set_property (GObject *object, E_SIGNATURE_EDITOR (object), g_value_get_object (value)); return; + + case PROP_EDITING_OLD: + e_signature_editor_set_editing_old ( + E_SIGNATURE_EDITOR (object), + g_value_get_boolean (value)); + return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -277,6 +285,12 @@ signature_editor_get_property (GObject *object, value, e_signature_editor_get_signature ( E_SIGNATURE_EDITOR (object))); return; + + case PROP_EDITING_OLD: + g_value_set_boolean ( + value, e_signature_editor_get_editing_old ( + E_SIGNATURE_EDITOR (object))); + return; } G_OBJECT_WARN_INVALID_PROPERTY_ID (object, property_id, pspec); @@ -389,6 +403,16 @@ e_signature_editor_class_init (ESignatureEditorClass *class) NULL, E_TYPE_SIGNATURE, G_PARAM_READWRITE)); + + g_object_class_install_property ( + object_class, + PROP_EDITING_OLD, + g_param_spec_boolean ( + "editing-old", + NULL, + NULL, + FALSE, + G_PARAM_READWRITE)); } static void @@ -585,3 +609,25 @@ exit: g_object_notify (G_OBJECT (editor), "signature"); } + +void +e_signature_editor_set_editing_old (ESignatureEditor *editor, + gboolean editing_old) +{ + g_return_if_fail (E_IS_SIGNATURE_EDITOR (editor)); + + if (editor->priv->editing_old == editing_old) + return; + + editor->priv->editing_old = editing_old; + + g_object_notify (G_OBJECT (editor), "editing-old"); +} + +gboolean +e_signature_editor_get_editing_old (ESignatureEditor *editor) +{ + g_return_val_if_fail (E_IS_SIGNATURE_EDITOR (editor), FALSE); + + return editor->priv->editing_old; +} diff --git a/widgets/misc/e-signature-editor.h b/widgets/misc/e-signature-editor.h index 0d07cb840e..f848e89fbf 100644 --- a/widgets/misc/e-signature-editor.h +++ b/widgets/misc/e-signature-editor.h @@ -67,6 +67,11 @@ EFocusTracker * e_signature_editor_get_focus_tracker ESignature * e_signature_editor_get_signature (ESignatureEditor *editor); void e_signature_editor_set_signature (ESignatureEditor *editor, ESignature *signature); +void e_signature_editor_set_editing_old + (ESignatureEditor *editor, + gboolean editing_old); +gboolean e_signature_editor_get_editing_old + (ESignatureEditor *editor); G_END_DECLS diff --git a/widgets/misc/e-signature-manager.c b/widgets/misc/e-signature-manager.c index eb68dd251d..888a9df3c4 100644 --- a/widgets/misc/e-signature-manager.c +++ b/widgets/misc/e-signature-manager.c @@ -378,6 +378,8 @@ signature_manager_edit_signature (ESignatureManager *manager) editor = e_signature_editor_new (); e_signature_editor_set_signature ( E_SIGNATURE_EDITOR (editor), signature); + e_signature_editor_set_editing_old ( + E_SIGNATURE_EDITOR (editor), TRUE); signature_manager_emit_editor_created (manager, editor); goto exit; |