[Gtk-sharp-list] Disabling UIManager Actions

Piotr Zurek p.zurek at gmail.com
Mon Aug 28 15:44:24 EDT 2006


Rafael Teixeira wrote:
> Have you tried the GetAction(string path) method?

Yep. I also wasn't sure what the path is so I did that before:

private void ActionActivated (object sender, EventArgs args)
{
     Action action = sender as Action;
     Console.WriteLine ("Action \"{0}\" activated", action.AccelPath);
}

the path I got was: "<Actions>/group/Delete" so I tried:

public void DisableDelete ()
{
     if (uiManager.GetAction ("<Actions>/group/Delete") != null)
         uiManager.GetAction("<Actions>/group/Delete").Sensitive = false;
}

I suspect my path is not quite OK but no idea what... :-)

Cheers
Piotr


More information about the Gtk-sharp-list mailing list