From 8aa258ef31bf251823e7f54314dc44a0600553a5 Mon Sep 17 00:00:00 2001 From: crs Date: Tue, 4 May 2004 20:45:06 +0000 Subject: [PATCH] Added GUI for relative mouse moves option on win32. --- cmd/launcher/CGlobalOptions.cpp | 11 +++++++++++ cmd/launcher/launcher.rc | 12 ++++++++---- cmd/launcher/resource.h | 1 + 3 files changed, 20 insertions(+), 4 deletions(-) diff --git a/cmd/launcher/CGlobalOptions.cpp b/cmd/launcher/CGlobalOptions.cpp index 8a44643f..1777863b 100644 --- a/cmd/launcher/CGlobalOptions.cpp +++ b/cmd/launcher/CGlobalOptions.cpp @@ -77,6 +77,8 @@ CGlobalOptions::init(HWND hwnd) setWindowText(child, buffer); child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC); setItemChecked(child, true); + child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); + setItemChecked(child, false); // get the global options const CConfig::CScreenOptions* options = m_config->getOptions(""); @@ -116,6 +118,10 @@ CGlobalOptions::init(HWND hwnd) child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC); setItemChecked(child, (value != 0)); } + else if (id == kOptionRelativeMouseMoves) { + child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); + setItemChecked(child, (value != 0)); + } } } } @@ -180,6 +186,7 @@ CGlobalOptions::save(HWND hwnd) m_config->removeOption("", kOptionScreenSwitchTwoTap); m_config->removeOption("", kOptionHeartbeat); m_config->removeOption("", kOptionScreenSaverSync); + m_config->removeOption("", kOptionRelativeMouseMoves); // add requested options child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK); @@ -198,6 +205,10 @@ CGlobalOptions::save(HWND hwnd) if (!isItemChecked(child)) { m_config->addOption("", kOptionScreenSaverSync, 0); } + child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES); + if (isItemChecked(child)) { + m_config->addOption("", kOptionRelativeMouseMoves, 1); + } // save last values m_delayTime = newDelayTime; diff --git a/cmd/launcher/launcher.rc b/cmd/launcher/launcher.rc index 51df8c83..d14e60f5 100644 --- a/cmd/launcher/launcher.rc +++ b/cmd/launcher/launcher.rc @@ -173,7 +173,7 @@ BEGIN IDC_STATIC,7,43,181,17 END -IDD_GLOBAL_OPTIONS DIALOG DISCARDABLE 0, 0, 207, 233 +IDD_GLOBAL_OPTIONS DIALOG DISCARDABLE 0, 0, 207, 269 STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU CAPTION "Options" FONT 8, "MS Sans Serif" @@ -205,8 +205,12 @@ BEGIN IDC_STATIC,7,176,193,8 CONTROL "Synchronize screen savers",IDC_GLOBAL_SCREENSAVER_SYNC, "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,192,101,10 - DEFPUSHBUTTON "OK",IDOK,94,212,50,14 - PUSHBUTTON "Cancel",IDCANCEL,150,212,50,14 + LTEXT "Experimental: Relative mouse moves on secondary screens.", + IDC_STATIC,7,213,193,8 + CONTROL "Use relative mouse moves",IDC_GLOBAL_RELATIVE_MOVES, + "Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,229,99,10 + DEFPUSHBUTTON "OK",IDOK,94,248,50,14 + PUSHBUTTON "Cancel",IDCANCEL,150,248,50,14 END IDD_ADVANCED_OPTIONS DIALOG DISCARDABLE 0, 0, 230, 133 @@ -274,7 +278,7 @@ BEGIN LEFTMARGIN, 7 RIGHTMARGIN, 200 TOPMARGIN, 7 - BOTTOMMARGIN, 226 + BOTTOMMARGIN, 262 END IDD_ADVANCED_OPTIONS, DIALOG diff --git a/cmd/launcher/resource.h b/cmd/launcher/resource.h index 3044c2d5..e6d90dac 100644 --- a/cmd/launcher/resource.h +++ b/cmd/launcher/resource.h @@ -100,6 +100,7 @@ #define IDC_GLOBAL_HEARTBEAT_TIME 1046 #define IDC_ADD_MOD_SUPER 1047 #define IDC_GLOBAL_SCREENSAVER_SYNC 1047 +#define IDC_GLOBAL_RELATIVE_MOVES 1048 #define IDC_ADVANCED_DEFAULTS 1049 // Next default values for new objects