git-svn-id: svn://db.shs.com.ru/pip@239 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
@@ -4,7 +4,7 @@
|
||||
#include "picrypt.h"
|
||||
|
||||
const char self_name[] = "__self__";
|
||||
extern PIScreen screen;
|
||||
extern PIScreen * screen;
|
||||
//bool Daemon::inited__ = false;
|
||||
|
||||
Daemon::Remote::Remote(const PIString & n): PIThread() {
|
||||
@@ -105,20 +105,20 @@ Daemon::TileFileProgress::TileFileProgress(): PIScreenTile() {
|
||||
addTile(prog_file);
|
||||
addTile(prog_all);
|
||||
addTile(buttons);
|
||||
CONNECTU(&(::screen), tileEvent, this, tileEvent)
|
||||
CONNECTU((::screen), tileEvent, this, tileEvent)
|
||||
}
|
||||
|
||||
|
||||
void Daemon::TileFileProgress::resizeEvent(int w, int h) {
|
||||
PIScreenTile::resizeEvent(w, h);
|
||||
w = ::screen.windowWidth() / 1.4;
|
||||
w = ::screen->windowWidth() / 1.4;
|
||||
minimumWidth = maximumWidth = w;
|
||||
}
|
||||
|
||||
|
||||
void Daemon::TileFileProgress::sizeHint(int & w, int & h) const {
|
||||
PIScreenTile::sizeHint(w, h);
|
||||
w = ::screen.windowWidth() / 1.4;
|
||||
w = ::screen->windowWidth() / 1.4;
|
||||
}
|
||||
|
||||
|
||||
@@ -163,7 +163,7 @@ void Daemon::TileFileProgress::show(PIFileTransfer * f) {
|
||||
ft = f;
|
||||
if (ft) {
|
||||
conn_name = ft->name();
|
||||
::screen.setDialogTile(this);
|
||||
::screen->setDialogTile(this);
|
||||
label_file->content[0].first = "Preparing ...";
|
||||
prog_file->value = prog_all->value = 0;
|
||||
buttons->cur = 0;
|
||||
@@ -177,7 +177,7 @@ void Daemon::TileFileProgress::show(PIFileTransfer * f) {
|
||||
void Daemon::TileFileProgress::close(bool ok) {
|
||||
buttons->content[0].first = "Pause";
|
||||
ft = 0;
|
||||
::screen.setDialogTile(0);
|
||||
::screen->setDialogTile(0);
|
||||
if (!ok) {
|
||||
piCout << "Achtung! Alarm!! Error!!!";
|
||||
showInfo("Error while files transfer...");
|
||||
@@ -210,7 +210,7 @@ Daemon::Daemon(): inited__(false), PIPeer(pisd_prefix + PISystemInfo::instance()
|
||||
// setName("Daemon");
|
||||
dtimer.setName("__S__Daemon_timer");
|
||||
mode = offset = cur = height = 0;
|
||||
CONNECTU(&screen, keyPressed, this, keyEvent)
|
||||
CONNECTU(screen, keyPressed, this, keyEvent)
|
||||
CONNECTU(&dtimer, tickEvent, this, timerEvent)
|
||||
CONNECTU(&fm, tileKey, this, fmKeyEvent)
|
||||
CONNECTU(&fm, actionRequest, this, fmActionRequest)
|
||||
@@ -259,7 +259,7 @@ Daemon::Daemon(): inited__(false), PIPeer(pisd_prefix + PISystemInfo::instance()
|
||||
tile_root->addTile(tile_info);
|
||||
tile_root->addTile(tile_fm);
|
||||
|
||||
CONNECTU(&screen, tileEvent, this, tileEvent)
|
||||
CONNECTU(screen, tileEvent, this, tileEvent)
|
||||
reinit();
|
||||
inited__ = true;
|
||||
}
|
||||
@@ -317,7 +317,7 @@ void Daemon::showTile(PIScreenTile * t, const PIString & header) {
|
||||
|
||||
|
||||
void Daemon::fillInfoTile(const Daemon::HostInfo & hi) {
|
||||
screen.lock();
|
||||
screen->lock();
|
||||
tile_info->content.clear();
|
||||
tile_info->content << TileSimple::Row("Exec command: " + hi.execCommand, CellFormat());
|
||||
tile_info->content << TileSimple::Row(" Executed on " + hi.execDateTime.toString(), CellFormat());
|
||||
@@ -327,7 +327,7 @@ void Daemon::fillInfoTile(const Daemon::HostInfo & hi) {
|
||||
tile_info->content << TileSimple::Row(" OS version: " + hi.OS_version, CellFormat());
|
||||
tile_info->content << TileSimple::Row("Architecture: " + hi.architecture, CellFormat());
|
||||
tile_info->content << TileSimple::Row(" CPU count: " + PIString::fromNumber(hi.processorsCount), CellFormat());
|
||||
screen.unlock();
|
||||
screen->unlock();
|
||||
}
|
||||
|
||||
|
||||
@@ -360,7 +360,7 @@ void Daemon::tileEvent(PIScreenTile * t, TileEvent e) {
|
||||
|
||||
void Daemon::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
if (!tile_root->visible) return;
|
||||
if (screen.dialogTile()) return;
|
||||
if (screen->dialogTile()) return;
|
||||
switch (key.key) {
|
||||
case PIKbdListener::Esc:
|
||||
if (mode == 0)
|
||||
@@ -368,9 +368,9 @@ void Daemon::keyEvent(PIKbdListener::KeyEvent key) {
|
||||
else {
|
||||
if (mode > 1) {
|
||||
mode = 1;
|
||||
screen.lock();
|
||||
screen->lock();
|
||||
tile_info->content.clear();
|
||||
screen.unlock();
|
||||
screen->unlock();
|
||||
showActionList();
|
||||
} else
|
||||
disconnect();
|
||||
@@ -472,12 +472,12 @@ void Daemon::fmActionRequest(bool remote_tile, FileManager::Action type, PIVaria
|
||||
|
||||
|
||||
void Daemon::timerEvent(void * _d, int delim) {
|
||||
screen.lock();
|
||||
screen->lock();
|
||||
list_daemons->content.clear();
|
||||
availableDaemons();
|
||||
piForeachC (PIString & i, available_daemons)
|
||||
list_daemons->content << TileList::Row(i, CellFormat());
|
||||
screen.unlock();
|
||||
screen->unlock();
|
||||
if (delim == 5 && mode == 2) {
|
||||
if (conn_name.isEmpty()) return;
|
||||
PIByteArray ba; ba << int(RequestHostInfo);
|
||||
|
||||
Reference in New Issue
Block a user