diff options
author | George Hazan <george.hazan@gmail.com> | 2013-11-26 15:28:09 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-11-26 15:28:09 +0000 |
commit | 19cab1ca9696845a338a17c9bad3788aa4ec7bc2 (patch) | |
tree | e7e8712794e7e78136d7eb101fa876124916e2d6 | |
parent | a24244a8159143a07208a91a6314680856d45a9e (diff) |
password protection removed
git-svn-id: http://svn.miranda-ng.org/main/trunk@6988 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
23 files changed, 78 insertions, 1536 deletions
diff --git a/plugins/HistoryPlusPlus/EmptyHistoryForm.dfm b/plugins/HistoryPlusPlus/EmptyHistoryForm.dfm index 0bec7e7226..bac2a324d4 100644 --- a/plugins/HistoryPlusPlus/EmptyHistoryForm.dfm +++ b/plugins/HistoryPlusPlus/EmptyHistoryForm.dfm @@ -32,7 +32,6 @@ object EmptyHistoryFrm: TEmptyHistoryFrm Height = 32
end
object Text: TLabel
- Caption = ''
Left = 42
Top = 0
Width = 232
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);
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.dfm b/plugins/HistoryPlusPlus/GlobalSearch.dfm index c4309e0b0e..7a211d7d66 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.dfm +++ b/plugins/HistoryPlusPlus/GlobalSearch.dfm @@ -1,9 +1,9 @@ object fmGlobalSearch: TfmGlobalSearch
Left = 259
Top = 118
- Width = 559
- Height = 544
Caption = 'Global History Search'
+ ClientHeight = 517
+ ClientWidth = 551
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -26,17 +26,19 @@ object fmGlobalSearch: TfmGlobalSearch Left = 0
Top = 0
Width = 551
- Height = 493
+ Height = 498
Align = alClient
BevelOuter = bvNone
BorderWidth = 2
TabOrder = 0
object spContacts: TSplitter
Left = 157
- Top = 248
- Height = 189
+ Top = 202
+ Height = 240
ResizeStyle = rsUpdate
Visible = False
+ ExplicitTop = 248
+ ExplicitHeight = 189
end
object paSearch: TPanel
Left = 2
@@ -45,7 +47,7 @@ object fmGlobalSearch: TfmGlobalSearch Height = 32
Align = alTop
BevelOuter = bvNone
- TabOrder = 5
+ TabOrder = 4
DesignSize = (
547
32)
@@ -84,13 +86,13 @@ object fmGlobalSearch: TfmGlobalSearch end
object paProgress: TPanel
Left = 2
- Top = 437
+ Top = 442
Width = 547
Height = 54
Align = alBottom
BevelInner = bvRaised
BevelOuter = bvLowered
- TabOrder = 3
+ TabOrder = 2
Visible = False
DesignSize = (
547
@@ -116,89 +118,20 @@ object fmGlobalSearch: TfmGlobalSearch TabOrder = 0
end
end
- object paPassword: TPanel
- Left = 2
- Top = 202
- Width = 547
- Height = 46
- Align = alTop
- BevelOuter = bvNone
- TabOrder = 1
- Visible = False
- DesignSize = (
- 547
- 46)
- object bePassword: TBevel
- Left = 12
- Top = 10
- Width = 519
- Height = 5
- Anchors = [akLeft, akTop, akRight]
- Shape = bsTopLine
- end
- object laPass: TLabel
- Left = 8
- Top = 25
- Width = 49
- Height = 13
- Caption = 'Password:'
- end
- object laPasswordHead: TLabel
- Left = 4
- Top = 4
- Width = 154
- Height = 13
- Caption = 'Search Protected Contacts'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = False
- end
- object sbPasswordClose: TSpeedButton
- Left = 521
- Top = 2
- Width = 18
- Height = 17
- Anchors = [akTop, akRight]
- Flat = True
- Transparent = False
- OnClick = sbPasswordCloseClick
- end
- object laPassNote: TLabel
- Caption = ''
- Left = 199
- Top = 25
- Width = 3
- Height = 13
- end
- object edPass: TEdit
- Left = 65
- Top = 21
- Width = 125
- Height = 21
- TabOrder = 0
- PasswordChar = '*'
- OnKeyDown = edSearchKeyUp
- OnKeyPress = edPassKeyPress
- end
- end
object paContacts: TPanel
Left = 2
- Top = 248
+ Top = 202
Width = 155
- Height = 189
+ Height = 240
Align = alLeft
BevelOuter = bvNone
- TabOrder = 2
+ TabOrder = 1
Visible = False
object lvContacts: TListView
Left = 0
Top = 0
Width = 155
- Height = 189
+ Height = 240
Align = alClient
Columns = <
item
@@ -221,17 +154,17 @@ object fmGlobalSearch: TfmGlobalSearch end
object paHistory: TPanel
Left = 160
- Top = 248
+ Top = 202
Width = 389
- Height = 189
+ Height = 240
Align = alClient
BevelOuter = bvNone
- TabOrder = 4
+ TabOrder = 3
object hg: THistoryGrid
Left = 0
Top = 0
Width = 389
- Height = 161
+ Height = 212
VertScrollBar.Increment = 1
ShowBottomAligned = False
ShowBookmarks = True
@@ -265,7 +198,6 @@ object fmGlobalSearch: TfmGlobalSearch OnUrlClick = hgUrlClick
OnBookmarkClick = hgBookmarkClick
OnItemFilter = hgItemFilter
- OnProcessRichText = hgProcessRichText
OnSearchItem = hgSearchItem
Reversed = False
ReversedHeader = False
@@ -279,7 +211,7 @@ object fmGlobalSearch: TfmGlobalSearch end
object paFilter: TPanel
Left = 0
- Top = 161
+ Top = 212
Width = 389
Height = 28
Align = alBottom
@@ -325,7 +257,7 @@ object fmGlobalSearch: TfmGlobalSearch Height = 46
Align = alTop
BevelOuter = bvNone
- TabOrder = 6
+ TabOrder = 5
Visible = False
DesignSize = (
547
@@ -396,7 +328,7 @@ object fmGlobalSearch: TfmGlobalSearch Height = 46
Align = alTop
BevelOuter = bvNone
- TabOrder = 7
+ TabOrder = 6
Visible = False
DesignSize = (
547
@@ -490,8 +422,6 @@ object fmGlobalSearch: TfmGlobalSearch Height = 30
AutoSize = True
BorderWidth = 2
- EdgeBorders = []
- Flat = True
DoubleBuffered = True
Images = ilToolbar
ParentDoubleBuffered = False
@@ -524,23 +454,14 @@ object fmGlobalSearch: TfmGlobalSearch Style = tbsCheck
OnClick = tbEventsClick
end
- object tbPassword: THppToolButton
- Left = 69
- Top = 0
- Hint = 'Search protected contacts'
- HelpKeyword = 'F7'
- Caption = 'Search protected contacts'
- Style = tbsCheck
- OnClick = tbPasswordClick
- end
object ToolButton1: THppToolButton
- Left = 92
+ Left = 69
Top = 0
Width = 8
Style = tbsSeparator
end
object tbBookmarks: THppToolButton
- Left = 100
+ Left = 77
Top = 0
Hint = 'Bookmarks'
HelpKeyword = 'F9'
@@ -549,13 +470,13 @@ object fmGlobalSearch: TfmGlobalSearch OnClick = tbBookmarksClick
end
object ToolButton2: THppToolButton
- Left = 123
+ Left = 100
Top = 0
Width = 8
Style = tbsSeparator
end
object tbSearch: THppToolButton
- Left = 131
+ Left = 108
Top = 0
Caption = 'Find'
Grouped = True
@@ -563,7 +484,7 @@ object fmGlobalSearch: TfmGlobalSearch Visible = False
end
object tbFilter: THppToolButton
- Left = 154
+ Left = 131
Top = 0
Caption = 'Filter'
Grouped = True
@@ -571,14 +492,14 @@ object fmGlobalSearch: TfmGlobalSearch Visible = False
end
object ToolButton3: THppToolButton
- Left = 177
+ Left = 154
Top = 0
Width = 8
Style = tbsSeparator
Visible = False
end
object tbEventsFilter: THppSpeedButton
- Left = 185
+ Left = 162
Top = 0
Width = 110
Height = 22
@@ -591,27 +512,27 @@ object fmGlobalSearch: TfmGlobalSearch OnClick = tbEventsFilterClick
end
object ToolButton4: THppToolButton
- Left = 295
+ Left = 272
Top = 0
Width = 8
Style = tbsSeparator
end
object tbCopy: THppToolButton
- Left = 303
+ Left = 280
Top = 0
Hint = 'Copy'
Caption = 'Copy'
OnClick = tbCopyClick
end
object tbDelete: THppToolButton
- Left = 326
+ Left = 303
Top = 0
Hint = 'Delete'
Caption = 'Delete'
OnClick = tbDeleteClick
end
object tbSave: THppToolButton
- Left = 349
+ Left = 326
Top = 0
Hint = 'Save'
Caption = 'Save'
@@ -626,7 +547,7 @@ object fmGlobalSearch: TfmGlobalSearch Height = 46
Align = alTop
BevelOuter = bvNone
- TabOrder = 8
+ TabOrder = 7
Visible = False
DesignSize = (
547
@@ -680,7 +601,6 @@ object fmGlobalSearch: TfmGlobalSearch AutoCloseUp = True
Style = csDropDownList
BiDiMode = bdLeftToRight
- ItemHeight = 13
ParentBiDiMode = False
TabOrder = 0
end
@@ -688,7 +608,7 @@ object fmGlobalSearch: TfmGlobalSearch end
object sb: TStatusBar
Left = 0
- Top = 493
+ Top = 498
Width = 551
Height = 19
Panels = <>
diff --git a/plugins/HistoryPlusPlus/GlobalSearch.pas b/plugins/HistoryPlusPlus/GlobalSearch.pas index 2c0c6bc7b1..a51daf10f0 100644 --- a/plugins/HistoryPlusPlus/GlobalSearch.pas +++ b/plugins/HistoryPlusPlus/GlobalSearch.pas @@ -100,9 +100,6 @@ type N1: TMenuItem;
N2: TMenuItem;
spContacts: TSplitter;
- paPassword: TPanel;
- edPass: TEdit;
- laPass: TLabel;
ilContacts: TImageList;
paContacts: TPanel;
lvContacts: TListView;
@@ -121,7 +118,6 @@ type N3: TMenuItem;
Bookmark1: TMenuItem;
ToolBar: THppToolBar;
- tbPassword: THppToolButton;
paAdvanced: TPanel;
paRange: TPanel;
rbAny: TRadioButton;
@@ -130,25 +126,21 @@ type laAdvancedHead: TLabel;
sbAdvancedClose: TSpeedButton;
sbRangeClose: TSpeedButton;
- sbPasswordClose: TSpeedButton;
dtRange1: TDateTimePicker;
laRange1: TLabel;
laRange2: TLabel;
dtRange2: TDateTimePicker;
- laPasswordHead: TLabel;
laRangeHead: TLabel;
tbEventsFilter: THppSpeedButton;
tbAdvanced: THppToolButton;
tbRange: THppToolButton;
ToolButton2: THppToolButton;
ilToolbar: TImageList;
- bePassword: TBevel;
beRange: TBevel;
beAdvanced: TBevel;
ToolButton3: THppToolButton;
tbSearch: THppToolButton;
tbFilter: THppToolButton;
- laPassNote: TLabel;
pmEventsFilter: TPopupMenu;
N4: TMenuItem;
Customize1: TMenuItem;
@@ -247,10 +239,8 @@ type procedure lvContactsContextPopup(Sender: TObject; MousePos: TPoint; var Handled: Boolean);
procedure tbAdvancedClick(Sender: TObject);
procedure tbRangeClick(Sender: TObject);
- procedure tbPasswordClick(Sender: TObject);
procedure sbAdvancedCloseClick(Sender: TObject);
procedure sbRangeCloseClick(Sender: TObject);
- procedure sbPasswordCloseClick(Sender: TObject);
procedure tbEventsFilterClick(Sender: TObject);
procedure EventsFilterItemClick(Sender: TObject);
procedure Customize1Click(Sender: TObject);
@@ -278,7 +268,6 @@ type procedure hgChar(Sender: TObject; var achar: WideChar; Shift: TShiftState);
procedure edFilterKeyPress(Sender: TObject; var Key: Char);
private
- UsedPassword: AnsiString;
UserMenu: hMenu;
UserMenuContact: THandle;
WasReturnPressed: Boolean;
@@ -354,7 +343,6 @@ type procedure ToggleAdvancedPanel(Show: Boolean);
procedure ToggleRangePanel(Show: Boolean);
procedure ToggleEventsPanel(Show: Boolean);
- procedure TogglePasswordPanel(Show: Boolean);
procedure OrganizePanels;
procedure ToggleMainMenu(Enabled: Boolean);
@@ -395,7 +383,7 @@ var implementation
uses
- hpp_options, PassForm, hpp_itemprocess, hpp_messages, CustomizeFiltersForm,
+ hpp_options, hpp_itemprocess, hpp_messages, CustomizeFiltersForm,
hpp_database, hpp_eventfilters, hpp_contacts, hpp_events, hpp_richedit,
hpp_forms, hpp_services, hpp_bookmarks;
@@ -679,13 +667,6 @@ begin pmEventsFilter.Popup(p.X, p.Y + tbEventsFilter.Height);
end;
-procedure TfmGlobalSearch.tbPasswordClick(Sender: TObject);
-begin
- if Sender <> tbPassword then
- tbPassword.Down := not tbPassword.Down;
- TogglePasswordPanel(tbPassword.Down);
-end;
-
procedure TfmGlobalSearch.tbRangeClick(Sender: TObject);
begin
if Sender <> tbRange then
@@ -783,26 +764,6 @@ begin end;
end;
-procedure TfmGlobalSearch.TogglePasswordPanel(Show: Boolean);
-var
- Lock: Boolean;
-begin
- Lock := Visible;
- if Lock then
- Lock := LockWindowUpdate(Handle);
- try
- if GetPassMode = PASSMODE_PROTALL then
- Show := True;
- tbPassword.Down := Show;
- paPassword.Visible := Show;
- laPassNote.Caption := '';
- OrganizePanels;
- finally
- if Lock then
- LockWindowUpdate(0);
- end;
-end;
-
procedure TfmGlobalSearch.ToggleRangePanel(Show: Boolean);
var
Lock: Boolean;
@@ -884,11 +845,6 @@ begin hg.SetFocus;
end;
-procedure TfmGlobalSearch.sbPasswordCloseClick(Sender: TObject);
-begin
- TogglePasswordPanel(False);
-end;
-
procedure TfmGlobalSearch.sbRangeCloseClick(Sender: TObject);
begin
ToggleRangePanel(False);
@@ -916,10 +872,6 @@ begin laEvents.Caption := TranslateUnicodeString(laEvents.Caption);
cbEvents.Left := laEvents.Left + laEvents.Width + 10;
- laPasswordHead.Caption := TranslateUnicodeString(laPasswordHead.Caption);
- laPass.Caption := TranslateUnicodeString(laPass.Caption);
- edPass.Left := laPass.Left + laPass.Width + 10;
-
sbClearFilter.Hint := TranslateUnicodeString(sbClearFilter.Hint);
SaveDialog.Title := TranslateUnicodeString(PWideChar(SaveDialog.Title));
@@ -1030,36 +982,6 @@ begin // raise Exception.Create('Enter text to search');
SearchProtected := False;
- if paPassword.Visible then
- begin
- PassMode := GetPassMode;
- if PassMode = PASSMODE_PROTNONE then
- laPassNote.Caption := TranslateW('History is not protected, searching all contacts')
- else
- begin
- if (PassMode <> PASSMODE_PROTALL) and (edPass.Text = '') then
- laPassNote.Caption := TranslateW('Searching unprotected contacts only')
- else
- begin
- if CheckPassword(AnsiString(edPass.Text)) then
- begin
- SearchProtected := True;
- laPassNote.Caption := TranslateW('Searching all contacts');
- end
- else
- begin
- HppMessageBox(Handle, TranslateW('You have entered the wrong password.'),
- TranslateW('History++ Password Protection'), MB_OK or MB_DEFBUTTON1 or MB_ICONSTOP);
- edPass.SetFocus;
- edPass.SelectAll;
- laPassNote.Caption := TranslateW('Wrong password');
- exit;
- end;
- end;
- end;
- end;
-
- UsedPassword := AnsiString(edPass.Text);
if Assigned(SearchThread) then
FreeAndNil(SearchThread);
@@ -1226,7 +1148,6 @@ begin oep.cbSize := SizeOf(oep);
oep.hContact := GetSearchItem(hg.Selected).Contact.Handle;
oep.hDBEvent := GetSearchItem(hg.Selected).hDBEvent;
- oep.pPassword := PAnsiChar(UsedPassword);
CallService(MS_HPP_OPENHISTORYEVENT, wParam(@oep), 0);
end;
@@ -1300,7 +1221,6 @@ begin LoadHPPIcons(sbAdvancedClose,HPP_ICON_SESS_HIDE);
LoadHPPIcons(sbRangeClose,HPP_ICON_SESS_HIDE);
LoadHPPIcons(sbEventsClose,HPP_ICON_SESS_HIDE);
- LoadHPPIcons(sbPasswordClose,HPP_ICON_SESS_HIDE);
end;
procedure TfmGlobalSearch.LoadContactsIcons;
@@ -1374,11 +1294,6 @@ begin // Self.Top := (Screen.Height - Self.Height) div 2;
// end;
Utils_RestoreFormPosition(Self, 0, hppDBName, 'GlobalSearchWindow.');
- // if we are password-protected (cbPass.Enabled) and
- // have PROTSEL (not (cbPass.Checked)) then load
- // checkbox from DB
- if not paPassword.Visible then
- TogglePasswordPanel(GetDBBool(hppDBName, 'GlobalSearchWindow.PassChecked', False));
n := GetDBInt(hppDBName, 'GlobalSearchWindow.ContactListWidth', -1);
if n <> -1 then
@@ -1428,8 +1343,6 @@ begin tbRange.ImageIndex := ii;
ii := ImageList_AddIcon(il, hppIcons[HPP_ICON_HOTFILTER].Handle);
tbEvents.ImageIndex := ii;
- ii := ImageList_AddIcon(il, hppIcons[HPP_ICON_SEARCHPROTECTED].Handle);
- tbPassword.ImageIndex := ii;
ii := ImageList_AddIcon(il, hppIcons[HPP_ICON_BOOKMARK].Handle);
tbBookmarks.ImageIndex := ii;
@@ -1541,12 +1454,6 @@ begin if paEvents.Visible then
begin
paEvents.Top := PrevPanel.Top + PrevPanel.Width;
- PrevPanel := paEvents;
- end;
- if paPassword.Visible then
- begin
- paPassword.Top := PrevPanel.Top + PrevPanel.Width;
- // PrevPanel := paPassword;
end;
end;
@@ -1627,12 +1534,7 @@ end; procedure TfmGlobalSearch.SavePosition;
begin
- // Utils_SaveWindowPosition(Self.Handle,0,'HistoryPlusPlus','GlobalSearchWindow.');
Utils_SaveFormPosition(Self, 0, hppDBName, 'GlobalSearchWindow.');
- // if we are password-protected (cbPass.Enabled) and
- // have PROTSEL (GetPassMode = PASSMODE_PROTSEL) then save
- // checkbox to DB
- WriteDBBool(hppDBName, 'GlobalSearchWindow.PassChecked', paPassword.Visible);
WriteDBInt(hppDBName, 'GlobalSearchWindow.ContactListWidth', paContacts.Width);
@@ -1813,10 +1715,6 @@ begin IsSearching := False;
SearchThread := nil;
- PassMode := GetPassMode;
- if (PassMode = PASSMODE_PROTALL) then
- TogglePasswordPanel(True);
-
hg.Codepage := hppCodepage;
hg.RTLMode := hppRTLDefault;
hg.TxtStartUp := TranslateW('Ready to search') + #10#13#10#13 +
@@ -2400,7 +2298,6 @@ end; procedure TfmGlobalSearch.hgRTLEnabled(Sender: TObject; BiDiMode: TBiDiMode);
begin
- edPass.BiDiMode := BiDiMode;
edSearch.BiDiMode := BiDiMode;
edFilter.BiDiMode := BiDiMode;
dtRange1.BiDiMode := BiDiMode;
diff --git a/plugins/HistoryPlusPlus/HistoryControls_Design.pas b/plugins/HistoryPlusPlus/HistoryControls_Design.pas index 4c0a90e85e..eef18cabe3 100644 --- a/plugins/HistoryPlusPlus/HistoryControls_Design.pas +++ b/plugins/HistoryPlusPlus/HistoryControls_Design.pas @@ -27,7 +27,7 @@ procedure Register; implementation
-uses Classes, HistoryControls, DesignIntf, DesignEditors;
+uses Classes, HistoryControls, HistoryGrid, DesignIntf, DesignEditors;
type
@@ -43,6 +43,7 @@ begin RegisterComponents('History++', [THppToolButton]);
RegisterComponents('History++', [THppSpeedButton]);
RegisterComponents('History++', [THppGroupBox]);
+ RegisterComponents('THistoryGrid', [THistoryGrid]);
RegisterCustomModule(THppForm, THppFormCustomModule);
{RegisterComponents('History++', [THppSaveDialog]);}
end;
diff --git a/plugins/HistoryPlusPlus/HistoryForm.dfm b/plugins/HistoryPlusPlus/HistoryForm.dfm index 2a890af9e2..6b74c82f43 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.dfm +++ b/plugins/HistoryPlusPlus/HistoryForm.dfm @@ -1,12 +1,12 @@ object HistoryFrm: THistoryFrm
Left = 245
Top = 167
- Width = 586
- Height = 424
VertScrollBar.Tracking = True
VertScrollBar.Visible = False
ActiveControl = hg
Caption = '%s - History++'
+ ClientHeight = 397
+ ClientWidth = 578
Color = clBtnFace
Font.Charset = DEFAULT_CHARSET
Font.Color = clWindowText
@@ -164,7 +164,6 @@ object HistoryFrm: THistoryFrm TabOrder = 0
OnChange = edSearchChange
OnKeyDown = edSearchKeyDown
- OnKeyPress = edPassKeyPress
OnKeyUp = edSearchKeyUp
end
end
@@ -217,7 +216,7 @@ object HistoryFrm: THistoryFrm Left = 22
Top = 3
Width = 12
- Height = 19
+ Height = 13
Align = alRight
Caption = '>>'
Transparent = True
@@ -254,8 +253,6 @@ object HistoryFrm: THistoryFrm Height = 30
AutoSize = True
BorderWidth = 2
- EdgeBorders = []
- Flat = True
DoubleBuffered = True
Images = ilToolbar
ParentDoubleBuffered = False
@@ -555,7 +552,6 @@ object HistoryFrm: THistoryFrm OnChange = tvSessChange
OnGetSelectedIndex = tvSessGetSelectedIndex
OnKeyDown = tvSessKeyDown
- OnKeyPress = edPassKeyPress
OnMouseMove = tvSessMouseMove
end
end
@@ -569,79 +565,6 @@ object HistoryFrm: THistoryFrm Panels = <>
SimplePanel = True
end
- object paPassHolder: TPanel
- Left = 179
- Top = 95
- Width = 325
- Height = 153
- BevelOuter = bvNone
- BorderStyle = bsSingle
- Enabled = False
- TabOrder = 2
- Visible = False
- OnResize = paPassHolderResize
- object paPassword: TPanel
- Left = 8
- Top = 16
- Width = 301
- Height = 117
- BevelOuter = bvNone
- TabOrder = 0
- object laPass: TLabel
- Left = 54
- Top = 7
- Width = 236
- Height = 46
- AutoSize = False
- Caption = 'You need password to access this history'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- Transparent = True
- WordWrap = True
- end
- object Image1: TImage
- Left = 10
- Top = 8
- Width = 32
- Height = 29
- AutoSize = True
- Transparent = True
- end
- object laPass2: TLabel
- Left = 10
- Top = 60
- Width = 49
- Height = 13
- Caption = 'Password:'
- Transparent = True
- end
- object edPass: TEdit
- Left = 80
- Top = 56
- Width = 211
- Height = 21
- MaxLength = 100
- TabOrder = 0
- PasswordChar = '*'
- OnKeyPress = edPassKeyPress
- OnKeyUp = edPassKeyUp
- end
- object bnPass: TButton
- Left = 208
- Top = 82
- Width = 83
- Height = 25
- Caption = 'Enter'
- Default = True
- TabOrder = 1
- OnClick = bnPassClick
- end
- end
- end
object SaveDialog: TSaveDialog
FilterIndex = 0
Options = [ofOverwritePrompt, ofHideReadOnly, ofPathMustExist, ofShareAware, ofEnableSizing]
@@ -841,10 +764,6 @@ object HistoryFrm: THistoryFrm object N7: TMenuItem
Caption = '-'
end
- object Passwordprotection1: TMenuItem
- Caption = 'Password protection...'
- OnClick = Passwordprotection1Click
- end
end
object pmEventsFilter: TPopupMenu
BiDiMode = bdLeftToRight
diff --git a/plugins/HistoryPlusPlus/HistoryForm.pas b/plugins/HistoryPlusPlus/HistoryForm.pas index 0cdca49b7a..a0e1f53b3c 100644 --- a/plugins/HistoryPlusPlus/HistoryForm.pas +++ b/plugins/HistoryPlusPlus/HistoryForm.pas @@ -119,13 +119,6 @@ type tiFilter: TTimer;
ilToolbar: TImageList;
Toolbar: THppToolBar;
- paPassHolder: TPanel;
- paPassword: TPanel;
- laPass: TLabel;
- Image1: TImage;
- laPass2: TLabel;
- edPass: TEdit;
- bnPass: TButton;
pmHistory: TPopupMenu;
SaveasMContacts2: TMenuItem;
SaveasRTF2: TMenuItem;
@@ -159,7 +152,6 @@ type ShowAll1: TMenuItem;
Customize1: TMenuItem;
N6: TMenuItem;
- Passwordprotection1: TMenuItem;
TopPanel: TPanel;
paSearchButtons: TPanel;
pmSessions: TPopupMenu;
@@ -236,7 +228,6 @@ type procedure tbSearchClick(Sender: TObject);
procedure tbFilterClick(Sender: TObject);
procedure pbSearchPaint(Sender: TObject);
- procedure paPassHolderResize(Sender: TObject);
procedure tvSessMouseMove(Sender: TObject; Shift: TShiftState; X, Y: Integer);
// procedure tvSessClick(Sender: TObject);
procedure sbCloseSessClick(Sender: TObject);
@@ -275,9 +266,6 @@ type procedure OpenLinkClick(Sender: TObject);
procedure OpenLinkNWClick(Sender: TObject);
procedure CopyLinkClick(Sender: TObject);
- procedure bnPassClick(Sender: TObject);
- procedure edPassKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
- procedure edPassKeyPress(Sender: TObject; var Key: Char);
procedure CopyText1Click(Sender: TObject);
procedure hgUrlClick(Sender: TObject; Item: Integer; const URLText: String; Button: TMouseButton);
procedure hgProcessRichText(Sender: TObject; Handle: THandle; Item: Integer);
@@ -295,7 +283,6 @@ type procedure tbHistorySearchClick(Sender: TObject);
procedure EmptyHistory1Click(Sender: TObject);
procedure EventsFilterItemClick(Sender: TObject);
- procedure Passwordprotection1Click(Sender: TObject);
procedure SessSelectClick(Sender: TObject);
procedure pmGridPopup(Sender: TObject);
procedure pmHistoryPopup(Sender: TObject);
@@ -343,7 +330,6 @@ type EndTimestamp: DWord;
FhContact, FhSubContact: THandle;
FProtocol, FSubProtocol: AnsiString;
- FPasswordMode: Boolean;
SavedLinkUrl: String;
SavedFileDir: String;
HotFilterString: String;
@@ -371,8 +357,6 @@ type procedure HMNickChanged(var M: TMessage); message HM_NOTF_NICKCHANGED;
procedure OpenDetails(Item: Integer);
- procedure SetPasswordMode(const Value: Boolean);
- procedure ProcessPassword;
procedure TranslateForm;
procedure SethContact(const Value: THandle);
@@ -417,7 +401,6 @@ type function GetItemData(Index: Integer): THistoryItem;
procedure ReplyQuoted(Item: Integer);
- procedure OpenPassword;
procedure EmptyHistory;
procedure SMPrepare(var M: TMessage); message HM_SESS_PREPARE;
@@ -449,7 +432,6 @@ type procedure FillBookmarks;
procedure HMBookmarkChanged(var M: TMessage); message HM_NOTF_BOOKMARKCHANGED;
- property PasswordMode: Boolean read FPasswordMode write SetPasswordMode;
property hContact: THandle read FhContact write SethContact;
property Protocol: AnsiString read FProtocol;
property hSubContact: THandle read FhSubContact;
@@ -470,7 +452,7 @@ const implementation
uses
- EventDetailForm, PassForm, hpp_options, hpp_services, hpp_eventfilters,
+ EventDetailForm, hpp_options, hpp_services, hpp_eventfilters,
hpp_database, hpp_contacts, hpp_itemprocess, hpp_events, hpp_forms, hpp_richedit,
hpp_messages, hpp_bookmarks, Checksum, CustomizeFiltersForm, CustomizeToolbar;
@@ -661,7 +643,6 @@ begin LoadButtonIcons;
LoadSessionIcons;
LoadBookIcons;
- Image1.Picture.Icon.Handle := CopyIcon(hppIntIcons[0].Handle);
DesktopFont := True;
MakeFontsParent(Self);
@@ -948,7 +929,7 @@ var begin
Utils_SaveFormPosition(Self, 0, hppDBName, 'HistoryWindow.');
- if (not PasswordMode) and (HistoryLength > 0) then
+ if (HistoryLength > 0) then
begin
if hContact = 0 then
begin
@@ -1135,7 +1116,7 @@ begin Exit;
end;
- if (Key = VK_F10) and (Shift = []) and (not PasswordMode) then
+ if (Key = VK_F10) and (Shift = []) then
begin
WriteDBBool(hppDBName, 'Accessability', True);
NotifyAllForms(HM_NOTF_ACCCHANGED, ORD(True), 0);
@@ -1143,7 +1124,7 @@ begin Exit;
end;
- if (Key = VK_F3) and ((Shift = []) or (Shift = [ssShift])) and (not PasswordMode) and
+ if (Key = VK_F3) and ((Shift = []) or (Shift = [ssShift])) and
(SearchMode in [smSearch, smHotSearch]) then
begin
if ssShift in Shift then
@@ -1157,13 +1138,10 @@ begin if hg.State = gsInline then
Exit;
- if not PasswordMode then
+ if IsFormShortCut([mmAcc], Key, Shift) then
begin
- if IsFormShortCut([mmAcc], Key, Shift) then
- begin
- Key := 0;
- Exit;
- end;
+ Key := 0;
+ Exit;
end;
with Sender as TWinControl do
@@ -1229,17 +1207,7 @@ begin Action := caFree;
if Assigned(WindowList) then
begin
- if WindowList.count = 1 then
- begin
- // we are the last left
- if Assigned(PassCheckFm) then
- FreeAndNil(PassCheckFm);
- if Assigned(PassFm) then
- FreeAndNil(PassFm);
- end;
WindowList.Delete(WindowList.IndexOf(Self));
- // Windows.ShowCaret(Handle);
- // Windows.ShowCursor(True);
end;
SavePosition;
except
@@ -2036,23 +2004,20 @@ var begin
if csDestroying in ComponentState then
Exit;
- if PasswordMode then
- t := ''
- else
- case State of
- gsIdle:
- t := Format(TranslateW('%.0n items in history'), [HistoryLength / 1]);
- gsLoad:
- t := TranslateW('Loading...');
- gsSave:
- t := TranslateW('Saving...');
- gsSearch:
- t := TranslateW('Searching...');
- gsDelete:
- t := TranslateW('Deleting...');
- gsInline:
- t := TranslateW('Pseudo-edit mode...');
- end;
+ case State of
+ gsIdle:
+ t := Format(TranslateW('%.0n items in history'), [HistoryLength / 1]);
+ gsLoad:
+ t := TranslateW('Loading...');
+ gsSave:
+ t := TranslateW('Saving...');
+ gsSearch:
+ t := TranslateW('Searching...');
+ gsDelete:
+ t := TranslateW('Deleting...');
+ gsInline:
+ t := TranslateW('Pseudo-edit mode...');
+ end;
sb.SimpleText := t;
end;
@@ -2192,8 +2157,6 @@ end; procedure THistoryFrm.FormMouseWheel(Sender: TObject; Shift: TShiftState; WheelDelta: Integer;
MousePos: TPoint; var Handled: Boolean);
begin
- if PasswordMode then
- Exit;
Handled := True;
(* we can get range check error (???) here
it looks that without range check it works ok
@@ -2504,43 +2467,6 @@ begin end;
end;
-procedure THistoryFrm.SetPasswordMode(const Value: Boolean);
-var
- enb: Boolean;
-begin
- FPasswordMode := Value;
- enb := not Value;
- hgState(hg, hg.State);
- hg.Enabled := enb;
- hg.Visible := enb;
- paClient.Enabled := enb;
- paClient.Visible := enb;
-
- if Value then
- paPassHolder.Align := TAlign(alClient);
- paPassHolder.Enabled := not enb;
- paPassHolder.Visible := not enb;
- if Value then
- begin
- paPassword.Left := (paPassHolder.ClientWidth - paPassword.Width) div 2;
- paPassword.Top := (paPassHolder.ClientHeight - paPassword.Height) div 2;
- if Self.Visible then
- edPass.SetFocus
- else
- Self.ActiveControl := edPass;
- end
- else
- begin
- ToggleMainMenu(GetDBBool(hppDBName, 'Accessability', False));
- // reset selected
- hg.Selected := hg.Selected;
- if Self.Visible then
- hg.SetFocus
- else
- Self.ActiveControl := hg;
- end;
-end;
-
procedure THistoryFrm.SetRecentEventsPosition(OnTop: Boolean);
begin
hg.Reversed := not OnTop;
@@ -2628,20 +2554,6 @@ begin hg.Selected := Value;
end;
-procedure THistoryFrm.bnPassClick(Sender: TObject);
-begin
- if DigToBase(HashString(AnsiString(edPass.Text))) = GetPassword then
- PasswordMode := False
- else
- { DONE: sHure }
- HppMessageBox(Handle, TranslateW('You have entered the wrong password'),
- TranslateW('History++ Password Protection'), MB_OK or MB_DEFBUTTON1 or MB_ICONSTOP);
-end;
-
-procedure THistoryFrm.edPassKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
-begin;
-end;
-
procedure THistoryFrm.edSearchChange(Sender: TObject);
begin
if SearchMode = smFilter then
@@ -2691,23 +2603,12 @@ begin end;
end;
-procedure THistoryFrm.edPassKeyPress(Sender: TObject; var Key: Char);
-begin
- // to prevent ** BLING ** when press Enter
- // to prevent ** BLING ** when press Tab
- // to prevent ** BLING ** when press Esc
- if ORD(Key) in [VK_RETURN, VK_TAB, VK_ESCAPE] then
- Key := #0;
-end;
-
procedure THistoryFrm.PostLoadHistory;
var
tPanel: THistoryPanels;
begin
LoadPosition;
- ProcessPassword;
- if not PasswordMode then
- ToggleMainMenu(GetDBBool(hppDBName, 'Accessability', False));
+ ToggleMainMenu(GetDBBool(hppDBName, 'Accessability', False));
// if hContact = 0 then paTop.Visible := False;
// set reversed here, after Allocate, because of some scrollbar
@@ -2765,19 +2666,6 @@ begin end;
-procedure THistoryFrm.ProcessPassword;
-begin
- if IsPasswordBlank(GetPassword) then
- Exit;
- if IsUserProtected(hContact) or IsUserProtected(hSubContact) then
- PasswordMode := True;
-end;
-
-procedure THistoryFrm.OpenPassword;
-begin
- RunPassForm;
-end;
-
procedure THistoryFrm.FormShow(Sender: TObject);
begin
// EndUpdate is better here, not in PostHistoryLoad, because it's faster
@@ -2827,20 +2715,6 @@ begin CustomizeToolbar;
end;
-procedure THistoryFrm.paPassHolderResize(Sender: TObject);
-begin
- if PasswordMode then
- begin
- paPassword.Left := (ClientWidth - paPassword.Width) div 2;
- paPassword.Top := (ClientHeight - paPassword.Height) div 2;
- end;
-end;
-
-procedure THistoryFrm.Passwordprotection1Click(Sender: TObject);
-begin
- OpenPassword;
-end;
-
procedure THistoryFrm.TranslateForm;
begin
Caption := TranslateUnicodeString(Caption);
@@ -2860,9 +2734,6 @@ begin sbClearFilter.Hint := TranslateUnicodeString(sbClearFilter.Hint);
- bnPass.Caption := TranslateUnicodeString(bnPass.Caption);
- laPass.Caption := TranslateUnicodeString(laPass.Caption);
- laPass2.Caption := TranslateUnicodeString(laPass2.Caption);
laSess.Caption := TranslateUnicodeString(laSess.Caption);
laBook.Caption := TranslateUnicodeString(laBook.Caption);
@@ -3127,12 +2998,6 @@ end; procedure THistoryFrm.hgKeyUp(Sender: TObject; var Key: Word; Shift: TShiftState);
begin
- // this workaround was done because when we have password and
- // press enter, if password is ok, we a brought to the
- // history grid, and have VK_RETURN onkeyup event. So we have
- // this var to help us. And no, if move this code to OnKeyDown,
- // we will have problems with inline richedit not appearing
- // on enter
if not WasReturnPressed then
Exit;
WasReturnPressed := False;
@@ -3820,7 +3685,6 @@ end; procedure THistoryFrm.hgRTLEnabled(Sender: TObject; BiDiMode: TBiDiMode);
begin
- edPass.BiDiMode := BiDiMode;
edSearch.BiDiMode := BiDiMode;
// tvSess.BiDiMode := BiDiMode;
if Assigned(EventDetailForm) then
diff --git a/plugins/HistoryPlusPlus/PassCheckForm.dfm b/plugins/HistoryPlusPlus/PassCheckForm.dfm deleted file mode 100644 index 3db1ed206c..0000000000 --- a/plugins/HistoryPlusPlus/PassCheckForm.dfm +++ /dev/null @@ -1,100 +0,0 @@ -object fmPassCheck: TfmPassCheck
- Left = 398
- Top = 290
- ActiveControl = edPass
- BorderIcons = [biSystemMenu]
- BorderStyle = bsDialog
- Caption = 'Password Check'
- ClientHeight = 166
- ClientWidth = 280
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- KeyPreview = True
- OldCreateOrder = False
- Position = poScreenCenter
- OnClose = FormClose
- OnCreate = FormCreate
- OnDestroy = FormDestroy
- OnKeyDown = FormKeyDown
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 10
- Top = 92
- Width = 49
- Height = 13
- Caption = 'Password:'
- end
- object Image1: TImage
- Left = 10
- Top = 10
- Width = 32
- Height = 29
- AutoSize = True
- Transparent = True
- end
- object Label2: TLabel
- Left = 50
- Top = 10
- Width = 220
- Height = 31
- AutoSize = False
- Caption = 'Enter password'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- WordWrap = True
- end
- object Label3: TLabel
- Left = 10
- Top = 46
- Width = 260
- Height = 37
- AutoSize = False
- Caption = 'To access Password Protection options you need to enter password'
- WordWrap = True
- end
- object Bevel1: TBevel
- Left = 10
- Top = 124
- Width = 260
- Height = 2
- end
- object edPass: TEdit
- Left = 77
- Top = 88
- Width = 193
- Height = 21
- MaxLength = 100
- TabOrder = 0
- PasswordChar = '*'
- OnKeyPress = edPassKeyPress
- end
- object bnOK: TButton
- Left = 118
- Top = 134
- Width = 75
- Height = 25
- Caption = 'OK'
- Default = True
- TabOrder = 1
- OnClick = bnOKClick
- end
- object bnCancel: TButton
- Left = 196
- Top = 134
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'Cancel'
- TabOrder = 2
- OnClick = bnCancelClick
- end
-end
diff --git a/plugins/HistoryPlusPlus/PassCheckForm.pas b/plugins/HistoryPlusPlus/PassCheckForm.pas deleted file mode 100644 index 8b9dd8b55c..0000000000 --- a/plugins/HistoryPlusPlus/PassCheckForm.pas +++ /dev/null @@ -1,148 +0,0 @@ -(*
- History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright (C) 2006-2009 theMIROn, 2003-2006 Art Fedorov.
- History+ parts (C) 2001 Christian Kastner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*)
-
-unit PassCheckForm;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls, {Checksum, HistoryControls, }m_api;
-
-type
- TfmPassCheck = class(TForm)
- Label1: TLabel;
- edPass: TEdit;
- bnOK: TButton;
- bnCancel: TButton;
- Image1: TImage;
- Label2: TLabel;
- Label3: TLabel;
- Bevel1: TBevel;
- procedure FormDestroy(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure bnOKClick(Sender: TObject);
- procedure bnCancelClick(Sender: TObject);
- procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
- procedure edPassKeyPress(Sender: TObject; var Key: Char);
- procedure FormCreate(Sender: TObject);
- private
- procedure TranslateForm;
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- fmPassCheck: TfmPassCheck;
-
-implementation
-
-uses hpp_options, hpp_services, hpp_forms, hpp_global, PassForm;
-
-{$R *.DFM}
-
-procedure TfmPassCheck.FormDestroy(Sender: TObject);
-begin
- try
- PassCheckFm := nil;
- except
- end;
-end;
-
-procedure TfmPassCheck.FormClose(Sender: TObject; var Action: TCloseAction);
-begin
- Action := caFree;
-end;
-
-procedure TfmPassCheck.bnOKClick(Sender: TObject);
-begin
- if CheckPassword(AnsiString(edPass.Text)) then
- begin
- if not Assigned(PassFm) then
- begin
- PassFm := TfmPass.Create(nil);
- end;
- PassFm.Show;
- Close;
- end
- else
- begin
- { DONE: sHure }
- HppMessageBox(Handle, TranslateW('You have entered the wrong password.'),
- TranslateW('History++ Password Protection'), MB_OK or MB_DEFBUTTON1 or MB_ICONSTOP);
- end;
-end;
-
-procedure TfmPassCheck.bnCancelClick(Sender: TObject);
-begin
- Close;
-end;
-
-procedure TfmPassCheck.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
-var
- Mask: Integer;
-begin
- with Sender as TWinControl do
- begin
- if Perform(CM_CHILDKEY, Key, LPARAM(Sender)) <> 0 then
- Exit;
- Mask := 0;
- case Key of
- VK_TAB:
- Mask := DLGC_WANTTAB;
- VK_RETURN, VK_EXECUTE, VK_ESCAPE, VK_CANCEL:
- Mask := DLGC_WANTALLKEYS;
- end;
- if (Mask <> 0) and (Perform(CM_WANTSPECIALKEY, Key, 0) = 0) and
- (Perform(WM_GETDLGCODE, 0, 0) and Mask = 0) and (Self.Perform(CM_DIALOGKEY, Key, 0) <> 0)
- then
- Exit;
- end;
-end;
-
-procedure TfmPassCheck.edPassKeyPress(Sender: TObject; var Key: Char);
-begin
- if (Key = Chr(VK_RETURN)) or
- (Key = Chr(VK_TAB)) or
- (Key = Chr(VK_ESCAPE)) then
- Key := #0;
-end;
-
-procedure TfmPassCheck.TranslateForm;
-begin
- Caption := TranslateUnicodeString(Caption);
- Label3.Caption := TranslateUnicodeString(Label3.Caption);
- Label2.Caption := TranslateUnicodeString(Label2.Caption);
- Label1.Caption := TranslateUnicodeString(Label1.Caption);
- bnOK.Caption := TranslateUnicodeString(bnOK.Caption);
- bnCancel.Caption := TranslateUnicodeString(bnCancel.Caption);
-end;
-
-procedure TfmPassCheck.FormCreate(Sender: TObject);
-begin
- DesktopFont := True;
- MakeFontsParent(Self);
- TranslateForm;
- Image1.Picture.Icon.Handle := CopyIcon(hppIntIcons[0].handle);
-end;
-
-end.
diff --git a/plugins/HistoryPlusPlus/PassForm.dfm b/plugins/HistoryPlusPlus/PassForm.dfm deleted file mode 100644 index ced13628fe..0000000000 --- a/plugins/HistoryPlusPlus/PassForm.dfm +++ /dev/null @@ -1,136 +0,0 @@ -object fmPass: TfmPass
- Left = 359
- Top = 180
- BorderIcons = [biSystemMenu]
- BorderStyle = bsDialog
- Caption = 'History++ Password Protection'
- ClientHeight = 329
- ClientWidth = 300
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- KeyPreview = True
- OldCreateOrder = False
- Position = poScreenCenter
- OnClose = FormClose
- OnCreate = FormCreate
- OnDestroy = FormDestroy
- OnKeyDown = FormKeyDown
- PixelsPerInch = 96
- TextHeight = 13
- object Image1: TImage
- Left = 10
- Top = 10
- Width = 32
- Height = 29
- AutoSize = True
- Transparent = True
- end
- object laPassState: TLabel
- Left = 106
- Top = 254
- Width = 174
- Height = 25
- AutoSize = False
- Caption = '-'
- Layout = tlCenter
- WordWrap = True
- end
- object Bevel1: TBevel
- Left = 10
- Top = 291
- Width = 280
- Height = 2
- end
- object Label1: TLabel
- Left = 50
- Top = 10
- Width = 102
- Height = 13
- Caption = 'Password Options'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object rbProtAll: TRadioButton
- Left = 10
- Top = 53
- Width = 280
- Height = 17
- Caption = 'Protect all contacts'
- Checked = True
- TabOrder = 0
- TabStop = True
- OnClick = rbProtSelClick
- end
- object rbProtSel: TRadioButton
- Left = 10
- Top = 73
- Width = 280
- Height = 17
- Caption = 'Protect only selected contacts'
- TabOrder = 1
- TabStop = True
- OnClick = rbProtSelClick
- end
- object lvCList: TListView
- Left = 10
- Top = 93
- Width = 280
- Height = 150
- Checkboxes = True
- Columns = <
- item
- Width = 276
- end>
- ReadOnly = True
- RowSelect = True
- PopupMenu = PopupMenu1
- ShowColumnHeaders = False
- SortType = stText
- TabOrder = 2
- ViewStyle = vsReport
- end
- object bnPass: TButton
- Left = 10
- Top = 254
- Width = 89
- Height = 25
- Caption = 'Password...'
- TabOrder = 3
- OnClick = bnPassClick
- end
- object bnCancel: TButton
- Left = 215
- Top = 299
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'Cancel'
- TabOrder = 5
- OnClick = bnCancelClick
- end
- object bnOK: TButton
- Left = 135
- Top = 299
- Width = 75
- Height = 25
- Caption = 'OK'
- TabOrder = 4
- OnClick = bnOKClick
- end
- object PopupMenu1: TPopupMenu
- Left = 186
- Top = 144
- object Refresh1: TMenuItem
- Caption = '&Refresh List'
- OnClick = Refresh1Click
- end
- end
-end
diff --git a/plugins/HistoryPlusPlus/PassForm.pas b/plugins/HistoryPlusPlus/PassForm.pas deleted file mode 100644 index 6b923b3b68..0000000000 --- a/plugins/HistoryPlusPlus/PassForm.pas +++ /dev/null @@ -1,354 +0,0 @@ -(*
- History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright (C) 2006-2009 theMIROn, 2003-2006 Art Fedorov.
- History+ parts (C) 2001 Christian Kastner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*)
-
-unit PassForm;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- ComCtrls, Menus, ExtCtrls, StdCtrls,
- m_api;
-
-type
- TfmPass = class(TForm)
- Image1: TImage;
- rbProtAll: TRadioButton;
- rbProtSel: TRadioButton;
- lvCList: TListView;
- bnPass: TButton;
- laPassState: TLabel;
- Bevel1: TBevel;
- bnCancel: TButton;
- bnOK: TButton;
- PopupMenu1: TPopupMenu;
- Refresh1: TMenuItem;
- Label1: TLabel;
- procedure bnCancelClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- procedure rbProtSelClick(Sender: TObject);
- procedure bnPassClick(Sender: TObject);
- procedure bnOKClick(Sender: TObject);
- procedure Refresh1Click(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
- procedure FormDestroy(Sender: TObject);
- procedure FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
- private
- PassMode: Byte;
- Password: AnsiString;
- FLastContact: THandle;
- procedure FillList;
- procedure UpdatePassword;
- procedure SetlastContact(const Value: THandle);
- procedure TranslateForm;
- public
- property LastContact: THandle read FLastContact write SetLastContact;
- { Public declarations }
- end;
-
-var
- fmPass: TfmPass;
-
-const
- PASSMODE_PROTNONE = 0; // no protection, not used
- PASSMODE_PROTALL = 1; // protect all contacts
- PASSMODE_PROTSEL = 2; // protect ONLY selected contacts
- PASSMODE_PROTNOTSEL = 3; // protect ALL, except selected contacts (not used)
-
-function ReadPassModeFromDB: Byte;
-function GetPassMode: Byte;
-function GetPassword: AnsiString;
-function IsPasswordBlank(const Password: AnsiString): Boolean;
-function IsUserProtected(hContact: THandle): Boolean;
-function CheckPassword(const Pass: AnsiString): Boolean;
-
-procedure RunPassForm;
-
-implementation
-
-uses
- PassNewForm, hpp_options, hpp_services, PassCheckForm,
- Checksum, hpp_global, hpp_contacts, hpp_database, hpp_forms;
-
-{$R *.DFM}
-
-procedure RunPassForm;
-begin
- if Assigned(PassFm) then
- begin
- PassFm.Show;
- exit;
- end;
- if Assigned(PassCheckFm) then
- begin
- PassCheckFm.Show;
- exit;
- end;
- if IsPasswordBlank(GetPassword) then
- begin
- if not Assigned(PassFm) then
- begin
- PassFm := TfmPass.Create(nil);
- end;
- PassFm.Show;
- end
- else
- begin
- PassCheckFm := TfmPassCheck.Create(nil);
- PassCheckFm.Show;
- end;
-end;
-
-function CheckPassword(const Pass: AnsiString): Boolean;
-begin
- Result := (DigToBase(HashString(Pass)) = GetPassword);
-end;
-
-function IsUserProtected(hContact: THandle): Boolean;
-begin
- Result := False;
- case GetPassMode of
- PASSMODE_PROTNONE: Result := False;
- PASSMODE_PROTALL: Result := True;
- PASSMODE_PROTSEL: Result := (DBGetContactSettingByte(hContact, hppDBName, 'PasswordProtect', 0) = 1);
- PASSMODE_PROTNOTSEL: Result := (DBGetContactSettingByte(hContact, hppDBName, 'PasswordProtect', 1) = 1);
- end;
- if IsPasswordBlank(GetPassword) then;
-end;
-
-function IsPasswordBlank(const Password: AnsiString): Boolean;
-begin
- Result := (Password = DigToBase(HashString('')));
-end;
-
-function GetPassword: AnsiString;
-begin
- Result := GetDBStr(hppDBName,'Password',DigToBase(HashString('')));
-end;
-
-function ReadPassModeFromDB: Byte;
-begin
- Result := GetDBByte(hppDBName,'PasswordMode',PASSMODE_PROTALL);
-end;
-
-function GetPassMode: Byte;
-begin
- Result := ReadPassModeFromDB;
- if IsPasswordBlank(GetPassword) then
- Result := PASSMODE_PROTNONE;
-end;
-
-procedure TfmPass.bnCancelClick(Sender: TObject);
-begin
- close;
-end;
-
-procedure AddContact(var lvCList:TListView; Contact: THandle);
-var
- li: TListItem;
- Capt: String;
-begin
- li := lvCList.Items.Add;
- if Contact = 0 then
- begin
- Capt := TranslateW('System History') + ' (' + GetContactDisplayName(Contact, 'ICQ') + ')';
- end
- else
- Capt := GetContactDisplayName(Contact);
- li.Caption := Capt;
- li.Data := Pointer(Contact);
- li.Checked := DBGetContactSettingByte(Contact, hppDBName, 'PasswordProtect', 0) = 1;
-end;
-
-procedure TfmPass.FillList;
-var
- hCont: THandle;
-begin
- lvCList.Items.BeginUpdate;
- try
- lvCList.Items.Clear;
- hCont := db_find_first();
- while hCont <> 0 do
- begin
- AddContact(lvCList,hCont);
- hCont := db_find_next(hCont);
- end;
- AddContact(lvCList,0);
- lvCList.SortType := stNone;
- lvCList.SortType := stText;
- finally
- lvCList.Items.EndUpdate;
- end;
-end;
-
-procedure TfmPass.FormCreate(Sender: TObject);
-begin
- DesktopFont := True;
- MakeFontsParent(Self);
- TranslateForm;
- FillList;
- PassMode := ReadPassModeFromDB;
- if not(PassMode in [PASSMODE_PROTALL, PASSMODE_PROTSEL]) then
- PassMode := PASSMODE_PROTALL;
- Password := GetPassword;
-
- if PassMode = PASSMODE_PROTSEL then
- rbProtSel.Checked := True
- else
- rbProtAll.Checked := True;
- rbProtSelClick(Self);
- UpdatePassword;
- Image1.Picture.Icon.Handle := CopyIcon(hppIntIcons[0].Handle);
-end;
-
-procedure TfmPass.rbProtSelClick(Sender: TObject);
-begin
- if rbProtSel.Checked then
- PassMode := PASSMODE_PROTSEL
- else if rbProtAll.Checked then
- PassMode := PASSMODE_PROTALL;
-
- if rbProtSel.Checked then
- begin
- lvCList.Enabled := True;
- lvCList.Color := clWindow;
- end
- else
- begin
- lvCList.Enabled := False;
- lvCList.Color := clInactiveBorder;
- end;
-end;
-
-procedure TfmPass.bnPassClick(Sender: TObject);
-begin
- with TfmPassNew.Create(Self) do
- begin
- if ShowModal = mrOK then
- begin
- Password := DigToBase(HashString(AnsiString(edPass.Text)));
- UpdatePassword;
- end;
- Free;
- end;
-end;
-
-procedure TfmPass.UpdatePassword;
-begin
- if Password = DigToBase(HashString('')) then
- begin
- // password not set
- laPassState.Font.Style := laPassState.Font.Style + [fsBold];
- laPassState.Caption := TranslateW('Password not set');
- end
- else
- begin
- // password set
- laPassState.ParentFont := True;
- laPassState.Caption := TranslateW('Password set');
- end;
-end;
-
-procedure TfmPass.bnOKClick(Sender: TObject);
-var
- i: Integer;
- li: TListItem;
-begin
- WriteDBByte(hppDBName,'PasswordMode',PassMode);
- WriteDBStr(hppDBName, 'Password', Password);
- if PassMode = PASSMODE_PROTSEL then
- begin
- for i := 0 to lvCList.Items.Count - 1 do
- begin
- li := lvCList.Items[i];
- if li.Checked then
- DBWriteContactSettingByte(THANDLE(li.Data), hppDBName, 'PasswordProtect', 1)
- else
- DBDeleteContactSetting(THANDLE(li.Data), hppDBName, 'PasswordProtect');
- end;
- end;
-
- close;
-end;
-
-procedure TfmPass.SetlastContact(const Value: THandle);
-begin
- FLastContact := Value;
-end;
-
-procedure TfmPass.Refresh1Click(Sender: TObject);
-begin
- FillList;
-end;
-
-procedure TfmPass.FormClose(Sender: TObject; var Action: TCloseAction);
-begin
- Action := caFree;
-end;
-
-procedure TfmPass.FormDestroy(Sender: TObject);
-begin
- try
- PassFm := nil;
- except
- end;
-end;
-
-procedure TfmPass.FormKeyDown(Sender: TObject; var Key: Word; Shift: TShiftState);
-var
- Mask: Integer;
-begin
- with Sender as TWinControl do
- begin
- if Perform(CM_CHILDKEY, Key, LPARAM(Sender)) <> 0 then
- Exit;
- Mask := 0;
- case Key of
- VK_TAB:
- Mask := DLGC_WANTTAB;
- VK_LEFT, VK_RIGHT, VK_UP, VK_DOWN:
- // added to change radio buttons from keyboard
- // however, we have to disable it when lvCList is focused
- if not lvCList.Focused then Mask := DLGC_WANTARROWS;
- VK_RETURN, VK_EXECUTE, VK_ESCAPE, VK_CANCEL:
- Mask := DLGC_WANTALLKEYS;
- end;
- if (Mask <> 0) and
- (Perform(CM_WANTSPECIALKEY, Key, 0) = 0) and
- (Perform(WM_GETDLGCODE, 0, 0) and Mask = 0) and
- (Perform(CM_DIALOGKEY, Key, 0) <> 0) then
- exit;
- end;
-end;
-
-procedure TfmPass.TranslateForm;
-begin
- Caption := TranslateUnicodeString(Caption);
- Label1.Caption := TranslateUnicodeString(Label1.Caption);
- rbProtAll.Caption := TranslateUnicodeString(rbProtAll.Caption);
- rbProtSel.Caption := TranslateUnicodeString(rbProtSel.Caption);
- bnPass.Caption := TranslateUnicodeString(bnPass.Caption);
- bnOK.Caption := TranslateUnicodeString(bnOK.Caption);
- bnCancel.Caption := TranslateUnicodeString(bnCancel.Caption);
- Refresh1.Caption := TranslateUnicodeString(Refresh1.Caption);
-end;
-
-end.
diff --git a/plugins/HistoryPlusPlus/PassNewForm.dfm b/plugins/HistoryPlusPlus/PassNewForm.dfm deleted file mode 100644 index c835d57271..0000000000 --- a/plugins/HistoryPlusPlus/PassNewForm.dfm +++ /dev/null @@ -1,120 +0,0 @@ -object fmPassNew: TfmPassNew
- Left = 460
- Top = 222
- ActiveControl = edPass
- BorderIcons = [biSystemMenu]
- BorderStyle = bsDialog
- Caption = 'New Password'
- ClientHeight = 203
- ClientWidth = 320
- Color = clBtnFace
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = []
- OldCreateOrder = False
- Position = poMainFormCenter
- OnCreate = FormCreate
- PixelsPerInch = 96
- TextHeight = 13
- object Label1: TLabel
- Left = 52
- Top = 10
- Width = 243
- Height = 31
- AutoSize = False
- Caption = 'Enter new password'
- Font.Charset = DEFAULT_CHARSET
- Font.Color = clWindowText
- Font.Height = -11
- Font.Name = 'MS Sans Serif'
- Font.Style = [fsBold]
- ParentFont = False
- end
- object Label2: TLabel
- Left = 10
- Top = 88
- Width = 49
- Height = 13
- Caption = 'Password:'
- end
- object Label3: TLabel
- Left = 10
- Top = 113
- Width = 38
- Height = 13
- Caption = 'Confirm:'
- end
- object Label4: TLabel
- Left = 10
- Top = 139
- Width = 297
- Height = 18
- AutoSize = False
- Caption = 'Leave this fields blank to disable password'
- WordWrap = True
- end
- object Image1: TImage
- Left = 10
- Top = 10
- Width = 32
- Height = 29
- AutoSize = True
- Transparent = True
- end
- object Label5: TLabel
- Left = 10
- Top = 50
- Width = 295
- Height = 27
- AutoSize = False
- Caption = 'Pay attention to CAPS LOCK button state'
- WordWrap = True
- end
- object Bevel1: TBevel
- Left = 10
- Top = 162
- Width = 300
- Height = 2
- end
- object edPass: TEdit
- Left = 72
- Top = 84
- Width = 234
- Height = 21
- MaxLength = 100
- PasswordChar = '*'
- TabOrder = 0
- end
- object edConf: TEdit
- Left = 72
- Top = 109
- Width = 234
- Height = 21
- MaxLength = 100
- PasswordChar = '*'
- TabOrder = 1
- end
- object bnCancel: TButton
- Left = 235
- Top = 171
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'Cancel'
- TabOrder = 3
- OnClick = bnCancelClick
- end
- object bnOK: TButton
- Left = 156
- Top = 171
- Width = 75
- Height = 25
- Cancel = True
- Caption = 'OK'
- Default = True
- TabOrder = 2
- OnClick = bnOKClick
- end
-end
diff --git a/plugins/HistoryPlusPlus/PassNewForm.pas b/plugins/HistoryPlusPlus/PassNewForm.pas deleted file mode 100644 index 59cc801cfe..0000000000 --- a/plugins/HistoryPlusPlus/PassNewForm.pas +++ /dev/null @@ -1,99 +0,0 @@ -(*
- History++ plugin for Miranda IM: the free IM client for Microsoft* Windows*
-
- Copyright (C) 2006-2009 theMIROn, 2003-2006 Art Fedorov.
- History+ parts (C) 2001 Christian Kastner
-
- This program is free software; you can redistribute it and/or modify
- it under the terms of the GNU General Public License as published by
- the Free Software Foundation; either version 2 of the License, or
- (at your option) any later version.
-
- This program is distributed in the hope that it will be useful,
- but WITHOUT ANY WARRANTY; without even the implied warranty of
- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
- GNU General Public License for more details.
-
- You should have received a copy of the GNU General Public License
- along with this program; if not, write to the Free Software
- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-*)
-
-unit PassNewForm;
-
-interface
-
-uses
- Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms, Dialogs,
- StdCtrls, ExtCtrls, m_api{, HistoryControls};
-
-type
- TfmPassNew = class(TForm)
- Label1: TLabel;
- Label2: TLabel;
- edPass: TEdit;
- edConf: TEdit;
- Label3: TLabel;
- bnCancel: TButton;
- bnOK: TButton;
- Label4: TLabel;
- Image1: TImage;
- Label5: TLabel;
- Bevel1: TBevel;
- procedure bnCancelClick(Sender: TObject);
- procedure bnOKClick(Sender: TObject);
- procedure FormCreate(Sender: TObject);
- private
- procedure TranslateForm;
- { Private declarations }
- public
- { Public declarations }
- end;
-
-var
- fmPassNew: TfmPassNew;
-
-implementation
-
-uses
- {hpp_global, }hpp_forms, hpp_options;
-
-{$R *.DFM}
-
-procedure TfmPassNew.bnCancelClick(Sender: TObject);
-begin
- ModalResult := mrCancel;
-end;
-
-procedure TfmPassNew.bnOKClick(Sender: TObject);
-begin
- if edPass.Text <> edConf.Text then
- begin
- MessageBox(Handle, TranslateW('Password and Confirm fields should be similar'),
- TranslateW('Error'), MB_OK or MB_DEFBUTTON1 or MB_ICONEXCLAMATION);
- exit;
- end;
- ModalResult := mrOK;
-end;
-
-procedure TfmPassNew.TranslateForm;
-begin
- Caption := TranslateUnicodeString(Caption);
- Label1.Caption := TranslateUnicodeString(Label1.Caption);
- Label5.Caption := TranslateUnicodeString(Label5.Caption);
- Label2.Caption := TranslateUnicodeString(Label2.Caption);
- Label3.Caption := TranslateUnicodeString(Label3.Caption);
- Label4.Caption := TranslateUnicodeString(Label4.Caption);
- bnOK.Caption := TranslateUnicodeString(bnOK.Caption);
- bnCancel.Caption := TranslateUnicodeString(bnCancel.Caption);
-end;
-
-procedure TfmPassNew.FormCreate(Sender: TObject);
-begin
- TranslateForm;
- DesktopFont := True;
- MakeFontsParent(Self);
- Image1.Picture.Icon.Handle := CopyIcon(hppIntIcons[0].handle);
-end;
-
-end.
diff --git a/plugins/HistoryPlusPlus/historypp.dpr b/plugins/HistoryPlusPlus/historypp.dpr index cc08f42e79..58939fab73 100644 --- a/plugins/HistoryPlusPlus/historypp.dpr +++ b/plugins/HistoryPlusPlus/historypp.dpr @@ -48,9 +48,6 @@ uses HistoryForm in 'HistoryForm.pas' {HistoryFrm},
EventDetailForm in 'EventDetailForm.pas' {EventDetailsFrm},
EmptyHistoryForm in 'EmptyHistoryForm.pas' {EmptyHistoryFrm},
- PassForm in 'PassForm.pas' {fmPass},
- PassNewForm in 'PassNewForm.pas' {fmPassNew},
- PassCheckForm in 'PassCheckForm.pas' {fmPassCheck},
GlobalSearch in 'GlobalSearch.pas' {fmGlobalSearch},
hpp_searchthread in 'hpp_searchthread.pas',
hpp_bookmarks in 'hpp_bookmarks.pas',
@@ -247,7 +244,6 @@ begin LoadIcons;
LoadIcons2;
- LoadIntIcons;
// TopToolBar support
HookTTBLoaded := HookEvent(ME_TTB_MODULELOADED,OnTTBLoaded);
diff --git a/plugins/HistoryPlusPlus/historypp.dproj b/plugins/HistoryPlusPlus/historypp.dproj index 41a02928e5..4a4281c8b7 100644 --- a/plugins/HistoryPlusPlus/historypp.dproj +++ b/plugins/HistoryPlusPlus/historypp.dproj @@ -8,7 +8,7 @@ <AppType>Library</AppType>
<FrameworkType>VCL</FrameworkType>
<ProjectVersion>13.4</ProjectVersion>
- <Platform Condition="'$(Platform)'==''">Win64</Platform>
+ <Platform Condition="'$(Platform)'==''">Win32</Platform>
</PropertyGroup>
<PropertyGroup Condition="'$(Config)'=='Base' or '$(Base)'!=''">
<Base>true</Base>
@@ -144,15 +144,6 @@ <DCCReference Include="EmptyHistoryForm.pas">
<Form>EmptyHistoryFrm</Form>
</DCCReference>
- <DCCReference Include="PassForm.pas">
- <Form>fmPass</Form>
- </DCCReference>
- <DCCReference Include="PassNewForm.pas">
- <Form>fmPassNew</Form>
- </DCCReference>
- <DCCReference Include="PassCheckForm.pas">
- <Form>fmPassCheck</Form>
- </DCCReference>
<DCCReference Include="GlobalSearch.pas">
<Form>fmGlobalSearch</Form>
</DCCReference>
diff --git a/plugins/HistoryPlusPlus/hpp_externalgrid.pas b/plugins/HistoryPlusPlus/hpp_externalgrid.pas index 3b499b5769..c0ee6c38e5 100644 --- a/plugins/HistoryPlusPlus/hpp_externalgrid.pas +++ b/plugins/HistoryPlusPlus/hpp_externalgrid.pas @@ -955,7 +955,6 @@ begin oep.cbSize := SizeOf(oep);
oep.hContact := Items[Grid.Selected].hContact;
oep.hDBEvent := Items[Grid.Selected].hDBEvent;
- oep.pPassword := nil;
CallService(MS_HPP_OPENHISTORYEVENT, WParam(@oep), 0);
end;
diff --git a/plugins/HistoryPlusPlus/hpp_global.pas b/plugins/HistoryPlusPlus/hpp_global.pas index 31ad4b1508..b678f4d9bc 100644 --- a/plugins/HistoryPlusPlus/hpp_global.pas +++ b/plugins/HistoryPlusPlus/hpp_global.pas @@ -224,8 +224,7 @@ const HPP_ICON_BOOKMARK_OFF = 30;
HPP_ICON_SEARCHADVANCED = 31;
HPP_ICON_SEARCHRANGE = 32;
- HPP_ICON_SEARCHPROTECTED = 33;
-
+
HPP_ICON_EVENT_INCOMING = 34;
HPP_ICON_EVENT_OUTGOING = 35;
HPP_ICON_EVENT_SYSTEM = 36;
@@ -356,7 +355,7 @@ var HostStart, HostEnd: Integer;
HostStr, EncodedStr: String;
begin
- // [scheme://*][user:password@]host[:port][/path]
+ // [scheme://*][user:pass]host[:port][/path]
// [mailto:]userinfo@host
// \\host\path
Result := False;
diff --git a/plugins/HistoryPlusPlus/hpp_options.pas b/plugins/HistoryPlusPlus/hpp_options.pas index 67065c3475..350ddba32a 100644 --- a/plugins/HistoryPlusPlus/hpp_options.pas +++ b/plugins/HistoryPlusPlus/hpp_options.pas @@ -98,7 +98,7 @@ const DEFFORMAT_SELECTION = '%selmes%\n';
DEFFORMAT_DATETIME = 'c'; // ShortDateFormat + LongTimeFormat
- hppIconsDefs : array[0..33] of ThppIconsRec = (
+ hppIconsDefs : array[0..32] of ThppIconsRec = (
(name:'historypp_01'; desc:'Contact history'; group: nil; i:HPP_ICON_CONTACTHISTORY),
(name:'historypp_02'; desc:'History search'; group: nil; i:HPP_ICON_GLOBALSEARCH),
(name:'historypp_03'; desc:'Conversation divider'; group: 'Conversations'; i:HPP_ICON_SESS_DIVIDER),
@@ -131,8 +131,7 @@ const (name:'historypp_30'; desc:'Bookmark enabled'; group: nil; i:HPP_ICON_BOOKMARK_ON),
(name:'historypp_31'; desc:'Bookmark disabled'; group: nil; i:HPP_ICON_BOOKMARK_OFF),
(name:'historypp_32'; desc:'Advanced Search Options'; group: 'Toolbar'; i:HPP_ICON_SEARCHADVANCED),
- (name:'historypp_33'; desc:'Limit Search Range'; group: 'Toolbar'; i:HPP_ICON_SEARCHRANGE),
- (name:'historypp_34'; desc:'Search Protected Contacts'; group: 'Toolbar'; i:HPP_ICON_SEARCHPROTECTED)
+ (name:'historypp_33'; desc:'Limit Search Range'; group: 'Toolbar'; i:HPP_ICON_SEARCHRANGE)
);
hppFontItems: array[0..29] of ThppFontsRec = (
@@ -228,11 +227,6 @@ const );
var
- hppIntIcons: array[0..0] of ThppIntIconsRec = (
- (handle: 0; name:'z_password_protect')
- );
-
-var
GridOptions: TGridOptions;
SmileyAddEnabled: Boolean;
MathModuleEnabled: Boolean;
@@ -248,7 +242,6 @@ procedure LoadGridOptions; procedure SaveGridOptions;
procedure LoadIcons;
procedure LoadIcons2;
-procedure LoadIntIcons;
procedure OnShowIcons;
procedure OnTextFormatting(Value: Boolean);
procedure hppRegisterGridOptions;
@@ -356,14 +349,6 @@ begin end;
end;
-procedure LoadIntIcons;
-var
- i: Integer;
-begin
- for i := 0 to High(hppIntIcons) do
- hppIntIcons[i].handle := LoadIconA(hInstance,hppIntIcons[i].name);
-end;
-
procedure LoadIcons2;
var
i: integer;
@@ -701,15 +686,6 @@ begin end;
end;
-procedure LocalFreeIcons;
-var
- i: Integer;
-begin
- for i := 0 to High(hppIntIcons) do
- if hppIntIcons[i].handle <> 0 then
- DestroyIcon(hppIntIcons[i].handle);
-end;
-
initialization
GridOptions := TGridOptions.Create;
@@ -720,8 +696,6 @@ initialization finalization
- LocalFreeIcons;
-
Finalize(hppIcons);
Finalize(skinIcons);
diff --git a/plugins/HistoryPlusPlus/hpp_resource.rc b/plugins/HistoryPlusPlus/hpp_resource.rc index b18b6031c7..4a23d8be1b 100644 --- a/plugins/HistoryPlusPlus/hpp_resource.rc +++ b/plugins/HistoryPlusPlus/hpp_resource.rc @@ -1,2 +1 @@ -z_password_protect Icon res\password_protect.ico
CR_HAND Cursor res\cr_hand.cur
\ No newline at end of file diff --git a/plugins/HistoryPlusPlus/hpp_richedit.pas b/plugins/HistoryPlusPlus/hpp_richedit.pas index ed80232967..aef1add484 100644 --- a/plugins/HistoryPlusPlus/hpp_richedit.pas +++ b/plugins/HistoryPlusPlus/hpp_richedit.pas @@ -303,7 +303,6 @@ const tomTextFlowSW = $00000004;
tomTextFlowWN = $00000008;
tomTextFlowNE = $0000000C;
- tomUsePassword = $00000010;
tomNoIME = $00080000;
tomSelfIME = $00040000;
diff --git a/plugins/HistoryPlusPlus/hpp_searchthread.pas b/plugins/HistoryPlusPlus/hpp_searchthread.pas index d3bd22d361..88637c039b 100644 --- a/plugins/HistoryPlusPlus/hpp_searchthread.pas +++ b/plugins/HistoryPlusPlus/hpp_searchthread.pas @@ -159,8 +159,7 @@ function SearchTextAllWords(const MessageText: String; SearchWords: array of Str implementation
uses
- hpp_contacts, hpp_events, hpp_bookmarks, hpp_eventfilters,
- PassForm;
+ hpp_contacts, hpp_events, hpp_bookmarks, hpp_eventfilters;
function SearchTextExact(const MessageText: String; const SearchText: String): Boolean;
begin
@@ -256,11 +255,7 @@ begin while hCont <> 0 do
begin
Inc(AllContacts);
- // I hope I haven't messed this up by
- // if yes, also fix the same in CalcMaxProgress
- if SearchProtectedContacts or (not SearchProtectedContacts and (not IsUserProtected(hCont)))
- then
- AddContact(hCont);
+ AddContact(hCont);
hCont := db_find_next(hCont);
end;
@@ -277,11 +272,7 @@ begin hCont := db_find_first();
while hCont <> 0 do
begin
- // I hope I haven't messed this up by
- // if yes, also fix the same in Execute
- if SearchProtectedContacts or (not SearchProtectedContacts and (not IsUserProtected(hCont)))
- then
- MaxProgress := MaxProgress + GetItemsCount(hCont);
+ MaxProgress := MaxProgress + GetItemsCount(hCont);
hCont := db_find_next(hCont);
end;
// add sysem history
diff --git a/plugins/HistoryPlusPlus/hpp_services.pas b/plugins/HistoryPlusPlus/hpp_services.pas index 63234f2897..05821743bc 100644 --- a/plugins/HistoryPlusPlus/hpp_services.pas +++ b/plugins/HistoryPlusPlus/hpp_services.pas @@ -51,13 +51,11 @@ interface uses
Classes, Windows, Controls,
m_api,
- HistoryForm, PassForm, PassCheckForm;
+ HistoryForm;
var
hHppRichEditItemProcess: THandle;
HstWindowList: TList;
- PassFm: TfmPass;
- PassCheckFm: TfmPassCheck;
procedure hppRegisterServices;
procedure hppUnregisterServices;
@@ -183,7 +181,6 @@ end; // See m_historypp.inc for details
function HppOpenHistoryEvent(wParam { POpenEventParams } : WPARAM; lParam: LPARAM): uint_ptr; cdecl;
var
- wHistory: THistoryFrm;
hDbEvent: THandle;
item, sel: Integer;
oep: TOpenEventParams;
@@ -201,14 +198,9 @@ begin end;
if hDbEvent = oep.hDbEvent then
sel := item;
- wHistory := OpenContactHistory(oep.hContact, sel);
- if wHistory.PasswordMode then
- if (oep.pPassword <> nil) and CheckPassword(oep.pPassword) then
- wHistory.PasswordMode := False;
- Result := int_ptr(not wHistory.PasswordMode);
- end
- else
- Result := 0;
+ OpenContactHistory(oep.hContact, sel);
+ end;
+ Result := 0;
end;
// MS_HPP_EMPTYHISTORY service
diff --git a/plugins/HistoryPlusPlus/res/password_protect.ico b/plugins/HistoryPlusPlus/res/password_protect.ico Binary files differdeleted file mode 100644 index 04431c031e..0000000000 --- a/plugins/HistoryPlusPlus/res/password_protect.ico +++ /dev/null |