Inheritance: Hyena.Widgets.ComplexMenuItem
Esempio n. 1
0
 //protected override void InsertProxy (Action menuAction, Widget menu, MenuItem afterItem)
 //{
 //    base.InsertProxy (menuAction, menu, afterItem);
 //}
 protected override ComplexMenuItem GetNewMenuItem()
 {
     RatingMenuItem item = new RatingMenuItem ();
     item.RatingEntry.Changing += HandleChanging;
     rating_items.Add (item);
     return item;
 }
Esempio n. 2
0
        private void BuildContextMenu()
        {
            if (menu != null) {
                return;
            }

            menu = (Menu)interface_action_service.UIManager.GetWidget("/NotificationAreaIconMenu");
            menu.Show ();

            for (int i = 0; i < menu.Children.Length; i++) {
                if (menu.Children[i].Name == "Previous") {
                    int j = i;
                    PlaybackRepeatActions repeat_group = interface_action_service.FindActionGroup ("PlaybackRepeat")
                         as PlaybackRepeatActions;
                    if (repeat_group != null) {
                        menu.Insert (repeat_group.CreateSubmenu (), i++ + 2);
                    }

                    PlaybackShuffleActions shuffle_group = interface_action_service.FindActionGroup ("PlaybackShuffle")
                         as PlaybackShuffleActions;
                    if (shuffle_group != null) {
                        menu.Insert (shuffle_group.CreateSubmenu (), i++ + 2);
                    }

                    if (j != i) {
                        menu.Insert (new SeparatorMenuItem (), i++ + 2);
                    }

                    rating_menu_item = new RatingMenuItem ();
                    rating_menu_item.Activated += OnRatingChanged;
                    ToggleRatingMenuSensitive ();
                    menu.Insert (rating_menu_item, i + 2);
                    break;
                }
            }
        }