apps/homescreen/js/grid.js
/*
     * Removes an application from the layout
     *
     * @param {Application} app
     *                      The application object that's to be uninstalled.
     */
Removes an application from the layout
@param {Application} app
The application object that's to be uninstalled.
Removes an application from the layout @param { Application } app The application object that ' s to be uninstalled .
function gm_uninstall(app) {
      var updateDock = false;
      var dock = DockManager.page;
      delete appsByOrigin[app.origin];
      if (app.isBookmark) {
        var icon = bookmarkIcons[app.bookmarkURL];
        updateDock = dock.containsIcon(icon);
        icon.remove();
        delete bookmarkIcons[app.bookmarkURL];
      } else {
        var iconsForApp = appIcons[app.manifestURL];
        if (!iconsForApp)
          return;
        for (var entryPoint in iconsForApp) {
          var icon = iconsForApp[entryPoint];
          updateDock = updateDock || dock.containsIcon(icon);
          icon.remove();
        }
        delete appIcons[app.manifestURL];
      }
      if (updateDock)
        DockManager.afterRemovingApp();
      removeEmptyPages();
      markDirtyState();
    }
function gm_uninstall ( app ) { var updateDock = false ; var dock = DockManager . page ; delete appsByOrigin [ app . origin ] ; if ( app . isBookmark ) { var icon = bookmarkIcons [ app . bookmarkURL ] ; updateDock = dock . containsIcon ( icon ) ; icon . remove ( ) ; delete bookmarkIcons [ app . bookmarkURL ] ; } else { var iconsForApp = appIcons [ app . manifestURL ] ; if ( ! iconsForApp ) return ; for ( var entryPoint in iconsForApp ) { var icon = iconsForApp [ entryPoint ] ; updateDock = updateDock || dock . containsIcon ( icon ) ; icon . remove ( ) ; } delete appIcons [ app . manifestURL ] ; } if ( updateDock ) DockManager . afterRemovingApp ( ) ; removeEmptyPages ( ) ; markDirtyState ( ) ; }
Removes an application from the layout
 @param {Application} app
                      The application object that's to be uninstalled.
Removes an application from the layout @param { Application } app The application object that ' s to be uninstalled .