private void OnCollabRevisionUpdated(CollabInfo state) { if (m_CollabState.tip != state.tip) { OnUpdatePage(m_CurrentPage); } }
public void OnWindowEnabled() { UnityConnect.instance.StateChanged += new UnityEditor.Connect.StateChangedDelegate(this.OnConnectStateChanged); Collab.instance.StateChanged += new StateChangedDelegate(this.OnCollabStateChanged); Collab.instance.RevisionUpdated += new StateChangedDelegate(this.OnCollabRevisionUpdated); Collab.instance.JobsCompleted += new StateChangedDelegate(this.OnCollabJobsCompleted); EditorApplication.playModeStateChanged += new Action <PlayModeStateChange>(this.OnPlayModeStateChanged); if (Collab.instance.IsConnected()) { this.m_ConnectState = UnityConnect.instance.GetConnectInfo(); this.m_CollabState = Collab.instance.GetCollabInfo(); } this.m_Window.revisionActionsEnabled = !EditorApplication.isPlayingOrWillChangePlaymode; this.m_Window.OnPageChangeAction = new PageChangeAction(this.OnUpdatePage); this.m_Window.OnUpdateAction = new RevisionAction(this.OnUpdate); this.m_Window.OnRestoreAction = new RevisionAction(this.OnRestore); this.m_Window.OnGoBackAction = new RevisionAction(this.OnGoBack); this.m_Window.OnShowBuildAction = new ShowBuildAction(this.ShowBuildForCommit); this.m_Window.OnShowServicesAction = new Action(this.ShowServicePage); this.m_Window.itemsPerPage = 5; this.UpdateBuildServiceStatus(); HistoryState historyState = this.RecalculateState(); if (historyState == HistoryState.Ready) { this.OnUpdatePage(this.m_CurrentPage); } this.m_Window.UpdateState(historyState, true); }
public void OnWindowEnabled() { UnityConnect.instance.StateChanged += OnConnectStateChanged; Collab.instance.StateChanged += OnCollabStateChanged; Collab.instance.RevisionUpdated += OnCollabRevisionUpdated; Collab.instance.JobsCompleted += OnCollabJobsCompleted; Collab.instance.ErrorOccurred += OnCollabError; Collab.instance.ErrorCleared += OnCollabErrorCleared; EditorApplication.playModeStateChanged += OnPlayModeStateChanged; m_ConnectState = UnityConnect.instance.GetConnectInfo(); m_CollabState = Collab.instance.GetCollabInfo(); m_Window.revisionActionsEnabled = !EditorApplication.isPlayingOrWillChangePlaymode; // Setup window callbacks m_Window.OnPageChangeAction = OnUpdatePage; m_Window.OnUpdateAction = OnUpdate; m_Window.OnRestoreAction = OnRestore; m_Window.OnGoBackAction = OnGoBack; m_Window.OnShowBuildAction = ShowBuildForCommit; m_Window.OnShowServicesAction = ShowServicePage; m_Window.itemsPerPage = ItemsPerPage; // Initialize data UpdateBuildServiceStatus(); var state = RecalculateState(); // Only try to load the page if we're ready if (state == HistoryState.Ready) { OnUpdatePage(m_CurrentPage); } m_Window.UpdateState(state, true); }
public void OnCollabStateChanged(CollabInfo info) { if (Collab.instance.WasWhitelistedRequestSent() && (!info.whitelisted || !CollabAccess.Instance.IsServiceEnabled())) { CloseHistoryWindows(); } }
public void OnCollabStateChanged(CollabInfo info) { if (info.ready && !info.inProgress && !info.maintenance) { foreach (ProjectBrowser current in ProjectBrowser.GetAllProjectBrowsers()) { current.RefreshSearchIfFilterContains("v:"); } } }
public bool Equals(CollabInfo other) { return(m_Update == other.m_Update && m_Publish == other.m_Publish && m_InProgress == other.m_InProgress && m_Maintenance == other.m_Maintenance && m_Conflict == other.m_Conflict && m_Refresh == other.m_Refresh && m_HasSeat == other.m_HasSeat && m_Ready == other.m_Ready && string.Equals(m_Tip, other.m_Tip)); }
public void OnCollabStateChanged(CollabInfo info) { if (!info.ready || info.inProgress || info.maintenance) { return; } foreach (ProjectBrowser pb in ProjectBrowser.GetAllProjectBrowsers()) { pb.RefreshSearchIfFilterContains("v:"); } }
private static bool CollabStatesEqual(CollabInfo c1, CollabInfo c2) { return(c1.ready == c2.ready && c1.update == c2.update && c1.publish == c2.publish && c1.inProgress == c2.inProgress && c1.maintenance == c2.maintenance && c1.conflict == c2.conflict && c1.dirty == c2.dirty && c1.refresh == c2.refresh && c1.seat == c2.seat && c1.tip == c2.tip); }
private void OnCollabStateChanged(CollabInfo state) { if (!CollabHistoryPresenter.CollabStatesEqual(this.m_CollabState, state)) { if (this.m_CollabState.tip != state.tip) { this.OnUpdatePage(this.m_CurrentPage); } this.m_CollabState = state; this.m_Window.UpdateState(this.RecalculateState(), false); if (state.inProgress) { this.m_Window.inProgressRevision = this.m_ProgressRevision; } else { this.m_Window.inProgressRevision = null; } } }
private void OnCollabStateChanged(CollabInfo state) { // Sometimes a collab state change will trigger even though everything is the same if (m_CollabState.Equals(state)) { return; } if (m_CollabState.tip != state.tip) { OnUpdatePage(m_CurrentPage); } m_CollabState = state; m_Window.UpdateState(RecalculateState(), false); if (state.inProgress) { m_Window.inProgressRevision = m_ProgressRevision; } else { m_Window.inProgressRevision = null; } }
private void OnCollabStateChanged(CollabInfo state) { /* bool ready * bool update * bool publish * bool inProgress * bool maintenance * bool conflict * bool dirty * bool refresh * bool seat * string tip */ // Sometimes a collab state change will trigger even though everything is the same if (CollabStatesEqual(m_CollabState, state)) { return; } if (m_CollabState.tip != state.tip) { OnUpdatePage(m_CurrentPage); } m_CollabState = state; m_Window.UpdateState(RecalculateState(), false); if (state.inProgress) { m_Window.inProgressRevision = m_ProgressRevision; } else { m_Window.inProgressRevision = null; } }
private void OnCollabJobsCompleted(CollabInfo state) { this.m_ProgressRevision = null; }
private void OnCollabRevisionUpdated(CollabInfo state) { this.OnUpdatePage(this.m_CurrentPage); }