diff --git a/client/preferences.c b/client/preferences.c
index b57170295..ebe72df94 100644
--- a/client/preferences.c
+++ b/client/preferences.c
@@ -1,40 +1,7 @@
-/*****************************************************************************
- * WARNING
- *
- * THIS CODE IS CREATED FOR EXPERIMENTATION AND EDUCATIONAL USE ONLY.
- *
- * USAGE OF THIS CODE IN OTHER WAYS MAY INFRINGE UPON THE INTELLECTUAL
- * PROPERTY OF OTHER PARTIES, SUCH AS INSIDE SECURE AND HID GLOBAL,
- * AND MAY EXPOSE YOU TO AN INFRINGEMENT ACTION FROM THOSE PARTIES.
- *
- * THIS CODE SHOULD NEVER BE USED TO INFRINGE PATENTS OR INTELLECTUAL PROPERTY RIGHTS.
- *
- *****************************************************************************
- *
- * This file is part of loclass. It is a reconstructon of the cipher engine
- * used in iClass, and RFID techology.
- *
- * The implementation is based on the work performed by
- * Flavio D. Garcia, Gerhard de Koning Gans, Roel Verdult and
- * Milosch Meriac in the paper "Dismantling IClass".
- *
- * Copyright (C) 2014 Martin Holst Swende
- *
- * This is free software: you can redistribute it and/or modify
- * it under the terms of the GNU General Public License version 2 as published
- * by the Free Software Foundation, or, at your option, any later version.
- *
- * This file is distributed in the hope that it will be useful,
- * but WITHOUT ANY WARRANTY; without even the implied warranty of
- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- * GNU General Public License for more details.
- *
- * You should have received a copy of the GNU General Public License
- * along with loclass. If not, see .
- *
- *
- ****************************************************************************/
-
+//-----------------------------------------------------------------------------
+// This code is licensed to you under the terms of the GNU GPL, version 2 or,
+// at your option, any later version. See the LICENSE.txt file for the text of
+// the license.
//-----------------------------------------------------------------------------
// Preferences Functions
//-----------------------------------------------------------------------------
@@ -56,7 +23,8 @@
#include
#include "cmdparser.h"
#include
-
+//#include "proxgui.h"
+extern void SetWindowsPosition (void);
static int CmdHelp(const char *Cmd);
// Load all settings into memory (struct)
@@ -477,7 +445,7 @@ static int CmdPrefSet (const char *Cmd)
// Need to work out how to change live....
// calling data plot seems to work
//plotwidget->MoveWindows ();
-
+ SetWindowsPosition();
showPlotPosState ();
break;
case prefOVERLAY:
@@ -500,6 +468,7 @@ static int CmdPrefSet (const char *Cmd)
if (y != -99999) session.window_overlay_ypos = y;
if (h != -99999) session.window_overlay_hsize = h;
if (w != -99999) session.window_overlay_wsize = w;
+ SetWindowsPosition();
showOverlayPosState ();
// Need to work out how to change live....
break;
diff --git a/client/preferences.h b/client/preferences.h
index 7dce07fc6..edc426086 100644
--- a/client/preferences.h
+++ b/client/preferences.h
@@ -1,7 +1,4 @@
//-----------------------------------------------------------------------------
-// Copyright (C) 2009 Michael Gernoth
-// Copyright (C) 2010 iZsh
-//
// This code is licensed to you under the terms of the GNU GPL, version 2 or,
// at your option, any later version. See the LICENSE.txt file for the text of
// the license.
diff --git a/client/proxgui.cpp b/client/proxgui.cpp
index d5f82ffe9..3a7ac9ff1 100644
--- a/client/proxgui.cpp
+++ b/client/proxgui.cpp
@@ -54,6 +54,9 @@ extern "C" void MainGraphics(void) {
gui->MainLoop();
}
+extern "C" void SetWindowsPosition (void) {
+ gui->SetWindowsPosition ();
+}
extern "C" void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop) {
#ifdef Q_WS_X11
diff --git a/client/proxgui.h b/client/proxgui.h
index c9cd0096d..635adffe6 100644
--- a/client/proxgui.h
+++ b/client/proxgui.h
@@ -24,6 +24,7 @@ void ShowGraphWindow(void);
void HideGraphWindow(void);
void RepaintGraphWindow(void);
void MainGraphics(void);
+void SetWindowsPosition (void);
void InitGraphics(int argc, char **argv, char *script_cmds_file, char *script_cmd, bool stayInCommandLoop);
void ExitGraphics(void);
#ifndef MAX_GRAPH_TRACE_LEN
diff --git a/client/proxguiqt.cpp b/client/proxguiqt.cpp
index cbe4ade8d..c65248719 100644
--- a/client/proxguiqt.cpp
+++ b/client/proxguiqt.cpp
@@ -128,7 +128,10 @@ ProxGuiQT::~ProxGuiQT(void) {
plotapp = NULL;
}
}
-
+void ProxGuiQT::SetWindowsPosition (void)
+{
+ plotwidget->SetWindowsPosition ();
+}
//--------------------
void ProxWidget::applyOperation() {
//printf("ApplyOperation()");
@@ -258,6 +261,13 @@ void ProxWidget::showEvent(QShowEvent *event) {
controlWidget->show();
plot->show();
}
+void ProxWidget::SetWindowsPosition(void) {
+ printf ("Settings windows Pos\n");
+ if (session.preferences_loaded) {
+ setGeometry (session.window_plot_xpos,session.window_plot_ypos,session.window_plot_wsize,session.window_plot_hsize);
+ controlWidget->setGeometry (session.window_overlay_xpos,session.window_overlay_ypos,session.window_overlay_wsize,session.window_overlay_hsize);
+ }
+}
//----------- Plotting
diff --git a/client/proxguiqt.h b/client/proxguiqt.h
index 80d9e1ef4..f5e9d2736 100644
--- a/client/proxguiqt.h
+++ b/client/proxguiqt.h
@@ -88,6 +88,7 @@ class ProxWidget : public QWidget {
void vchange_askedge(int v);
void vchange_dthr_up(int v);
void vchange_dthr_down(int v);
+ void SetWindowsPosition(void);
};
class WorkerThread : public QThread {
@@ -121,7 +122,7 @@ class ProxGuiQT : public QObject {
void HideGraphWindow(void);
void MainLoop(void);
void Exit(void);
-
+ void SetWindowsPosition (void);
private slots:
void _ShowGraphWindow(void);
void _RepaintGraphWindow(void);
diff --git a/client/proxmark3.c b/client/proxmark3.c
index d152fa93a..910d49327 100644
--- a/client/proxmark3.c
+++ b/client/proxmark3.c
@@ -914,7 +914,7 @@ int main(int argc, char *argv[]) {
showBanner();
#ifdef USE_PREFERENCE_FILE
- // Save settings if not load from settings json file.
+ // Save settings if not loaded from settings json file.
// Doing this here will ensure other checks and updates are saved to over rule default
// e.g. Linux color use check
if (!session.preferences_loaded) {