TimerPool fixoutManipulator

git-svn-id: svn://db.shs.com.ru/pip@83 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2015-04-09 09:03:23 +00:00
parent e269607a12
commit e2d4607eb5
5 changed files with 30 additions and 9 deletions

View File

@@ -75,7 +75,9 @@ void Daemon::TileFileProgress::sizeHint(int & w, int & h) const {
void Daemon::TileFileProgress::drawEvent(PIScreenDrawer * d) {
if (ft) {
label_file->content[0].first = ft->stateString() + ft->curFile();
label_file->content[0].first = ft->stateString() + " " + ft->curFile();
if (!label_file->content[0].first.isEmpty())
label_file->content[0].first[0] = label_file->content[0].first[0].toUpper();
PIString spd;
if (ft->isReceiving()) spd = ft->diagnostic().receiveSpeed();
else spd = ft->diagnostic().sendSpeed();
@@ -94,14 +96,17 @@ void Daemon::TileFileProgress::show(PIFileTransfer * f) {
if (ft) {
conn_name = ft->name();
::screen.setDialogTile(this);
buttons->cur = 0;
buttons->setFocus();
}
}
void Daemon::TileFileProgress::close() {
void Daemon::TileFileProgress::close(bool ok) {
ft = 0;
::screen.setDialogTile(0);
if (!ok)
showInfo("Achtung! Alarm!! Error!!!");
}
@@ -386,8 +391,11 @@ void Daemon::peerDisconnected(const PIString & name) {
}
Remote * dt = remotes.value(name, 0);
if (!dt) return;
delete dt;
if (tile_file_progress->ft == &(dt->ft)) {
tile_file_progress->close(false);
}
remotes.remove(name);
delete dt;
}
@@ -397,10 +405,10 @@ void Daemon::filesReceived(const PIString & name, bool ok) {
void Daemon::closeFileDialog(const PIString & name, bool ok) {
piCout << "CLOSE" << name << ok;
piCout << "CLOSE" << tile_file_progress->conn_name << name << ok;
if (tile_file_progress->conn_name != name) return;
if (ok)
tile_file_progress->close();
tile_file_progress->close(ok);
if (ok) requestChDir(".");
}