UnityEditor.ASMainWindow.ShortCommitList C# (CSharp) Method

ShortCommitList() private method

private ShortCommitList ( ) : void
return void
        private void ShortCommitList()
        {
            bool enabled = GUI.enabled;
            GUILayout.BeginVertical(!this.showSmallWindow ? constants.groupBox : constants.groupBoxNoMargin, new GUILayoutOption[0]);
            GUILayout.Label("Local Changes", constants.title, new GUILayoutOption[0]);
            if (this.pv.lv.totalRows == 0)
            {
                GUILayoutOption[] options = new GUILayoutOption[] { GUILayout.ExpandHeight(true) };
                GUILayout.BeginVertical(constants.contentBox, options);
                GUILayout.Label("Nothing to commit", new GUILayoutOption[0]);
                GUILayout.EndVertical();
            }
            else
            {
                this.DoCommitParentView();
                GUILayout.BeginHorizontal(constants.contentBox, new GUILayoutOption[0]);
                Event current = Event.current;
                if (!this.committing)
                {
                    GUI.enabled = this.pvHasSelection && enabled;
                    if (GUILayout.Button("Compare", constants.smallButton, new GUILayoutOption[0]))
                    {
                        ASCommitWindow.DoShowDiff(ASCommitWindow.GetParentViewSelectedItems(this.pv, false, false), false);
                        GUIUtility.ExitGUI();
                    }
                    bool flag2 = GUI.enabled;
                    if (!this.somethingDiscardableSelected)
                    {
                        GUI.enabled = false;
                    }
                    if (GUILayout.Button("Discard", constants.smallButton, new GUILayoutOption[0]))
                    {
                        this.DoMyRevert(false);
                        GUIUtility.ExitGUI();
                    }
                    GUI.enabled = flag2;
                    GUILayout.FlexibleSpace();
                    if (GUILayout.Button("Commit...", constants.smallButton, new GUILayoutOption[0]) || ((this.pvHasSelection && (current.type == EventType.KeyDown)) && (current.keyCode == KeyCode.Return)))
                    {
                        this.StartCommitting();
                        current.Use();
                    }
                    if ((current.type == EventType.KeyDown) && ((current.character == '\n') || (current.character == '\x0003')))
                    {
                        current.Use();
                    }
                    GUI.enabled = enabled;
                    if (GUILayout.Button("Details", constants.smallButton, new GUILayoutOption[0]))
                    {
                        this.SwitchSelectedPage(Page.Commit);
                        base.Repaint();
                        GUIUtility.ExitGUI();
                    }
                }
                else
                {
                    if (current.type == EventType.KeyDown)
                    {
                        KeyCode keyCode = current.keyCode;
                        if (keyCode == KeyCode.Escape)
                        {
                            this.CancelCommit();
                            current.Use();
                        }
                        else if (keyCode == KeyCode.Return)
                        {
                            this.DoCommit();
                            current.Use();
                        }
                        else if ((current.character == '\n') || (current.character == '\x0003'))
                        {
                            current.Use();
                        }
                    }
                    GUI.SetNextControlName("commitMessage");
                    this.commitMessage = EditorGUILayout.TextField(this.commitMessage, new GUILayoutOption[0]);
                    GUILayoutOption[] optionArray2 = new GUILayoutOption[] { GUILayout.Width(60f) };
                    if (GUILayout.Button("Commit", constants.smallButton, optionArray2))
                    {
                        this.DoCommit();
                    }
                    GUILayoutOption[] optionArray3 = new GUILayoutOption[] { GUILayout.Width(60f) };
                    if (GUILayout.Button("Cancel", constants.smallButton, optionArray3))
                    {
                        this.CancelCommit();
                    }
                    if (this.focusCommitMessage)
                    {
                        EditorGUI.FocusTextInControl("commitMessage");
                        this.focusCommitMessage = false;
                        base.Repaint();
                    }
                }
                GUILayout.EndHorizontal();
            }
            GUILayout.EndVertical();
            if (this.lastRevertSelectionChanged == 0)
            {
                this.lastRevertSelectionChanged = -1;
                if (ASCommitWindow.ShowDiscardWarning())
                {
                    this.DoMyRevert(true);
                }
            }
            if (this.lastRevertSelectionChanged > 0)
            {
                this.lastRevertSelectionChanged--;
                base.Repaint();
            }
        }