#include "common.h"
-INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+static const TCHAR *licenseText = _T("\
+WinMute\r\n\
+Copyright(c) 2022, Alexander Steinhoefer\r\n\
+\r\n\
+-----------------------------------------------------------------------------\r\n\
+Redistribution and use in source and binary forms, with or without\r\n\
+modification, are permitted provided that the following conditions are met:\r\n\
+\r\n\
+ * Redistributions of source code must retain the above copyright notice,\r\n\
+ this list of conditions and the following disclaimer.\r\n\
+\r\n\
+ * Redistributions in binary form must reproduce the above copyright\r\n\
+ notice, this list of conditions and the following disclaimer in the\r\n\
+ documentation and /or other materials provided with the distribution.\r\n\
+\r\n\
+ * Neither the name of the author nor the names of its contributors may\r\n\
+ be used to endorse or promote products derived from this software\r\n\
+ without specific prior written permission.\r\n\
+\r\n\
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS\r\n\
+\"AS IS\" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT\r\n\
+LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS\r\n\
+FOR A PARTICULAR PURPOSE ARE DISCLAIMED.IN NO EVENT SHALL THE\r\n\
+COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,\r\n\
+INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES(INCLUDING,\r\n\
+BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;\r\n\
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\r\n\
+CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT\r\n\
+LIABILITY, OR TORT(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY\r\n\
+WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE\r\n\
+POSSIBILITY OF SUCH DAMAGE.\r\n\
+");
+
+static const TCHAR *aboutText = _T("\
+WinMute is developed by Alexander Steinhoefer\r\n\
+in his spare time.\r\n\
+\r\n\
+The code as well as new releases for this tool\r\n\
+can be found on GitHub.\r\n\
+Contributions in the form of code, tickets or\r\n\
+feature requests are very welcome.\r\n\
+\r\n\
+Thank your for using this little tool!\r\n\
+");
+
+enum AboutTabsIDs {
+ ABOUT_TAB_GENERAL = 0,
+ ABOUT_TAB_LICENSE,
+ ABOUT_TAB_COUNT
+};
+
+struct AboutDlgData {
+ HWND hTabCtrl;
+ HWND hTabs[ABOUT_TAB_COUNT];
+ HWND hActiveTab;
+ HFONT hTitleFont;
+
+ AboutDlgData()
+ : hTabCtrl(NULL), hActiveTab(NULL), hTitleFont(NULL)
+ {
+ ZeroMemory(hTabs, sizeof(hTabs));
+ }
+};
+
+static void InsertTabItem(HWND hTabCtrl, UINT id, const TCHAR* itemName)
+{
+ constexpr int bufSize = 50;
+ TCHAR buf[bufSize];
+ TC_ITEM tcItem;
+ ZeroMemory(&tcItem, sizeof(tcItem));
+ tcItem.mask |= TCIF_TEXT;
+ StringCchCopy(buf, bufSize, itemName);
+ tcItem.pszText = buf;
+ tcItem.cchTextMax = bufSize;
+
+ TabCtrl_InsertItem(hTabCtrl, id, &tcItem);
+}
+
+static void SwitchTab(AboutDlgData* dlgData, HWND hNewTab)
+{
+ if (dlgData->hActiveTab != NULL) {
+ ShowWindow(dlgData->hActiveTab, SW_HIDE);
+ }
+ dlgData->hActiveTab = hNewTab;
+ ShowWindow(dlgData->hActiveTab, SW_SHOW);
+}
+
+static void ResizeTab(HWND hTabCtrl, HWND hTabPage)
+{
+ RECT r = { 0 };
+ GetClientRect(hTabPage, &r);
+ TabCtrl_AdjustRect(hTabCtrl, FALSE, &r);
+ MoveWindow(hTabPage, r.left, r.top, r.right, r.bottom, TRUE);
+}
+
+static INT_PTR CALLBACK About_GeneralDlgProc(HWND hDlg, UINT msg, WPARAM, LPARAM lParam)
{
switch (msg) {
case WM_INITDIALOG:
- return TRUE;
- case WM_COMMAND:
- if (LOWORD(wParam) == IDOK) {
- EndDialog(hDlg, 0);
+ if (IsAppThemed()) {
+ EnableThemeDialogTexture(hDlg, ETDT_ENABLETAB);
}
- return 0;
- case WM_NOTIFY:
- {
- PNMLINK pNmLink = (PNMLINK)lParam;
- switch (pNmLink->hdr.code) {
- case NM_CLICK:
- case NM_RETURN:
- {
+ Edit_SetText(GetDlgItem(hDlg, IDC_ABOUTTEXT), aboutText);
+ return TRUE;
+ case WM_NOTIFY: {
+ PNMLINK pNmLink = reinterpret_cast<PNMLINK>(lParam);
+ if (pNmLink->hdr.code == NM_CLICK || pNmLink->hdr.code == NM_RETURN) {
UINT_PTR ctrlId = pNmLink->hdr.idFrom;
LITEM item = pNmLink->item;
- if ((ctrlId == IDC_LINK_HOMEPAGE || ctrlId == IDC_LINK_SUPPORT)
+ if ((ctrlId == IDC_LINK_HOMEPAGE
+ || ctrlId == IDC_LINK_TICKETS
+ || ctrlId == IDC_LINK_PROJECT)
&& item.iLink == 0) {
ShellExecute(nullptr, _T("open"), item.szUrl, nullptr, nullptr,
SW_SHOW);
}
- break;
}
+ return TRUE;
+ }
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+static INT_PTR CALLBACK About_LicenseDlgProc(HWND hDlg, UINT msg, WPARAM, LPARAM)
+{
+ switch (msg) {
+ case WM_INITDIALOG:
+ if (IsAppThemed()) {
+ EnableThemeDialogTexture(hDlg, ETDT_ENABLETAB);
+ }
+ Edit_SetText(GetDlgItem(hDlg, IDC_LICENSETEXT), licenseText);
+ return TRUE;
+ default:
+ break;
+ }
+ return FALSE;
+}
+
+INT_PTR CALLBACK AboutDlgProc(HWND hDlg, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+ AboutDlgData* dlgData =
+ reinterpret_cast<AboutDlgData*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
+ switch (msg) {
+ case WM_INITDIALOG: {
+ dlgData = new AboutDlgData();
+ SetWindowLongPtr(hDlg, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(dlgData));
+
+ dlgData->hTabCtrl = GetDlgItem(hDlg, IDC_ABOUT_TAB);
+
+ InsertTabItem(dlgData->hTabCtrl, ABOUT_TAB_GENERAL, _T("WinMute"));
+ InsertTabItem(dlgData->hTabCtrl, ABOUT_TAB_LICENSE, _T("License"));
+
+ dlgData->hTabs[ABOUT_TAB_GENERAL] = CreateDialog(
+ nullptr,
+ MAKEINTRESOURCE(IDD_ABOUT_WINMUTE),
+ dlgData->hTabCtrl,
+ About_GeneralDlgProc);
+ dlgData->hTabs[ABOUT_TAB_LICENSE] = CreateDialog(
+ nullptr,
+ MAKEINTRESOURCE(IDD_ABOUT_LICENSE),
+ dlgData->hTabCtrl,
+ About_LicenseDlgProc);
+
+ // Init tab pages
+ for (int i = 0; i < ABOUT_TAB_COUNT; ++i) {
+ HWND hCurTab = dlgData->hTabs[i];
+ ShowWindow(hCurTab, SW_HIDE);
+ ResizeTab(dlgData->hTabCtrl, hCurTab);
}
+
+ SwitchTab(dlgData, dlgData->hTabs[ABOUT_TAB_GENERAL]);
+
+ // Set title font
+ LOGFONT font;
+ font.lfHeight = 32;
+ font.lfWidth = 0;
+ font.lfEscapement = 0;
+ font.lfOrientation = 0;
+ font.lfWeight = FW_BOLD;
+ font.lfItalic = false;
+ font.lfUnderline = false;
+ font.lfStrikeOut = false;
+ font.lfEscapement = 0;
+ font.lfOrientation = 0;
+ font.lfOutPrecision = OUT_DEFAULT_PRECIS;
+ font.lfClipPrecision = CLIP_STROKE_PRECIS | CLIP_MASK | CLIP_TT_ALWAYS | CLIP_LH_ANGLES;
+ font.lfQuality = CLEARTYPE_QUALITY;
+ font.lfPitchAndFamily = VARIABLE_PITCH | FF_ROMAN;
+ lstrcpy(font.lfFaceName, _T("Segoe UI"));
+
+ dlgData->hTitleFont = CreateFontIndirect(&font);
+ SendMessage(
+ GetDlgItem(hDlg, IDC_ABOUT_TITLE),
+ WM_SETFONT,
+ reinterpret_cast<WPARAM>(dlgData->hTitleFont),
+ TRUE);
return TRUE;
}
+ case WM_NOTIFY: {
+ const LPNMHDR lpnmhdr = reinterpret_cast<LPNMHDR>(lParam);
+ if (lpnmhdr->code == TCN_SELCHANGE
+ && lpnmhdr->hwndFrom == dlgData->hTabCtrl) {
+ const int curSel = TabCtrl_GetCurSel(dlgData->hTabCtrl);
+ if (curSel >= 0 && curSel <= ABOUT_TAB_COUNT) {
+ SwitchTab(dlgData, dlgData->hTabs[curSel]);
+ }
+ }
+ return 0;
+ }
+ case WM_COMMAND:
+ if (LOWORD(wParam) == IDOK) {
+ EndDialog(hDlg, 0);
+ }
+ return 0;
+ case WM_DESTROY:
+ DeleteObject(dlgData->hTitleFont);
+ delete dlgData;
+ SetWindowLongPtr(hDlg, GWLP_USERDATA, NULL);
+ return 0;
case WM_CLOSE:
EndDialog(hDlg, 0);
return TRUE;
void MuteControl::SetMute(bool mute)
{
- Log::GetInstance().Write(_T("Manual muting: {}"), mute ? _T("on") : _T("off"));
+ WMLog::GetInstance().Write(_T("Manual muting: {}"), mute ? _T("on") : _T("off"));
winAudio_->SetMute(mute);
}
void MuteControl::RestoreVolume()
{
if (!restoreVolume_) {
- Log::GetInstance().Write(_T("Restore is FALSE"));
+ WMLog::GetInstance().Write(_T("Restore is FALSE"));
return;
}
bool restore = true;
int i = 0;
for (const auto& conf : muteConfig_) {
if (conf.shouldMute && conf.active) {
- Log::GetInstance().Write(_T("Entry {} found with ShouldMute: Yes and Active: Yes"), i);
+ WMLog::GetInstance().Write(_T("Entry {} found with ShouldMute: Yes and Active: Yes"), i);
restore = false;
//break;
}
}
if (restore) {
if (winAudio_->IsMuted() && !wasAlreadyMuted_) {
- Log::GetInstance().Write(_T("Mute: Off"));
+ WMLog::GetInstance().Write(_T("Mute: Off"));
winAudio_->SetMute(false);
} else {
- Log::GetInstance().Write(
+ WMLog::GetInstance().Write(
_T("Skipping unmute since workstation was already muted."));
}
}
if (active) {
ConfigureWasAlreadyMuted();
muteConfig_[type].active = active;
- Log::GetInstance().Write(_T("Condition {}: ACTIVE"), type);
+ WMLog::GetInstance().Write(_T("Condition {}: ACTIVE"), type);
if (muteConfig_[type].shouldMute &&
!winAudio_->IsMuted()) {
- Log::GetInstance().Write(_T("Mute: On"));
+ WMLog::GetInstance().Write(_T("Mute: On"));
winAudio_->SetMute(true);
}
} else {
- Log::GetInstance().Write(_T("Condition {}: INACTIVE"), type);
+ WMLog::GetInstance().Write(_T("Condition {}: INACTIVE"), type);
muteConfig_[type].active = active;
RestoreVolume();
}
void MuteControl::NotifySuspend(bool /*active*/)
{
- Log::GetInstance().Write(_T("Suspend: START"));
+ WMLog::GetInstance().Write(_T("Suspend: START"));
if (muteConfig_[MuteTypeSuspend].shouldMute) {
winAudio_->SetMute(true);
}
{
if (active) {
ConfigureWasAlreadyMuted();
- Log::GetInstance().Write(L"Quiet Hours startet");
+ WMLog::GetInstance().Write(L"Quiet Hours startet");
if (!winAudio_->IsMuted()) {
winAudio_->SetMute(true);
}
} else {
- Log::GetInstance().Write(L"Quiet Hours ended");
+ WMLog::GetInstance().Write(L"Quiet Hours ended");
RestoreVolume();
}
}
HWND hTabs[SETTINGS_TAB_COUNT];
HWND hActiveTab;
- Settings* settings;
+ WMSettings* settings;
- SettingsDlgData(Settings* settings)
+ SettingsDlgData(WMSettings* settings)
: settings(settings), hTabCtrl(NULL), hActiveTab(NULL)
{
ZeroMemory(hTabs, sizeof(hTabs));
switch (msg) {
case WM_INITDIALOG: {
assert(dlgData == nullptr);
- Settings* settings = reinterpret_cast<Settings*>(lParam);
+ WMSettings* settings = reinterpret_cast<WMSettings*>(lParam);
dlgData = new SettingsDlgData(settings);
SetWindowLongPtr(hDlg, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(dlgData));
}
static bool SaveQuietHours(
- Settings* settings,
+ WMSettings* settings,
const int enabled,
const int forceUnmute,
const int showNotifications,
HWND hStart = GetDlgItem(hDlg, IDC_QUIETHOURS_START);
HWND hEnd = GetDlgItem(hDlg, IDC_QUIETHOURS_END);
- Settings* settings = reinterpret_cast<Settings*>(lParam);
+ WMSettings* settings = reinterpret_cast<WMSettings*>(lParam);
assert(settings != NULL);
SetWindowLongPtr(hDlg, GWLP_USERDATA, reinterpret_cast<LONG_PTR>(settings));
HWND hNotify = GetDlgItem(hDlg, IDC_SHOWNOTIFICATIONS);
HWND hStart = GetDlgItem(hDlg, IDC_QUIETHOURS_START);
HWND hEnd = GetDlgItem(hDlg, IDC_QUIETHOURS_END);
- Settings* settings = reinterpret_cast<Settings*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
+ WMSettings* settings = reinterpret_cast<WMSettings*>(GetWindowLongPtr(hDlg, GWLP_USERDATA));
int qhEnabled = Button_GetCheck(hEnable) == BST_CHECKED;
int qhForceUnmute = Button_GetCheck(hForce) == BST_CHECKED;
int qhNotifications = Button_GetCheck(hNotify) == BST_CHECKED;
return logFile.is_open();
}
-Log& Log::GetInstance()
+WMLog& WMLog::GetInstance()
{
- static Log log;
+ static WMLog log;
return log;
}
-Log::Log() :
+WMLog::WMLog() :
initialized_(false)
{
if (OpenLogFile(logFile_)) {
}
}
-Log::~Log()
+WMLog::~WMLog()
{
if (initialized_) {
logFile_.close();
}
}
-void Log::SetEnabled(bool enable)
+void WMLog::SetEnabled(bool enable)
{
enabled_ = enable;
}
-void Log::WriteMessage(const tstring& msg)
+void WMLog::WriteMessage(const tstring& msg)
{
struct tm tm;
auto now = std::chrono::system_clock::now();
logFile_.flush();
}
-void Log::Write(const tstring& msg)
+void WMLog::Write(const tstring& msg)
{
if (!initialized_ || !enabled_) {
return;
#include "common.h"
-class Log {
+class WMLog {
public:
- static Log& GetInstance();
+ static WMLog& GetInstance();
void Write(const tstring& wmsg);
void SetEnabled(bool enable);
private:
- Log();
- ~Log();
- Log(const Log&) = delete;
- Log& operator=(const Log&) = delete;
+ WMLog();
+ ~WMLog();
+ WMLog(const WMLog&) = delete;
+ WMLog& operator=(const WMLog&) = delete;
void WriteMessage(const tstring& msg);
*/
#include "common.h"
-#include "Settings.h"
static const LPCWSTR LX_SYSTEMS_SUBKEY = _T("SOFTWARE\\lx-systems\\WinMute");
-
static LPCWSTR KeyToStr(SettingsKey key)
{
LPCWSTR keyStr = nullptr;
case SettingsKey::QUIETHOURS_END:
keyStr = _T("QuietHoursEnd");
break;
+ case SettingsKey::LOGGING_ENABLED:
+ keyStr = _T("Logging");
+ break;
}
return keyStr;
}
-Settings::Settings() :
+WMSettings::WMSettings() :
hRegSettingsKey_(nullptr)
{
}
-Settings::~Settings()
+WMSettings::~WMSettings()
{
Unload();
}
-bool Settings::Init()
+bool WMSettings::Init()
{
if (hRegSettingsKey_ == nullptr) {
DWORD regError = RegCreateKeyEx(
return true;
}
-void Settings::Unload()
+void WMSettings::Unload()
{
RegCloseKey(hRegSettingsKey_);
hRegSettingsKey_ = nullptr;
}
-DWORD Settings::QueryValue(SettingsKey key, DWORD defValue)
+DWORD WMSettings::QueryValue(SettingsKey key, DWORD defValue)
{
auto keyStr = KeyToStr(key);
assert(keyStr != nullptr);
return value;
}
-bool Settings::SetValue(SettingsKey key, DWORD value)
+bool WMSettings::SetValue(SettingsKey key, DWORD value)
{
auto keyStr = KeyToStr(key);
assert(keyStr != nullptr);
, QUIETHOURS_NOTIFICATIONS
, QUIETHOURS_START
, QUIETHOURS_END
+ , LOGGING_ENABLED
};
-class Settings {
+class WMSettings {
public:
- Settings();
- ~Settings();
+ WMSettings();
+ ~WMSettings();
- Settings(const Settings&) = delete;
- Settings& operator=(const Settings&) = delete;
+ WMSettings(const WMSettings&) = delete;
+ WMSettings& operator=(const WMSettings&) = delete;
bool Init();
void Unload();
if (!muteCtrl_.Init(hWnd_)) {
return false;
}
- Log::GetInstance().SetEnabled(true);
+ WMLog::GetInstance().SetEnabled(true);
return true;
}
!CHECK_MENU_ITEM(RESTOREAUDIO, muteCtrl_.GetRestoreVolume()) ||
!CHECK_MENU_ITEM(MUTEONSUSPEND, muteCtrl_.GetMuteOnSuspend()) ||
!CHECK_MENU_ITEM(MUTEONSHUTDOWN, muteCtrl_.GetMuteOnShutdown()) ||
- !CHECK_MENU_ITEM(MUTEONLOGOUT, muteCtrl_.GetMuteOnLogout()) ||
- !CHECK_MENU_ITEM(CONFIGUREQUIETHOURS, muteConfig_.quietHours.enabled)) {
+ !CHECK_MENU_ITEM(MUTEONLOGOUT, muteCtrl_.GetMuteOnLogout())) {
return false;
}
return true;
hWnd_,
AboutDlgProc);
break;
- case ID_TRAYMENU_CONFIGUREQUIETHOURS:
- DialogBoxParam(
- hglobInstance,
- MAKEINTRESOURCE(IDD_QUIETHOURS),
- hWnd_,
- QuietHoursDlgProc,
- reinterpret_cast<LPARAM>(&settings_));
- break;
case ID_TRAYMENU_EXIT:
SendMessage(hWnd, WM_CLOSE, 0, 0);
break;
if (QuietHoursShouldAlreadyHaveStarted(&now, &start, &end)) {
int timerQhEnd = GetDiffMillseconds(&end, &now);
- Log::GetInstance().Write(L"Mute: On | Quiet hours have already started");
+ WMLog::GetInstance().Write(L"Mute: On | Quiet hours have already started");
muteCtrl_.NotifyQuietHours(true);
if (SetTimer(hWnd_, QUIETHOURS_TIMER_END_ID, timerQhEnd, QuietHoursTimer) == 0) {
MessageBox(hWnd_, L"Failed to create Timer", PROGRAM_NAME, MB_OK);
TrayIcon trayIcon_;
ScreensaverNotifier scrnSaverNoti_;
- Settings settings_;
+ WMSettings settings_;
MuteControl muteCtrl_;
bool RegisterWindowClass();
// Dialog
//
-IDD_ABOUT DIALOGEX 0, 0, 236, 56
+IDD_ABOUT DIALOGEX 0, 0, 313, 269
STYLE DS_SETFONT | DS_FIXEDSYS | DS_CENTER | WS_POPUP | WS_CAPTION
CAPTION "About WinMute"
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
- DEFPUSHBUTTON "OK",IDOK,178,7,50,14
- LTEXT "WinMute v1.6.0",IDC_STATIC,35,7,82,10
- LTEXT "Copyright (c) 2020, Alexander Steinhöfer",IDC_STATIC,35,20,135,8
- ICON IDI_APP,IDC_STATIC,7,7,20,20,SS_CENTERIMAGE
- CONTROL "<a href=""https://lx-s.de"">lx-systems - lx-s.de</a>",IDC_LINK_HOMEPAGE,
- "SysLink",WS_TABSTOP,34,33,82,14
- CONTROL "<a href=""https://github.com/lx-s/WinMute/issues/"">Support</a>",IDC_LINK_SUPPORT,
- "SysLink",WS_TABSTOP,106,33,60,14
+ CONTROL "",IDC_ABOUT_TAB,"SysTabControl32",0x0,7,34,299,202
+ PUSHBUTTON "OK",IDOK,242,246,64,16
+ LTEXT "WinMute 2.0",IDC_ABOUT_TITLE,41,7,193,23
+ ICON IDI_APP,IDC_STATIC,13,7,21,20,SS_CENTERIMAGE
END
IDD_SETTINGS DIALOGEX 0, 0, 269, 253
LTEXT "End time:",IDC_STATIC,24,73,32,16
END
+IDD_ABOUT_LICENSE DIALOGEX 0, 0, 300, 181
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ EDITTEXT IDC_LICENSETEXT,7,7,286,167,ES_CENTER | ES_MULTILINE | ES_AUTOVSCROLL | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER | WS_VSCROLL
+END
+
+IDD_ABOUT_WINMUTE DIALOGEX 0, 0, 298, 176
+STYLE DS_SETFONT | DS_FIXEDSYS | WS_CHILD
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "<a href=""https://lx-s.de"">Author Site: www.lx-s.de</a>",IDC_LINK_HOMEPAGE,
+ "SysLink",WS_TABSTOP,197,14,94,14
+ CONTROL "<a href=""https://github.com/lx-s/WinMute/"">Project Site && Code</a>",IDC_LINK_PROJECT,
+ "SysLink",WS_TABSTOP,197,32,94,14
+ EDITTEXT IDC_ABOUTTEXT,7,14,182,155,ES_MULTILINE | ES_AUTOHSCROLL | ES_READONLY | NOT WS_BORDER
+ CONTROL "<a href=""https://github.com/lx-s/WinMute/issues/"">Support</a>",IDC_LINK_TICKETS,
+ "SysLink",WS_TABSTOP,197,49,94,14
+END
+
/////////////////////////////////////////////////////////////////////////////
//
IDD_ABOUT, DIALOG
BEGIN
LEFTMARGIN, 7
- RIGHTMARGIN, 229
+ RIGHTMARGIN, 306
TOPMARGIN, 7
- BOTTOMMARGIN, 49
+ BOTTOMMARGIN, 262
END
IDD_SETTINGS, DIALOG
TOPMARGIN, 7
BOTTOMMARGIN, 170
END
+
+ IDD_ABOUT_LICENSE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 293
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 174
+ END
+
+ IDD_ABOUT_WINMUTE, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 291
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 169
+ END
END
#endif // APSTUDIO_INVOKED
0
END
+IDD_ABOUT_LICENSE AFX_DIALOG_LAYOUT
+BEGIN
+ 0,
+ 100, 100, 100, 100
+END
+
+IDD_ABOUT_WINMUTE AFX_DIALOG_LAYOUT
+BEGIN
+ 0
+END
+
/////////////////////////////////////////////////////////////////////////////
//
MENUITEM SEPARATOR
MENUITEM "Restore volume when returning", ID_TRAYMENU_RESTOREAUDIO, CHECKED
MENUITEM SEPARATOR
- MENUITEM "Configure Quiet Hours...", ID_TRAYMENU_CONFIGUREQUIETHOURS
+ MENUITEM "Settings...", ID_TRAYMENU_SETTINGS
MENUITEM SEPARATOR
MENUITEM "Mute on (no volume restore)", ID_TRAYMENU_AFTERWARDS, INACTIVE
MENUITEM "... Shutdown", ID_TRAYMENU_MUTEONSHUTDOWN
MENUITEM "... Sleep", ID_TRAYMENU_MUTEONSUSPEND
MENUITEM "... Logout", ID_TRAYMENU_MUTEONLOGOUT
MENUITEM SEPARATOR
- MENUITEM "Settings...", ID_TRAYMENU_SETTINGS
MENUITEM "Mute now", ID_TRAYMENU_MUTE
MENUITEM SEPARATOR
MENUITEM "Exit", ID_TRAYMENU_EXIT
<ItemGroup>
<ClInclude Include="BaseTypes.h" />
<ClInclude Include="common.h" />
- <ClInclude Include="Log.h" />
+ <ClInclude Include="WMLog.h" />
<ClInclude Include="MMNotificationClient.h" />
<ClInclude Include="MuteControl.h" />
<ClInclude Include="QuietHours.h" />
<ClInclude Include="resource.h" />
<ClInclude Include="ScreensaverNotifier.h" />
- <ClInclude Include="settings.h" />
+ <ClInclude Include="WMSettings.h" />
<ClInclude Include="TrayIcon.h" />
<ClInclude Include="VersionHelper.h" />
<ClInclude Include="VistaAudioSessionEvents.h" />
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
</ClCompile>
- <ClCompile Include="Log.cpp" />
+ <ClCompile Include="WMLog.cpp" />
<ClCompile Include="MMNotificationClient.cpp" />
<ClCompile Include="MuteControl.cpp" />
<ClCompile Include="QuietHours.cpp" />
- <ClCompile Include="QuietHoursDlg.cpp" />
<ClCompile Include="ScreensaverNotifier.cpp" />
- <ClCompile Include="Settings.cpp" />
+ <ClCompile Include="WMSettings.cpp" />
<ClCompile Include="SettingsDlg.cpp" />
<ClCompile Include="Settings_GeneralDlg.cpp" />
<ClCompile Include="Settings_QuietHoursDlg.cpp" />
<ClInclude Include="ScreensaverNotifier.h">
<Filter>Source Files\Base\Helper</Filter>
</ClInclude>
- <ClInclude Include="Log.h">
+ <ClInclude Include="WMLog.h">
<Filter>Source Files\Base\Log</Filter>
</ClInclude>
- <ClInclude Include="settings.h">
+ <ClInclude Include="WMSettings.h">
<Filter>Source Files\Base\Settings</Filter>
</ClInclude>
<ClInclude Include="VersionHelper.h">
<ClCompile Include="Utility.cpp">
<Filter>Source Files\Base\Helper</Filter>
</ClCompile>
- <ClCompile Include="Log.cpp">
+ <ClCompile Include="WMLog.cpp">
<Filter>Source Files\Base\Log</Filter>
</ClCompile>
- <ClCompile Include="Settings.cpp">
+ <ClCompile Include="WMSettings.cpp">
<Filter>Source Files\Base\Settings</Filter>
</ClCompile>
<ClCompile Include="WinMain.cpp">
<ClCompile Include="AboutDlg.cpp">
<Filter>Source Files\UI\Dialogs</Filter>
</ClCompile>
- <ClCompile Include="QuietHoursDlg.cpp">
- <Filter>Source Files\UI\Dialogs</Filter>
- </ClCompile>
<ClCompile Include="TrayIcon.cpp">
<Filter>Source Files\UI\TrayIcon</Filter>
</ClCompile>
#include "resource.h"
#include "BaseTypes.h"
+#include "WMSettings.h"
#include "ScreensaverNotifier.h"
-#include "Settings.h"
-#include "Log.h"
+#include "WMLog.h"
#include "TrayIcon.h"
#include "WinAudio.h"
#include "MuteControl.h"
#define IDD_SETTINGS 109
#define IDD_SETTINGS_GENERAL 114
#define IDD_SETTINGS_QUIETHOURS 116
+#define IDD_ABOUT_LICENSE 118
+#define IDD_ABOUT_WINMUTE 120
#define IDC_LINK_HOMEPAGE 1001
#define IDC_LINK_SUPPORT 1002
+#define IDC_LINK_PROJECT 1002
#define IDC_ENABLEQUIETHOURS 1003
+#define IDC_LINK_TICKETS 1003
#define IDC_QUIETHOURS_START 1004
#define IDC_QUIETHOURS_END 1005
#define IDC_FORCEUNMUTE 1006
#define IDC_CHECK1 1011
#define IDC_ENABLELOGGING 1012
#define IDC_CHECK3 1013
-#define IDC_BUTTON1 1014
#define IDC_OPENLOG 1014
+#define IDC_LICENSETEXT 1015
+#define IDC_ABOUT_TAB 1016
+#define IDC_ABOUTTEXT 1019
+#define IDC_TITLE 1020
+#define IDC_ABOUT_TITLE 1020
#define ID_TRAYMENU_INFO 40001
#define ID_TRAYMENU_ 40002
#define ID_TRAYMENU_MUTEON 40003
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
-#define _APS_NEXT_RESOURCE_VALUE 118
+#define _APS_NEXT_RESOURCE_VALUE 122
#define _APS_NEXT_COMMAND_VALUE 40026
-#define _APS_NEXT_CONTROL_VALUE 1015
+#define _APS_NEXT_CONTROL_VALUE 1021
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif