Results 1 to 5 of 5

Thread: Cinnamon 1.5.8 menu issue.

  1. #1

    Default Cinnamon 1.5.8 menu issue.

    Custom (tree) cinnamon-applications.menu is not parsed correctly under cinnamon 1.5.8. Several menus and most menu entries are missing. The same menu works well under Gnome fallback (there is no syntax error in the menu).

    Here's the warning:

    Code:
     JS ERROR: !!!   WARNING: 'assignment to undeclared variable subdir'
     JS ERROR: !!!   WARNING: file '/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js' line 1298 exception 0 number 156

    As a temporary workaround, using menu@cinnamon.org/applet.js from version 1.4.0 (copying this file to /usr/share/cinnamon/applets/menu@cinnamon.org/) would solve the menu issue (all menus and entries are displayed correctly) but produces this warning over and over:


    Code:
    (cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'CinnamonGenericContainer' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'.
    
    (cinnamon:2899): Clutter-WARNING **: Attempting to add actor of type 'StScrollView' to a container of type 'StBoxLayout', but the actor has already a parent of type 'StBoxLayout'.

  2. #2

    Default Re: Cinnamon 1.5.8 menu issue.


  3. #3

    Default Re: Cinnamon 1.5.8 menu issue.

    This is not fixed in 1.6.0. Same problem, same workaround.

  4. #4

    Default Re: Cinnamon 1.5.8 menu issue.

    I got it fixed. Here's a patch in /usr/share/cinnamon against version 1.6.1 (will submit it):

    Code:
    --- applets/menu@cinnamon.org/applet.js.1.6.1   2012-09-28 17:50:40.048812007 -0700
    +++ applets/menu@cinnamon.org/applet.js 2012-10-06 13:51:20.188587373 -0700
    @@ -1284,8 +1284,8 @@
                             applicationButton.actor.connect('leave-event', Lang.bind(this, this._appLeaveEvent, applicationButton));
                             this._addEnterEvent(applicationButton, Lang.bind(this, this._appEnterEvent, applicationButton));
                             this._applicationsButtons.push(applicationButton);
    -                        applicationButton.category.push(dir.get_menu_id());
    -                        this.applicationsByCategory[dir.get_menu_id()].push(app.get_name());
    +                        applicationButton.category.push(top_dir.get_menu_id());
    +                        this.applicationsByCategory[top_dir.get_menu_id()].push(app.get_name());
                         } else {
                             for (let i = 0; i < this._applicationsButtons.length; i++) {
                                 if (this._applicationsButtons[i].app == app) {
    The only problem is that some entries (mostly YaST modules) are duplicated:



    Also the Adminstration menu shows up twice - once from my menu, a second time maybe imported from somewhere by default (?) - but I had this already with previous versions.

  5. #5

    Default Re: Cinnamon 1.5.8 menu issue.

    Got another undeclared variable (I thought it was fixed though).

    Code:
    JS ERROR: !!!   WARNING: 'assignment to undeclared variable subdir'
    JS ERROR: !!!   WARNING: file '/usr/share/cinnamon/applets/menu@cinnamon.org/applet.js' line 1299 exception 0 number 156
    Just in case it's not just me being confused, here's a better patch:

    Code:
    --- applets/menu@cinnamon.org/applet.js.1.6.1   2012-09-28 17:50:40.048812007 -0700
    +++ applets/menu@cinnamon.org/applet.js 2012-10-06 15:43:42.446100568 -0700
    @@ -1284,8 +1284,8 @@
                             applicationButton.actor.connect('leave-event', Lang.bind(this, this._appLeaveEvent, applicationButton));
                             this._addEnterEvent(applicationButton, Lang.bind(this, this._appEnterEvent, applicationButton));
                             this._applicationsButtons.push(applicationButton);
    -                        applicationButton.category.push(dir.get_menu_id());
    -                        this.applicationsByCategory[dir.get_menu_id()].push(app.get_name());
    +                        applicationButton.category.push(top_dir.get_menu_id());
    +                        this.applicationsByCategory[top_dir.get_menu_id()].push(app.get_name());
                         } else {
                             for (let i = 0; i < this._applicationsButtons.length; i++) {
                                 if (this._applicationsButtons[i].app == app) {
    @@ -1296,7 +1296,7 @@
                         }
                     }
                 } else if (nextType == GMenu.TreeItemType.DIRECTORY) {
    -                subdir = iter.get_directory();
    +                let subdir = iter.get_directory();
                     this.applicationsByCategory[subdir.get_menu_id()] = new Array();
                     this._loadCategory(subdir, top_dir);
                 }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •