From 32a37006c3d6eab55725fbd2c2702e2e2abec888 Mon Sep 17 00:00:00 2001 From: Sergey Bolhovskoy Date: Sat, 27 Jun 2015 17:24:47 +0000 Subject: SmileyAdd: clear filename smiley pack if it filed fix contact menu (remove unload smiley pack) git-svn-id: http://svn.miranda-ng.org/main/trunk@14418 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/SmileyAdd/src/services.cpp | 2 +- plugins/SmileyAdd/src/smileys.cpp | 10 ++++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/SmileyAdd/src/services.cpp b/plugins/SmileyAdd/src/services.cpp index 773c7cccc9..dd3c679bad 100644 --- a/plugins/SmileyAdd/src/services.cpp +++ b/plugins/SmileyAdd/src/services.cpp @@ -301,7 +301,7 @@ int RebuildContactMenu(WPARAM wParam, LPARAM) HGENMENU hMenu; for (int i=0; i < smc.getCount(); i++) { - if (smc[i].IsExt() || (smc[i].IsProto() && opt.UseOneForAll)) + if (smc[i].IsExt() || (smc[i].IsProto() && opt.UseOneForAll) || smc[i].GetFilename().IsEmpty()) continue; const int ind = i + 3; diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 899e2580b1..c2a688ae97 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -734,8 +734,14 @@ void SmileyCategoryType::Load(void) { bool visiblecat = opt.UsePhysProto ? !IsAcc() : !IsPhysProto(); bool visible = opt.UseOneForAll ? !IsProto() : visiblecat; - if (visible) - m_pSmileyPackStore->AddSmileyPack(m_Filename, m_DisplayName); + + if (visible && !m_Filename.IsEmpty()){ + bool loaded = m_pSmileyPackStore->AddSmileyPack(m_Filename, m_DisplayName); + if (!loaded){ + ClearFilename(); + SaveSettings(); + } + } } -- cgit v1.2.3