uidesigner/com.nokia.sdt.series60.componentlibrary/components/menu/SystemMenuPane.js
author timkelly
Mon, 29 Mar 2010 15:56:12 -0500
changeset 1138 352c0236f181
parent 0 fb279309251b
permissions -rw-r--r--
bug 10674. Sort sbsv2 configuration names with same platform_target alias prefix. ensure gcce error parser is used for sbsv2 GCCE4 build configs, add a project specific (sbsv2 only) edit box that allows user to append whatever they want to the -c parameter (the build alias). Also, fixed SDK support for TB kits now that TB92SF appears as a prefix rather than a suffix in the buildinfo.txt file.

/*
* Copyright (c) 2006 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of the License "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: 
*
*/


include("../containers/containerLibrary.js")
include("../implLibrary.js")

function SystemMenuPane() {
}


// IQueryContainment

function canContainComponent(instance, component) {
	if (component.id == "com.nokia.sdt.series60.SystemMenuItem")
		return null;
	return buildSimpleContainmentErrorStatus(
			lookupString("systemMenuPaneContainmentErr"), []);			
}

SystemMenuPane.prototype.canContainComponent = function(instance, otherComponent) {
	return canContainComponent(instance, otherComponent);
}

SystemMenuPane.prototype.canContainChild = function(instance, child) {
	return canContainComponent(instance, child.component);
}

SystemMenuPane.prototype.canRemoveChild = function(instance) {
	return false;
}

SystemMenuPane.prototype.isValidComponentInPalette = function(instance, otherComponent) {
	return false;
}

// IComponentValidator
SystemMenuPane.prototype.validate = function(instance) {
	if (instance.properties.systemResourceName == "") {
		var modelMessage = newModelMessage(IStatus.WARNING, 
			formatString(lookupString("NoSystemMenuResource"), 
				[instance.name ]), 
			instance, "systemResourceName", null);
		return [ modelMessage ];
	}
	return null;
}

SystemMenuPane.prototype.queryPropertyChange = function(instance, propertyPath, newValue) {
	return null;
}