need help



Need Help with Linux Mint 12

I would like to add a function in the MGSE extension.js for mintmenu that keybinds the Super_L
key to the menu button.

I believe the correct file to add this function to would be:

/usr/share/gnome-shell/extensions/bottompanel linuxmint com/extension.js

In this file there is a "moveMe: function(item)"

 moveMe: function(item) {
        item.actor.get_parent().remove_actor(item.actor);
       
        if (item==Main.panel._mintMenu) {
            this.leftBox.insert_actor(item.actor, 0);
        }
        else if (item==Main.panel._mintWindowList) {
            let _children = this.leftBox.get_children();
            this.leftBox.insert_actor(item.actor, _children.length);
        }
        else {
            this.leftBox.add(item.actor);
        }
       
        if (item==Main.panel._mintMenu || item==Main.panel._mintWindowList) item.setBottomPosition(true);
    }
};

Further down the script:

Main.wm._reset();

    bottomPanel = new BottomPanel();
    bottomPanel.relayout();
   
    /* Look for the menu */
    if (Main.panel._mintMenu != null) {
        bottomPanel.moveMe(Main.panel._mintMenu);
        global.log("mintPanel found mintmenu");
    }
   
    /* Look for the show desktop button */
    if (Main.panel._mintShowDesktopButton != null) {
        bottomPanel.moveMe(Main.panel._mintShowDesktopButton);
        global.log("mintPanel found mintShowDesktopButton");
    }
   
    /* Look for the window list */
    if (Main.panel._mintWindowList != null) {
        bottomPanel.moveMe(Main.panel._mintWindowList);
        global.log("mintPanel found mintWindowList");
    }
   
    /* Tell the main panel we're here */
    Main.panel._mintPanel = bottomPanel;
}

>From looking at this, could the function be placed in this script? Or is main.js or windowManager.js the correct location?

Not sure where to start with _javascript_ for applications. I have only little skill in js for web. dev..

Any feedback would be appreciated.

Neqtan


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]