From f3f1284d206c580e4aed4266567f019cde9abab7 Mon Sep 17 00:00:00 2001 From: alec Date: Thu, 14 Oct 2010 07:35:48 +0000 Subject: - Fix set_busy() usage, add encryption menu in compose git-svn-id: https://svn.roundcube.net/trunk@4087 208e9e7b-5314-0410-a742-e7e81cd9613c --- plugins/enigma/enigma.php | 21 ++++++++++++--------- 1 file changed, 12 insertions(+), 9 deletions(-) (limited to 'plugins/enigma/enigma.php') diff --git a/plugins/enigma/enigma.php b/plugins/enigma/enigma.php index ad4f65a0e..fb7c98635 100644 --- a/plugins/enigma/enigma.php +++ b/plugins/enigma/enigma.php @@ -52,16 +52,22 @@ class enigma extends rcube_plugin $this->add_hook('message_part_structure', array($this, 'parse_structure')); $this->add_hook('message_body_prefix', array($this, 'status_message')); - // message sending hooks - //$this->add_hook('outgoing_message_body', array($this, 'msg_encode')); - //$this->add_hook('outgoing_message_body', array($this, 'msg_sign')); - + // message displaying if ($rcmail->action == 'show' || $rcmail->action == 'preview') { $this->add_hook('message_load', array($this, 'message_load')); $this->add_hook('template_object_messagebody', array($this, 'message_output')); + $this->register_action('plugin.enigmaimport', array($this, 'import_file')); + } + // message composing + else if ($rcmail->action == 'compose') { + $this->load_ui(); + $this->ui->init($section); + } + // message sending (and draft storing) + else if ($rcmail->action == 'sendmail') { + //$this->add_hook('outgoing_message_body', array($this, 'msg_encode')); + //$this->add_hook('outgoing_message_body', array($this, 'msg_sign')); } - - $this->register_action('plugin.enigmaimport', array($this, 'import_file')); } else if ($this->rc->task == 'settings') { // add hooks for Enigma settings @@ -78,9 +84,6 @@ class enigma extends rcube_plugin $this->load_ui(); $this->ui->init($section); } - - // include main js script -// $this->include_script('enigma.js'); } } -- cgit v1.2.3