Пример #1
0
        public void AddEffect(string category, Command action)
        {
            var effects_menu = PintaCore.Chrome.EffectsMenu;

            if (!Menus.ContainsKey(category))
            {
                var category_menu = new GLib.Menu();
                effects_menu.AppendMenuItemSorted(GLib.MenuItem.NewSubmenu(Translations.GetString(category), category_menu));
                Menus.Add(category, category_menu);
            }

            Actions.Add(action);

            GLib.Menu m = Menus[category];
            m.AppendMenuItemSorted(action.CreateMenuItem());
        }