parent
414028e867
commit
09aa6f4c79
|
@ -2,7 +2,6 @@ Settings.MainWndTitle="Window title to check for:"
|
|||
Settings.MainWndScene="Scene to switch to on window title:"
|
||||
Settings.WindowTitle="Window Title"
|
||||
Settings.Scene="Scene"
|
||||
Settings.MatchExact="Match exact window name"
|
||||
Settings.SetToggleHotkey="Set a hotkey to toggle Scene Switcher:"
|
||||
Settings.NoMatch="When no window title matches"
|
||||
Settings.SwitchTo="switch to:"
|
||||
|
|
|
@ -46,7 +46,6 @@ SceneSwitcher::SceneSwitcher(HINSTANCE hinstMain, OBSHOTKEYPROC ToggleHotkeyProc
|
|||
altSceneName.Clear();
|
||||
mainWndName.Clear();
|
||||
altDoSwitch = 1;
|
||||
matchExact = 1;
|
||||
|
||||
// Start with an empty list of window-scene assignments
|
||||
nWindowsDefined = 0;
|
||||
|
@ -90,7 +89,6 @@ void SceneSwitcher::ReadSettings()
|
|||
nWindowsDefined = config.GetInt(TEXT("GENERAL"), TEXT("nWindows"));
|
||||
altDoSwitch = config.GetInt(TEXT("GENERAL"), TEXT("AltDoSwitch"));
|
||||
toggleHotkey = (DWORD)config.GetInt(TEXT("GENERAL"), TEXT("ToggleHotkey"));
|
||||
matchExact = config.GetInt(TEXT("GENERAL"), TEXT("MatchExact"), 1);
|
||||
scenes.Clear();
|
||||
windows.Clear();
|
||||
config.GetStringList(TEXT("SceneDef"), TEXT("window"), windows);
|
||||
|
@ -115,7 +113,6 @@ void SceneSwitcher::WriteSettings()
|
|||
config.SetInt(TEXT("General"), TEXT("nWindows"), nWindowsDefined);
|
||||
config.SetInt(TEXT("General"), TEXT("AltDoSwitch"), altDoSwitch);
|
||||
config.SetInt(TEXT("General"), TEXT("ToggleHotkey"), toggleHotkey);
|
||||
config.SetInt(TEXT("General"), TEXT("MatchExact"), matchExact);
|
||||
config.SetStringList(TEXT("SceneDef"), TEXT("window"), windows);
|
||||
config.SetStringList(TEXT("SceneDef"), TEXT("scene"), scenes);
|
||||
}
|
||||
|
@ -283,7 +280,6 @@ void SceneSwitcher::ApplyConfig(HWND hDialog)
|
|||
|
||||
// Get the checkboxes state
|
||||
altDoSwitch = IsDlgButtonChecked(hDialog, IDC_ALTSWITCH);
|
||||
matchExact = IsDlgButtonChecked(hDialog, IDC_EXACT);
|
||||
startAuto = IsDlgButtonChecked(hDialog, IDC_STARTAUTO);
|
||||
|
||||
if(newAltSceneName.IsEmpty() && IsAltDoSwitch())
|
||||
|
|
|
@ -85,7 +85,6 @@ class SceneSwitcher
|
|||
String altSceneName;
|
||||
String mainWndName;
|
||||
int startAuto;
|
||||
int matchExact;
|
||||
bool bKillThread;
|
||||
ConfigFile config;
|
||||
int altDoSwitch;
|
||||
|
@ -116,7 +115,6 @@ public:
|
|||
inline bool IsRunning() const {return thread!=0;}
|
||||
inline bool IsStartAuto() const {return startAuto!=0;}
|
||||
inline bool IsAltDoSwitch() const {return altDoSwitch!=0;}
|
||||
inline bool IsMatchExact() const {return matchExact!=0;}
|
||||
inline int GetToggleHotkey() const {return toggleHotkey;}
|
||||
|
||||
inline int GetnWindowsDefined() const {return nWindowsDefined;}
|
||||
|
|
|
@ -152,9 +152,6 @@ void SceneSwitcherSettings::MsgInitDialog()
|
|||
SendMessage(hwndSwButton, BM_SETCHECK, (thePlugin->IsAltDoSwitch() ? BST_CHECKED : BST_UNCHECKED), 0);
|
||||
SendMessage(hwndNoswButton, BM_SETCHECK, (thePlugin->IsAltDoSwitch() ? BST_UNCHECKED : BST_CHECKED), 0);
|
||||
EnableWindow(hwndAltScn, thePlugin->IsAltDoSwitch());
|
||||
|
||||
if(thePlugin->IsMatchExact()) // Match exact window name checkbox
|
||||
CheckDlgButton(hwnd, IDC_EXACT, BST_CHECKED);
|
||||
|
||||
do
|
||||
{
|
||||
|
@ -390,15 +387,6 @@ INT_PTR SceneSwitcherSettings::MsgClicked(int controlId, int code, HWND controlH
|
|||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case IDC_EXACT:
|
||||
{
|
||||
HWND control = GetDlgItem(hwnd, IDC_EXACT);
|
||||
bool newState = (SendMessage(control, BM_GETSTATE, 0, 0) & BST_CHECKED) != 0;
|
||||
pChange = pChange || (newState != thePlugin->IsMatchExact());
|
||||
SetChangedSettings(pChange);
|
||||
return TRUE;
|
||||
}
|
||||
break;
|
||||
case IDC_TOGGLEHOTKEY:
|
||||
if (code == EN_CHANGE) {
|
||||
SetChangedSettings(pChange = true);
|
||||
|
|
Binary file not shown.
Binary file not shown.
Loading…
Reference in New Issue