@@ -11,7 +11,6 @@ const AppFavorites = imports.ui.appFavorites;
1111const Gtk = imports . gi . Gtk ;
1212const Atk = imports . gi . Atk ;
1313const Gio = imports . gi . Gio ;
14- const GObject = imports . gi . GObject
1514const XApp = imports . gi . XApp ;
1615const GnomeSession = imports . misc . gnomeSession ;
1716const ScreenSaver = imports . misc . screenSaver ;
@@ -28,7 +27,6 @@ const SignalManager = imports.misc.signalManager;
2827const Params = imports . misc . params ;
2928
3029const INITIAL_BUTTON_LOAD = 30 ;
31- const NUM_SYSTEM_BUTTONS = 3 ;
3230
3331const USER_DESKTOP_PATH = FileUtils . getUserDesktopDir ( ) ;
3432
@@ -1293,13 +1291,13 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
12931291 }
12941292
12951293 _updateShowIcons ( container , show ) {
1296- Util . each ( container . get_children ( ) , c => {
1294+ container . get_children ( ) . forEach ( c => {
12971295 let b = c . _delegate ;
12981296 if ( ! ( b instanceof SimpleMenuItem ) )
12991297 return ;
13001298 if ( b . icon )
13011299 b . icon . visible = show ;
1302- } )
1300+ } ) ;
13031301 }
13041302
13051303 _onBoxResized ( width , height ) {
@@ -1317,11 +1315,12 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
13171315
13181316 _updateKeybinding ( ) {
13191317 Main . keybindingManager . addHotKey ( "overlay-key-" + this . instance_id , this . overlayKey , Lang . bind ( this , function ( ) {
1320- if ( ! Main . overview . visible && ! Main . expo . visible )
1318+ if ( ! Main . overview . visible && ! Main . expo . visible ) {
13211319 if ( this . forceShowPanel && ! this . isOpen ) {
13221320 this . panel . peekPanel ( ) ;
13231321 }
13241322 this . menu . toggle_with_options ( this . enableAnimation ) ;
1323+ }
13251324 } ) ) ;
13261325 }
13271326
@@ -2449,7 +2448,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
24492448 let recents = this . RecentManager . _infosByTimestamp . filter ( info => ! info . name . startsWith ( "." ) ) ;
24502449 if ( recents . length > 0 ) {
24512450 this . noRecentDocuments = false ;
2452- Util . each ( recents , ( info ) => {
2451+ recents . forEach ( info => {
24532452 let button = new RecentButton ( this , info ) ;
24542453 this . _recentButtons . push ( button ) ;
24552454 this . applicationsBox . add_actor ( button . actor ) ;
@@ -2516,7 +2515,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
25162515 this . categoriesBox . add_actor ( this . favoriteDocsButton . actor ) ;
25172516 }
25182517
2519- Util . each ( favorite_infos , ( info ) => {
2518+ favorite_infos . forEach ( info => {
25202519 let button = new FavoriteButton ( this , info ) ;
25212520 this . _favoriteDocButtons . push ( button ) ;
25222521 this . applicationsBox . add_actor ( button . actor ) ;
@@ -2549,7 +2548,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
25492548 let [ apps , dirs ] = AppUtils . getApps ( ) ;
25502549
25512550 // generate all category buttons from top-level directories
2552- Util . each ( dirs , ( d ) => {
2551+ dirs . forEach ( d => {
25532552 let categoryButton = new CategoryButton ( this , d . get_menu_id ( ) , d . get_name ( ) , d . get_icon ( ) ) ;
25542553 this . _categoryButtons . push ( categoryButton ) ;
25552554 this . categoriesBox . add_actor ( categoryButton . actor ) ;
@@ -2906,7 +2905,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
29062905 this . orderDirty = false ;
29072906 }
29082907
2909- Util . each ( this . applicationsBox . get_children ( ) , c => {
2908+ this . applicationsBox . get_children ( ) . forEach ( c => {
29102909 let b = c . _delegate ;
29112910 if ( ! ( b instanceof SimpleMenuItem ) )
29122911 return ;
@@ -2922,7 +2921,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
29222921 } else {
29232922 this . orderDirty = true ;
29242923
2925- Util . each ( this . applicationsBox . get_children ( ) , c => {
2924+ this . applicationsBox . get_children ( ) . forEach ( c => {
29262925 let b = c . _delegate ;
29272926 if ( ! ( b instanceof SimpleMenuItem ) )
29282927 return ;
@@ -2958,7 +2957,7 @@ class CinnamonMenuApplet extends Applet.TextIconApplet {
29582957 this . _searchProviderButtons = [ ] ;
29592958
29602959 if ( autoCompletes ) {
2961- Util . each ( autoCompletes , item => {
2960+ autoCompletes . forEach ( item => {
29622961 let button = new TransientButton ( this , item ) ;
29632962 this . _transientButtons . push ( button ) ;
29642963 this . applicationsBox . add_actor ( button . actor ) ;
0 commit comments