0.5.0_beta
git-svn-id: svn://db.shs.com.ru/pip@42 12ceb7fc-bf1f-11e4-8940-5bc7170c53b5
This commit is contained in:
2
.gitignore
vendored
2
.gitignore
vendored
@@ -1,2 +0,0 @@
|
|||||||
doc
|
|
||||||
|
|
||||||
@@ -26,5 +26,6 @@
|
|||||||
#include "pistatemachine.h"
|
#include "pistatemachine.h"
|
||||||
#include "pitime.h"
|
#include "pitime.h"
|
||||||
#include "pivariant.h"
|
#include "pivariant.h"
|
||||||
|
#include "picli.h"
|
||||||
|
|
||||||
#endif // PICOREMODULE_H
|
#endif // PICOREMODULE_H
|
||||||
|
|||||||
@@ -161,6 +161,7 @@ bool PIEthernet::init() {
|
|||||||
}
|
}
|
||||||
if (params[PIEthernet::ReuseAddress]) ethSetsockoptBool(sock, SOL_SOCKET, SO_REUSEADDR);
|
if (params[PIEthernet::ReuseAddress]) ethSetsockoptBool(sock, SOL_SOCKET, SO_REUSEADDR);
|
||||||
if (params[PIEthernet::Broadcast]) ethSetsockoptBool(sock, SOL_SOCKET, SO_BROADCAST);
|
if (params[PIEthernet::Broadcast]) ethSetsockoptBool(sock, SOL_SOCKET, SO_BROADCAST);
|
||||||
|
if (type() == PIEthernet::TCP_Client) ethSetsockoptBool(sock, SOL_SOCKET, SO_KEEPALIVE);
|
||||||
applyTimeouts();
|
applyTimeouts();
|
||||||
applyOptInt(IPPROTO_IP, IP_TTL, TTL());
|
applyOptInt(IPPROTO_IP, IP_TTL, TTL());
|
||||||
//cout << "inited " << sock << ": bc = " << params << endl;
|
//cout << "inited " << sock << ": bc = " << params << endl;
|
||||||
|
|||||||
@@ -5,6 +5,6 @@
|
|||||||
#define PIP_VERSION_MAJOR 0
|
#define PIP_VERSION_MAJOR 0
|
||||||
#define PIP_VERSION_MINOR 5
|
#define PIP_VERSION_MINOR 5
|
||||||
#define PIP_VERSION_REVISION 0
|
#define PIP_VERSION_REVISION 0
|
||||||
#define PIP_VERSION_SUFFIX "_alpha"
|
#define PIP_VERSION_SUFFIX "_beta"
|
||||||
|
|
||||||
#endif // PIVERSION_H
|
#endif // PIVERSION_H
|
||||||
|
|||||||
@@ -35,10 +35,14 @@ Daemon::Daemon(): PIPeer("_pisd_" + PISystemInfo::instance()->hostname + "_" + P
|
|||||||
tile_info = new TileSimple("daemon info");
|
tile_info = new TileSimple("daemon info");
|
||||||
tile_info->hide();
|
tile_info->hide();
|
||||||
|
|
||||||
|
tile_fm = fm.tile();
|
||||||
|
tile_fm->hide();
|
||||||
|
|
||||||
tile_root->addTile(tile_header);
|
tile_root->addTile(tile_header);
|
||||||
tile_root->addTile(list_daemons);
|
tile_root->addTile(list_daemons);
|
||||||
tile_root->addTile(list_actions);
|
tile_root->addTile(list_actions);
|
||||||
tile_root->addTile(tile_info);
|
tile_root->addTile(tile_info);
|
||||||
|
tile_root->addTile(tile_fm);
|
||||||
|
|
||||||
CONNECTU(&screen, tileEvent, this, tileEvent)
|
CONNECTU(&screen, tileEvent, this, tileEvent)
|
||||||
|
|
||||||
@@ -105,6 +109,7 @@ void Daemon::tileEvent(PIScreenTile * t, TileEvent e) {
|
|||||||
if (e.type == TileList::RowPressed) {
|
if (e.type == TileList::RowPressed) {
|
||||||
switch (e.data.toInt()) {
|
switch (e.data.toInt()) {
|
||||||
case 0: mode = 2; showTile(tile_info, "Information"); break;
|
case 0: mode = 2; showTile(tile_info, "Information"); break;
|
||||||
|
case 1: mode = 3; showTile(tile_fm, "File manager"); break;
|
||||||
default: break;
|
default: break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -4,6 +4,7 @@
|
|||||||
#include "piscreentiles.h"
|
#include "piscreentiles.h"
|
||||||
#include "pipeer.h"
|
#include "pipeer.h"
|
||||||
#include "pisystemmonitor.h"
|
#include "pisystemmonitor.h"
|
||||||
|
#include "file_manager.h"
|
||||||
|
|
||||||
extern PISystemMonitor sys_mon;
|
extern PISystemMonitor sys_mon;
|
||||||
|
|
||||||
@@ -80,8 +81,9 @@ private:
|
|||||||
PIMap<int, PIString> dnames;
|
PIMap<int, PIString> dnames;
|
||||||
PISystemMonitor sys_mon_other;
|
PISystemMonitor sys_mon_other;
|
||||||
HostInfo info_my, info_other;
|
HostInfo info_my, info_other;
|
||||||
|
FileManager fm;
|
||||||
PIScreenTile * tile_root;
|
PIScreenTile * tile_root;
|
||||||
TileSimple * tile_info, * tile_header;
|
TileSimple * tile_info, * tile_fm, * tile_header;
|
||||||
TileList * list_daemons, * list_actions;
|
TileList * list_daemons, * list_actions;
|
||||||
int mode, offset, cur, height;
|
int mode, offset, cur, height;
|
||||||
|
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "file_manager.h"
|
#include "file_manager.h"
|
||||||
#include "shared.h"
|
#include "shared.h"
|
||||||
|
#include "daemon.h"
|
||||||
|
|
||||||
extern PIScreen screen;
|
extern PIScreen screen;
|
||||||
|
|
||||||
@@ -130,9 +131,10 @@ void FileManager::TileDir::resizeEvent(int w, int h) {
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
FileManager::FileManager() {
|
FileManager::FileManager(Daemon * d) {
|
||||||
setName("FileManager");
|
setName("FileManager");
|
||||||
del_commit = false;
|
del_commit = false;
|
||||||
|
daemon = d;
|
||||||
CONNECTU(&screen, keyPressed, this, keyEvent)
|
CONNECTU(&screen, keyPressed, this, keyEvent)
|
||||||
//dir.setDir("/home/peri4/Documents");
|
//dir.setDir("/home/peri4/Documents");
|
||||||
TileSimple * tl;
|
TileSimple * tl;
|
||||||
|
|||||||
@@ -4,10 +4,12 @@
|
|||||||
#include "piscreentiles.h"
|
#include "piscreentiles.h"
|
||||||
#include "pidir.h"
|
#include "pidir.h"
|
||||||
|
|
||||||
|
class Daemon;
|
||||||
|
|
||||||
class FileManager: public PIObject {
|
class FileManager: public PIObject {
|
||||||
PIOBJECT(FileManager)
|
PIOBJECT(FileManager)
|
||||||
public:
|
public:
|
||||||
FileManager();
|
FileManager(Daemon * d);
|
||||||
|
|
||||||
PIScreenTile * tile() const;
|
PIScreenTile * tile() const;
|
||||||
|
|
||||||
@@ -35,6 +37,7 @@ private:
|
|||||||
|
|
||||||
bool del_commit;
|
bool del_commit;
|
||||||
TileDir * panels[2];
|
TileDir * panels[2];
|
||||||
|
Daemon * daemon;
|
||||||
PIScreenTile * tile_root;
|
PIScreenTile * tile_root;
|
||||||
PIStringList selected;
|
PIStringList selected;
|
||||||
typedef PIPair<PIString, PIString> SSPair;
|
typedef PIPair<PIString, PIString> SSPair;
|
||||||
|
|||||||
@@ -32,8 +32,8 @@ _Init _pisd_init;
|
|||||||
|
|
||||||
PIScreen screen(false);
|
PIScreen screen(false);
|
||||||
PISystemMonitor sys_mon;
|
PISystemMonitor sys_mon;
|
||||||
FileManager file_manager;
|
|
||||||
Daemon daemon_;
|
Daemon daemon_;
|
||||||
|
FileManager file_manager(&daemon_);
|
||||||
|
|
||||||
|
|
||||||
class MainMenu: public PITimer {
|
class MainMenu: public PITimer {
|
||||||
|
|||||||
Reference in New Issue
Block a user