Added drop file notification on client #4745
This commit is contained in:
parent
d7063a87c8
commit
4a27c0b05c
|
@ -53,5 +53,6 @@
|
||||||
<file>icons/16x16/money.png</file>
|
<file>icons/16x16/money.png</file>
|
||||||
<file>image/spinning-wheel.gif</file>
|
<file>image/spinning-wheel.gif</file>
|
||||||
<file>icons/16x16/padlock.png</file>
|
<file>icons/16x16/padlock.png</file>
|
||||||
|
<file>icons/16x16/synergy-transfering.png</file>
|
||||||
</qresource>
|
</qresource>
|
||||||
</RCC>
|
</RCC>
|
||||||
|
|
Binary file not shown.
After Width: | Height: | Size: 15 KiB |
|
@ -394,6 +394,13 @@ void MainWindow::appendLogRaw(const QString& text)
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::updateStateFromLogLine(const QString &line)
|
void MainWindow::updateStateFromLogLine(const QString &line)
|
||||||
|
{
|
||||||
|
checkConnected(line);
|
||||||
|
checkFingerprint(line);
|
||||||
|
checkTransmission(line);
|
||||||
|
}
|
||||||
|
|
||||||
|
void MainWindow::checkConnected(const QString& line)
|
||||||
{
|
{
|
||||||
// TODO: implement ipc connection state messages to replace this hack.
|
// TODO: implement ipc connection state messages to replace this hack.
|
||||||
if (line.contains("started server") ||
|
if (line.contains("started server") ||
|
||||||
|
@ -413,8 +420,6 @@ void MainWindow::updateStateFromLogLine(const QString &line)
|
||||||
appConfig().saveSettings();
|
appConfig().saveSettings();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
checkFingerprint(line);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void MainWindow::checkFingerprint(const QString& line)
|
void MainWindow::checkFingerprint(const QString& line)
|
||||||
|
@ -459,6 +464,19 @@ void MainWindow::checkFingerprint(const QString& line)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void MainWindow::checkTransmission(const QString& line)
|
||||||
|
{
|
||||||
|
if (line.contains("receiving file"))
|
||||||
|
{
|
||||||
|
int p = line.lastIndexOf(':');
|
||||||
|
if (p > 0) {
|
||||||
|
m_pTrayIcon->showMessage(
|
||||||
|
"Data Transmission",
|
||||||
|
"Receiving file: " + line.mid(p + 2));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
bool MainWindow::autoHide()
|
bool MainWindow::autoHide()
|
||||||
{
|
{
|
||||||
if ((appConfig().processMode() == Desktop) &&
|
if ((appConfig().processMode() == Desktop) &&
|
||||||
|
@ -477,6 +495,7 @@ void MainWindow::clearLog()
|
||||||
|
|
||||||
void MainWindow::startSynergy()
|
void MainWindow::startSynergy()
|
||||||
{
|
{
|
||||||
|
m_pTrayIcon->showMessage("test", "transfering clipboard data!!",QSystemTrayIcon::Warning,2);
|
||||||
bool desktopMode = appConfig().processMode() == Desktop;
|
bool desktopMode = appConfig().processMode() == Desktop;
|
||||||
bool serviceMode = appConfig().processMode() == Service;
|
bool serviceMode = appConfig().processMode() == Service;
|
||||||
|
|
||||||
|
|
|
@ -167,7 +167,9 @@ class MainWindow : public QMainWindow, public Ui::MainWindowBase
|
||||||
void promptAutoConfig();
|
void promptAutoConfig();
|
||||||
void updateEdition();
|
void updateEdition();
|
||||||
QString getProfileRootForArg();
|
QString getProfileRootForArg();
|
||||||
|
void checkConnected(const QString& line);
|
||||||
void checkFingerprint(const QString& line);
|
void checkFingerprint(const QString& line);
|
||||||
|
void checkTransmission(const QString& line);
|
||||||
bool autoHide();
|
bool autoHide();
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
|
|
@ -127,6 +127,9 @@ public:
|
||||||
//! Return received file data
|
//! Return received file data
|
||||||
String& getReceivedFileData() { return m_receivedFileData; }
|
String& getReceivedFileData() { return m_receivedFileData; }
|
||||||
|
|
||||||
|
//! Return drag file list
|
||||||
|
DragFileList getDragFileList() { return m_dragFileList; }
|
||||||
|
|
||||||
//@}
|
//@}
|
||||||
|
|
||||||
// IScreen overrides
|
// IScreen overrides
|
||||||
|
|
|
@ -864,6 +864,10 @@ ServerProxy::fileChunkReceived()
|
||||||
if (result == kFinish) {
|
if (result == kFinish) {
|
||||||
m_events->addEvent(Event(m_events->forIScreen().fileRecieveCompleted(), m_client));
|
m_events->addEvent(Event(m_events->forIScreen().fileRecieveCompleted(), m_client));
|
||||||
}
|
}
|
||||||
|
else if (result == kStart) {
|
||||||
|
String filename = m_client->getDragFileList().at(0).getFilename();
|
||||||
|
LOG((CLOG_INFO "receiving file: %s", filename.c_str()));
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
|
|
@ -79,7 +79,7 @@ DragInformation::parseDragInfo(DragFileList& dragFileList, UInt32 fileNum, Strin
|
||||||
dragFileList.size()));
|
dragFileList.size()));
|
||||||
|
|
||||||
for (size_t i = 0; i < dragFileList.size(); ++i) {
|
for (size_t i = 0; i < dragFileList.size(); ++i) {
|
||||||
LOG((CLOG_DEBUG2 "dragging file %i name: %s",
|
LOG((CLOG_DEBUG "dragging file %i name: %s",
|
||||||
i + 1,
|
i + 1,
|
||||||
dragFileList.at(i).getFilename().c_str()));
|
dragFileList.at(i).getFilename().c_str()));
|
||||||
}
|
}
|
||||||
|
|
|
@ -93,7 +93,7 @@ FileChunk::assemble(synergy::IStream* stream, String& dataReceived, size_t& expe
|
||||||
LOG((CLOG_DEBUG2 "recv file data from client: file size=%s", content.c_str()));
|
LOG((CLOG_DEBUG2 "recv file data from client: file size=%s", content.c_str()));
|
||||||
stopwatch.start();
|
stopwatch.start();
|
||||||
}
|
}
|
||||||
return kNotFinish;
|
return kStart;
|
||||||
|
|
||||||
case kDataChunk:
|
case kDataChunk:
|
||||||
dataReceived.append(content);
|
dataReceived.append(content);
|
||||||
|
|
|
@ -79,6 +79,7 @@ enum EDataTransfer {
|
||||||
|
|
||||||
// Data received constants
|
// Data received constants
|
||||||
enum EDataReceived {
|
enum EDataReceived {
|
||||||
|
kStart,
|
||||||
kNotFinish,
|
kNotFinish,
|
||||||
kFinish,
|
kFinish,
|
||||||
kError
|
kError
|
||||||
|
|
Loading…
Reference in New Issue