Esempio n. 1
0
        static void DoToolbarArea(
            SearchField searchField,
            RepositoriesListView listView,
            bool isEnabled,
            Action refreshAction,
            GenericMenu.MenuFunction2 selectServerAction,
            ref State state)
        {
            GUILayout.BeginHorizontal();

            GUILayout.Label("Server:");

            GUI.enabled = isEnabled;

            state.Server = DoDropDownTextField(
                state.Server,
                state.AvailableServers,
                selectServerAction,
                refreshAction);

            if (GUILayout.Button("Refresh", EditorStyles.miniButton))
            {
                refreshAction();
            }

            GUILayout.FlexibleSpace();

            DrawSearchField.For(
                searchField, listView, SEARCH_FIELD_WIDTH);

            GUI.enabled = true;

            GUILayout.EndHorizontal();
        }
 internal void DrawSearchFieldForBranchesTab()
 {
     DrawSearchField.For(
         mSearchField,
         mBranchesListView,
         UnityConstants.SEARCH_FIELD_WIDTH);
 }
Esempio n. 3
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();
        }
Esempio n. 4
0
 internal void DrawSearchFieldForHistoryTab()
 {
     DrawSearchField.For(
         mSearchField,
         mHistoryListView,
         UnityConstants.SEARCH_FIELD_WIDTH);
 }
Esempio n. 5
0
 internal void DrawSearchFieldForPendingChangesTab()
 {
     DrawSearchField.For(
         mSearchField,
         mPendingChangesTreeView,
         UnityConstants.SEARCH_FIELD_WIDTH);
 }
Esempio n. 6
0
        void DoActionsToolbar(
            List <ClientDiff> diffs,
            ProgressControlsForViews progressControls,
            bool isSkipMergeTrackingButtonVisible,
            bool isSkipMergeTrackingButtonChecked,
            SearchField searchField,
            DiffTreeView diffTreeView)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            if (progressControls.IsOperationRunning())
            {
                DrawProgressForViews.ForIndeterminateProgress(
                    progressControls.ProgressData);
            }

            GUILayout.FlexibleSpace();

            if (isSkipMergeTrackingButtonVisible)
            {
                DoSkipMergeTrackingButton(
                    diffs,
                    isSkipMergeTrackingButtonChecked,
                    diffTreeView);
            }

            DrawSearchField.For(
                searchField,
                diffTreeView,
                UnityConstants.SEARCH_FIELD_WIDTH);
            VerifyIfSearchFieldIsRecentlyFocused(searchField);

            EditorGUILayout.EndHorizontal();
        }
Esempio n. 7
0
        void DoActionsToolbar(
            WorkspaceInfo workspaceInfo,
            bool isGluonMode,
            IRefreshableView refreshableView,
            ProgressControlsForViews progressControls,
            EditorWindow editorWindow)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            string checkinHeader = string.Format(
                PlasticLocalization.GetString(PlasticLocalization.Name.CheckinHeader),
                mPendingChangesTreeView.GetSelectedItemCount(),
                mPendingChangesTreeView.GetTotalItemCount());

            GUILayout.Label(checkinHeader, UnityStyles.PendingChangesTab.HeaderLabel);

            if (progressControls.IsOperationRunning())
            {
                DrawProgressForViews.ForIndeterminateProgress(
                    progressControls.ProgressData);
            }

            GUILayout.FlexibleSpace();

            DrawSearchField.For(
                mSearchField,
                mPendingChangesTreeView,
                UnityConstants.SEARCH_FIELD_WIDTH);

            DoRefreshButton(
                refreshableView,
                progressControls.IsOperationRunning());

            EditorGUILayout.EndHorizontal();
        }
Esempio n. 8
0
        internal void DrawSearchFieldForChangesetsTab()
        {
            DrawSearchField.For(
                mSearchField,
                mChangesetsListView,
                UnityConstants.SEARCH_FIELD_WIDTH);

            VerifyIfSearchFieldIsRecentlyFocused(mSearchField);
        }
