From 19cab1ca9696845a338a17c9bad3788aa4ec7bc2 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 26 Nov 2013 15:28:09 +0000 Subject: password protection removed git-svn-id: http://svn.miranda-ng.org/main/trunk@6988 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/HistoryPlusPlus/EmptyHistoryForm.pas | 49 +++------------------------- 1 file changed, 4 insertions(+), 45 deletions(-) (limited to 'plugins/HistoryPlusPlus/EmptyHistoryForm.pas') diff --git a/plugins/HistoryPlusPlus/EmptyHistoryForm.pas b/plugins/HistoryPlusPlus/EmptyHistoryForm.pas index e6235fd9f9..39dc70dcc6 100644 --- a/plugins/HistoryPlusPlus/EmptyHistoryForm.pas +++ b/plugins/HistoryPlusPlus/EmptyHistoryForm.pas @@ -67,24 +67,20 @@ type private FContact: THandle; FContacts: Array of THandle; - FPasswordMode: Boolean; procedure TranslateForm; procedure PrepareForm; procedure SetContact(const Value: THandle); - procedure SetPasswordMode(const Value: Boolean); procedure EmptyHistory(hContact: THandle); protected function GetFormText: String; public property Contact: THandle read FContact write SetContact; - property PasswordMode: Boolean read FPasswordMode write SetPasswordMode; end; implementation uses Math, SysUtils, HistoryForm, - PassForm, {PassCheckForm,} hpp_global, hpp_forms, hpp_contacts, hpp_database, hpp_bookmarks; {$R *.dfm} @@ -169,10 +165,7 @@ begin IconTextWidth := Image.Width + HorzSpacing + TextRect.Right; IconTextHeight := Max(Image.Height,TextRect.Bottom); - if PasswordMode then - ButtonGroupWidth := ButtonWidth - else - ButtonGroupWidth := ButtonWidth*2 + ButtonSpacing; + ButtonGroupWidth := ButtonWidth*2 + ButtonSpacing; BorderWidth := VertSpacing; ClientWidth := Max(IconTextWidth, ButtonGroupWidth); @@ -194,15 +187,8 @@ begin Text.SetBounds(Image.Width + HorzSpacing, 0, TextRect.Right, TextRect.Bottom); - if PasswordMode then - begin - btCancel.SetBounds((ClientWidth - ButtonGroupWidth) div 2,0, ButtonWidth, ButtonHeight); - end - else - begin - btYes.SetBounds((ClientWidth - ButtonGroupWidth) div 2,0, ButtonWidth, ButtonHeight); - btNo.SetBounds(btYes.Left + btYes.Width + ButtonSpacing,0, ButtonWidth, ButtonHeight); - end; + btYes.SetBounds((ClientWidth - ButtonGroupWidth) div 2,0, ButtonWidth, ButtonHeight); + btNo.SetBounds(btYes.Left + btYes.Width + ButtonSpacing,0, ButtonWidth, ButtonHeight); end; procedure TEmptyHistoryFrm.FormShow(Sender: TObject); @@ -255,34 +241,7 @@ begin end; end; end; - if Assigned(Owner) and (Owner is THistoryFrm) then - PasswordMode := THistoryFrm(Owner).PasswordMode - else - PasswordMode := (not IsPasswordBlank(GetPassword)) and IsUserProtected(FContact); - paContacts.Visible := not PasswordMode and (Length(FContacts) > 0); -end; - -procedure TEmptyHistoryFrm.SetPasswordMode(const Value: Boolean); -begin - FPasswordMode := Value; - if PasswordMode then - begin - Image.Picture.Icon.Handle := LoadIcon(0, IDI_EXCLAMATION); - Text.Caption := TranslateW('History of this contact is password protected'); - end - else - begin - Image.Picture.Icon.Handle := LoadIcon(0, IDI_QUESTION); - Text.Caption := - TranslateW('Do you really want to delete ALL items for this contact?')+#10#13+ - #10#13+ - TranslateW('Note: It can take several minutes for large histories'); - end; - btYes.Visible := not FPasswordMode; - btYes.Default := not FPasswordMode; - btNo.Visible := not FPasswordMode; - btCancel.Visible := FPasswordMode; - btCancel.Default := FPasswordMode; + paContacts.Visible := (Length(FContacts) > 0); end; procedure TEmptyHistoryFrm.EmptyHistory(hContact: THandle); -- cgit v1.2.3