summaryrefslogtreecommitdiff
path: root/program/steps
diff options
context:
space:
mode:
Diffstat (limited to 'program/steps')
-rw-r--r--program/steps/mail/check_recent.inc3
-rw-r--r--program/steps/settings/func.inc9
-rw-r--r--program/steps/settings/save_prefs.inc1
3 files changed, 12 insertions, 1 deletions
diff --git a/program/steps/mail/check_recent.inc b/program/steps/mail/check_recent.inc
index e84d7ba9e..07313c156 100644
--- a/program/steps/mail/check_recent.inc
+++ b/program/steps/mail/check_recent.inc
@@ -41,6 +41,9 @@ foreach ($a_mailboxes as $mbox_name)
$OUTPUT->command('set_rowcount', rcmail_get_messagecount_text());
$OUTPUT->command('set_quota', rcmail_quota_content($IMAP->get_quota()));
+ if (rcmail::get_instance()->config->get('focus_on_new_message',true))
+ $OUTPUT->command('new_message_focus');
+
// add new message headers to list
$a_headers = array();
for ($i=$recent_count, $id=$count_all-$recent_count+1; $i>0; $i--, $id++)
diff --git a/program/steps/settings/func.inc b/program/steps/settings/func.inc
index 6e8c6b509..1b28d3b17 100644
--- a/program/steps/settings/func.inc
+++ b/program/steps/settings/func.inc
@@ -148,6 +148,13 @@ function rcmail_user_prefs_form($attrib)
$table = new html_table(array('cols' => 2));
+ if (!isset($no_override['focus_on_new_message'])) {
+ $field_id = 'rcmfd_focus_on_new_message';
+ $input_focus_on_new_message = new html_checkbox(array('name' => '_focus_on_new_message', 'id' => $field_id, 'value' => 1));
+ $table->add('title', html::label($field_id, Q(rcube_label('focusonnewmessage'))));
+ $table->add(null, $input_focus_on_new_message->show($config['focus_on_new_message']?1:0));
+ }
+
// show config parameter for preview pane
if (!isset($no_override['preview_pane'])) {
$field_id = 'rcmfd_preview';
@@ -294,7 +301,7 @@ function rcmail_user_prefs_form($attrib)
$table->add('title', html::label($field_id, Q(rcube_label('skipdeleted'))));
$table->add(null, $input_purge->show($config['skip_deleted']?1:0));
}
-
+
// Trash purging on logout
if (!isset($no_override['logout_purge'])) {
$field_id = 'rcmfd_logout_purge';
diff --git a/program/steps/settings/save_prefs.inc b/program/steps/settings/save_prefs.inc
index beeb1df0f..3f6328d0d 100644
--- a/program/steps/settings/save_prefs.inc
+++ b/program/steps/settings/save_prefs.inc
@@ -30,6 +30,7 @@ $a_user_prefs = array(
'htmleditor' => isset($_POST['_htmleditor']) ? TRUE : FALSE,
'inline_images' => isset($_POST['_inline_images']) ? TRUE : FALSE,
'preview_pane' => isset($_POST['_preview_pane']) ? TRUE : FALSE,
+ 'focus_on_new_message' => isset($_POST['_focus_on_new_message']) ? TRUE : FALSE,
'read_when_deleted' => isset($_POST['_read_when_deleted']) ? TRUE : FALSE,
'skip_deleted' => isset($_POST['_skip_deleted']) ? TRUE : FALSE,
'flag_for_deletion' => isset($_POST['_flag_for_deletion']) ? TRUE : FALSE,