Skip to content

Commit

Permalink
Bug 815517 - Add support for custom profiles to allow for per market …
Browse files Browse the repository at this point in the history
…customizations of the homescreen grid. r=vingtetun a=blocking-basecamp+
  • Loading branch information
fzzzy authored and mrbkap committed Jan 8, 2013
1 parent 8f915a4 commit 7748f61
Showing 1 changed file with 39 additions and 22 deletions.
61 changes: 39 additions & 22 deletions build/applications-data.js
Expand Up @@ -84,33 +84,50 @@ function iconDescriptor(directory, app_name, entry_point) {
};
}

let content = [
// zeroth grid page is the dock
// zeroth grid page is the dock
let customize = {"homescreens": [
[
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'communications', 'dialer'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'sms'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'communications', 'contacts'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'browser'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'feedback')
["apps", "communications", "dialer"],
["apps", "sms"],
["apps", "communications", "contacts"],
["apps", "browser"],
["apps", "feedback"]
], [
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'camera'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'gallery'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'fm'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'settings'),
iconDescriptor(GAIA_EXTERNAL_APP_SRCDIR, 'marketplace'),
iconDescriptor(GAIA_EXTERNAL_APP_SRCDIR, 'maps')
["apps", "camera"],
["apps", "gallery"],
["apps", "fm"],
["apps", "settings"],
["external-apps", "marketplace"],
["external-apps", "maps"]
], [
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'calendar'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'clock'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'costcontrol'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'email'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'music'),
iconDescriptor(GAIA_CORE_APP_SRCDIR, 'video'),
iconDescriptor(GAIA_EXTERNAL_APP_SRCDIR, 'marketplace-dev')
["apps", "calendar"],
["apps", "clock"],
["apps", "costcontrol"],
["apps", "email"],
["apps", "music"],
["apps", "video"],
["external-apps", "marketplace-dev"]
]
];
]};

let init = getFile(GAIA_DIR, 'customize.json');
if (init.exists()) {
customize = getJSON(init);
}

let content = customize.homescreens.map(
function map_homescreens(applist) {
var output = [];
for (var i = 0; i < applist.length; i++) {
if (applist[i] !== null) {
output.push(iconDescriptor.apply(null, applist[i]));
}
}
return output;
}
);

let init = getFile(GAIA_DIR, GAIA_CORE_APP_SRCDIR, 'homescreen', 'js', 'init.json');
init = getFile(GAIA_DIR, GAIA_CORE_APP_SRCDIR, 'homescreen', 'js', 'init.json');
writeContent(init, JSON.stringify(content));

// Apps that should never appear as icons in the homescreen grid or dock.
Expand Down

0 comments on commit 7748f61

Please sign in to comment.