Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Notifications clear option #3674

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@
<toolbarbutton type="checkbox" id="filter-progress"
tooltiptext="&filterProgressTooltip;"
oncommand="NotificationsWidgetController.updateFilters()"/>
<toolbarbutton id="notifications-clear"
tooltiptext="&notificationsClearTooltip;"
oncommand="NotificationsWidgetController.clearMessages()"/>
</toolbargroup>
</toolbar>
</box>
Expand Down
1 change: 1 addition & 0 deletions src/chrome/komodo/locale/en-US/notifications.dtd
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,5 @@
<!ENTITY filterWarningTooltip "Toggle whether warnings are shown">
<!ENTITY filterInfoTooltip "Toggle whether informational messages are shown">
<!ENTITY filterProgressTooltip "Toggle whether to limit to in-progress tasks">
<!ENTITY notificationsClearTooltip "Clear all messages">
<!ENTITY filterSearchEmpty "Filter messages">
1 change: 1 addition & 0 deletions src/chrome/komodo/skin/global/icons.less
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/chrome/komodo/skin/notifications.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/chrome/komodo/skin/plat/shared/icons_rules.less
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down