示例#1
0
        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();
        }
示例#2
0
        static void DoHistoryArea(
            HistoryListView historyListView,
            bool isOperationRunning)
        {
            GUI.enabled = !isOperationRunning;

            Rect rect = GUILayoutUtility.GetRect(0, 100000, 0, 100000);

            historyListView.OnGUI(rect);

            GUI.enabled = true;
        }
示例#3
0
        internal static HistoryRevision GetSelectedHistoryRevision(
            HistoryListView listView)
        {
            List <HistoryRevision> revisions =
                listView.GetSelectedHistoryRevisions();

            if (revisions.Count == 0)
            {
                return(null);
            }

            return(revisions[0]);
        }
示例#4
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);
        }
示例#5
0
        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();
        }
示例#6
0
 internal static List <HistoryRevision> GetSelectedHistoryRevisions(
     HistoryListView listView)
 {
     return(listView.GetSelectedHistoryRevisions());
 }
示例#7
0
 internal static List <RepObjectInfo> GetSelectedRepObjectInfos(
     HistoryListView listView)
 {
     return(listView.GetSelectedRepObjectInfos());
 }