summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2022-08-19 17:55:12 +0300
committerGeorge Hazan <ghazan@miranda.im>2022-08-19 17:55:12 +0300
commit96f34ff28a65710520816b32a87ab6752c32c02f (patch)
tree4a9c80b8d45531bb05a7dacc97a5bddab58968f1 /plugins
parent2fc7cab6c488e18f3178b9311418234851f81e7b (diff)
fixes #3167 (VoiceService: problems with frame) - no frame, no pain
Diffstat (limited to 'plugins')
-rw-r--r--plugins/VoiceService/VoiceService.vcxproj2
-rw-r--r--plugins/VoiceService/VoiceService.vcxproj.filters45
-rw-r--r--plugins/VoiceService/src/VoiceCall.cpp3
-rw-r--r--plugins/VoiceService/src/hooks.cpp88
-rw-r--r--plugins/VoiceService/src/main.cpp10
-rw-r--r--plugins/VoiceService/src/services.cpp4
-rw-r--r--plugins/VoiceService/src/stdafx.h10
7 files changed, 0 insertions, 162 deletions
diff --git a/plugins/VoiceService/VoiceService.vcxproj b/plugins/VoiceService/VoiceService.vcxproj
index 45ec92d4df..0816a9cc42 100644
--- a/plugins/VoiceService/VoiceService.vcxproj
+++ b/plugins/VoiceService/VoiceService.vcxproj
@@ -26,7 +26,6 @@
<Import Project="$(ProjectDir)..\..\build\vc.common\plugin.props" />
</ImportGroup>
<ItemGroup>
- <ClCompile Include="src\frame.cpp" />
<ClCompile Include="src\hooks.cpp" />
<ClCompile Include="src\main.cpp" />
<ClCompile Include="src\options.cpp" />
@@ -44,7 +43,6 @@
</ClCompile>
</ItemGroup>
<ItemGroup>
- <ClInclude Include="src\frame.h" />
<ClInclude Include="src\options.h" />
<ClInclude Include="src\popup.h" />
<ClInclude Include="src\resource.h" />
diff --git a/plugins/VoiceService/VoiceService.vcxproj.filters b/plugins/VoiceService/VoiceService.vcxproj.filters
index 29396adb3f..2b465b04b6 100644
--- a/plugins/VoiceService/VoiceService.vcxproj.filters
+++ b/plugins/VoiceService/VoiceService.vcxproj.filters
@@ -44,48 +44,6 @@
<ResourceCompile Include="res\version.rc">
<Filter>Resource Files</Filter>
</ResourceCompile>
- <None Include="res\Busy.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Call.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Calling.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\dialpad.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Drop.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\ended.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Hold.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Main.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\On hold.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Rinning.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\secure.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\smalldot.ico">
- <Filter>Resource Files</Filter>
- </None>
- <None Include="res\Talking.ico">
- <Filter>Resource Files</Filter>
- </None>
- <ClInclude Include="src\frame.h">
- <Filter>Header Files</Filter>
- </ClInclude>
<ClInclude Include="src\options.h">
<Filter>Header Files</Filter>
</ClInclude>
@@ -109,9 +67,6 @@
<ClCompile Include="..\..\utils\mir_options.cpp">
<Filter>Source Files</Filter>
</ClCompile>
- <ClCompile Include="src\frame.cpp">
- <Filter>Source Files</Filter>
- </ClCompile>
<ClCompile Include="src\hooks.cpp">
<Filter>Source Files</Filter>
</ClCompile>
diff --git a/plugins/VoiceService/src/VoiceCall.cpp b/plugins/VoiceService/src/VoiceCall.cpp
index f40d0a3f40..df2cb5ca11 100644
--- a/plugins/VoiceService/src/VoiceCall.cpp
+++ b/plugins/VoiceService/src/VoiceCall.cpp
@@ -100,7 +100,6 @@ bool VoiceCall::OnClose()
Button_FreeIcon_IcoLib(m_hwnd, IDC_ANSWERBTN);
calls.remove(this);
- RefreshFrame();
return false;
}
@@ -296,8 +295,6 @@ void VoiceCall::Notify(bool popup, bool sound, bool /*clist*/)
clistBlinking = true;
}*/
-
- RefreshFrame();
}
bool VoiceCall::IsFinished()
diff --git a/plugins/VoiceService/src/hooks.cpp b/plugins/VoiceService/src/hooks.cpp
index cab92f8f83..4eaa3ffcb5 100644
--- a/plugins/VoiceService/src/hooks.cpp
+++ b/plugins/VoiceService/src/hooks.cpp
@@ -61,13 +61,6 @@ static HGENMENU hCMHold = NULL;
OBJLIST<VoiceProvider> modules(1, PtrKeySortT);
OBJLIST<VoiceCall> calls(1, PtrKeySortT);
-HFONT fonts[NUM_STATES] = { 0 };
-COLORREF font_colors[NUM_STATES] = { 0 };
-int font_max_height;
-
-COLORREF bkg_color = { 0 };
-HBRUSH bk_brush = NULL;
-
static INT_PTR CListDblClick(WPARAM wParam, LPARAM lParam);
static INT_PTR Service_CanCall(WPARAM wParam, LPARAM lParam);
@@ -356,22 +349,6 @@ static int PreBuildContactMenu(WPARAM wParam, LPARAM)
/////////////////////////////////////////////////////////////////////////////////////////
-static int ReloadColor(WPARAM, LPARAM)
-{
- ColourIDW ci = { 0 };
- lstrcpyn(ci.group, TranslateT("Voice Calls"), _countof(ci.group));
- lstrcpyn(ci.name, TranslateT("Background"), _countof(ci.name));
-
- bkg_color = Colour_GetW(ci);
-
- if (bk_brush != NULL)
- DeleteObject(bk_brush);
- bk_brush = CreateSolidBrush(bkg_color);
-
- RefreshFrame();
- return 0;
-}
-
VoiceProvider* FindModule(const char *szModule)
{
for (auto &it : modules)
@@ -482,28 +459,6 @@ void Answer(VoiceCall *call)
/////////////////////////////////////////////////////////////////////////////////////////
-static int ReloadFont(WPARAM, LPARAM)
-{
- FontID fi = { 0 };
- strncpy_s(fi.group, "Voice Calls", _TRUNCATE);
-
- font_max_height = 0;
- for (int i = 0; i < NUM_STATES; i++) {
- if (fonts[i] != 0) DeleteObject(fonts[i]);
-
- strncpy_s(fi.name, stateIcons[i].szName, _TRUNCATE);
-
- LOGFONTA log_font = { 0 };
- font_colors[i] = Font_Get(fi, &log_font);
- fonts[i] = CreateFontIndirectA(&log_font);
-
- font_max_height = max(font_max_height, log_font.lfHeight);
- }
-
- RefreshFrame();
- return 0;
-}
-
static INT_PTR Service_CanCall(WPARAM wParam, LPARAM)
{
MCONTACT hContact = (MCONTACT)wParam;
@@ -586,8 +541,6 @@ static INT_PTR CMDrop(WPARAM wParam, LPARAM)
int ModulesLoaded(WPARAM, LPARAM)
{
- g_plugin.bFramesExist = ServiceExists(MS_CLIST_FRAMES_ADDFRAME);
-
// add our modules to the KnownModules list
CallService("DBEditorpp/RegisterSingleModule", (WPARAM)MODULE_NAME, 0);
@@ -596,38 +549,7 @@ int ModulesLoaded(WPARAM, LPARAM)
g_plugin.registerIcon(LPGEN("Voice Calls"), stateIcons, "vc");
g_plugin.registerIcon(LPGEN("Voice Calls"), actionIcons, "vca");
- // Init fonts
- {
- FontID fi = {};
- strncpy_s(fi.group, LPGEN("Voice Calls"), _TRUNCATE);
- strncpy_s(fi.dbSettingsGroup, MODULE_NAME, _TRUNCATE);
-
- for (int i = 0; i < _countof(stateIcons); i++) {
- fi.order = i;
- strncpy_s(fi.name, stateIcons[i].szName, _TRUNCATE);
- g_plugin.addFont(&fi);
- }
-
- ReloadFont(0, 0);
- HookEvent(ME_FONT_RELOAD, ReloadFont);
- }
-
- // Init bkg color
- {
- ColourID ci = { 0 };
- strncpy_s(ci.group, LPGEN("Voice Calls"), _TRUNCATE);
- strncpy_s(ci.name, LPGEN("Background"), _TRUNCATE);
- strncpy_s(ci.dbSettingsGroup, MODULE_NAME, _TRUNCATE);
- strncpy_s(ci.setting, "BkgColor", _TRUNCATE);
- ci.defcolour = GetSysColor(COLOR_BTNFACE);
- g_plugin.addColor(&ci);
-
- ReloadColor(0, 0);
- HookEvent(ME_COLOUR_RELOAD, ReloadColor);
- }
-
InitOptions();
- InitFrames();
// Add menu items
CMenuItem mi(&g_plugin);
@@ -685,16 +607,6 @@ int ModulesLoaded(WPARAM, LPARAM)
int PreShutdown(WPARAM, LPARAM)
{
- DeInitFrames();
DeInitOptions();
return 0;
}
-
-int ProtoAck(WPARAM, LPARAM lParam)
-{
- ACKDATA *ack = (ACKDATA *)lParam;
- if (ack->type == ACKTYPE_STATUS)
- RefreshFrame();
-
- return 0;
-}
diff --git a/plugins/VoiceService/src/main.cpp b/plugins/VoiceService/src/main.cpp
index fd9062dfc2..8c307b9dfd 100644
--- a/plugins/VoiceService/src/main.cpp
+++ b/plugins/VoiceService/src/main.cpp
@@ -47,7 +47,6 @@ void CreateServices(void);
int ModulesLoaded(WPARAM wParam, LPARAM lParam);
int PreShutdown(WPARAM wParam, LPARAM lParam);
-int ProtoAck(WPARAM wParam, LPARAM lParam);
int CMPlugin::Load()
{
@@ -56,14 +55,5 @@ int CMPlugin::Load()
// Hooks
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
HookEvent(ME_SYSTEM_PRESHUTDOWN, PreShutdown);
- HookEvent(ME_PROTO_ACK, ProtoAck);
- return 0;
-}
-
-int CMPlugin::Unload()
-{
- if (bk_brush != NULL)
- DeleteObject(bk_brush);
-
return 0;
}
diff --git a/plugins/VoiceService/src/services.cpp b/plugins/VoiceService/src/services.cpp
index c8607ca99a..e068d3dd6f 100644
--- a/plugins/VoiceService/src/services.cpp
+++ b/plugins/VoiceService/src/services.cpp
@@ -126,8 +126,6 @@ INT_PTR VoiceRegister(WPARAM wParam, LPARAM)
return -3;
modules.insert(new VoiceProvider(in->name, in->description, in->flags, in->icon));
-
- RefreshFrame();
return 0;
}
@@ -150,8 +148,6 @@ INT_PTR VoiceUnregister(WPARAM wParam, LPARAM)
}
modules.remove(module);
-
- RefreshFrame();
return 0;
}
diff --git a/plugins/VoiceService/src/stdafx.h b/plugins/VoiceService/src/stdafx.h
index 4ef560e84f..6fcd01ff9c 100644
--- a/plugins/VoiceService/src/stdafx.h
+++ b/plugins/VoiceService/src/stdafx.h
@@ -63,19 +63,15 @@ using namespace std;
#include "resource.h"
#include "version.h"
#include "options.h"
-#include "frame.h"
#include "popup.h"
/////////////////////////////////////////////////////////////////////////////////////////
struct CMPlugin : public PLUGIN<CMPlugin>
{
- bool bFramesExist = false;
-
CMPlugin();
int Load() override;
- int Unload() override;
};
#define MODULE_NAME "VoiceService"
@@ -91,12 +87,6 @@ struct CMPlugin : public PLUGIN<CMPlugin>
#define AUTO_ACCEPT 1
#define AUTO_DROP 2
-extern HFONT fonts[NUM_STATES];
-extern COLORREF font_colors[NUM_STATES];
-extern int font_max_height;
-extern COLORREF bkg_color;
-extern HBRUSH bk_brush;
-
class VoiceProvider
{
public: