From 22347e2a45e7ee6d76f33b64f65fe49ab1cf0e7d Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 15 Jun 2014 18:00:33 +0000 Subject: removed support for mathmodule & speech git-svn-id: http://svn.miranda-ng.org/main/trunk@9507 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryPlusPlus/GlobalSearch.dfm | 4 - plugins/HistoryPlusPlus/GlobalSearch.pas | 46 -------- plugins/HistoryPlusPlus/HistoryForm.dfm | 10 +- plugins/HistoryPlusPlus/HistoryForm.pas | 44 -------- plugins/HistoryPlusPlus/HistoryGrid.pas | 17 --- plugins/HistoryPlusPlus/Hpp.dpk | 42 ++++++++ plugins/HistoryPlusPlus/Hpp.dproj | 152 +++++++++++++++++++++++++++ plugins/HistoryPlusPlus/hpp_externalgrid.pas | 77 +++++--------- plugins/HistoryPlusPlus/hpp_itemprocess.pas | 33 ------ plugins/HistoryPlusPlus/hpp_opt_dialog.pas | 6 -- plugins/HistoryPlusPlus/hpp_options.pas | 23 +--- plugins/HistoryPlusPlus/hpp_services.pas | 1 - 12 files changed, 223 insertions(+), 232 deletions(-) create mode 100644 plugins/HistoryPlusPlus/Hpp.dpk create mode 100644 plugins/HistoryPlusPlus/Hpp.dproj (limited to 'plugins/HistoryPlusPlus') diff --git a/plugins/HistoryPlusPlus/GlobalSearch.dfm b/plugins/HistoryPlusPlus/GlobalSearch.dfm index 7a211d7d66..c0877f8d55 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.dfm +++ b/plugins/HistoryPlusPlus/GlobalSearch.dfm @@ -628,10 +628,6 @@ object fmGlobalSearch: TfmGlobalSearch ShortCut = 16450 OnClick = Bookmark1Click end - object SpeakMessage1: TMenuItem - Caption = 'Speak Message' - OnClick = SpeakMessage1Click - end object N3: TMenuItem Caption = '-' end diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas index 08d783d6df..cc8e087680 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.pas +++ b/plugins/HistoryPlusPlus/GlobalSearch.pas @@ -187,7 +187,6 @@ type tbCopy: THppToolButton; tbDelete: THppToolButton; tbSave: THppToolButton; - SpeakMessage1: TMenuItem; procedure pbFilterPaint(Sender: TObject); procedure edFilterKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState); procedure tiFilterTimer(Sender: TObject); @@ -264,7 +263,6 @@ type procedure tbEventsClick(Sender: TObject); procedure sbEventsCloseClick(Sender: TObject); procedure lvContactsDblClick(Sender: TObject); - procedure SpeakMessage1Click(Sender: TObject); procedure hgChar(Sender: TObject; var achar: WideChar; Shift: TShiftState); procedure edFilterKeyPress(Sender: TObject; var Key: Char); private @@ -389,8 +387,6 @@ uses {$R *.DFM} -{$include m_speak.inc} - function TfmGlobalSearch.AddContact(hContact: THandle): THPPContactInfo; var ci: THPPContactInfo; @@ -1604,7 +1600,6 @@ end; procedure TfmGlobalSearch.hgPopup(Sender: TObject); begin - SpeakMessage1.Visible := MeSpeakEnabled; Delete1.Visible := False; SaveSelected1.Visible := False; if hg.Selected <> -1 then @@ -2374,24 +2369,6 @@ begin Key := 0; exit; end; - { if (ssCtrl in Shift) then begin - if key=Ord('T') then begin - InlineCopyAll.Click; - key:=0; - end; - if key=Ord('P') then begin - InlineTextFormatting.Click; - key:=0; - end; - if key=Ord('M') then begin - SendMessage1.Click; - key:=0; - end; - if key=Ord('R') then begin - InlineReplyQuoted.Click; - key:=0; - end; - end; } end; procedure TfmGlobalSearch.OpenLinkClick(Sender: TObject); @@ -2510,29 +2487,6 @@ begin SendMessageTo(hContact); end; -procedure TfmGlobalSearch.SpeakMessage1Click(Sender: TObject); -var - mesW: String; - mesA: AnsiString; - hContact: THandle; -begin - if not MeSpeakEnabled then - exit; - if hg.Selected = -1 then - exit; - hContact := GetSearchItem(hg.Selected).Contact.Handle; - mesW := hg.Items[hg.Selected].Text; - if GridOptions.BBCodesEnabled then - mesW := DoStripBBCodes(mesW); - if Boolean(ServiceExists(MS_SPEAK_SAY_W)) then - CallService(MS_SPEAK_SAY_W, hContact, LParam(PChar(mesW))) - else - begin - mesA := WideToAnsiString(mesW, GetSearchItem(hg.Selected).Contact.Codepage); - CallService(MS_SPEAK_SAY_A, hContact, LParam(PAnsiChar(mesA))); - end; -end; - procedure TfmGlobalSearch.hgChar(Sender: TObject; var achar: WideChar; Shift: TShiftState); var Mes: TWMChar; diff --git a/plugins/HistoryPlusPlus/HistoryForm.dfm b/plugins/HistoryPlusPlus/HistoryForm.dfm index 6b74c82f43..43ea33cfcc 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.dfm +++ b/plugins/HistoryPlusPlus/HistoryForm.dfm @@ -587,10 +587,6 @@ object HistoryFrm: THistoryFrm ShortCut = 16450 OnClick = Bookmark1Click end - object SpeakMessage1: TMenuItem - Caption = 'Speak Message' - OnClick = SpeakMessage1Click - end object N8: TMenuItem Caption = '-' end @@ -782,7 +778,7 @@ object HistoryFrm: THistoryFrm object pmSessions: TPopupMenu BiDiMode = bdLeftToRight ParentBiDiMode = False - Left = 198 + Left = 222 Top = 61 object SessCopy: TMenuItem Caption = '&Copy' @@ -839,7 +835,7 @@ object HistoryFrm: THistoryFrm BiDiMode = bdLeftToRight ParentBiDiMode = False Left = 324 - Top = 293 + Top = 301 object InlineCopy: TMenuItem Caption = '&Copy' ShortCut = 16451 @@ -879,7 +875,7 @@ object HistoryFrm: THistoryFrm end object mmAcc: TMainMenu Left = 10 - Top = 98 + Top = 106 object mmToolbar: TMenuItem Caption = 'Toolbar' OnClick = mmToolbarClick diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index 0f2255092b..095ce2f5b2 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -209,7 +209,6 @@ type FileActions: TMenuItem; N10: TMenuItem; pmFile: TPopupMenu; - SpeakMessage1: TMenuItem; procedure tbHistoryClick(Sender: TObject); procedure SaveasText2Click(Sender: TObject); procedure SaveasMContacts2Click(Sender: TObject); @@ -322,7 +321,6 @@ type procedure hgFilterChange(Sender: TObject); procedure OpenFileFolderClick(Sender: TObject); procedure BrowseReceivedFilesClick(Sender: TObject); - procedure SpeakMessage1Click(Sender: TObject); procedure hgOptionsChange(Sender: TObject); private DelayedFilter: TMessageTypes; @@ -458,8 +456,6 @@ uses {$R *.DFM} -{$include m_speak.inc} - const HPP_SESS_YEARFORMAT = 'yyyy'; HPP_SESS_MONTHFORMAT = 'mmmm'; @@ -1677,7 +1673,6 @@ end; procedure THistoryFrm.hgPopup(Sender: TObject); begin - SpeakMessage1.Visible := MeSpeakEnabled; Delete1.Visible := False; SaveSelected1.Visible := False; if hContact = 0 then @@ -3839,24 +3834,6 @@ begin Key := 0; Exit; end; - { if (ssCtrl in Shift) then begin - if key=Ord('T') then begin - InlineCopyAll.Click; - key:=0; - end; - if key=Ord('P') then begin - InlineTextFormatting.Click; - key:=0; - end; - if key=Ord('M') then begin - SendMessage1.Click; - key:=0; - end; - if key=Ord('R') then begin - InlineReplyQuoted.Click; - key:=0; - end; - end; } end; procedure THistoryFrm.ToggleMainMenu(Enabled: Boolean); @@ -3923,27 +3900,6 @@ begin ShellExecuteA(0, 'open', Path, nil, nil, SW_SHOW); end; -procedure THistoryFrm.SpeakMessage1Click(Sender: TObject); -var - mesW: String; - mesA: AnsiString; -begin - if not MeSpeakEnabled then - Exit; - if hg.Selected = -1 then - Exit; - mesW := hg.Items[hg.Selected].Text; - if GridOptions.BBCodesEnabled then - mesW := DoStripBBCodes(mesW); - if Boolean(ServiceExists(MS_SPEAK_SAY_W)) then - CallService(MS_SPEAK_SAY_W, hContact, lParam(PChar(mesW))) - else - begin - mesA := WideToAnsiString(mesW, UserCodepage); - CallService(MS_SPEAK_SAY_A, hContact, lParam(PAnsiChar(mesA))); - end; -end; - procedure THistoryFrm.hgOptionsChange(Sender: TObject); begin if Assigned(EventDetailForm) then diff --git a/plugins/HistoryPlusPlus/HistoryGrid.pas b/plugins/HistoryPlusPlus/HistoryGrid.pas index 3cc5cee89c..6954426099 100644 --- a/plugins/HistoryPlusPlus/HistoryGrid.pas +++ b/plugins/HistoryPlusPlus/HistoryGrid.pas @@ -198,7 +198,6 @@ type FBBCodesEnabled: Boolean; FSmileysEnabled: Boolean; - FMathModuleEnabled: Boolean; FRawRTFEnabled: Boolean; FAvatarsHistoryEnabled: Boolean; @@ -242,7 +241,6 @@ type procedure SetBBCodesEnabled(const Value: Boolean); procedure SetSmileysEnabled(const Value: Boolean); - procedure SetMathModuleEnabled(const Value: Boolean); procedure SetRawRTFEnabled(const Value: Boolean); procedure SetAvatarsHistoryEnabled(const Value: Boolean); procedure SetProfileName(const Value: String); @@ -303,7 +301,6 @@ type property BBCodesEnabled: Boolean read FBBCodesEnabled write SetBBCodesEnabled; property SmileysEnabled: Boolean read FSmileysEnabled write SetSmileysEnabled; - property MathModuleEnabled: Boolean read FMathModuleEnabled write SetMathModuleEnabled; property RawRTFEnabled: Boolean read FRawRTFEnabled write SetRawRTFEnabled; property AvatarsHistoryEnabled: Boolean read FAvatarsHistoryEnabled write SetAvatarsHistoryEnabled; @@ -5984,7 +5981,6 @@ begin FSmileysEnabled := False; FBBCodesEnabled := False; - FMathModuleEnabled := False; FRawRTFEnabled := False; FAvatarsHistoryEnabled := False; @@ -6317,19 +6313,6 @@ begin end; end; -procedure TGridOptions.SetMathModuleEnabled(const Value: Boolean); -begin - if FMathModuleEnabled = Value then - exit; - FMathModuleEnabled := Value; - Self.StartChange; - try - DoChange; - finally - Self.EndChange; - end; -end; - procedure TGridOptions.SetRawRTFEnabled(const Value: Boolean); begin if FRawRTFEnabled = Value then diff --git a/plugins/HistoryPlusPlus/Hpp.dpk b/plugins/HistoryPlusPlus/Hpp.dpk new file mode 100644 index 0000000000..c3b5714fe0 --- /dev/null +++ b/plugins/HistoryPlusPlus/Hpp.dpk @@ -0,0 +1,42 @@ +package Hpp; + +{$R *.res} +{$IFDEF IMPLICITBUILDING This IFDEF should not be used by users} +{$ALIGN 8} +{$ASSERTIONS ON} +{$BOOLEVAL OFF} +{$DEBUGINFO ON} +{$EXTENDEDSYNTAX ON} +{$IMPORTEDDATA ON} +{$IOCHECKS ON} +{$LOCALSYMBOLS ON} +{$LONGSTRINGS ON} +{$OPENSTRINGS ON} +{$OPTIMIZATION OFF} +{$OVERFLOWCHECKS OFF} +{$RANGECHECKS OFF} +{$REFERENCEINFO ON} +{$SAFEDIVIDE OFF} +{$STACKFRAMES ON} +{$TYPEDADDRESS OFF} +{$VARSTRINGCHECKS ON} +{$WRITEABLECONST OFF} +{$MINENUMSIZE 1} +{$IMAGEBASE $400000} +{$DEFINE DEBUG} +{$ENDIF IMPLICITBUILDING} +{$DESCRIPTION 'History++'} +{$IMPLICITBUILD ON} + +requires + rtl, + designide, + vcl, + vclactnband, + vclx, + xmlrtl; + +contains + HistoryControls_Design in 'HistoryControls_Design.pas'; + +end. diff --git a/plugins/HistoryPlusPlus/Hpp.dproj b/plugins/HistoryPlusPlus/Hpp.dproj new file mode 100644 index 0000000000..0453a0786a --- /dev/null +++ b/plugins/HistoryPlusPlus/Hpp.dproj @@ -0,0 +1,152 @@ + + + {AB637172-7B23-465F-8B55-06EA9189EC9B} + Hpp.dpk + 13.4 + None + True + Debug + Win32 + 1 + Package + + + true + + + true + Base + true + + + true + Base + true + + + true + Cfg_1 + true + true + + + true + Base + true + + + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + true + 1049 + System;Vcl;Xml;Data;Datasnap;Web;Soap;$(DCC_Namespace) + All + .;..\..\include\delphi;..\..\plugins\ExternalAPI\delphi;$(DCC_UnitSearchPath);D:\miranda-ng\plugins\HistoryPlusPlus;$(DCC_UnitSearchPath) + true + bpl + .\$(Platform)\$(Config) + .\$(Platform)\$(Config) + false + false + false + false + false + + + true + Winapi;System.Win;Data.Win;Datasnap.Win;Web.Win;Soap.Win;Xml.Win;Bde;$(DCC_Namespace) + 1033 + CompanyName=;FileDescription=;FileVersion=1.0.0.0;InternalName=;LegalCopyright=;LegalTrademarks=;OriginalFilename=;ProductName=;ProductVersion=1.0.0.0;Comments= + + + DEBUG;$(DCC_Define) + false + true + true + true + + + true + History++ + 1033 + false + + + false + RELEASE;$(DCC_Define) + 0 + false + + + + MainSource + + + + + + + + + + Cfg_2 + Base + + + Base + + + Cfg_1 + Base + + + + Delphi.Personality.12 + Package + + + + True + False + 1 + 0 + 0 + 0 + False + False + False + False + False + 1049 + 1251 + + + + + 1.0.0.0 + + + + + + 1.0.0.0 + + + + Hpp.dpk + + + Microsoft Office 2000 Sample Automation Server Wrapper Components + Microsoft Office XP Sample Automation Server Wrapper Components + + + + + False + True + + + 12 + + + + diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 98dd52d235..33199467c2 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -140,7 +140,6 @@ type procedure OnEventsFilterItemClick(Sender: TObject); procedure OnBrowseReceivedFilesClick(Sender: TObject); procedure OnOpenFileFolderClick(Sender: TObject); - procedure OnSpeakMessage(Sender: TObject); public constructor Create(AParentWindow: HWND; ControlID: Cardinal = 0); destructor Destroy; override; @@ -178,8 +177,6 @@ uses hpp_events, hpp_services, hpp_forms, hpp_bookmarks, hpp_messages, hpp_options, hpp_sessionsthread; -{$include m_speak.inc} - { TExtHistoryGrid } constructor TExtHistoryGrid.Create(AOwner: TComponent); @@ -424,7 +421,6 @@ begin pmGrid := TPopupMenu.Create(Grid); pmGrid.ParentBiDiMode := False; pmGrid.Items.Add(NewItem('Sh&ow in history', 0, False, True, OnOpenClick, 0, 'pmOpen')); - pmGrid.Items.Add(NewItem('Speak Message', 0, False, True, OnSpeakMessage, 0, 'pmSpeakMessage')); pmGrid.Items.Add(NewItem('-', 0, False, True, nil, 0, 'pmN1')); pmGrid.Items.Add(NewItem('&Copy', TextToShortCut('Ctrl+C'), False, True, OnCopyClick, 0, 'pmCopy')); pmGrid.Items.Add(NewItem('Copy &Text', TextToShortCut('Ctrl+T'), False, True, OnCopyTextClick, 0, 'pmCopyText')); @@ -782,45 +778,44 @@ var begin GridSelected := (Grid.Selected <> -1); pmGrid.Items[0].Visible := GridSelected and (Grid.State = gsIdle) and not Items[Grid.Selected].Custom; - pmGrid.Items[1].Visible := MeSpeakEnabled; + pmGrid.Items[2].Visible := GridSelected; pmGrid.Items[3].Visible := GridSelected; - pmGrid.Items[4].Visible := GridSelected; - pmGrid.Items[5].Visible := GridSelected and (Grid.State = gsInline); + pmGrid.Items[4].Visible := GridSelected and (Grid.State = gsInline); // works even if not in pseudo-edit - pmGrid.Items[6].Visible := GridSelected; - pmGrid.Items[8].Visible := GridSelected and (Grid.State = gsInline); - pmGrid.Items[9].Visible := GridSelected; + pmGrid.Items[5].Visible := GridSelected; + pmGrid.Items[7].Visible := GridSelected and (Grid.State = gsInline); + pmGrid.Items[8].Visible := GridSelected; if GridSelected then begin - pmGrid.Items[8].Checked := GridOptions.TextFormatting; + pmGrid.Items[7].Checked := GridOptions.TextFormatting; if Grid.State = gsInline then - pmGrid.Items[3].Enabled := Grid.InlineRichEdit.SelLength > 0 + pmGrid.Items[2].Enabled := Grid.InlineRichEdit.SelLength > 0 else - pmGrid.Items[3].Enabled := True; - pmGrid.Items[9].Enabled := pmGrid.Items[2].Enabled; + pmGrid.Items[2].Enabled := True; + pmGrid.Items[8].Enabled := pmGrid.Items[2].Enabled; end; - pmGrid.Items[10].Visible := GridSelected and not Items[Grid.Selected].Custom; - pmGrid.Items[11].Visible := GridSelected; + pmGrid.Items[9].Visible := GridSelected and not Items[Grid.Selected].Custom; + pmGrid.Items[10].Visible := GridSelected; if GridSelected then begin if Items[Grid.Selected].Custom then - pmGrid.Items[11].Visible := False + pmGrid.Items[10].Visible := False else if Grid.Items[Grid.Selected].Bookmarked then - TMenuItem(pmGrid.Items[11]).Caption := TranslateW('Remove &Bookmark') + TMenuItem(pmGrid.Items[10]).Caption := TranslateW('Remove &Bookmark') else - TMenuItem(pmGrid.Items[11]).Caption := TranslateW('Set &Bookmark'); + TMenuItem(pmGrid.Items[10]).Caption := TranslateW('Set &Bookmark'); end; - pmGrid.Items[13].Visible := (Grid.SelCount > 1); - pmGrid.Items[15].Visible := GridSelected and IsFileEvent(Grid.Selected); - if pmGrid.Items[15].Visible then - pmGrid.Items[15].Items[1].Visible := (SavedFileDir <> ''); + pmGrid.Items[12].Visible := (Grid.SelCount > 1); + pmGrid.Items[14].Visible := GridSelected and IsFileEvent(Grid.Selected); + if pmGrid.Items[14].Visible then + pmGrid.Items[14].Items[1].Visible := (SavedFileDir <> ''); + pmGrid.Items[15].Visible := (Grid.State = gsIdle); + pmGrid.Items[15].Items[0].Checked := not FUseHistoryRTLMode; + pmGrid.Items[15].Items[1].Checked := FUseHistoryRTLMode; pmGrid.Items[16].Visible := (Grid.State = gsIdle); - pmGrid.Items[16].Items[0].Checked := not FUseHistoryRTLMode; - pmGrid.Items[16].Items[1].Checked := FUseHistoryRTLMode; - pmGrid.Items[17].Visible := (Grid.State = gsIdle); - pmGrid.Items[17].Items[0].Checked := not FUseHistoryCodepage; - pmGrid.Items[17].Items[1].Checked := FUseHistoryCodepage; - pmGrid.Items[19].Visible := (Grid.State = gsIdle); + pmGrid.Items[16].Items[0].Checked := not FUseHistoryCodepage; + pmGrid.Items[16].Items[1].Checked := FUseHistoryCodepage; + pmGrid.Items[18].Visible := (Grid.State = gsIdle); pmGrid.Popup(Mouse.CursorPos.x, Mouse.CursorPos.y); end; @@ -1369,28 +1364,4 @@ begin ShellExecuteA(0, 'open', Path, nil, nil, SW_SHOW); end; -procedure TExternalGrid.OnSpeakMessage(Sender: TObject); -var - mesW: String; - mesA: AnsiString; - hContact: THandle; -begin - if not MeSpeakEnabled then - exit; - if Grid.Selected = -1 then - exit; - // if Items[Grid.Selected].Custom then exit; - hContact := Items[Grid.Selected].hContact; - mesW := Grid.Items[Grid.Selected].Text; - if GridOptions.BBCodesEnabled then - mesW := DoStripBBCodes(mesW); - if Boolean(ServiceExists(MS_SPEAK_SAY_W)) then - CallService(MS_SPEAK_SAY_W, hContact, LParam(PChar(mesW))) - else - begin - mesA := WideToAnsiString(mesW, Items[Grid.Selected].Codepage); - CallService(MS_SPEAK_SAY_A, hContact, LParam(PAnsiChar(mesA))); - end; -end; - end. diff --git a/plugins/HistoryPlusPlus/hpp_itemprocess.pas b/plugins/HistoryPlusPlus/hpp_itemprocess.pas index c873502176..eb26a5cb68 100644 --- a/plugins/HistoryPlusPlus/hpp_itemprocess.pas +++ b/plugins/HistoryPlusPlus/hpp_itemprocess.pas @@ -64,7 +64,6 @@ function DoSupportBBCodesRTF(const S: AnsiString; StartColor: integer; doColorBB function DoStripBBCodes(const S: String): String; function DoSupportSmileys(awParam:WPARAM; alParam: LPARAM): Integer; -function DoSupportMathModule(awParam:WPARAM; alParam: LPARAM): Integer; function DoSupportAvatarHistory(awParam:WPARAM; alParam: LPARAM): Integer; implementation @@ -75,8 +74,6 @@ uses m_api, hpp_global, hpp_richedit, hpp_events{, RichEdit -- used for CHARRANGE and EM_EXTSETSEL}; -{$include m_mathmodule.inc} - const EM_EXSETSEL = WM_USER + 55; // from RichEdit @@ -466,36 +463,6 @@ begin Result := 0; end; -function DoSupportMathModule(awParam{hRichEdit}:WPARAM; alParam{PItemRenderDetails}: LPARAM): Integer; -var - mrei: TMathRicheditInfo; -begin - mrei.hwndRichEditControl := awParam; - mrei.sel := nil; - mrei.disableredraw := integer(false); - Result := CallService(MATH_RTF_REPLACE_FORMULAE,0,LPARAM(@mrei)); -end; - -(* -function DoSupportAvatars(wParam:WPARAM; lParam: LPARAM): Integer; -const - crlf: AnsiString = '{\line }'; -var - ird: PItemRenderDetails; - ave: PAvatarCacheEntry; - msglen: integer; -begin - ird := Pointer(lParam); - ave := Pointer(CallService(MS_AV_GETAVATARBITMAP,ird.hContact,0)); - if (ave <> nil) and (ave.hbmPic <> 0) then begin - msglen := SendMessage(wParam,WM_GETTEXTLENGTH,0,0); - SendMessage(wParam,EM_SETSEL,msglen,msglen); - SetRichRTF(wParam,crlf,True,False,True); - InsertBitmapToRichEdit(wParam,ave.hbmPic); - end; - Result := 0; -end; -*) function DoSupportAvatarHistory(awParam:WPARAM; alParam: LPARAM): int; const diff --git a/plugins/HistoryPlusPlus/hpp_opt_dialog.pas b/plugins/HistoryPlusPlus/hpp_opt_dialog.pas index 6f0eed12bb..d5c532d855 100644 --- a/plugins/HistoryPlusPlus/hpp_opt_dialog.pas +++ b/plugins/HistoryPlusPlus/hpp_opt_dialog.pas @@ -116,8 +116,6 @@ begin if GetChecked(IDC_BBCODE) <> GridOptions.BBCodesEnabled then exit; if SmileyAddEnabled then if GetChecked(IDC_SMILEY) <> GridOptions.SmileysEnabled then exit; - if MathModuleEnabled then - if GetChecked(IDC_MATH) <> GridOptions.MathModuleEnabled then exit; if GetChecked(IDC_RAWRTF) <> GridOptions.RawRTFEnabled then exit; if GetChecked(IDC_AVATARSHISTORY) <> GridOptions.AvatarsHistoryEnabled then exit; @@ -158,7 +156,6 @@ begin GridOptions.AvatarsHistoryEnabled := GetChecked(IDC_AVATARSHISTORY); if SmileyAddEnabled then GridOptions.SmileysEnabled := GetChecked(IDC_SMILEY); - if MathModuleEnabled then GridOptions.MathModuleEnabled := GetChecked(IDC_MATH); SaveGridOptions; finally @@ -233,9 +230,6 @@ begin EnableWindow(GetDlgItem(hDlg,IDC_SMILEY),SmileyAddEnabled); if SmileyAddEnabled then SetChecked(IDC_SMILEY,GridOptions.SmileysEnabled); - EnableWindow(GetDlgItem(hDlg,IDC_MATH),MathModuleEnabled); - if MathModuleEnabled then - SetChecked(IDC_MATH,GridOptions.MathModuleEnabled); SetChecked(IDC_RAWRTF,GridOptions.RawRTFEnabled); SetChecked(IDC_AVATARSHISTORY,GridOptions.AvatarsHistoryEnabled); diff --git a/plugins/HistoryPlusPlus/hpp_options.pas b/plugins/HistoryPlusPlus/hpp_options.pas index 15f78b5e70..155dd17925 100644 --- a/plugins/HistoryPlusPlus/hpp_options.pas +++ b/plugins/HistoryPlusPlus/hpp_options.pas @@ -158,7 +158,7 @@ const (_type: [hppFont,hppColor]; name: 'Incoming url'; Mes: [mtUrl,mtIncoming]; style:0; size: -11; color: $000000; back: $F4D9CC), - + (_type: [hppFont,hppColor]; name: 'Outgoing url'; Mes: [mtUrl,mtOutgoing]; style:0; size: -11; color: $000000; back: $F4D9CC), @@ -229,8 +229,6 @@ const var GridOptions: TGridOptions; SmileyAddEnabled: Boolean; - MathModuleEnabled: Boolean; - MeSpeakEnabled: Boolean; ShowHistoryCount: Boolean; hppIcons: array of ThppIntIconsRec; skinIcons: array of ThppIntIconsRec; @@ -262,9 +260,6 @@ const (Index: 5; Filter:'Unicode text file'; DefaultExt:'*.txt'; Owned:[sfUnicode,sfText]; OwnedIndex: 1), (Index: 6; Filter:'Text file'; DefaultExt:'*.txt'; Owned:[sfUnicode,sfText]; OwnedIndex: 2)); -{$include m_mathmodule.inc} -{$include m_speak.inc} - procedure RegisterFont(Name:PAnsiChar; Order:integer; const defFont:TFontSettings); var fid: TFontID; @@ -448,7 +443,6 @@ begin GridOptions.SmileysEnabled := GetDBBool(hppDBName, 'Smileys', SmileyAddEnabled); GridOptions.BBCodesEnabled := GetDBBool(hppDBName, 'BBCodes', true); - GridOptions.MathModuleEnabled := GetDBBool(hppDBName, 'MathModule', MathModuleEnabled); GridOptions.RawRTFEnabled := GetDBBool(hppDBName, 'RawRTF', true); GridOptions.AvatarsHistoryEnabled := GetDBBool(hppDBName, 'AvatarsHistory', true); @@ -480,7 +474,6 @@ begin WriteDBBool(hppDBName, 'BBCodes', GridOptions.BBCodesEnabled); WriteDBBool(hppDBName, 'Smileys', GridOptions.SmileysEnabled); - WriteDBBool(hppDBName, 'MathModule', GridOptions.MathModuleEnabled); WriteDBBool(hppDBName, 'RawRTF', GridOptions.RawRTFEnabled); WriteDBBool(hppDBName, 'AvatarsHistory', GridOptions.AvatarsHistoryEnabled); @@ -611,21 +604,9 @@ begin hppFontItems[i].back { TRANSLATE-IGNORE } ); end; end; + // Register in SmileyAdd SmileyAddEnabled := boolean(ServiceExists(MS_SMILEYADD_REPLACESMILEYS)); - { if SmileyAddEnabled then begin - ZeroMemory(@sarc,SizeOf(sarc)); - sarc.cbSize := SizeOf(sarc); - sarc.name := hppName; - sarc.dispname := hppName; - CallService(MS_SMILEYADD_REGISTERCATEGORY,0,LPARAM(@sarc)); - end; } - // Register in MathModule - MathModuleEnabled := boolean(ServiceExists(MATH_RTF_REPLACE_FORMULAE)); - - // Checking presence of speech api - MeSpeakEnabled := boolean(ServiceExists(MS_SPEAK_SAY_W)) or - boolean(ServiceExists(MS_SPEAK_SAY_A)); end; procedure PrepareSaveDialog(SaveDialog: TSaveDialog; SaveFormat: TSaveFormat; AllFormats: boolean = false); diff --git a/plugins/HistoryPlusPlus/hpp_services.pas b/plugins/HistoryPlusPlus/hpp_services.pas index 3ffda00576..4ee1d5c161 100644 --- a/plugins/HistoryPlusPlus/hpp_services.pas +++ b/plugins/HistoryPlusPlus/hpp_services.pas @@ -79,7 +79,6 @@ function AllHistoryRichEditProcess(wParam { hRichEdit } : WPARAM; lParam { PItem begin Result := 0; if GridOptions.SmileysEnabled then Result := Result or DoSupportSmileys(wParam, lParam); - if GridOptions.MathModuleEnabled then Result := Result or DoSupportMathModule(wParam, lParam); if GridOptions.AvatarsHistoryEnabled then Result := Result or DoSupportAvatarHistory(wParam, lParam); end; -- cgit v1.2.3