From 6c363f7dfa718b24726b4704ae88a5708e57ea58 Mon Sep 17 00:00:00 2001 From: Guille Polito Date: Mon, 18 Jun 2018 14:06:44 +0200 Subject: [PATCH] Fix #850 - Make text in warning color (set by theme) if head is tagged --- .../IceTipEntityModel.class/instance/colorWarning.st | 3 +++ .../IceTipEntityModel.class/instance/toWarningMessage..st | 3 +++ .../IceTipRepositoryModel.class/instance/status.st | 4 +++- Iceberg.package/IceCommitish.class/instance/isTag.st | 4 ++++ Iceberg.package/IceTag.class/instance/isTag.st | 4 ++++ 5 files changed, 17 insertions(+), 1 deletion(-) create mode 100644 Iceberg-TipUI.package/IceTipEntityModel.class/instance/colorWarning.st create mode 100644 Iceberg-TipUI.package/IceTipEntityModel.class/instance/toWarningMessage..st create mode 100644 Iceberg.package/IceCommitish.class/instance/isTag.st create mode 100644 Iceberg.package/IceTag.class/instance/isTag.st diff --git a/Iceberg-TipUI.package/IceTipEntityModel.class/instance/colorWarning.st b/Iceberg-TipUI.package/IceTipEntityModel.class/instance/colorWarning.st new file mode 100644 index 0000000000..c42cf0ecdc --- /dev/null +++ b/Iceberg-TipUI.package/IceTipEntityModel.class/instance/colorWarning.st @@ -0,0 +1,3 @@ +TOMOVE +colorWarning + ^ Smalltalk ui theme warningTextColor \ No newline at end of file diff --git a/Iceberg-TipUI.package/IceTipEntityModel.class/instance/toWarningMessage..st b/Iceberg-TipUI.package/IceTipEntityModel.class/instance/toWarningMessage..st new file mode 100644 index 0000000000..2f7b8e662c --- /dev/null +++ b/Iceberg-TipUI.package/IceTipEntityModel.class/instance/toWarningMessage..st @@ -0,0 +1,3 @@ +TOMOVE +toWarningMessage: aString + ^ aString asText allBold makeAllColor: self colorWarning \ No newline at end of file diff --git a/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/status.st b/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/status.st index e5da6d3b71..6fa2107631 100644 --- a/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/status.st +++ b/Iceberg-TipUI.package/IceTipRepositoryModel.class/instance/status.st @@ -8,7 +8,9 @@ status entity workingCopy workingCopyState isUnknownCommitState ifTrue: [ ^ self toErrorMessage: entity workingCopy workingCopyState description ]. entity workingCopy isDetached - ifTrue: [ ^ self toErrorMessage: 'Detached Working Copy' ]. + ifTrue: [ ^ self toErrorMessage: 'Detached Working Copy' ]. + (entity head isDetached and: [ entity head tags notEmpty ]) + ifTrue: [ ^ self toWarningMessage: 'Detached HEAD' ]. entity head isDetached ifTrue: [ ^ self toErrorMessage: 'Detached HEAD' ]. diff --git a/Iceberg.package/IceCommitish.class/instance/isTag.st b/Iceberg.package/IceCommitish.class/instance/isTag.st new file mode 100644 index 0000000000..8223a3789d --- /dev/null +++ b/Iceberg.package/IceCommitish.class/instance/isTag.st @@ -0,0 +1,4 @@ +testing +isTag + + ^ false \ No newline at end of file diff --git a/Iceberg.package/IceTag.class/instance/isTag.st b/Iceberg.package/IceTag.class/instance/isTag.st new file mode 100644 index 0000000000..26b0e951d0 --- /dev/null +++ b/Iceberg.package/IceTag.class/instance/isTag.st @@ -0,0 +1,4 @@ +testing +isTag + + ^ true \ No newline at end of file