summaryrefslogtreecommitdiff
path: root/plugins/newmail_notifier
diff options
context:
space:
mode:
authorthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-31 12:25:48 +0000
committerthomasb <thomasb@208e9e7b-5314-0410-a742-e7e81cd9613c>2012-03-31 12:25:48 +0000
commite6d8f97bf2e0bbb4d95df0c4e030eb7ec6ef75a5 (patch)
tree4f6fdadb51cbe1a2bb3b2b06c9bcabb0429d1a84 /plugins/newmail_notifier
parent868c169e2a64c1d19a9b6bbcd98f268808dfd173 (diff)
Move plugins repository into roundcubemail root folder; svn:externals are not defined anymore
git-svn-id: https://svn.roundcube.net/trunk@6034 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'plugins/newmail_notifier')
-rw-r--r--plugins/newmail_notifier/config.inc.php.dist12
-rw-r--r--plugins/newmail_notifier/favicon.icobin1734 -> 0 bytes
-rw-r--r--plugins/newmail_notifier/localization/de_CH.inc27
-rw-r--r--plugins/newmail_notifier/localization/de_DE.inc27
-rw-r--r--plugins/newmail_notifier/localization/en_US.inc13
-rw-r--r--plugins/newmail_notifier/localization/ja_JP.inc27
-rw-r--r--plugins/newmail_notifier/localization/lv_LV.inc27
-rw-r--r--plugins/newmail_notifier/localization/pl_PL.inc27
-rw-r--r--plugins/newmail_notifier/localization/pt_BR.inc27
-rw-r--r--plugins/newmail_notifier/localization/ru_RU.inc27
-rw-r--r--plugins/newmail_notifier/localization/sv_SE.inc27
-rw-r--r--plugins/newmail_notifier/mail.pngbin1408 -> 0 bytes
-rw-r--r--plugins/newmail_notifier/newmail_notifier.js120
-rw-r--r--plugins/newmail_notifier/newmail_notifier.php178
-rw-r--r--plugins/newmail_notifier/package.xml70
-rw-r--r--plugins/newmail_notifier/sound.wavbin10444 -> 0 bytes
16 files changed, 0 insertions, 609 deletions
diff --git a/plugins/newmail_notifier/config.inc.php.dist b/plugins/newmail_notifier/config.inc.php.dist
deleted file mode 100644
index 067fe19f1..000000000
--- a/plugins/newmail_notifier/config.inc.php.dist
+++ /dev/null
@@ -1,12 +0,0 @@
-<?php
-
-// Enables basic notification
-$rcmail_config['newmail_notifier_basic'] = false;
-
-// Enables sound notification
-$rcmail_config['newmail_notifier_sound'] = false;
-
-// Enables desktop notification
-$rcmail_config['newmail_notifier_desktop'] = false;
-
-?>
diff --git a/plugins/newmail_notifier/favicon.ico b/plugins/newmail_notifier/favicon.ico
deleted file mode 100644
index 86e10c1c7..000000000
--- a/plugins/newmail_notifier/favicon.ico
+++ /dev/null
Binary files differ
diff --git a/plugins/newmail_notifier/localization/de_CH.inc b/plugins/newmail_notifier/localization/de_CH.inc
deleted file mode 100644
index 4ce6134d1..000000000
--- a/plugins/newmail_notifier/localization/de_CH.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/de_CH/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Anzeige im Browser bei neuer Nachricht';
-$labels['desktop'] = 'Desktop-Benachrichtigung bei neuer Nachricht';
-$labels['sound'] = 'Akustische Meldung bei neuer Nachricht';
-$labels['test'] = 'Test';
-$labels['title'] = 'Neue E-Mail!';
-$labels['body'] = 'Sie haben eine neue Nachricht';
-$labels['testbody'] = 'Dies ist eine Testbenachrichtigung';
-$labels['desktopdisabled'] = 'Desktop-Benachrichtigungen sind deaktiviert.';
-$labels['desktopunsupported'] = 'Ihr Browser unterstützt keine Desktop-Benachrichtigungen.';
-
diff --git a/plugins/newmail_notifier/localization/de_DE.inc b/plugins/newmail_notifier/localization/de_DE.inc
deleted file mode 100644
index f49eb4929..000000000
--- a/plugins/newmail_notifier/localization/de_DE.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/de_DE/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Benachrichtigung im Browser bei neuer Nachricht';
-$labels['desktop'] = 'Desktop-Benachrichtigung bei neuer Nachricht';
-$labels['sound'] = 'Akustische Meldung bei neuer Nachricht';
-$labels['test'] = 'Test';
-$labels['title'] = 'Neue E-Mail!';
-$labels['body'] = 'Sie haben eine neue Nachricht';
-$labels['testbody'] = 'Dies ist eine Testbenachrichtigung';
-$labels['desktopdisabled'] = 'Desktop-Benachrichtigungen sind deaktiviert.';
-$labels['desktopunsupported'] = 'Ihr Browser unterstützt keine Desktop-Benachrichtigungen.';
-
diff --git a/plugins/newmail_notifier/localization/en_US.inc b/plugins/newmail_notifier/localization/en_US.inc
deleted file mode 100644
index 3017c43dc..000000000
--- a/plugins/newmail_notifier/localization/en_US.inc
+++ /dev/null
@@ -1,13 +0,0 @@
-<?php
-
-$labels['basic'] = 'Display browser notifications on new message';
-$labels['desktop'] = 'Display desktop notifications on new message';
-$labels['sound'] = 'Play the sound on new message';
-$labels['test'] = 'Test';
-$labels['title'] = 'New Email!';
-$labels['body'] = 'You\'ve received a new message.';
-$labels['testbody'] = 'This is a test notification.';
-$labels['desktopdisabled'] = 'Desktop notifications are disabled in your browser.';
-$labels['desktopunsupported'] = 'Your browser does not support desktop notifications.';
-
-?>
diff --git a/plugins/newmail_notifier/localization/ja_JP.inc b/plugins/newmail_notifier/localization/ja_JP.inc
deleted file mode 100644
index f01fd7591..000000000
--- a/plugins/newmail_notifier/localization/ja_JP.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/ja_JP/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = '新しいメッセージの通知をブラウザーに表示する';
-$labels['desktop'] = '新しいメッセージの通知をデスクトップに表示する';
-$labels['sound'] = '新しいメッセージが届くと音を再生する';
-$labels['test'] = 'テスト';
-$labels['title'] = '新しいメールです!';
-$labels['body'] = '新しいメッセージを受信しました。';
-$labels['testbody'] = 'これはテスト通知です。';
-$labels['desktopdisabled'] = 'ブラウザーでデスクトップ通知が無効になっています。';
-$labels['desktopunsupported'] = 'ブラウザーがデスクトップ通知をサポートしていません。';
-
diff --git a/plugins/newmail_notifier/localization/lv_LV.inc b/plugins/newmail_notifier/localization/lv_LV.inc
deleted file mode 100644
index 0459d723b..000000000
--- a/plugins/newmail_notifier/localization/lv_LV.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/lv_LV/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Attēlot paziņojumu pie jaunas vēstules saņemšanas';
-$labels['desktop'] = 'Attēlot darbvirsmas paziņojumu pie jaunas vēstules saņemšanas';
-$labels['sound'] = 'Atskaņot skaņas signālu pie jaunas vēstules saņemšanas';
-$labels['test'] = 'Test';
-$labels['title'] = 'Jauns E-pasts!';
-$labels['body'] = 'Jūs esat saņēmis jaunu e-pastu.';
-$labels['testbody'] = 'Šis ir testa paziņojums.';
-$labels['desktopdisabled'] = 'Darbvirsmas paziņojumi ir atslēgti Jūsu pārlūkprogrammā.';
-$labels['desktopunsupported'] = 'Jūsu pārlūkprogramma neatbalsta darbvirsmas paziņojumus.';
-
diff --git a/plugins/newmail_notifier/localization/pl_PL.inc b/plugins/newmail_notifier/localization/pl_PL.inc
deleted file mode 100644
index 711dcc550..000000000
--- a/plugins/newmail_notifier/localization/pl_PL.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/pl_PL/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Wyświetlaj powiadomienia o nadejściu nowej wiadomości w przeglądarce';
-$labels['desktop'] = 'Wyświetlaj powiadomienia o nadejściu nowej wiadomości na pulpicie';
-$labels['sound'] = 'Odtwarzaj dźwięk o nadejściu nowej wiadomości';
-$labels['test'] = 'Testuj powiadomienie';
-$labels['title'] = 'Nowa wiadomość!';
-$labels['body'] = 'Nadeszła nowa wiadomość.';
-$labels['testbody'] = 'To jest testowe powiadomienie.';
-$labels['desktopdisabled'] = 'Powiadomienia na pulpicie zostały zablokowane w twojej przeglądarce.';
-$labels['desktopunsupported'] = 'Twoja przeglądarka nie obsługuje powiadomień na pulpicie.';
-
diff --git a/plugins/newmail_notifier/localization/pt_BR.inc b/plugins/newmail_notifier/localization/pt_BR.inc
deleted file mode 100644
index 600a3ff1a..000000000
--- a/plugins/newmail_notifier/localization/pt_BR.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/pt_BR/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Exibir notificação quando uma nova mensagem chegar';
-$labels['desktop'] = 'Exibir notificação no desktop quando uma nova mensagem chegar';
-$labels['sound'] = 'Alerta sonoro quando uma nova mensagem chegar';
-$labels['test'] = 'Testar';
-$labels['title'] = 'Novo Email!';
-$labels['body'] = 'Você recebeu uma nova mensagem.';
-$labels['testbody'] = 'Essa é uma notificação de teste.';
-$labels['desktopdisabled'] = 'As notificações no desktop estão desabilitadas no seu navegador.';
-$labels['desktopunsupported'] = 'Seu navegador não suporta notificações no desktop';
-
diff --git a/plugins/newmail_notifier/localization/ru_RU.inc b/plugins/newmail_notifier/localization/ru_RU.inc
deleted file mode 100644
index b95a60bf7..000000000
--- a/plugins/newmail_notifier/localization/ru_RU.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/ru_RU/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Thomas <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Показывать в браузере уведомление о приходе нового сообщения';
-$labels['desktop'] = 'Показывать на рабочем столе уведомление о приходе нового сообщения';
-$labels['sound'] = 'Подавать звуковой сигнал о приходе нового сообщения';
-$labels['test'] = 'Проверить';
-$labels['title'] = 'Свежая почта!';
-$labels['body'] = 'Вы получили новое сообщение.';
-$labels['testbody'] = 'Это тестовое уведомление.';
-$labels['desktopdisabled'] = 'В Вашем браузере отключены уведомления на рабочем столе.';
-$labels['desktopunsupported'] = 'Ваш браузер не поддерживает уведомления на рабочем столе.';
-
diff --git a/plugins/newmail_notifier/localization/sv_SE.inc b/plugins/newmail_notifier/localization/sv_SE.inc
deleted file mode 100644
index b1c92ed79..000000000
--- a/plugins/newmail_notifier/localization/sv_SE.inc
+++ /dev/null
@@ -1,27 +0,0 @@
-<?php
-
-/*
- +-----------------------------------------------------------------------+
- | localization/sv_SE/labels.inc |
- | |
- | Language file of the Roundcube Webmail client |
- | Copyright (C) 2012, The Roundcube Dev Team |
- | Licensed under the GNU General Public License |
- | |
- +-----------------------------------------------------------------------+
- | Author: Jonas Nasholm <Unknown> |
- +-----------------------------------------------------------------------+
- @version $Id$
-*/
-
-$labels = array();
-$labels['basic'] = 'Avisera nytt meddelande i webbläsaren';
-$labels['desktop'] = 'Avisera nytt meddelande på skrivbordet';
-$labels['sound'] = 'Avisera nytt meddelande med ljudsignal';
-$labels['test'] = 'Prova';
-$labels['title'] = 'Nytt meddelande!';
-$labels['body'] = 'Du har mottagit ett nytt meddelande.';
-$labels['testbody'] = 'Denna avisering är ett prov.';
-$labels['desktopdisabled'] = 'Avisering på skrivbordet är avstängt i webbläsaren.';
-$labels['desktopunsupported'] = 'Avisering på skrivbordet stöds inte av webbläsaren.';
-
diff --git a/plugins/newmail_notifier/mail.png b/plugins/newmail_notifier/mail.png
deleted file mode 100644
index 79f3a5311..000000000
--- a/plugins/newmail_notifier/mail.png
+++ /dev/null
Binary files differ
diff --git a/plugins/newmail_notifier/newmail_notifier.js b/plugins/newmail_notifier/newmail_notifier.js
deleted file mode 100644
index 7c9b55ded..000000000
--- a/plugins/newmail_notifier/newmail_notifier.js
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * New Mail Notifier plugin script
- *
- * @version @package_version@
- * @author Aleksander Machniak <alec@alec.pl>
- */
-
-if (window.rcmail && rcmail.env.task == 'mail') {
- rcmail.addEventListener('plugin.newmail_notifier', newmail_notifier_run);
- rcmail.addEventListener('actionbefore', newmail_notifier_stop);
- rcmail.addEventListener('init', function() {
- // bind to messages list select event, so favicon will be reverted on message preview too
- if (rcmail.message_list)
- rcmail.message_list.addEventListener('select', newmail_notifier_stop);
- });
-}
-
-// Executes notification methods
-function newmail_notifier_run(prop)
-{
- if (prop.basic)
- newmail_notifier_basic();
- if (prop.sound)
- newmail_notifier_sound();
- if (prop.desktop)
- newmail_notifier_desktop(rcmail.gettext('body', 'newmail_notifier'));
-}
-
-// Stops notification
-function newmail_notifier_stop(prop)
-{
- // revert original favicon
- if (rcmail.env.favicon_href && (!prop || prop.action != 'check-recent')) {
- $('<link rel="shortcut icon" href="'+rcmail.env.favicon_href+'"/>').replaceAll('link[rel="shortcut icon"]');
- rcmail.env.favicon_href = null;
- }
-}
-
-// Basic notification: window.focus and favicon change
-function newmail_notifier_basic()
-{
- var w = rcmail.is_framed() ? window.parent : window;
-
- w.focus();
-
- // we cannot simply change a href attribute, we must to replace the link element (at least in FF)
- var link = $('<link rel="shortcut icon" href="plugins/newmail_notifier/favicon.ico"/>'),
- oldlink = $('link[rel="shortcut icon"]', w.document);
-
- rcmail.env.favicon_href = oldlink.attr('href');
- link.replaceAll(oldlink);
-}
-
-// Sound notification
-function newmail_notifier_sound()
-{
- var elem, src = 'plugins/newmail_notifier/sound.wav';
-
- // HTML5
- try {
- elem = $('<audio src="' + src + '" />');
- elem.get(0).play();
- }
- // old method
- catch (e) {
- elem = $('<embed id="sound" src="' + src + '" hidden=true autostart=true loop=false />');
- elem.appendTo($('body'));
- window.setTimeout("$('#sound').remove()", 5000);
- }
-}
-
-// Desktop notification (need Chrome or Firefox with a plugin)
-function newmail_notifier_desktop(body)
-{
- var dn = window.webkitNotifications;
-
- if (dn && !dn.checkPermission()) {
- if (rcmail.newmail_popup)
- rcmail.newmail_popup.cancel();
- var popup = window.webkitNotifications.createNotification('plugins/newmail_notifier/mail.png',
- rcmail.gettext('title', 'newmail_notifier'), body);
- popup.onclick = function() {
- this.cancel();
- }
- popup.show();
- setTimeout(function() { popup.cancel(); }, 10000); // close after 10 seconds
- rcmail.newmail_popup = popup;
- return true;
- }
-
- return false;
-}
-
-function newmail_notifier_test_desktop()
-{
- var dn = window.webkitNotifications,
- txt = rcmail.gettext('testbody', 'newmail_notifier');
-
- if (dn) {
- if (!dn.checkPermission())
- newmail_notifier_desktop(txt);
- else
- dn.requestPermission(function() {
- if (!newmail_notifier_desktop(txt))
- rcmail.display_message(rcmail.gettext('desktopdisabled', 'newmail_notifier'), 'error');
- });
- }
- else
- rcmail.display_message(rcmail.gettext('desktopunsupported', 'newmail_notifier'), 'error');
-}
-
-function newmail_notifier_test_basic()
-{
- newmail_notifier_basic();
-}
-
-function newmail_notifier_test_sound()
-{
- newmail_notifier_sound();
-}
diff --git a/plugins/newmail_notifier/newmail_notifier.php b/plugins/newmail_notifier/newmail_notifier.php
deleted file mode 100644
index 20ffac8ce..000000000
--- a/plugins/newmail_notifier/newmail_notifier.php
+++ /dev/null
@@ -1,178 +0,0 @@
-<?php
-
-/**
- * New Mail Notifier plugin
- *
- * Supports three methods of notification:
- * 1. Basic - focus browser window and change favicon
- * 2. Sound - play wav file
- * 3. Desktop - display desktop notification (using webkitNotifications feature,
- * supported by Chrome and Firefox with 'HTML5 Notifications' plugin)
- *
- * @version @package_version@
- * @author Aleksander Machniak <alec@alec.pl>
- *
- *
- * Copyright (C) 2011, Kolab Systems AG
- *
- * This program is free software; you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2
- * as published by the Free Software Foundation.
- *
- * This program is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
- */
-
-class newmail_notifier extends rcube_plugin
-{
- public $task = 'mail|settings';
-
- private $rc;
- private $notified;
-
- /**
- * Plugin initialization
- */
- function init()
- {
- $this->rc = rcmail::get_instance();
-
- // Preferences hooks
- if ($this->rc->task == 'settings') {
- $this->add_hook('preferences_list', array($this, 'prefs_list'));
- $this->add_hook('preferences_save', array($this, 'prefs_save'));
- }
- else { // if ($this->rc->task == 'mail') {
- $this->add_hook('new_messages', array($this, 'notify'));
- // add script when not in ajax and not in frame
- if (is_a($this->rc->output, 'rcube_template') && empty($_REQUEST['_framed'])) {
- $this->add_texts('localization/');
- $this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.body');
- $this->include_script('newmail_notifier.js');
- }
- }
- }
-
- /**
- * Handler for user preferences form (preferences_list hook)
- */
- function prefs_list($args)
- {
- if ($args['section'] != 'mailbox') {
- return $args;
- }
-
- // Load configuration
- $this->load_config();
-
- // Load localization and configuration
- $this->add_texts('localization/');
-
- if (!empty($_REQUEST['_framed'])) {
- $this->rc->output->add_label('newmail_notifier.title', 'newmail_notifier.testbody',
- 'newmail_notifier.desktopunsupported', 'newmail_notifier.desktopenabled', 'newmail_notifier.desktopdisabled');
- $this->include_script('newmail_notifier.js');
- }
-
- // Check that configuration is not disabled
- $dont_override = (array) $this->rc->config->get('dont_override', array());
-
- foreach (array('basic', 'desktop', 'sound') as $type) {
- $key = 'newmail_notifier_' . $type;
- if (!in_array($key, $dont_override)) {
- $field_id = '_' . $key;
- $input = new html_checkbox(array('name' => $field_id, 'id' => $field_id, 'value' => 1));
- $content = $input->show($this->rc->config->get($key))
- . ' ' . html::a(array('href' => '#', 'onclick' => 'newmail_notifier_test_'.$type.'()'),
- $this->gettext('test'));
-
- $args['blocks']['new_message']['options'][$key] = array(
- 'title' => html::label($field_id, Q($this->gettext($type))),
- 'content' => $content
- );
- }
- }
-
- return $args;
- }
-
- /**
- * Handler for user preferences save (preferences_save hook)
- */
- function prefs_save($args)
- {
- if ($args['section'] != 'mailbox') {
- return $args;
- }
-
- // Load configuration
- $this->load_config();
-
- // Check that configuration is not disabled
- $dont_override = (array) $this->rc->config->get('dont_override', array());
-
- foreach (array('basic', 'desktop', 'sound') as $type) {
- $key = 'newmail_notifier_' . $type;
- if (!in_array($key, $dont_override)) {
- $args['prefs'][$key] = get_input_value('_'.$key, RCUBE_INPUT_POST) ? true : false;
- }
- }
-
- return $args;
- }
-
- /**
- * Handler for new message action (new_messages hook)
- */
- function notify($args)
- {
- // Already notified or non-automatic check
- if ($this->notified || !empty($_GET['_refresh'])) {
- return $args;
- }
-
- // Get folders to skip checking for
- if (empty($this->exceptions)) {
- $this->delimiter = $this->rc->storage->get_hierarchy_delimiter();
-
- $exceptions = array('drafts_mbox', 'sent_mbox', 'trash_mbox');
- foreach ($exceptions as $folder) {
- $folder = $this->rc->config->get($folder);
- if (strlen($folder) && $folder != 'INBOX') {
- $this->exceptions[] = $folder;
- }
- }
- }
-
- $mbox = $args['mailbox'];
-
- // Skip exception (sent/drafts) folders (and their subfolders)
- foreach ($this->exceptions as $folder) {
- if (strpos($mbox.$this->delimiter, $folder.$this->delimiter) === 0) {
- return $args;
- }
- }
-
- $this->notified = true;
-
- // Load configuration
- $this->load_config();
-
- $basic = $this->rc->config->get('newmail_notifier_basic');
- $sound = $this->rc->config->get('newmail_notifier_sound');
- $desktop = $this->rc->config->get('newmail_notifier_desktop');
-
- if ($basic || $sound || $desktop) {
- $this->rc->output->command('plugin.newmail_notifier',
- array('basic' => $basic, 'sound' => $sound, 'desktop' => $desktop));
- }
-
- return $args;
- }
-}
diff --git a/plugins/newmail_notifier/package.xml b/plugins/newmail_notifier/package.xml
deleted file mode 100644
index d3de25fb3..000000000
--- a/plugins/newmail_notifier/package.xml
+++ /dev/null
@@ -1,70 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<package xmlns="http://pear.php.net/dtd/package-2.0" xmlns:tasks="http://pear.php.net/dtd/tasks-1.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" packagerversion="1.9.0" version="2.0" xsi:schemaLocation="http://pear.php.net/dtd/tasks-1.0
- http://pear.php.net/dtd/tasks-1.0.xsd
- http://pear.php.net/dtd/package-2.0
- http://pear.php.net/dtd/package-2.0.xsd">
- <name>newmail_notifier</name>
- <channel>pear.roundcube.net</channel>
- <summary>Displays notification about a new mail</summary>
- <description>
- Supports three methods of notification:
- 1. Basic - focus browser window and change favicon
- 2. Sound - play wav file
- 3. Desktop - display desktop notification (using webkitNotifications feature,
- supported by Chrome and Firefox with 'HTML5 Notifications' plugin).
- </description>
- <lead>
- <name>Aleksander Machniak</name>
- <user>alec</user>
- <email>alec@alec.pl</email>
- <active>yes</active>
- </lead>
- <date>2012-02-07</date>
- <version>
- <release>0.4</release>
- <api>0.3</api>
- </version>
- <stability>
- <release>stable</release>
- <api>stable</api>
- </stability>
- <license uri="http://www.gnu.org/licenses/gpl-2.0.html">GNU GPLv2</license>
- <notes>-</notes>
- <contents>
- <dir baseinstalldir="/" name="/">
- <file name="newmail_notifier.php" role="php">
- <tasks:replace from="@name@" to="name" type="package-info"/>
- <tasks:replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file name="newmail_notifier.js" role="data">
- <tasks:replace from="@name@" to="name" type="package-info"/>
- <tasks:replace from="@package_version@" to="version" type="package-info"/>
- </file>
- <file name="config.inc.php.dist" role="data"></file>
- <file name="favicon.ico" role="data"></file>
- <file name="mail.png" role="data"></file>
- <file name="sound.wav" role="data"></file>
- <file name="localization/de_CH.inc" role="data"></file>
- <file name="localization/de_DE.inc" role="data"></file>
- <file name="localization/en_US.inc" role="data"></file>
- <file name="localization/ja_JP.inc" role="data"></file>
- <file name="localization/lv_LV.inc" role="data"></file>
- <file name="localization/pl_PL.inc" role="data"></file>
- <file name="localization/pt_BR.inc" role="data"></file>
- <file name="localization/ru_RU.inc" role="data"></file>
- <file name="localization/sv_SE.inc" role="data"></file>
- </dir>
- <!-- / -->
- </contents>
- <dependencies>
- <required>
- <php>
- <min>5.2.1</min>
- </php>
- <pearinstaller>
- <min>1.7.0</min>
- </pearinstaller>
- </required>
- </dependencies>
- <phprelease/>
-</package>
diff --git a/plugins/newmail_notifier/sound.wav b/plugins/newmail_notifier/sound.wav
deleted file mode 100644
index 72d3dd857..000000000
--- a/plugins/newmail_notifier/sound.wav
+++ /dev/null
Binary files differ