diff options
author | George Hazan <george.hazan@gmail.com> | 2013-03-21 20:43:46 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-03-21 20:43:46 +0000 |
commit | 6f2c99a32c9e539fc61edb6b836e8805b013a180 (patch) | |
tree | b0108fbaf865ad5dc7522a55f8ca272bf0df7600 /plugins/SmileyAdd/src | |
parent | 365b792d3509d4e94cdc31ee4384bf458f152e59 (diff) |
- unused constant MIRANDA_IDLE_INFO_SIZE_1 removed;
- proper tracking of autoaway sound options;
- code cleanup for MIRANDA_IDLE_INFO initialization;
git-svn-id: http://svn.miranda-ng.org/main/trunk@4156 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/SmileyAdd/src')
-rw-r--r-- | plugins/SmileyAdd/src/smileys.cpp | 18 |
1 files changed, 5 insertions, 13 deletions
diff --git a/plugins/SmileyAdd/src/smileys.cpp b/plugins/SmileyAdd/src/smileys.cpp index 706764a81c..75df1bfadd 100644 --- a/plugins/SmileyAdd/src/smileys.cpp +++ b/plugins/SmileyAdd/src/smileys.cpp @@ -304,8 +304,7 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo {
Clear();
- if (filename.empty())
- {
+ if (filename.empty()) {
m_Name = _T("Nothing loaded");
return false;
}
@@ -315,10 +314,8 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo // Load xep file
int fh = _topen(modpath.c_str(), _O_BINARY | _O_RDONLY);
- if (fh == -1)
- {
- if (!noerr)
- {
+ if (fh == -1) {
+ if (!noerr) {
static const TCHAR errmsg[] = LPGENT("Smiley Pack %s not found.\nSelect correct Smiley Pack in the Miranda Options | Customize | Smileys.");
TCHAR msgtxt[1024];
mir_sntprintf(msgtxt, SIZEOF(msgtxt), TranslateTS(errmsg), modpath.c_str());
@@ -347,17 +344,11 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo bkstring tbuf;
if (len>2 && *(wchar_t*)buf == 0xfeff)
- {
tbuf = W2T_SM((wchar_t*)buf+1);
- }
else if (len>3 && buf[0]=='\xef' && buf[1]=='\xbb' && buf[2]=='\xbf')
- {
tbuf = W2T_SM(A2W_SM(buf+3, CP_UTF8));
- }
else
- {
tbuf = A2T_SM(buf);
- }
delete[] buf;
@@ -367,7 +358,8 @@ bool SmileyPackType::LoadSmileyFile(const bkstring& filename, bool onlyInfo, boo else
res = LoadSmileyFileXEP(tbuf, onlyInfo, modpath);
- if (errorFound) ReportError(TranslateT("There were problems loading smiley pack (it should be corrected).\nSee Network Log for details."));
+ if (errorFound)
+ ReportError(TranslateT("There were problems loading smiley pack (it should be corrected).\nSee Network Log for details."));
return res;
}
|