[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
[vidalia-svn] r2714: Note that the bootstrap phase failed (and include the 'reaso (in vidalia: . trunk/src/vidalia)
Author: edmanm
Date: 2008-06-13 04:04:48 -0400 (Fri, 13 Jun 2008)
New Revision: 2714
Modified:
vidalia/
vidalia/trunk/src/vidalia/mainwindow.cpp
Log:
r551@thebe: edmanm | 2008-06-13 04:05:27 -0400
Note that the bootstrap phase failed (and include the 'reason' field) if the
bootstrap status event's severity is 'warn'.
Property changes on: vidalia
___________________________________________________________________
svk:merge ticket from /local/vidalia [r551] on 45a62a8a-8088-484c-baad-c7b3e776dd32
Modified: vidalia/trunk/src/vidalia/mainwindow.cpp
===================================================================
--- vidalia/trunk/src/vidalia/mainwindow.cpp 2008-06-13 07:18:20 UTC (rev 2713)
+++ vidalia/trunk/src/vidalia/mainwindow.cpp 2008-06-13 08:04:48 UTC (rev 2714)
@@ -523,6 +523,7 @@
MainWindow::bootstrapStatusChanged(const BootstrapStatusEvent *bse)
{
int percentComplete = STARTUP_PROGRESS_BOOTSTRAPPING + bse->percentComplete();
+ bool warn = (bse->severity() == StatusEvent::SeverityWarn);
QString description;
switch (bse->status()) {
@@ -557,10 +558,44 @@
break;
case BootstrapStatusEvent::BootstrappingDone:
description = tr("Connected to the Tor network!");
+ warn = false; /* probably false anyway */
break;
default:
description = tr("Unrecognized startup status");
}
+ if (warn) {
+ QString reason;
+ /* Is it really a good idea to translate these? */
+ switch (bse->reason()) {
+ case tc::MiscellaneousReason:
+ reason = tr("miscellaneous");
+ break;
+ case tc::IdentityMismatch:
+ reason = tr("identity mismatch");
+ break;
+ case tc::ConnectionDone:
+ reason = tr("done");
+ break;
+ case tc::ConnectionRefused:
+ reason = tr("connection refused");
+ break;
+ case tc::ConnectionTimeout:
+ reason = tr("connection timeout");
+ break;
+ case tc::ConnectionIoError:
+ reason = tr("read/write error");
+ break;
+ case tc::NoRouteToHost:
+ reason = tr("no route to host");
+ break;
+ case tc::ResourceLimitReached:
+ reason = tr("insufficient resources");
+ break;
+ default:
+ reason = tr("unknown");
+ }
+ description += tr(" failed (%1)").arg(reason);
+ }
setStartupProgress(percentComplete, description);
}