| | |
| | | } |
| | | } |
| | | |
| | | $type = 'desktop_timeout'; |
| | | $key = 'newmail_notifier_' . $type; |
| | | if (!in_array($key, $dont_override)) { |
| | | $field_id = '_' . $key; |
| | | $select = new html_select(array('name' => $field_id, 'id' => $field_id)); |
| | | |
| | | foreach (array(5, 10, 15, 30, 45, 60) as $sec) { |
| | | $label = $this->rc->gettext(array('name' => 'afternseconds', 'vars' => array('n' => $sec))); |
| | | $select->add($label, $sec); |
| | | } |
| | | |
| | | $args['blocks']['new_message']['options'][$key] = array( |
| | | 'title' => html::label($field_id, rcube::Q($this->gettext('desktoptimeout'))), |
| | | 'content' => $select->show((int) $this->rc->config->get($key)) |
| | | ); |
| | | } |
| | | |
| | | return $args; |
| | | } |
| | | |
| | |
| | | $key = 'newmail_notifier_' . $type; |
| | | if (!in_array($key, $dont_override)) { |
| | | $args['prefs'][$key] = rcube_utils::get_input_value('_'.$key, rcube_utils::INPUT_POST) ? true : false; |
| | | } |
| | | } |
| | | |
| | | $option = 'newmail_notifier_desktop_timeout'; |
| | | if (!in_array($option, $dont_override)) { |
| | | if ($value = (int) rcube_utils::get_input_value('_' . $option, rcube_utils::INPUT_POST)) { |
| | | $args['prefs'][$option] = $value; |
| | | } |
| | | } |
| | | |
| | |
| | | if ($unseen->count()) { |
| | | $this->notified = true; |
| | | |
| | | $this->rc->output->set_env('newmail_notifier_timeout', $this->rc->config->get('newmail_notifier_desktop_timeout')); |
| | | $this->rc->output->command('plugin.newmail_notifier', |
| | | array( |
| | | 'basic' => $this->opt['basic'], |