menu item enabling/disabling for GTK

This commit is contained in:
saari%netscape.com 1999-04-24 03:26:10 +00:00
Родитель 7883d47f8f
Коммит 6ad312bc54
2 изменённых файлов: 6 добавлений и 4 удалений

Просмотреть файл

@ -546,9 +546,6 @@ void nsMenu::LoadMenuItem(
menuitemElement->GetAttribute(nsAutoString("disabled"), disabled);
menuitemElement->GetAttribute(nsAutoString("name"), menuitemName);
menuitemElement->GetAttribute(nsAutoString("cmd"), menuitemCmd);
if(disabled == NS_STRING_TRUE ) {
}
// Create nsMenuItem
nsIMenuItem * pnsMenuItem = nsnull;
@ -560,7 +557,11 @@ void nsMenu::LoadMenuItem(
pParentMenu->AddItem(supports); // Parent should now own menu item
NS_RELEASE(supports);
if(disabled == NS_STRING_TRUE ) {
pnsMenuItem->SetEnabled(PR_FALSE);
}
// Create MenuDelegate - this is the intermediator inbetween
// the DOM node and the nsIMenuItem
// The nsWebShellWindow wacthes for Document changes and then notifies the

Просмотреть файл

@ -270,6 +270,7 @@ NS_METHOD nsMenuItem::SetLabel(nsString &aText)
//-------------------------------------------------------------------------
NS_METHOD nsMenuItem::SetEnabled(PRBool aIsEnabled)
{
gtk_widget_set_sensitive(GTK_WIDGET(mMenuItem), aIsEnabled);
return NS_OK;
}