public void Dispose ()
{
if (disposed) {
return;
}
if (current_nf != null) {
try {
current_nf.Close ();
} catch {}
}
if (notif_area != null) {
notif_area.Dispose ();
notif_area = null;
}
ServiceManager.PlayerEngine.DisconnectEvent (OnPlayerEvent);
elements_service.PrimaryWindowClose = null;
Gtk.Action close_action = interface_action_service.GlobalActions["CloseAction"];
if (close_action != null) {
interface_action_service.GlobalActions.Remove (close_action);
}
if (ui_manager_id >= 0) {
interface_action_service.RemoveActionGroup ("NotificationArea");
interface_action_service.UIManager.RemoveUi ((uint)ui_manager_id);
ui_manager_id = -1;
}
actions = null;
elements_service = null;
interface_action_service = null;
disposed = true;
}