static void DoActionsToolbar( IRefreshableView refreshableView, ProgressControlsForViews progressControls, SearchField searchField, HistoryListView listView, string viewTitle) { EditorGUILayout.BeginHorizontal(EditorStyles.toolbar); GUILayout.Label( viewTitle, UnityStyles.HistoryTab.HeaderLabel); if (progressControls.IsOperationRunning()) { DrawProgressForViews.ForIndeterminateProgress( progressControls.ProgressData); } GUILayout.FlexibleSpace(); DrawSearchField.For( searchField, listView, UnityConstants.SEARCH_FIELD_WIDTH); DoRefreshButton( refreshableView, progressControls.IsOperationRunning()); EditorGUILayout.EndHorizontal(); }
static void DoHistoryArea( HistoryListView historyListView, bool isOperationRunning) { GUI.enabled = !isOperationRunning; Rect rect = GUILayoutUtility.GetRect(0, 100000, 0, 100000); historyListView.OnGUI(rect); GUI.enabled = true; }
internal static HistoryRevision GetSelectedHistoryRevision( HistoryListView listView) { List <HistoryRevision> revisions = listView.GetSelectedHistoryRevisions(); if (revisions.Count == 0) { return(null); } return(revisions[0]); }
internal static void SelectRevisions( HistoryListView listView, List <RepObjectInfo> revisionsToSelect) { if (revisionsToSelect == null || revisionsToSelect.Count == 0) { TableViewOperations.SelectFirstRow(listView); return; } listView.SelectRepObjectInfos(revisionsToSelect); if (listView.HasSelection()) { return; } TableViewOperations.SelectFirstRow(listView); }
void BuildComponents( WorkspaceInfo wkInfo, RepositorySpec repSpec) { mSearchField = new SearchField(); mSearchField.downOrUpArrowKeyPressed += SearchField_OnDownOrUpArrowKeyPressed; HistoryListHeaderState headerState = HistoryListHeaderState.Default; TreeHeaderSettings.Load(headerState, UnityConstants.HISTORY_TABLE_SETTINGS_NAME, (int)HistoryListColumn.CreationDate, false); mHistoryListView = new HistoryListView( wkInfo.ClientPath, repSpec, headerState, new HistoryListViewMenu(this, this), HistoryListHeaderState.GetColumnNames()); mHistoryListView.Reload(); }
internal static List <HistoryRevision> GetSelectedHistoryRevisions( HistoryListView listView) { return(listView.GetSelectedHistoryRevisions()); }
internal static List <RepObjectInfo> GetSelectedRepObjectInfos( HistoryListView listView) { return(listView.GetSelectedRepObjectInfos()); }