From 8e1ab25ab9d49b2890f54dbff09df3be0e7b964d Mon Sep 17 00:00:00 2001 From: Stephen Sigwart Date: Tue, 5 Feb 2019 12:46:20 -0500 Subject: [PATCH] Notifications clear option. --- .../komodo/content/notifications/notificationsWidget.js | 9 +++++++++ .../komodo/content/notifications/notificationsWidget.xul | 3 +++ src/chrome/komodo/locale/en-US/notifications.dtd | 1 + src/chrome/komodo/skin/global/icons.less | 1 + src/chrome/komodo/skin/notifications.css | 3 +++ src/chrome/komodo/skin/plat/shared/icons_rules.less | 5 +++++ 6 files changed, 22 insertions(+) diff --git a/src/chrome/komodo/content/notifications/notificationsWidget.js b/src/chrome/komodo/content/notifications/notificationsWidget.js index bdc4d469bf..a1fbe44e48 100644 --- a/src/chrome/komodo/content/notifications/notificationsWidget.js +++ b/src/chrome/komodo/content/notifications/notificationsWidget.js @@ -169,6 +169,15 @@ this.updateFilters = (function NWC_updateFilters() { } }).bind(this); +/** + * Clear all notifications + */ +this.clearMessages = (function NWC_clearMessages() { + while (this.container.firstChild) + this.container.removeChild(this.container.firstChild); + this._map = {}; +}).bind(this); + /** * Determine whether a given item should be shown * @param aElem {richlistitem} The item to check diff --git a/src/chrome/komodo/content/notifications/notificationsWidget.xul b/src/chrome/komodo/content/notifications/notificationsWidget.xul index 1da023269e..dfad2be0f4 100644 --- a/src/chrome/komodo/content/notifications/notificationsWidget.xul +++ b/src/chrome/komodo/content/notifications/notificationsWidget.xul @@ -37,6 +37,9 @@ + diff --git a/src/chrome/komodo/locale/en-US/notifications.dtd b/src/chrome/komodo/locale/en-US/notifications.dtd index 7f4a676f15..34b28c60ab 100644 --- a/src/chrome/komodo/locale/en-US/notifications.dtd +++ b/src/chrome/komodo/locale/en-US/notifications.dtd @@ -2,4 +2,5 @@ + diff --git a/src/chrome/komodo/skin/global/icons.less b/src/chrome/komodo/skin/global/icons.less index 14b38e6e96..3fb4392902 100644 --- a/src/chrome/komodo/skin/global/icons.less +++ b/src/chrome/komodo/skin/global/icons.less @@ -324,6 +324,7 @@ richlistitem.file-item[view-type="browser"] #filter-warning { .icon(); .icon-exclamation-circle(); } #filter-info { .icon(); .icon-info-circle(); } #filter-progress { .icon(); .icon-clock-o(); } + #notifications-clear { .icon(); .icon-close(); } } .scrollbutton-up diff --git a/src/chrome/komodo/skin/notifications.css b/src/chrome/komodo/skin/notifications.css index 6b5af45666..7358085122 100644 --- a/src/chrome/komodo/skin/notifications.css +++ b/src/chrome/komodo/skin/notifications.css @@ -21,6 +21,9 @@ #filter-progress { list-style-image: url("chrome://fugue/skin/icons/clock-history.png"); } +#notifications-clear { + list-style-image: url("chrome://global/skin/icons/close.png"); +} #filter-search { -moz-box-flex: 1; diff --git a/src/chrome/komodo/skin/plat/shared/icons_rules.less b/src/chrome/komodo/skin/plat/shared/icons_rules.less index ce4a64fcfb..5b0efaaf80 100644 --- a/src/chrome/komodo/skin/plat/shared/icons_rules.less +++ b/src/chrome/komodo/skin/plat/shared/icons_rules.less @@ -1616,6 +1616,11 @@ ko-pane[type="icons"] { list-style-image: @icon-filter-progress !important; } + + #notifications-clear + { + list-style-image: @icon-close !important; + } } /* Syntax checking widget */