summaryrefslogtreecommitdiff
path: root/client/ProxyClientApp.cpp
diff options
context:
space:
mode:
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()