summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/BASS_interface/res/BASSSoundOff.ico (renamed from plugins/BASS_interface/res/BASSSoundOnOffDown.ico)bin1150 -> 1150 bytes
-rw-r--r--plugins/BASS_interface/res/BASSSoundOn.ico (renamed from plugins/BASS_interface/res/BASSSoundOnOffUp.ico)bin1150 -> 1150 bytes
-rw-r--r--plugins/BASS_interface/res/Bass.rc4
-rw-r--r--plugins/BASS_interface/src/Main.cpp31
-rw-r--r--plugins/BASS_interface/src/Resource.h4
5 files changed, 28 insertions, 11 deletions
diff --git a/plugins/BASS_interface/res/BASSSoundOnOffDown.ico b/plugins/BASS_interface/res/BASSSoundOff.ico
index a10bfce204..a10bfce204 100644
--- a/plugins/BASS_interface/res/BASSSoundOnOffDown.ico
+++ b/plugins/BASS_interface/res/BASSSoundOff.ico
Binary files differ
diff --git a/plugins/BASS_interface/res/BASSSoundOnOffUp.ico b/plugins/BASS_interface/res/BASSSoundOn.ico
index bee9f065a0..bee9f065a0 100644
--- a/plugins/BASS_interface/res/BASSSoundOnOffUp.ico
+++ b/plugins/BASS_interface/res/BASSSoundOn.ico
Binary files differ
diff --git a/plugins/BASS_interface/res/Bass.rc b/plugins/BASS_interface/res/Bass.rc
index 93532048f9..07a0999b43 100644
--- a/plugins/BASS_interface/res/Bass.rc
+++ b/plugins/BASS_interface/res/Bass.rc
@@ -28,8 +28,8 @@ LANGUAGE LANG_RUSSIAN, SUBLANG_DEFAULT
// Icon with lowest ID value placed first to ensure application icon
// remains consistent on all systems.
-IDI_BASSSoundOnOffUp ICON "BASSSoundOnOffUp.ico"
-IDI_BASSSoundOnOffDown ICON "BASSSoundOnOffDown.ico"
+IDI_BASSSoundOn ICON "BASSSoundOn.ico"
+IDI_BASSSoundOff ICON "BASSSoundOff.ico"
/////////////////////////////////////////////////////////////////////////////
//
diff --git a/plugins/BASS_interface/src/Main.cpp b/plugins/BASS_interface/src/Main.cpp
index d7fe67897c..eafed88e02 100644
--- a/plugins/BASS_interface/src/Main.cpp
+++ b/plugins/BASS_interface/src/Main.cpp
@@ -302,8 +302,8 @@ INT_PTR CALLBACK OptionsProc(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPara
static IconItem iconList[] =
{
- { LPGEN("Audio device is opened"), "BASSSoundOnOffUp", IDI_BASSSoundOnOffUp },
- { LPGEN("Audio device is closed"), "BASSSoundOnOffDown", IDI_BASSSoundOnOffDown }
+ {LPGEN("Sounds enabled"), "BASSSoundOn", IDI_BASSSoundOn},
+ {LPGEN("Sounds disabled"), "BASSSoundOff", IDI_BASSSoundOff}
};
void InitIcons(void)
@@ -335,7 +335,13 @@ int OnSettingChanged(WPARAM wParam, LPARAM lParam)
if(!strcmp(dbcws->szModule, "Skin")) {
if(!strcmp(dbcws->szSetting, "UseSound")) {
int useSound = dbcws->value.bVal;
- SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(useSound ? Skin_GetIcon("BASSSoundOnOffUp") : Skin_GetIcon("BASSSoundOnOffDown")));
+ if (useSound) {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOn"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Disable sounds"), 0);
+ } else {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOff"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Enable sounds"), 0);
+ }
return 0;
}
}
@@ -360,15 +366,20 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
{
hwndMute = CreateWindow(MIRANDABUTTONCLASS, _T(""), WS_CHILD | WS_VISIBLE, 1, 1,
20, 20, hwnd, 0, (HINSTANCE) GetWindowLong(hwnd, GWL_HINSTANCE), NULL);
- SendMessage(hwndMute, BUTTONSETASFLATBTN,0,0);
- SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(db_get_b(NULL, "Skin", "UseSound", 1) ? Skin_GetIcon("BASSSoundOnOffUp") : Skin_GetIcon("BASSSoundOnOffDown")));
+ SendMessage(hwndMute, BUTTONSETASFLATBTN,0,0);
+ if (db_get_b(NULL, "Skin", "UseSound", 1)) {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOn"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Disable sounds"), 0);
+ } else {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOff"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Enable sounds"), 0);
+ }
hwndSlider = CreateWindow(TRACKBAR_CLASS, _T(""), WS_CHILD | WS_VISIBLE | TBS_NOTICKS | TBS_TOOLTIPS, 21, 1, 100, 20,
hwnd, (HMENU)0, (HINSTANCE) GetWindowLongPtr(hwnd, GWL_HINSTANCE), NULL);
SendMessage(hwndSlider, TBM_SETRANGE, FALSE, MAKELONG(SLIDER_MIN, SLIDER_MAX));
SendMessage(hwndSlider, TBM_SETPOS, TRUE, Volume);
OldSliderWndProc = (WNDPROC)SetWindowLong(hwndSlider, GWL_WNDPROC, (LONG)SliderWndProc);
- SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Click to toggle all sounds"), 0);
break;
}
@@ -376,7 +387,13 @@ static LRESULT CALLBACK FrameWindowProc(HWND hwnd, UINT msg, WPARAM wParam, LPAR
if((HWND)lParam == hwndMute) {
int useSound = !db_get_b(NULL, "Skin", "UseSound", 1);
db_set_b(NULL, "Skin", "UseSound", useSound);
- SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)(useSound ? Skin_GetIcon("BASSSoundOnOffUp") : Skin_GetIcon("BASSSoundOnOffDown")));
+ if (useSound) {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOn"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Disable sounds"), 0);
+ } else {
+ SendMessage(hwndMute, BM_SETIMAGE, IMAGE_ICON, (LPARAM)Skin_GetIcon("BASSSoundOff"));
+ SendMessage(hwndMute, BUTTONADDTOOLTIP, (WPARAM)Translate("Enable sounds"), 0);
+ }
}
break;
diff --git a/plugins/BASS_interface/src/Resource.h b/plugins/BASS_interface/src/Resource.h
index fb35fa7855..8a5faaa1b4 100644
--- a/plugins/BASS_interface/src/Resource.h
+++ b/plugins/BASS_interface/src/Resource.h
@@ -27,5 +27,5 @@
#define IDC_CHECKBOX9 1108
#define IDC_CHECKBOX10 1109
#define IDC_PREVIEW 1110
-#define IDI_BASSSoundOnOffUp 200
-#define IDI_BASSSoundOnOffDown 201
+#define IDI_BASSSoundOn 1111
+#define IDI_BASSSoundOff 1112