summaryrefslogtreecommitdiff
path: root/cpp/src/IcePatch2/Client.cpp
diff options
context:
space:
mode:
authorMarc Laukien <marc@zeroc.com>2005-01-27 22:37:17 +0000
committerMarc Laukien <marc@zeroc.com>2005-01-27 22:37:17 +0000
commit5b5b9d594d4f465103f6b72acfd4194a00a78541 (patch)
treef5726ff5065de40ff34494199fdbdfcc9e0260b8 /cpp/src/IcePatch2/Client.cpp
parentservice cleanup (diff)
downloadice-5b5b9d594d4f465103f6b72acfd4194a00a78541.tar.bz2
ice-5b5b9d594d4f465103f6b72acfd4194a00a78541.tar.xz
ice-5b5b9d594d4f465103f6b72acfd4194a00a78541.zip
more fixes
Diffstat (limited to 'cpp/src/IcePatch2/Client.cpp')
-rw-r--r--cpp/src/IcePatch2/Client.cpp26
1 files changed, 22 insertions, 4 deletions
diff --git a/cpp/src/IcePatch2/Client.cpp b/cpp/src/IcePatch2/Client.cpp
index 8c9581061f2..55236f9f251 100644
--- a/cpp/src/IcePatch2/Client.cpp
+++ b/cpp/src/IcePatch2/Client.cpp
@@ -27,7 +27,8 @@ class TextPatcherFeedback : public PatcherFeedback
{
public:
- TextPatcherFeedback()
+ TextPatcherFeedback() :
+ _pressAnyKeyMessage(false)
{
#ifndef _WIN32
tcgetattr(0, &_savedTerm);
@@ -66,6 +67,12 @@ public:
virtual bool
checksumStart()
{
+ if(!_pressAnyKeyMessage)
+ {
+ cout << "[Press any key to abort]" << endl;
+ _pressAnyKeyMessage = true;
+ }
+
return !keyPressed();
}
@@ -85,6 +92,12 @@ public:
virtual bool
fileListStart()
{
+ if(!_pressAnyKeyMessage)
+ {
+ cout << "[Press any key to abort]" << endl;
+ _pressAnyKeyMessage = true;
+ }
+
_lastProgress = "0%";
cout << "Getting list of files to patch: " << _lastProgress << flush;
return !keyPressed();
@@ -114,6 +127,12 @@ public:
virtual bool
patchStart(const string& path, Long size, Long totalProgress, Long totalSize)
{
+ if(!_pressAnyKeyMessage)
+ {
+ cout << "[Press any key to abort]" << endl;
+ _pressAnyKeyMessage = true;
+ }
+
ostringstream s;
s << "0/" << size << " (" << totalProgress << '/' << totalSize << ')';
_lastProgress = s.str();
@@ -177,8 +196,6 @@ private:
fcntl(0, F_SETFL, flags);
_block = false;
-
- cout << "[Press any key to abort]" << endl;
}
bool pressed = false;
@@ -197,6 +214,7 @@ private:
#endif
string _lastProgress;
+ bool _pressAnyKeyMessage;
};
class Client : public Application
@@ -255,7 +273,7 @@ Client::run(int argc, char* argv[])
}
if(args.size() == 1)
{
- properties->setProperty("IcePatch2.Directory", args[0]);
+ properties->setProperty("IcePatch2.Directory", simplify(args[0]));
}
bool aborted = false;