B2G/gecko/browser/components/places/src/PlacesUIUtils.jsm
// Helper to create an organizer special folder.
Helper to create an organizer special folder.
Helper to create an organizer special folder .
function CB_create_folder(aFolderName, aParentId, aIsRoot) {
        let folderId = bs.createFolder(aParentId,
                                       queries[aFolderName].title,
                                       bs.DEFAULT_INDEX);
        as.setItemAnnotation(folderId, PlacesUtils.EXCLUDE_FROM_BACKUP_ANNO, 1,
                             0, as.EXPIRE_NEVER);
        bs.setFolderReadonly(folderId, true);
        if (aIsRoot) {
          as.setItemAnnotation(folderId, PlacesUIUtils.ORGANIZER_FOLDER_ANNO,
                               PlacesUIUtils.ORGANIZER_LEFTPANE_VERSION,
                               0, as.EXPIRE_NEVER);
        }
        else {
          as.setItemAnnotation(folderId, PlacesUIUtils.ORGANIZER_QUERY_ANNO, aFolderName,
                           0, as.EXPIRE_NEVER);
          PlacesUIUtils.leftPaneQueries[aFolderName] = folderId;
        }
        return folderId;
      }
function CB_create_folder ( aFolderName , aParentId , aIsRoot ) { let folderId = bs . createFolder ( aParentId , queries [ aFolderName ] . title , bs . DEFAULT_INDEX ) ; as . setItemAnnotation ( folderId , PlacesUtils . EXCLUDE_FROM_BACKUP_ANNO , 1 , 0 , as . EXPIRE_NEVER ) ; bs . setFolderReadonly ( folderId , true ) ; if ( aIsRoot ) { as . setItemAnnotation ( folderId , PlacesUIUtils . ORGANIZER_FOLDER_ANNO , PlacesUIUtils . ORGANIZER_LEFTPANE_VERSION , 0 , as . EXPIRE_NEVER ) ; } else { as . setItemAnnotation ( folderId , PlacesUIUtils . ORGANIZER_QUERY_ANNO , aFolderName , 0 , as . EXPIRE_NEVER ) ; PlacesUIUtils . leftPaneQueries [ aFolderName ] = folderId ; } return folderId ; }
Helper to create an organizer special folder.
Helper to create an organizer special folder .
// Left Pane Root Folder. // We should never backup this, since it changes between profiles. // Disallow manipulating this folder within the organizer UI. // Mark as special left pane root. // Mark as special organizer folder.