예제 #1
0
        private void OnNotificationAreaPopupMenuEvent(object o, PopupMenuArgs args)
        {
            BuildContextMenu();

            if (rating_menu_item.Visible)
            {
                TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack;
                if (track != null)
                {
                    if (track is DatabaseTrackInfo)
                    {
                        (track as DatabaseTrackInfo).Refresh();
                    }
                    rating_menu_item.Reset(track.Rating);
                }
            }

            // Work around/fix bgo#641608 on Windows with this if/else/endif
            if (PlatformDetection.IsWindows)
            {
                menu.Popup(null, null, null, 3, Gtk.Global.CurrentEventTime);
            }
            else
            {
                menu.Popup(null, null, notif_area.PositionMenu, 3, Gtk.Global.CurrentEventTime);
            }
        }
        private void OnNotificationAreaPopupMenuEvent(object o, PopupMenuArgs args)
        {
            BuildContextMenu();

            if (rating_menu_item.Visible)
            {
                TrackInfo track = ServiceManager.PlayerEngine.CurrentTrack;
                if (track != null)
                {
                    if (track is DatabaseTrackInfo)
                    {
                        (track as DatabaseTrackInfo).Refresh();
                    }
                    rating_menu_item.Reset(track.Rating);
                }
            }

            menu.Popup(null, null, notif_area.PositionMenu, 3, Gtk.Global.CurrentEventTime);
        }