From 88f7ddde0024f0bac97fe06b6529ebb3241b626e Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Sat, 2 Aug 2014 15:07:04 +0000 Subject: NewStatusNotify: - removed cutting off status description - correct reading and freeing of string from database - status message changed/removed templates are now stored using internal account name - minor ressource fixes git-svn-id: http://svn.miranda-ng.org/main/trunk@10021 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/NewXstatusNotify/src/main.cpp | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) (limited to 'plugins/NewXstatusNotify/src/main.cpp') diff --git a/plugins/NewXstatusNotify/src/main.cpp b/plugins/NewXstatusNotify/src/main.cpp index 7a7f9970ce..63ebeb45b2 100644 --- a/plugins/NewXstatusNotify/src/main.cpp +++ b/plugins/NewXstatusNotify/src/main.cpp @@ -306,13 +306,13 @@ void GetStatusText(MCONTACT hContact, WORD newStatus, WORD oldStatus, TCHAR *stz if (opt.UseAlternativeText) { switch (GetGender(hContact)) { case GENDER_MALE: - _tcsncpy(stzStatusText, _tcsninc(StatusList[Index(newStatus)].lpzMStatusText, 4), MAX_STATUSTEXT); + _tcsncpy(stzStatusText, StatusList[Index(newStatus)].lpzMStatusText, MAX_STATUSTEXT); break; case GENDER_FEMALE: - _tcsncpy(stzStatusText, _tcsninc(StatusList[Index(newStatus)].lpzFStatusText, 4), MAX_STATUSTEXT); + _tcsncpy(stzStatusText, StatusList[Index(newStatus)].lpzFStatusText, MAX_STATUSTEXT); break; case GENDER_UNSPECIFIED: - _tcsncpy(stzStatusText, _tcsninc(StatusList[Index(newStatus)].lpzUStatusText, 4), MAX_STATUSTEXT); + _tcsncpy(stzStatusText, StatusList[Index(newStatus)].lpzUStatusText, MAX_STATUSTEXT); break; } } @@ -858,10 +858,8 @@ int StatusModeChanged(WPARAM wParam, LPARAM lParam) db_set_b(0, MODULE, "OldUseSound", hlpUseSound); db_set_b(0, "Skin", "UseSound", FALSE); } - else { - if (hlpUseSound == FALSE) - db_set_b(0, "Skin", "UseSound", db_get_b(0, MODULE, "OldUseSound", 1)); - } + else if (hlpUseSound == FALSE) + db_set_b(0, "Skin", "UseSound", db_get_b(0, MODULE, "OldUseSound", 1)); } } } @@ -1080,7 +1078,7 @@ int ProtoAck(WPARAM wParam, LPARAM lParam) return 0; } -INT_PTR EnableDisableMenuCommand(WPARAM wParam, LPARAM lParam) +INT_PTR EnableDisableMenuCommand(WPARAM, LPARAM) { opt.TempDisabled = !opt.TempDisabled; db_set_b(0, MODULE, "TempDisable", opt.TempDisabled); @@ -1148,7 +1146,7 @@ int InitTopToolbar(WPARAM, LPARAM) return 0; } -int ModulesLoaded(WPARAM wParam, LPARAM lParam) +int ModulesLoaded(WPARAM, LPARAM) { InitMainMenuItem(); -- cgit v1.2.3