Esempio n. 9
0
        void DoActionsToolbar(
            IRefreshableView refreshableView,
            ProgressControlsForViews progressControls,
            SearchField searchField,
            ChangesetsListView changesetsListView,
            DateFilter dateFilter,
            string changesetsLabelText,
            float showChangesButtonWidth,
            bool wasChangesPanelVisible)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            if (!string.IsNullOrEmpty(changesetsLabelText))
            {
                GUILayout.Label(
                    changesetsLabelText,
                    UnityStyles.ChangesetsTab.HeaderLabel);
            }

            if (progressControls.IsOperationRunning())
            {
                DrawProgressForViews.ForIndeterminateProgress(
                    progressControls.ProgressData);
            }

            GUILayout.FlexibleSpace();

            mIsChangesPanelVisible =
                DoShowChangesButton(
                    showChangesButtonWidth,
                    wasChangesPanelVisible);

            GUILayout.Space(2);

            DrawSearchField.For(
                searchField,
                changesetsListView,
                UnityConstants.SEARCH_FIELD_WIDTH);

            DoDateFilter(
                refreshableView,
                dateFilter,
                progressControls.IsOperationRunning());

            DoRefreshButton(
                refreshableView,
                progressControls.IsOperationRunning());

            EditorGUILayout.EndHorizontal();
        }
Esempio n. 10
0
        void DoActionsToolbar(
            WorkspaceInfo workspaceInfo,
            bool isGluonMode,
            IRefreshableView refreshableView,
            ProgressControlsForViews progressControls,
            EditorWindow editorWindow)
        {
            EditorGUILayout.BeginHorizontal(EditorStyles.toolbar);

            string checkinHeader = string.Format(
                "Checkin {0} of {1} item(s)",
                mPendingChangesTreeView.GetSelectedItemCount(),
                mPendingChangesTreeView.GetTotalItemCount());

            GUILayout.Label(checkinHeader, UnityStyles.PendingChangesTab.HeaderLabel);

            if (progressControls.IsOperationRunning())
            {
                DrawProgressForViews.ForIndeterminateProgress(
                    progressControls.ProgressData);
            }

            GUILayout.FlexibleSpace();

            DrawSearchField.For(
                mSearchField,
                mPendingChangesTreeView,
                UnityConstants.SEARCH_FIELD_WIDTH);

            if (GUILayout.Button(PlasticLocalization.GetString(
                                     PlasticLocalization.Name.Options),
                                 EditorStyles.toolbarButton,
                                 GUILayout.Width(UnityConstants.REGULAR_BUTTON_WIDTH)))
            {
                PendingChangesOptionsDialog.ChangeOptions(
                    workspaceInfo, refreshableView, this, editorWindow);
                GUIUtility.ExitGUI();
            }

            DoRefreshButton(
                refreshableView,
                progressControls.IsOperationRunning());

            EditorGUILayout.EndHorizontal();
        }
        static void DoToolbarArea(
            SearchField searchField,
            RepositoriesListView listView,
            bool isEnabled,
            Action refreshAction,
            GenericMenu.MenuFunction2 selectServerAction,
            ref State state)
        {
            GUILayout.BeginHorizontal();

            GUILayout.Label(
                PlasticLocalization.GetString(PlasticLocalization.Name.RepositoryExplorerServerLabel));

            GUI.enabled = isEnabled;

            state.Server = DoDropDownTextField(
                state.Server,
                state.AvailableServers,
                selectServerAction,
                refreshAction);

            var refreshText = PlasticLocalization.GetString(PlasticLocalization.Name.RefreshButton);

            if (GUILayout.Button(refreshText, EditorStyles.miniButton))
            {
                refreshAction();
            }

            GUILayout.FlexibleSpace();

            DrawSearchField.For(
                searchField, listView, SEARCH_FIELD_WIDTH);

            GUI.enabled = true;

            GUILayout.EndHorizontal();
        }