Added GUI for relative mouse moves option on win32.
This commit is contained in:
parent
a8c6b5e5ee
commit
8aa258ef31
|
@ -77,6 +77,8 @@ CGlobalOptions::init(HWND hwnd)
|
||||||
setWindowText(child, buffer);
|
setWindowText(child, buffer);
|
||||||
child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC);
|
child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC);
|
||||||
setItemChecked(child, true);
|
setItemChecked(child, true);
|
||||||
|
child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES);
|
||||||
|
setItemChecked(child, false);
|
||||||
|
|
||||||
// get the global options
|
// get the global options
|
||||||
const CConfig::CScreenOptions* options = m_config->getOptions("");
|
const CConfig::CScreenOptions* options = m_config->getOptions("");
|
||||||
|
@ -116,6 +118,10 @@ CGlobalOptions::init(HWND hwnd)
|
||||||
child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC);
|
child = getItem(hwnd, IDC_GLOBAL_SCREENSAVER_SYNC);
|
||||||
setItemChecked(child, (value != 0));
|
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("", kOptionScreenSwitchTwoTap);
|
||||||
m_config->removeOption("", kOptionHeartbeat);
|
m_config->removeOption("", kOptionHeartbeat);
|
||||||
m_config->removeOption("", kOptionScreenSaverSync);
|
m_config->removeOption("", kOptionScreenSaverSync);
|
||||||
|
m_config->removeOption("", kOptionRelativeMouseMoves);
|
||||||
|
|
||||||
// add requested options
|
// add requested options
|
||||||
child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK);
|
child = getItem(hwnd, IDC_GLOBAL_DELAY_CHECK);
|
||||||
|
@ -198,6 +205,10 @@ CGlobalOptions::save(HWND hwnd)
|
||||||
if (!isItemChecked(child)) {
|
if (!isItemChecked(child)) {
|
||||||
m_config->addOption("", kOptionScreenSaverSync, 0);
|
m_config->addOption("", kOptionScreenSaverSync, 0);
|
||||||
}
|
}
|
||||||
|
child = getItem(hwnd, IDC_GLOBAL_RELATIVE_MOVES);
|
||||||
|
if (isItemChecked(child)) {
|
||||||
|
m_config->addOption("", kOptionRelativeMouseMoves, 1);
|
||||||
|
}
|
||||||
|
|
||||||
// save last values
|
// save last values
|
||||||
m_delayTime = newDelayTime;
|
m_delayTime = newDelayTime;
|
||||||
|
|
|
@ -173,7 +173,7 @@ BEGIN
|
||||||
IDC_STATIC,7,43,181,17
|
IDC_STATIC,7,43,181,17
|
||||||
END
|
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
|
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
|
||||||
CAPTION "Options"
|
CAPTION "Options"
|
||||||
FONT 8, "MS Sans Serif"
|
FONT 8, "MS Sans Serif"
|
||||||
|
@ -205,8 +205,12 @@ BEGIN
|
||||||
IDC_STATIC,7,176,193,8
|
IDC_STATIC,7,176,193,8
|
||||||
CONTROL "Synchronize screen savers",IDC_GLOBAL_SCREENSAVER_SYNC,
|
CONTROL "Synchronize screen savers",IDC_GLOBAL_SCREENSAVER_SYNC,
|
||||||
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,192,101,10
|
"Button",BS_AUTOCHECKBOX | WS_TABSTOP,7,192,101,10
|
||||||
DEFPUSHBUTTON "OK",IDOK,94,212,50,14
|
LTEXT "Experimental: Relative mouse moves on secondary screens.",
|
||||||
PUSHBUTTON "Cancel",IDCANCEL,150,212,50,14
|
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
|
END
|
||||||
|
|
||||||
IDD_ADVANCED_OPTIONS DIALOG DISCARDABLE 0, 0, 230, 133
|
IDD_ADVANCED_OPTIONS DIALOG DISCARDABLE 0, 0, 230, 133
|
||||||
|
@ -274,7 +278,7 @@ BEGIN
|
||||||
LEFTMARGIN, 7
|
LEFTMARGIN, 7
|
||||||
RIGHTMARGIN, 200
|
RIGHTMARGIN, 200
|
||||||
TOPMARGIN, 7
|
TOPMARGIN, 7
|
||||||
BOTTOMMARGIN, 226
|
BOTTOMMARGIN, 262
|
||||||
END
|
END
|
||||||
|
|
||||||
IDD_ADVANCED_OPTIONS, DIALOG
|
IDD_ADVANCED_OPTIONS, DIALOG
|
||||||
|
|
|
@ -100,6 +100,7 @@
|
||||||
#define IDC_GLOBAL_HEARTBEAT_TIME 1046
|
#define IDC_GLOBAL_HEARTBEAT_TIME 1046
|
||||||
#define IDC_ADD_MOD_SUPER 1047
|
#define IDC_ADD_MOD_SUPER 1047
|
||||||
#define IDC_GLOBAL_SCREENSAVER_SYNC 1047
|
#define IDC_GLOBAL_SCREENSAVER_SYNC 1047
|
||||||
|
#define IDC_GLOBAL_RELATIVE_MOVES 1048
|
||||||
#define IDC_ADVANCED_DEFAULTS 1049
|
#define IDC_ADVANCED_DEFAULTS 1049
|
||||||
|
|
||||||
// Next default values for new objects
|
// Next default values for new objects
|
||||||
|
|
Loading…
Reference in New Issue