summaryrefslogtreecommitdiff
path: root/client/ProxyClientApp.cpp
diff options
context:
space:
mode:
authorAlex Borisov <b0ric.alex@gmail.com>2012-02-02 00:33:44 +0200
committerAlex Borisov <b0ric.alex@gmail.com>2012-02-02 00:33:44 +0200
commit873642c0d898f3152b251a783bf4cdef47070d4c (patch)
treef271bf4f62122f21dd32c27fb62d80f60bc0c54c /client/ProxyClientApp.cpp
parentf381a83786d233ca183f3d45f892c4f064a77a58 (diff)
FIX: implement async connection requests
Diffstat (limited to 'client/ProxyClientApp.cpp')
-rw-r--r--client/ProxyClientApp.cpp22
1 files changed, 8 insertions, 14 deletions
diff --git a/client/ProxyClientApp.cpp b/client/ProxyClientApp.cpp
index f9cbf78..b55c33c 100644
--- a/client/ProxyClientApp.cpp
+++ b/client/ProxyClientApp.cpp
@@ -1,7 +1,5 @@
-#include <QMenu>
-#include <QMessageBox>
-#include <QFileInfo>
+#include <QtGui>
#include "client.h"
#include "Dialog.h"
@@ -70,17 +68,6 @@ ProxyClientApp::ProxyClientApp(int &argc, char *argv[]): QApplication(argc, argv
welcomeMsg.setStandardButtons(QMessageBox::Ok);
welcomeMsg.setIcon(QMessageBox::Information);
welcomeMsg.exec();
-
- /*
- vector<pair<string, string> > files;
- pair<string, string> file;
- file = make_pair("../main.cpp", "70ba1d68907cc9d3");
- files.push_back(file);
-
- //QString addr = QString::fromLocal8Bit();
- DownloadClient downloadClient("127.0.0.1");
- downloadClient.Download(files);
- */
}
void ProxyClientApp::trayActivated(QSystemTrayIcon::ActivationReason reason)
@@ -94,8 +81,15 @@ void ProxyClientApp::trayActivated(QSystemTrayIcon::ActivationReason reason)
void ProxyClientApp::showProxyDialog()
{
Logger::Trace("Creating proxy dialog.\n");
+ QDesktopWidget* screen = QApplication::desktop();
+ QRect availScreenRect = screen->availableGeometry();
+
+ Logger::Debug("Available screen size WxH = %d x %d\n", availScreenRect.width(), availScreenRect.height());
+
ProxyDialog *dialog = new ProxyDialog();
dialog->show();
+ dialog->move(availScreenRect.width() - dialog->frameSize().width(),
+ availScreenRect.height() - dialog->frameSize().height());
}
void ProxyClientApp::configUpdated()