comparison src/hgaction.h @ 571:012ba1b83328

Show cancel button with progress bar only when running an operation that it makes sense to cancel (we don't really want people cancelling e.g. initial folder scan because it would leave things in an inconsistent state)
author Chris Cannam
date Thu, 01 Mar 2012 22:53:54 +0000
parents 533519ebc0cb
children ab92f695f776
comparison
equal deleted inserted replaced
570:e0d734fad735 571:012ba1b83328
116 return true; 116 return true;
117 default: 117 default:
118 return false; 118 return false;
119 } 119 }
120 } 120 }
121
122 bool makesSenseToCancel() const {
123 switch (action) {
124 case ACT_INCOMING:
125 case ACT_PUSH:
126 case ACT_PULL:
127 case ACT_CLONEFROMREMOTE:
128 case ACT_FOLDERDIFF:
129 case ACT_CHGSETDIFF:
130 return true;
131 default:
132 return false;
133 }
134 }
121 }; 135 };
122 136
123 #endif 137 #endif