diff options
author | Alexey Kulakov <panda75@bk.ru> | 2012-07-05 12:35:02 +0000 |
---|---|---|
committer | Alexey Kulakov <panda75@bk.ru> | 2012-07-05 12:35:02 +0000 |
commit | 3e577372cab9dde2981fb4ac143cacce0419b069 (patch) | |
tree | c08ee1d69b563c056d8facd7b45325a489972b77 /plugins/HistoryPlusPlus/hpp_options.pas | |
parent | c78cb0fb36db5ac84fdc6f012074a6c1cea68b1e (diff) |
m_api: hide hLangpack from interface part
History++ small cleanup
git-svn-id: http://svn.miranda-ng.org/main/trunk@770 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/HistoryPlusPlus/hpp_options.pas')
-rw-r--r-- | plugins/HistoryPlusPlus/hpp_options.pas | 30 |
1 files changed, 20 insertions, 10 deletions
diff --git a/plugins/HistoryPlusPlus/hpp_options.pas b/plugins/HistoryPlusPlus/hpp_options.pas index 758046d0fd..0562463c63 100644 --- a/plugins/HistoryPlusPlus/hpp_options.pas +++ b/plugins/HistoryPlusPlus/hpp_options.pas @@ -64,8 +64,8 @@ type ThppIconsRec = record
name: PAnsiChar;
- desc: PAnsiChar;
- group: PAnsiChar;
+ desc: PChar;
+ group: PChar;
i: shortint;
end;
@@ -209,8 +209,8 @@ implementation uses hpp_database, ShellAPI;
-{$include inc\m_mathmodule.inc}
-{$include inc\m_speak.inc}
+{$include m_mathmodule.inc}
+{$include m_speak.inc}
procedure RegisterFont(Name:PAnsiChar; Order:integer; const defFont:TFontSettings);
var
@@ -454,7 +454,14 @@ var hppMessage: WideString;
CountIconsDll: Integer;
DoCheck: boolean;
+ hppDllName,hppPluginsDir:string;
begin
+ // Get plugins dir
+ SetLength(hppPluginsDir, MAX_PATH);
+ SetLength(hppPluginsDir, GetModuleFileNameW(hInstance, @hppPluginsDir[1], MAX_PATH));
+ hppDllName := ExtractFileName(hppPluginsDir);
+ hppPluginsDir := ExtractFilePath(hppPluginsDir);
+
DoCheck := ForceCheck or GetDBBool(hppDBName, 'CheckIconPack', true);
hppIconsDir := ExpandFileName(hppPluginsDir + '..\Icons\');
if FileExists(hppIconsDir + hppIPName) then
@@ -500,21 +507,24 @@ var i: Integer;
mt: TMessageType;
str: PAnsiChar;
+ hppIconPack: String;
begin
// Register in IcoLib
hppIconPack := FindIconsDll(false);
ZeroMemory(@sid, sizeof(sid));
sid.cbSize := sizeof(sid);
- sid.szDefaultFile.a := PAnsiChar(AnsiString(hppIconPack)); // !!
+ sid.Flags:=SIDF_ALL_UNICODE;
+
+ sid.szDefaultFile.w := PChar(hppIconPack);
for i := 0 to High(hppIconsDefs) do
begin
hppIcons[hppIconsDefs[i].i].name := hppIconsDefs[i].name;
sid.pszName := hppIconsDefs[i].name;
- sid.szDescription.a := hppIconsDefs[i].desc;
+ sid.szDescription.w := hppIconsDefs[i].desc;
if hppIconsDefs[i].group = nil then
- sid.szSection.a := hppName
+ sid.szSection.w := hppName
else
- sid.szSection.a := PAnsiChar(hppName + '/' + hppIconsDefs[i].group);
+ sid.szSection.w := PChar(hppName + '/' + hppIconsDefs[i].group);
sid.iDefaultIndex := hppIconsDefs[i].i;
Skin_AddIcon(@sid);
end;
@@ -527,8 +537,8 @@ begin begin
hppIcons[EventRecords[mt].i].name := EventRecords[mt].iName;
sid.pszName := hppIcons[EventRecords[mt].i].name;
- sid.szDescription.a := PAnsiChar(WideToAnsiString(EventRecords[mt].name, hppCodepage));
- sid.szSection.a := PAnsiChar(hppName + '/' +'Events');
+ sid.szDescription.w := PChar(EventRecords[mt].name);
+ sid.szSection.w := PChar(hppName + '/' +'Events');
sid.iDefaultIndex := EventRecords[mt].i;
Skin_AddIcon(@sid);
end
|