Skip to content

Commit

Permalink
[applet.js] Re added ability to display a separator on applets contex…
Browse files Browse the repository at this point in the history
…t menus.

In Cinnamon version 3.0.7, when new menu items are added to the context menu
of an applet/desklet, a separator automatically appears, dividing the default
menu items (**About**, **Configure...** and **Remove...**) from the just added
menu items. In Cinnamon version 3.2.x, the same behavior was observed until
the https://git.io/v6rI7 commit removed it.

This commit brings back that behavior to the context menu for applets.
  • Loading branch information
Odyseus committed Nov 13, 2016
1 parent 023c17f commit f96b8ad
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions js/ui/applet.js
Expand Up @@ -492,6 +492,10 @@ Applet.prototype = {
this.context_menu_separator = new PopupMenu.PopupSeparatorMenuItem();
}

if (this._applet_context_menu._getMenuItems().length > 0) {
this._applet_context_menu.addMenuItem(this.context_menu_separator);
}

if (items.indexOf(this.context_menu_item_about) == -1) {
this._applet_context_menu.addMenuItem(this.context_menu_item_about);
}
Expand Down

0 comments on commit f96b8ad

Please sign in to comment.