• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

ギコナビ


Commit MetaInfo

修訂156bf263201930bd9de562caddd3c7c767c26343 (tree)
時間2006-02-19 03:52:11
作者cvs2git <cvs2git>
Commitercvs2git

Log Message

This commit was manufactured by cvs2svn to create tag 'v1_52_0_645'.

Change Summary

差異

--- a/Editor.dfm
+++ b/Editor.dfm
@@ -1,6 +1,6 @@
11 object EditorForm: TEditorForm
2- Left = 328
3- Top = 257
2+ Left = 432
3+ Top = 258
44 Width = 640
55 Height = 449
66 HorzScrollBar.Visible = False
@@ -58,24 +58,14 @@ object EditorForm: TEditorForm
5858 Top = 30
5959 Width = 632
6060 Height = 354
61- ActivePage = RocalRuleTab
61+ ActivePage = EditorTab
6262 Align = alClient
6363 MultiLine = True
64- TabIndex = 4
64+ TabIndex = 0
6565 TabOrder = 0
6666 OnChange = EditorPageChange
6767 object EditorTab: TTabSheet
6868 Caption = #32232#38598
69- object BodyEdit: TMemo
70- Left = 0
71- Top = 60
72- Width = 624
73- Height = 267
74- Align = alClient
75- ScrollBars = ssBoth
76- TabOrder = 0
77- WordWrap = False
78- end
7969 object NameBasePanel: TPanel
8070 Left = 0
8171 Top = 29
@@ -83,7 +73,7 @@ object EditorForm: TEditorForm
8373 Height = 31
8474 Align = alTop
8575 BevelOuter = bvNone
86- TabOrder = 2
76+ TabOrder = 1
8777 object NameLabel: TLabel
8878 Left = 4
8979 Top = 8
@@ -144,7 +134,7 @@ object EditorForm: TEditorForm
144134 Height = 29
145135 Align = alTop
146136 BevelOuter = bvNone
147- TabOrder = 1
137+ TabOrder = 0
148138 object Label1: TLabel
149139 Left = 4
150140 Top = 8
@@ -161,6 +151,16 @@ object EditorForm: TEditorForm
161151 TabOrder = 0
162152 end
163153 end
154+ object BodyEdit: TMemo
155+ Left = 0
156+ Top = 60
157+ Width = 624
158+ Height = 267
159+ Align = alClient
160+ ScrollBars = ssBoth
161+ TabOrder = 2
162+ WordWrap = False
163+ end
164164 end
165165 object PreviewTab: TTabSheet
166166 Caption = #12503#12524#12499#12517#12540
@@ -343,6 +343,19 @@ object EditorForm: TEditorForm
343343 Action = BeLogInOutEAction
344344 Style = tbsCheck
345345 end
346+ object ToolButton8: TToolButton
347+ Left = 285
348+ Top = 0
349+ Width = 8
350+ Caption = 'ToolButton8'
351+ ImageIndex = 11
352+ Style = tbsSeparator
353+ end
354+ object ToolButton9: TToolButton
355+ Left = 293
356+ Top = 0
357+ Action = ShowInputAssistForm
358+ end
346359 end
347360 object MainMenu: TMainMenu
348361 Left = 8
@@ -469,7 +482,7 @@ object EditorForm: TEditorForm
469482 Left = 72
470483 Top = 124
471484 Bitmap = {
472- 494C01010B000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
485+ 494C01010C000E00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
473486 0000000000003600000028000000400000004000000001002000000000000040
474487 0000000000000000000000000000000000000000000000000000000000000000
475488 0000000000000000000000000000000000000000000000000000000000000000
@@ -989,11 +1002,11 @@ object EditorForm: TEditorForm
9891002 0000000000000000000000000000000000000000000000000000000000000000
9901003 0000000000000000000000000000000000000000000000000000000000000000
9911004 0000000000000000000000000000000000000000000000000000000000000000
992- 00000000000000000000000000000000F81FFFFFFFFF0000E007FDFFF81F0000
993- C003F17FF00F00008001E05FE00700008001C017C00300000000800580010000
994- 0000000180010000000000018001000000008001800100000000E00180010000
995- 0000F803800100008001FE07C00300008001FF8FE0070000C003FFFFF00F0000
996- E007FFFFF81F0000F81FFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFE00FFFFFFFF
1005+ 00000000000000000000000000000000F81FFFFFFFFFFFFFE007FDFFF81FF3F9
1006+ C003F17FF00FF9F38001E05FE007F9F38001C017C003F80300008005800184E7
1007+ 000000018001CCE7000000018001CE4F000080018001CE4F0000E0018001CE4F
1008+ 0000F8038001CF1F8001FE07C0038F1F8001FF8FE007FFFFC003FFFFF00F8FFF
1009+ E007FFFFF81F8FFFF81FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE00FFFFFFFF
9971010 FE00C000F000F000FE008000F000F000FE008000F000F0008000800000000000
9981011 8000800070000000800080017000000080008001700000008001800170000000
9991012 8003800170000000800780017FDF001F807F8001001F001F80FFC003001F001F
@@ -1001,14 +1014,13 @@ object EditorForm: TEditorForm
10011014 FFF3000FFFFFF0CFFF010007FFFFF08700000003FFFFF08700010003FFF7F887
10021015 0003003FC1F7FE8F0003003FC3FBFE3F00038FFFC7FBFF7F0003FC00CBFBFE3F
10031016 0003C400DCF7FEBF0003CC00FF0FFC9F0003D400FFFFFDDF0003F800FFFFFDDF
1004- FFFFFC00FFFFFDDFFFFFFC00FFFFFFFF00000000000000000000000000000000
1005- 000000000000}
1017+ FFFFFC00FFFFFDDFFFFFFC00FFFFFFFF}
10061018 end
10071019 object HotToobarImageList: TImageList
10081020 Left = 104
10091021 Top = 124
10101022 Bitmap = {
1011- 494C01010B000E00040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
1023+ 494C01010C000E00040010001000FFFFFFFFFF00FFFFFFFFFFFFFFFF424D3600
10121024 0000000000003600000028000000400000004000000001002000000000000040
10131025 0000000000000000000000000000000000000000000000000000000000000000
10141026 0000000000000000000000000000000000000000000000000000000000000000
@@ -1528,11 +1540,11 @@ object EditorForm: TEditorForm
15281540 0000000000000000000000000000000000000000000000000000000000000000
15291541 0000000000000000000000000000000000000000000000000000000000000000
15301542 0000000000000000000000000000000000000000000000000000000000000000
1531- 00000000000000000000000000000000F81FFFFFFFFF0000E007FDFFF81F0000
1532- C003F17FF00F00008001E05FE00700008001C017C00300000000000580010000
1533- 0000000180010000000000018001000000008001800100000000E00180010000
1534- 0000F803800100008001FE07C00300008001FF8FE0070000C003FFFFF00F0000
1535- E007FFFFF81F0000F81FFFFFFFFF0000FFFFFFFFFFFFFFFFFFFFFE00FFFFFFFF
1543+ 00000000000000000000000000000000F81FFFFFFFFFFFFFE007FDFFF81FF3F9
1544+ C003F17FF00FF9F38001E05FE007F9F38001C017C003F80300000005800184E7
1545+ 000000018001CCE7000000018001CE4F000080018001CE4F0000E0018001CE4F
1546+ 0000F8038001CF1F8001FE07C0038F1F8001FF8FE007FFFFC003FFFFF00F8FFF
1547+ E007FFFFF81F8FFFF81FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFE00FFFFFFFF
15361548 FE00C000F000F000FE008000F000F000FE008000F000F0008000800000000000
15371549 8000800070000000800080017000000080008001700000008001800170000000
15381550 8003800170000000800780017FDF001F807F8001001F001F80FFC003001F001F
@@ -1540,8 +1552,7 @@ object EditorForm: TEditorForm
15401552 FFF3000FFFFFF0CFFF010007FFFFF08700000003FFFFF08700010003FFE7F887
15411553 0003003FC1F3FE8F0003003FC3FBFE3F00038FFFC7FBFF7F0003FC00CBFBFE3F
15421554 0003C400DCF3FEBF0003CC00FF07FC9F0003D400FFFFFDDF0003F800FFFFFDDF
1543- FFFFFC00FFFFFDDFFFFFFC00FFFFFFFF00000000000000000000000000000000
1544- 000000000000}
1555+ FFFFFC00FFFFFDDFFFFFFC00FFFFFFFF}
15451556 end
15461557 object Indy: TIdHTTP
15471558 Intercept = IdLogDebug
@@ -1733,6 +1744,19 @@ object EditorForm: TEditorForm
17331744 OnExecute = UpdateSambaActionExecute
17341745 OnUpdate = UpdateSambaActionUpdate
17351746 end
1747+ object InputAssistAction: TAction
1748+ Tag = -1
1749+ Category = #32232#38598
1750+ Caption = #20837#21147#12450#12471#12473#12488
1751+ OnExecute = InputAssistActionExecute
1752+ end
1753+ object ShowInputAssistForm: TAction
1754+ Category = #32232#38598
1755+ Caption = #20837#21147#12450#12471#12473#12488#12501#12457#12540#12512#21628#12403#20986#12375
1756+ Hint = #20837#21147#12450#12471#12473#12488#12501#12457#12540#12512#12434#21628#12403#20986#12377
1757+ ImageIndex = 11
1758+ OnExecute = ShowInputAssistFormExecute
1759+ end
17361760 end
17371761 object IdLogDebug: TIdLogDebug
17381762 OnReceive = IdLogDebugReceive
@@ -1748,4 +1772,16 @@ object EditorForm: TEditorForm
17481772 Left = 233
17491773 Top = 123
17501774 end
1775+ object InputAssistPopupMenu: TPopupMenu
1776+ AutoHotkeys = maManual
1777+ AutoPopup = False
1778+ OwnerDraw = True
1779+ Left = 272
1780+ Top = 128
1781+ end
1782+ object ApplicationEvents1: TApplicationEvents
1783+ OnMessage = ApplicationEvents1Message
1784+ Left = 304
1785+ Top = 128
1786+ end
17511787 end
--- a/Editor.pas
+++ b/Editor.pas
@@ -17,7 +17,7 @@ uses
1717 IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
1818 IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
1919 IdLogBase, IdLogDebug, IdException, DateUtils, bmRegExp,
20- Gesture;
20+ Gesture, AppEvnts;
2121
2222 type
2323 // TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
@@ -44,7 +44,6 @@ type
4444 N02: TMenuItem;
4545 ToolBarImageList: TImageList;
4646 HotToobarImageList: TImageList;
47- BodyEdit: TMemo;
4847 NameBasePanel: TPanel;
4948 NameLabel: TLabel;
5049 MailLabel: TLabel;
@@ -127,6 +126,13 @@ type
127126 UpdateSambaAction: TAction;
128127 Samba241: TMenuItem;
129128 N7: TMenuItem;
129+ InputAssistAction: TAction;
130+ InputAssistPopupMenu: TPopupMenu;
131+ BodyEdit: TMemo;
132+ ApplicationEvents1: TApplicationEvents;
133+ ToolButton8: TToolButton;
134+ ToolButton9: TToolButton;
135+ ShowInputAssistForm: TAction;
130136
131137 procedure EditorPageChange(Sender: TObject);
132138 procedure FormCreate(Sender: TObject);
@@ -181,6 +187,10 @@ type
181187 procedure BeLogInOutEActionUpdate(Sender: TObject);
182188 procedure UpdateSambaActionUpdate(Sender: TObject);
183189 procedure UpdateSambaActionExecute(Sender: TObject);
190+ procedure InputAssistActionExecute(Sender: TObject);
191+ procedure ApplicationEvents1Message(var Msg: tagMSG;
192+ var Handled: Boolean);
193+ procedure ShowInputAssistFormExecute(Sender: TObject);
184194 private
185195 FThreadItem: TThreadItem;
186196 FBoard: TBoard;
@@ -195,6 +205,8 @@ type
195205 FHost: string;
196206 FNow: TDateTime;
197207 FGestures : TMouseGesture;
208+ FInputAssistKey: String; ///< “ü—̓AƒVƒXƒg‚̃L[
209+ FResistWords: TStringList; ///< “ü—̓AƒVƒXƒg‚ÌŽ«‘‚©‚ç‚ÌŒŸõŒ‹‰Ê
198210 procedure Preview;
199211 function RepHtml(s: string): string;
200212 function Check: Boolean;
@@ -244,21 +256,25 @@ type
244256 function LFusianaGet(s: String): Boolean;
245257 // Cookie‚̎擾
246258 procedure GetCookie(Rawtext: String; ABoard: TBoard);
259+ //! “ü—̓AƒVƒXƒg‚̃|ƒbƒvƒAƒbƒvƒƒjƒ…[‚̃NƒŠƒbƒNƒCƒxƒ“ƒg
260+ procedure InputAssistMenuClick(Sender: TObject);
261+ //! TMemo‚̃J[ƒ\ƒ‹ˆÊ’u‚É•¶Žš—ñ‘}“ü
262+ procedure InsertText(Memo: TMemo; Text: String);
247263 protected
248264 procedure CreateParams(var Params: TCreateParams); override;
249265 public
250- FBBSID: String;
266+ FBBSID: String;
251267 procedure SetFont;
252268 procedure SetThreadItem(Item: TThreadItem);
253269 procedure SetBoard(Item: TBoard);
254- property BBSID: string read FBBSID write FBBSID;
255-
270+ property BBSID: string read FBBSID write FBBSID;
256271 end;
257272
258273 implementation
259274
260275 uses
261- Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage;
276+ Giko, ItemDownload, MojuUtils, IdGlobal, GikoMessage, Imm,
277+ InputAssistDataModule, InputAssist;
262278 const
263279 CAPTION_NAME_NEW: string = 'ƒMƒRƒiƒr ƒXƒŒ—§‚ăGƒfƒBƒ^';
264280 CAPTION_NAME_RES: string = 'ƒMƒRƒiƒr ƒŒƒXƒGƒfƒBƒ^';
@@ -427,7 +443,8 @@ begin
427443 finally
428444 ini.Free;
429445 end;
430-
446+ // ƒL[Ý’è‚̓ǂݍž‚Ý
447+ GikoSys.LoadKeySetting(ActionList, GikoSys.GetEditorKeyFileName);
431448 // ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[‚̃Cƒ“ƒXƒg[ƒ‹
432449 if GikoSys.Setting.GestureEnabled then begin
433450 MouseGesture.UnHook;
@@ -930,33 +947,35 @@ begin
930947
931948 if ABoard = nil then Exit;
932949
933- if FileExists(ABoard.GetSETTINGTXTFileName) then begin
934- body := TStringList.Create;
935- try
936- body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
937- Remote := GetFusianaName(body, ABoard);
938- finally
939- body.Free;
940- end;
941- end;
942-
943- //Setting.txt‚ª‚È‚©‚Á‚½‚çŽæ“¾
944- //ŽI‚É•‰‰×‚ª‚©‚©‚è‚»‚¤‚Å•|‚¢EEE
945- if not FileExists(ABoard.GetSETTINGTXTFileName) then begin
946- //GetSETTINGTXTAction‚ðŒÄ‚яo‚·‚ÆIndy‚ª‰Šú‰»‚³‚ê‚é‚̂ŁA
950+ if FileExists(ABoard.GetSETTINGTXTFileName) then begin
951+ body := TStringList.Create;
952+ try
953+ body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
954+ Remote := GetFusianaName(body, ABoard);
955+ finally
956+ body.Free;
957+ end;
958+ end;
959+
960+ //Setting.txt‚ª‚È‚©‚Á‚½‚çŽæ“¾
961+ //ŽI‚É•‰‰×‚ª‚©‚©‚è‚»‚¤‚Å•|‚¢EEE
962+ if not FileExists(ABoard.GetSETTINGTXTFileName) then begin
963+ //GetSETTINGTXTAction‚ðŒÄ‚яo‚·‚ÆIndy‚ª‰Šú‰»‚³‚ê‚é‚̂ŁA
947964 //‚±‚±‚ÅCookie‚ð•Û‘¶‚µ‚È‚­‚Ä‚Í‚¢‚¯‚È‚¢
948965 tmpRawheader := Indy.Response.RawHeaders.Text;
949966 GetSETTINGTXTAction.Execute;
950967 body := TStringList.Create;
951968 try
952- body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
953- Remote := GetFusianaName(body, ABoard);
954- finally
955- body.Free;
956- end;
969+ if FileExists(ABoard.GetSETTINGTXTFileName) then begin
970+ body.LoadFromFile(ABoard.GetSETTINGTXTFileName);
971+ Remote := GetFusianaName(body, ABoard);
972+ end;
973+ finally
974+ body.Free;
975+ end;
957976 end;
958977
959- if Remote = 'fusianasan' then begin
978+ if Remote = 'fusianasan' then begin
960979 MsgResult := MsgBox(
961980 Handle,
962981 'ƒŠƒ‚[ƒgƒzƒXƒg‚ð•\Ž¦‚·‚é‹@”\‚ªŽg‚í‚ê‚Ä‚¢‚Ü‚·' + #13#10 +
@@ -971,8 +990,8 @@ begin
971990 EnableMenuItem(SysMenu, SC_CLOSE, MF_BYCOMMAND or MF_ENABLED);
972991 DrawMenuBar(Handle);
973992 Exit;
974- end;
975- end;
993+ end;
994+ end;
976995 end;
977996
978997 if ResultType = grtOK then begin
@@ -1214,7 +1233,7 @@ begin
12141233 ini.WriteInteger(sDate, 'Status', FStatusCode);
12151234 ini.WriteDateTime(sDate, 'Date', Now);
12161235 if FThreadItem = nil then begin
1217- ini.WriteString(sDate, 'Title', TitleEdit.Text);
1236+ ini.WriteString(sDate, 'Title', MojuUtils.Sanitize(TitleEdit.Text));
12181237 ini.WriteString(sDate, 'BBS', FBoard.BBSID);
12191238 ini.WriteInteger(sDate, 'NewThread', 1);
12201239 end else begin
@@ -1731,9 +1750,6 @@ var
17311750 settingBody: TStringList;
17321751 tmpBoard: TBoard;
17331752 begin
1734- if FWork then
1735- Exit;
1736- FWork := True;
17371753
17381754 InitIdHTTP(Indy);
17391755 if FThreadItem = nil then
@@ -1784,7 +1800,6 @@ begin
17841800 end;
17851801 ShowBoardInformation(tmpBoard, BoardInformationMemo);
17861802
1787- FWork := False;
17881803 end;
17891804
17901805 procedure TEditorForm.ShowBoardInformation(ABoard: TBoard; AMemo: TMemo);
@@ -2211,4 +2226,183 @@ begin
22112226 end;
22122227 end;
22132228
2229+procedure TEditorForm.InputAssistActionExecute(Sender: TObject);
2230+var
2231+ count, i : Integer;
2232+ item : TMenuItem;
2233+ point: TPoint;
2234+ Bitmap : TBitmap;
2235+ TextWidth, ItemWidth, tmpWidth: Integer;
2236+begin
2237+ if FInputAssistKey = '' then Exit;
2238+
2239+ InputAssistPopupMenu.Items.Clear;
2240+
2241+ if (FResistWords = nil) then begin
2242+ FResistWords := TStringList.Create;
2243+ end else begin
2244+ FResistWords.Clear;
2245+ end;
2246+
2247+ if (GetKeyState( VK_SHIFT ) < 0) then begin
2248+ // ƒVƒtƒg‚ª‰Ÿ‚³‚ê‚Ä‚¢‚ê‚΁AƒL[‚ÅŽn‚Ü‚éƒJƒeƒSƒŠ
2249+ count :=
2250+ InputAssistDM.GetStartWithCategoryResistWords(
2251+ FInputAssistKey, FResistWords);
2252+ end else begin
2253+ // ƒVƒtƒg‚ª–³‚¢‚̂ŁAƒL[‚ÅŽn‚Ü‚éƒL[
2254+ count :=
2255+ InputAssistDM.GetStartWithKeyResistWords(
2256+ FInputAssistKey, FResistWords);
2257+ end;
2258+ Bitmap := TBitmap.Create;
2259+ try
2260+ Bitmap.Canvas.Font.Assign(BodyEdit.Font);
2261+ // ƒ}[ƒWƒ“5px
2262+ TextWidth := Bitmap.Canvas.TextWidth(FInputAssistKey) + 5;
2263+ ItemWidth := 0;
2264+ for i := 0 to count - 1 do begin
2265+ item := TMenuItem.Create(nil);
2266+ item.Break := mbNone;
2267+ item.Caption := FResistWords[i];
2268+ item.Tag := i;
2269+ item.OnClick := InputAssistMenuClick;
2270+ InputAssistPopupMenu.Items.Add(item);
2271+
2272+ tmpWidth := Bitmap.Canvas.TextWidth(Item.Caption);
2273+ if (tmpWidth > ItemWidth) then begin
2274+ ItemWidth := tmpWidth;
2275+ end;
2276+ end;
2277+ finally
2278+ Bitmap.Free;
2279+ end;
2280+
2281+ if (count > 0) then begin
2282+ GetCaretpos(point);
2283+ point.X := point.X + Self.Left + (Self.Width - BodyEdit.Width) div 2;
2284+ point.Y := point.Y + Self.Top + (Self.Height - Self.ClientHeight);
2285+
2286+ if Screen.DesktopWidth >
2287+ (point.X + TextWidth + ItemWidth) then begin
2288+ InputAssistPopupMenu.Popup(
2289+ point.X + TextWidth,
2290+ point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
2291+ end else begin
2292+ InputAssistPopupMenu.Popup(
2293+ point.X - TextWidth - ItemWidth,
2294+ point.Y + EditorPage.Top + EditorPage.TabHeight + BodyEdit.Top);
2295+ end;
2296+ end;
2297+end;
2298+
2299+procedure TEditorForm.InputAssistMenuClick(Sender: TObject);
2300+var
2301+ text : String;
2302+ IMC: HIMC;
2303+begin
2304+ if not (Sender is TMenuItem) then Exit;
2305+
2306+ if (FResistWords <> nil) then begin
2307+ try
2308+ text :=
2309+ TResistWord(FResistWords.Objects[TMenuItem(Sender).Tag]).GetText;
2310+ except
2311+ text := '';
2312+ end;
2313+ IMC := ImmGetContext(BodyEdit.Handle); //ƒRƒ“ƒeƒLƒXƒgŽæ“¾
2314+ try
2315+ ImmNotifyIME(IMC, NI_COMPOSITIONSTR, CPS_CANCEL, 0);
2316+ finally
2317+ ImmReleaseContext(BodyEdit.Handle, IMC); //ƒRƒ“ƒeƒLƒXƒg‰ð•ú
2318+ end;
2319+
2320+ FResistWords.Clear;
2321+ FInputAssistKey := '';
2322+ end;
2323+ InsertText(BodyEdit, text);
2324+end;
2325+
2326+//! TMemo‚̃J[ƒ\ƒ‹ˆÊ’u‚É•¶Žš—ñ‘}“ü
2327+procedure TEditorForm.InsertText(Memo: TMemo; Text: String);
2328+var
2329+ line, sel, pos: Integer;
2330+ left, right : String;
2331+begin
2332+ Memo.Lines.BeginUpdate;
2333+ line := SendMessage(Memo.Handle,EM_LINEFROMCHAR,-1,0); //s
2334+ sel := Memo.SelStart;
2335+ pos := sel - SendMessage(Memo.Handle, EM_LINEINDEX, -1, 0); //Œ…
2336+ if (pos > 0) then begin
2337+ left := Copy(Memo.Lines[line], 0, pos);
2338+ end else begin
2339+ left := '';
2340+ end;
2341+ right := Copy(Memo.Lines[line], pos + 1, Length(Memo.Lines[line]));
2342+ Memo.Lines.Strings[line] := left + Text + right;
2343+ Memo.Lines.EndUpdate;
2344+ //@ƒLƒƒƒŒƒbƒg‚̈ʒu‚ðXV‚·‚é
2345+ Memo.SelStart := sel + Length(text);
2346+ // ƒLƒƒƒŒƒbƒg‚̈ʒu‚܂ŃXƒNƒ[ƒ‹
2347+ Memo.Perform(EM_SCROLLCARET, 0, 0);
2348+
2349+end;
2350+
2351+procedure TEditorForm.ApplicationEvents1Message(var Msg: tagMSG;
2352+ var Handled: Boolean);
2353+var
2354+ wmMsg: TWMKey;
2355+ IMC: HIMC;
2356+ Len: integer;
2357+ Str: string;
2358+begin
2359+ if (Self.Active) then begin
2360+ case Msg.message of
2361+ //ƒL[‰Ÿ‰º‚̂ݎ󂯎æ‚é
2362+ WM_KEYDOWN:
2363+ begin
2364+ // ƒ^ƒu‚ªh•ÒWh‚ÅCtrlƒL[‚ª‰Ÿ‚³‚ê‚Ä‚¢‚é‚Ì‚ðŠm”F‚·‚é
2365+ if (EditorPage.ActivePageIndex = 0)
2366+ and (GetKeyState( VK_CONTROL ) < 0) then begin
2367+ wmMsg.Msg := Msg.message;
2368+ wmMsg.CharCode := Word(Msg.wParam);
2369+ wmMsg.KeyData := Msg.lParam;
2370+ if (wmMsg.CharCode = 229) and (wmMsg.KeyData = 3735553) then begin
2371+ IMC := ImmGetContext(BodyEdit.Handle); //ƒRƒ“ƒeƒLƒXƒgŽæ“¾
2372+ Len := ImmGetCompositionString(IMC, GCS_COMPSTR, nil, 0); //‚Ü‚¸’·‚³‚ðŽæ“¾
2373+ if (Len > 0) then begin
2374+ SetLength(Str, Len + 1); //Buffer‚̃ƒ‚ƒŠ‚ðÝ’è
2375+ ImmGetCompositionString(IMC, GCS_COMPSTR, PChar(Str), Len + 1); //‚Ü‚¸’·‚³‚ðŽæ“¾
2376+ SetLength(Str, Len);
2377+ FInputAssistKey := Str;
2378+ InputAssistActionExecute(nil);
2379+ Handled := True;
2380+ end;
2381+ ImmReleaseContext(BodyEdit.Handle, IMC); //ƒRƒ“ƒeƒLƒXƒg‰ð•ú
2382+ end;
2383+ end;
2384+ end;
2385+ end;
2386+
2387+ end;
2388+end;
2389+
2390+procedure TEditorForm.ShowInputAssistFormExecute(Sender: TObject);
2391+var
2392+ form : TInputAssistForm;
2393+begin
2394+ form := TInputAssistForm.Create(nil);
2395+ try
2396+ if TopAction.Checked then begin // ƒXƒeƒCó‘Ԃɐݒè
2397+ SetWindowPos(form.Handle, HWND_TOPMOST, 0, 0, 0, 0, SWP_NOMOVE + SWP_NOSIZE);
2398+ end;
2399+ form.SetUpFromEditor;
2400+ if (form.ShowModal = mrOk) then begin
2401+ InsertText(BodyEdit, form.GetInsertText);
2402+ end;
2403+ finally
2404+ form.Release;
2405+ end;
2406+end;
2407+
22142408 end.
--- a/Favorite.pas
+++ b/Favorite.pas
@@ -410,12 +410,12 @@ begin
410410 board := BBSsFindBoardFromBBSID( Node.Attributes[ 'bbs' ] );
411411 if board <> nil then
412412 FavBoard := TFavoriteBoardItem.Create(
413- board.URL, Node.Attributes[ 'title' ], board );
413+ board.URL, MojuUtils.UnSanitize(Node.Attributes[ 'title' ]), board );
414414 end else begin
415415 FavBoard := TFavoriteBoardItem.Create(
416- Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
416+ Node.Attributes[ 'url' ], MojuUtils.UnSanitize(Node.Attributes[ 'title' ]), nil );
417417 end;
418- CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavBoard);
418+ CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, UnSanitize(Node.Attributes['title']), FavBoard);
419419 CurrentNode.ImageIndex := 15;
420420 CurrentNode.SelectedIndex := 15;
421421 end else if Node.Attributes['favtype'] = 'thread' then begin
@@ -433,17 +433,17 @@ begin
433433 board.BoardPlugIn,
434434 board,
435435 GikoSys.Get2chBoard2ThreadURL( board, ChangeFileExt( Node.Attributes[ 'thread' ], '' ) ) );
436- threadItem.Title := Node.Attributes[ 'title' ];
436+ threadItem.Title := UnSanitize(Node.Attributes[ 'title' ]);
437437 board.Add( threadItem );
438438 end;
439439 FavThread := TFavoriteThreadItem.Create(
440- threadItem.URL, Node.Attributes[ 'title' ], threadItem );
440+ threadItem.URL, UnSanitize(Node.Attributes[ 'title' ]), threadItem );
441441 threadItem.Free;
442442 end else begin
443443 FavThread := TFavoriteThreadItem.Create(
444- Node.Attributes[ 'url' ], Node.Attributes[ 'title' ], nil );
444+ Node.Attributes[ 'url' ], UnSanitize(Node.Attributes[ 'title' ]), nil );
445445 end;
446- CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, Node.Attributes['title'], FavThread);
446+ CurrentNode := FTreeView.Items.AddChildObjectFirst(ParentNode, UnSanitize(Node.Attributes['title']), FavThread);
447447 CurrentNode.ImageIndex := 16;
448448 CurrentNode.SelectedIndex := 16;
449449 end;
@@ -558,12 +558,12 @@ begin
558558 end else if TObject(data) is TFavoriteBoardItem then begin
559559 FavBoard := TFavoriteBoardItem(data);
560560 s := Format('<favitem type="2ch" favtype="board" url="%s" title="%s"/>',
561- [HtmlEncode( FavBoard.URL ), HtmlEncode(Node.Text)]);
561+ [HtmlEncode( FavBoard.URL ), HtmlEncode(MojuUtils.Sanitize(Node.Text))]);
562562 SaveList.Add(s);
563563 end else if TObject(data) is TFavoriteThreadItem then begin
564564 FavThread := TFavoriteThreadItem(data);
565565 s := Format('<favitem type="2ch" favtype="thread" url="%s" title="%s"/>',
566- [HtmlEncode( FavThread.URL ), HtmlEncode(Node.Text)]);
566+ [HtmlEncode( FavThread.URL ), HtmlEncode(MojuUtils.Sanitize(Node.Text))]);
567567 SaveList.Add(s);
568568 end;
569569 Node := Node.getNextSibling;
--- a/Giko.dfm
+++ b/Giko.dfm
@@ -1,6 +1,6 @@
11 object GikoForm: TGikoForm
2- Left = 363
3- Top = 92
2+ Left = 422
3+ Top = 68
44 HorzScrollBar.Visible = False
55 VertScrollBar.Visible = False
66 AutoScroll = False
@@ -7959,6 +7959,12 @@ object GikoForm: TGikoForm
79597959 object N43: TMenuItem
79607960 Caption = '-'
79617961 end
7962+ object N22: TMenuItem
7963+ Action = GikoDM.SetInputAssistAction
7964+ end
7965+ object N42: TMenuItem
7966+ Caption = '-'
7967+ end
79627968 object PlugInMenu: TMenuItem
79637969 Caption = #12503#12521#12464#12452#12531'(&P)'
79647970 end
--- a/Giko.pas
+++ b/Giko.pas
@@ -402,6 +402,8 @@ type
402402 N74: TMenuItem;
403403 WikiFAQ: TMenuItem;
404404 GikoApplicationEvents: TApplicationEvents;
405+ N22: TMenuItem;
406+ N42: TMenuItem;
405407 procedure FormCreate(Sender: TObject);
406408 procedure FormDestroy(Sender: TObject);
407409 procedure BrowserStatusTextChange(Sender: TObject;
@@ -541,6 +543,7 @@ type
541543 procedure GikoApplicationEventsException(Sender: TObject; E: Exception);
542544 procedure TreeViewMouseDown(Sender: TObject; Button: TMouseButton;
543545 Shift: TShiftState; X, Y: Integer);
546+ procedure GetResURLMenuClick(Sender: TObject);
544547 private
545548 { Private éŒ¾ }
546549 FEnabledCloseButton: Boolean;
@@ -588,7 +591,8 @@ type
588591 FIsHandledWheel : Boolean; ///< Šù‚Ɏ󂯎æ‚Á‚½ WM_MOUSEWHEEL ‚©‚Ç‚¤‚©
589592 DiffComp: Boolean; //Add by Genyakun ƒXƒŒ‚ªXV‚³‚ꂽ‚Æ‚«‚ÉTrue‚É‚È‚é
590593 FOrigenCaption: String; //‚¨‹C‚É“ü‚èƒcƒŠ[‚̃AƒCƒeƒ€•ÒWŽž‚̕ҏW‘O‚Ì•¶Žš—ñ
591- FPreviewBrowserRect: TRect; ///< ƒvƒŒƒrƒ…[‚Ì•\Ž¦ˆÊ’u‚ð‹L‰¯‚·‚é
594+ FPreviewBrowserRect: TRect; ///< ƒvƒŒƒrƒ…[‚Ì•\Ž¦ˆÊ’u‚ð‹L‰¯‚·‚é
595+ FActionListGroupIndexes: array of Integer; ///<GikoDMã‚̃AƒNƒVƒ‡ƒ“ƒŠƒXƒg‚ÌŠeƒAƒNƒVƒ‡ƒ“‚ɐݒ肳‚ꂽGroupIndex‚ð•Û‘¶‚·‚é”z—ñ
592596 procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
593597 procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
594598 procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
@@ -648,12 +652,16 @@ type
648652 function GetScreenCursor(): TCursor;
649653 //ƒJ[ƒ\ƒ‹‚ðÝ’è‚·‚é
650654 procedure SetScreenCursor(Cursor : TCursor);
651- //! ƒAƒNƒVƒ‡ƒ“‚̃`ƒFƒbƒNó‘Ԃ̏‰Šú‰»
652- procedure InitActionChecked();
653655 //! ƒ_ƒEƒ“ƒ[ƒhƒRƒ“ƒgƒ[ƒ‹ƒXƒŒƒbƒh‚̐¶¬
654656 procedure CreateControlThread();
655657 //! ƒuƒ‰ƒEƒU‚̐¶¬
656658 procedure CreateBrowsers(count: Integer);
659+ //! ActionList‚ÌGroupIndex‚Ì•Û‘¶
660+ procedure GetGroupIndex(ActionList: TActionList);
661+ //! ActionList‚ÌGroupIndex‚̐ݒè
662+ procedure SetGroupIndex(ActionList: TActionList);
663+ //! Žw’肳‚ꂽƒXƒŒƒbƒh‚ðŠJ‚­(ƒƒO‚ª–³‚¢‚Æ‚« or Žw’èJUMP‚Ü‚Å‘«‚è‚È‚¢‚Æ‚«‚ÍDL‚·‚é)
664+ procedure OpenThreadItem(Thread: TThreadItem; URL: String);
657665 protected
658666 procedure CreateParams(var Params: TCreateParams); override;
659667 procedure WndProc(var Message: TMessage); override;
@@ -783,6 +791,7 @@ type
783791 function WebBrowserClick(Sender: TObject): WordBool;
784792 //! ƒc[ƒ‹ƒo[‚ɃXƒŒiž‚݃Rƒ“ƒ{ƒ{ƒbƒNƒX‚ðÝ’è‚·‚é
785793 procedure SetSelectComboBox();
794+
786795 published
787796 property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
788797 end;
@@ -820,7 +829,8 @@ uses
820829 FavoriteArrange, AddressHistory, Preview, Gesture,
821830 About, Option, Round, Splash, Sort, ListSelect, Imm,
822831 NewBoard, MojuUtils, Clipbrd, GikoBayesian,Y_TextConverter,
823- HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage;
832+ HTMLCreate, ListViewUtils, GikoDataModule, GikoMessage,
833+ InputAssistDataModule;
824834
825835 const
826836 BLANK_HTML: string = 'about:blank';
@@ -869,12 +879,18 @@ begin
869879 Writeln(' I—¹Žž‚́AƒMƒRƒiƒrƒEƒBƒ“ƒhƒE‚ð•Â‚¶‚Ä‚­‚¾‚³‚¢');
870880 Writeln('============================================================');
871881 {$ENDIF}
882+//try
883+ Sort.SetSortDate(Now());
884+
872885 FTreeType := gttNone;
873886 // ‹N“®Žž‚É•Û‘¶‚³‚ê‚Ä‚µ‚Ü‚¤‘΍ô
874887 FStartUp := true;
875888 Application.HookMainWindow(Hook);
876889 FIsIgnoreResize := rtResizing;
877-
890+ //ActionList‚ÌGuoupIndex‚ð•Û‘¶‚µ‚āA0‚ɃNƒŠƒA‚·‚éB
891+ //(‹N“®Žž‚Ƀc[ƒ‹ƒ{ƒ^ƒ“‚ÌDownƒvƒƒpƒeƒB‚𔽉f‚³‚¹‚é“s‡ãGroupIndex‚͐ݒè‚Å‚«‚È‚¢)
892+ //‚±‚êˆÈŒãSet`‚ōĐݒ肷‚é‚܂ŁAAction‚ÌChecked‚ð‚¢‚¶‚é‚Æ‚«‚Í’ˆÓI
893+ GetGroupIndex(GikoDM.GikoFormActionList);
878894 FSearchDialog := nil;
879895 CreateBrowsers(BROWSER_COUNT);
880896
@@ -944,6 +960,49 @@ begin
944960 //ViewNoButton.Down := GikoSys.Setting.ListViewNo;
945961 GikoDM.ListNumberVisibleAction.Checked := GikoSys.Setting.ListViewNo;
946962
963+ //ƒ~ƒ…[ƒg‚̏ó‘Ô‚ðÝ’è
964+ GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
965+
966+ // ƒŒƒX•\Ž¦”͈Í
967+ FResRangeMenuSelect := GikoSys.ResRange;
968+ case GikoSys.ResRange of
969+ Ord( grrAll ):
970+ begin
971+ GikoDM.AllResAction.Execute;
972+ end;
973+ Ord( grrSelect ):
974+ begin
975+ SelectComboBox.Text := SelectComboBox.Items[ 1 ];
976+ GikoDM.SelectResAction.Checked := True;
977+ end;
978+ else
979+ case FResRangeMenuSelect of
980+ Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
981+ Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
982+ 100: GikoDM.OnlyAHundredResAction.Checked := True;
983+ end;
984+ end;
985+
986+ // ƒXƒŒƒbƒhˆê——•\Ž¦”͈Í
987+ case GikoSys.Setting.ThreadRange of
988+ gtrAll:
989+ begin
990+ GikoDM.AllItemAction.Checked := True;
991+ ViewType := gvtAll;
992+ end;
993+ gtrLog:
994+ begin
995+ GikoDM.LogItemAction.Checked := True;
996+ ViewType := gvtLog;
997+ end;
998+ gtrNew:
999+ begin
1000+ GikoDM.NewItemAction.Checked := True;
1001+ ViewType := gvtNew;
1002+ end;
1003+ end;
1004+
1005+
9471006 //ƒuƒ‰ƒEƒUƒ^ƒuƒtƒHƒ“ƒg
9481007 BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
9491008 BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
@@ -952,9 +1011,27 @@ begin
9521011 BrowserTab.Font.Style := [fsBold];
9531012 if GikoSys.Setting.BrowserTabFontItalic then
9541013 BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
1014+ BrowserTab.DoubleBuffered := True;
9551015 FDragWFirst := false;
9561016 SetContent(BrowserNullTab); //ƒuƒ‰ƒEƒU‚ð‹ó”’•\Ž¦
9571017
1018+ //ƒuƒ‰ƒEƒUƒ^ƒu
1019+ GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1020+
1021+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1022+ GikoDM.BrowserTabTopAction.Checked := True;
1023+ end else begin
1024+ GikoDM.BrowserTabBottomAction.Checked := True;
1025+ end;
1026+
1027+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1028+ GikoDM.BrowserTabTabStyleAction.Checked := True;
1029+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1030+ GikoDM.BrowserTabButtonStyleAction.Checked := True;
1031+ end else begin
1032+ GikoDM.BrowserTabFlatStyleAction.Checked := True;
1033+ end;
1034+
9581035 //ƒvƒƒOƒŒƒXƒo[‚̏‰Šú‰»
9591036 ProgressBar.Parent := StatusBar;
9601037 ProgressBar.Top := 2;
@@ -968,10 +1045,14 @@ begin
9681045
9691046 // ƒ{[ƒhƒtƒ@ƒCƒ‹—ñ‹“(ReadFavorite ‚æ‚èæ‚ɍs‚¤‚±‚Æ)
9701047 GikoSys.ListBoardFile;
971-
1048+ //@˜A‘±‹N“®Žž‚ɃXƒvƒ‰ƒbƒVƒ…ƒEƒBƒ“ƒhƒE‚̃ƒ‚ƒŠ‚ª•s’è‚É
1049+ try
9721050 // ƒXƒvƒ‰ƒbƒVƒ…ƒEƒBƒ“ƒhƒE‚̃vƒƒOƒŒƒXƒo[‚̐ݒè
973- SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
974-
1051+ if (SplashWindow <> nil) then begin
1052+ SplashWindow.ProgressBar.Max := Length(BBSs) * 20;
1053+ end;
1054+ except
1055+ end;
9751056 // ‚·‚ׂĂÌBBS‚ð“ǂݍž‚ñ‚Å‚¨‚­
9761057 for i := Length(BBSs) - 1 downto 0 do begin
9771058 if not BBSs[i].IsBoardFileRead then
@@ -982,6 +1063,7 @@ begin
9821063 SplashWindow.Update;
9831064 end;
9841065 end;
1066+
9851067 //„‰ñƒf[ƒ^“ǂݍž‚Ý
9861068 RoundList := TRoundList.Create;
9871069 RoundList.LoadRoundBoardFile;
@@ -1200,7 +1282,8 @@ begin
12001282 FavoriteAddToolButton.Caption := '’ljÁ...';
12011283 AntiIndivAbonMenuItem.Caption := 'ŒÂ•Ê‚ ‚ځ`‚ñ‰ðœ';
12021284
1203-
1285+ //“ü—̓AƒVƒXƒg‹@\‚̏‰Šú‰»
1286+ InputAssistDM.Init(GikoSys.GetInputAssistFileName);
12041287 end;
12051288
12061289 // CoolBar ‚̐ݒè‚ð•Ï”‚É•Û‘¶
@@ -1341,51 +1424,20 @@ begin
13411424 GikoDM.BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
13421425 GikoDM.BrowserNameBarVisibleActionExecute( nil );
13431426
1344- //ƒuƒ‰ƒEƒUƒ^ƒu
1345- GikoDM.BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
1346- GikoDM.BrowserTabVisibleActionExecute(nil);
1347-
1348- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
1349- GikoDM.BrowserTabTopAction.Checked := True;
1350- GikoDM.BrowserTabTopActionExecute(nil);
1351- end else begin
1352- GikoDM.BrowserTabBottomAction.Checked := True;
1353- GikoDM.BrowserTabBottomActionExecute(nil);
1354- end;
1355-
1356- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
1357- GikoDM.BrowserTabTabStyleAction.Checked := True;
1358- GikoDM.BrowserTabTabStyleActionExecute(nil);
1359- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
1360- GikoDM.BrowserTabButtonStyleAction.Checked := True;
1361- GikoDM.BrowserTabButtonStyleActionExecute(nil);
1362- end else begin
1363- GikoDM.BrowserTabFlatStyleAction.Checked := True;
1364- GikoDM.BrowserTabFlatStyleActionExecute(nil);
1365- end;
1366-
1367- // ListView ‚̃wƒbƒ_ƒhƒ‰ƒbƒO
1368-// ListView.FullDrag := True;
1369-
13701427 // CoolBar •œŒ³
13711428 LoadCoolBarSettings;
13721429
13731430 //d—v@‚±‚ꂪ‚È‚¢‚ƃc[ƒ‹ƒ{ƒ^ƒ“‚̍XV‚ª‚¨‚©‚µ‚­‚È‚é
13741431 // ResetBandInfo( ListCoolBar, ListToolBar );
13751432 FIsIgnoreResize := rtNone;
1376- //ƒc[ƒ‹ƒo[‚̍XV‚ðI‚¦‚½Œã‚É‚â‚ç‚È‚¢‚Æ‚¢‚¯‚È‚¢‚Ì‚©‚à
1377- //ƒAƒNƒVƒ‡ƒ“‚̃`ƒFƒbƒNó‘Ô‚ð‰Šú‰»
1378- InitActionChecked();
13791433
13801434 //FormCrete‚©‚çˆÚ“®B
13811435 if GikoSys.Setting.TabAutoLoadSave then begin
13821436 GikoDM.TabAutoLoadAction.Execute;
13831437 end;
1384- //‚É‚¿‚á‚ñŒêˆÄ“àƒTƒ|[ƒg‹@”\
1385- if GikoSys.Setting.GengoSupport then begin
1386- //—\’è’n
1387- //TestŒü‚¯
1388- end;
1438+
1439+ //ActionList‚ÌGroupIndex‚ðŒ³‚É–ß‚·
1440+ SetGroupIndex(GikoDM.GikoFormActionList);
13891441
13901442 FStartUp := false;
13911443 end;
@@ -1474,6 +1526,8 @@ begin
14741526 // CoolBar •Û‘¶
14751527 //if (GikoForm.WindowState <> wsMinimized) and (GikoForm.WindowState <> wsMaximized) then
14761528
1529+ //“ü—̓AƒVƒXƒg‹@\‚̐ݒè‚Ì•Û‘¶
1530+ InputAssistDM.SaveToFile(GikoSys.GetInputAssistFileName);
14771531
14781532 //‚¨‹C‚É“ü‚è•Û‘¶
14791533 try
@@ -2249,6 +2303,7 @@ begin
22492303 GikoSys.Setting.BoardSortIndex := 0;
22502304 GikoSys.Setting.BoardSortOrder := True;
22512305 end;
2306+ Sort.SetSortDate(Now());
22522307 SetActiveList(Item.Board);
22532308 end;
22542309 Item.Board.Modified := True;
@@ -2543,7 +2598,7 @@ var
25432598 BBSID: string;
25442599 FileName: string;
25452600 sTitle: string;
2546- doc: Variant;
2601+ doc: Variant;
25472602 s: string;
25482603 i: Integer;
25492604 idx: Integer;
@@ -2655,18 +2710,27 @@ begin
26552710 Thread.Repaint := false;
26562711
26572712 Thread.Browser.OnStatusTextChange := nil;
2658- doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
2659-
2660- //GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
2661- HTMLCreater.CreateHTML2(doc, ThreadItem, sTitle);
2713+ LockWindowUpdate(Thread.Browser.Handle);
2714+ HTMLCreater.CreateHTML2(
2715+ Idispatch( olevariant(Thread.Browser.ControlInterface).Document),
2716+ ThreadItem, sTitle);
2717+ while ( (Thread.Browser.Document as IHTMLDocument2).readyState <> 'complete' ) do begin
2718+ Application.ProcessMessages;
2719+ Sleep(1);
2720+ end;
26622721 Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
2663-
26642722 if ThreadItem = nil then begin
26652723 FActiveContent := nil;
26662724 BrowserTab.Repaint;
26672725 Exit;
26682726 end;
2669- PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
2727+ //PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
2728+ end else begin
2729+ // JUMP‚ðŽw’肳‚ê‚Ä‚¢‚½‚çJUMP‚·‚é
2730+ if (Thread.Movement <> '') then begin
2731+ Thread.Move(Thread.Movement);
2732+ Thread.Movement := '';
2733+ end;
26702734 end;
26712735 end;
26722736 if (Thread <> nil) and (ThreadItem <>nil) then begin
@@ -3037,7 +3101,7 @@ begin
30373101 // title ‚͍¡‚Ì‚Æ‚±‚ëŽg‚Á‚Ä‚¢‚È‚¢
30383102 saveList.Add(
30393103 '<history url="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).URL ) + '"' +
3040- ' title="' + HtmlEncode( TFavoriteThreadItem( FHistoryList[ i ] ).Title ) + '"/>');
3104+ ' title="' + HtmlEncode( MojuUtils.Sanitize(TFavoriteThreadItem( FHistoryList[ i ] ).Title )) + '"/>');
30413105 end;
30423106 saveList.Add('</address>');
30433107 saveList.SaveToFile( GikoSys.GetConfigDir + 'History.xml' );
@@ -3056,15 +3120,21 @@ var
30563120 HistoryNode : IXMLNode;
30573121 s : string;
30583122 favItem : TFavoriteThreadItem;
3123+{$IFDEF DEBUG}
3124+ st, rt : Cardinal;
3125+{$ENDIF}
30593126 begin
3127+{$IFDEF DEBUG}
3128+ st := GetTickCount;
3129+{$ENDIF}
30603130
30613131 fileName := GikoSys.GetConfigDir + 'History.xml';
30623132
30633133 if FileExists( fileName ) then begin
30643134 try
3065- XMLDoc := IXMLDocument.Create;
3135+ XMLDoc := IXMLDocument.Create;
30663136 //XMLDoc := LoadXMLDocument(FileName);
3067- LoadXMLDocument(FileName, XMLDoc);
3137+ LoadXMLDocument(FileName, XMLDoc);
30683138 try
30693139 XMLNode := XMLDoc.DocumentElement;
30703140
@@ -3077,9 +3147,9 @@ begin
30773147 s := Trim(HistoryNode.Attributes['url']);
30783148 if s <> '' then begin
30793149 favItem := TFavoriteThreadItem.Create(
3080- s, HistoryNode.Attributes[ 'title' ] );
3150+ s, MojuUtils.UnSanitize(HistoryNode.Attributes[ 'title' ]) );
30813151 if not AddHistory( favItem ) then
3082- favItem.Free;
3152+ favItem.Free;
30833153 end;
30843154 //end;
30853155 end;
@@ -3091,6 +3161,10 @@ begin
30913161 except
30923162 end;
30933163 end;
3164+{$IFDEF DEBUG}
3165+ rt := GetTickCount - st;
3166+ Writeln('Runtime(Load Histroy) : ' + IntToStr(rt) + ' ms');
3167+{$ENDIF}
30943168
30953169 end;
30963170
@@ -3338,7 +3412,6 @@ begin
33383412 end else begin
33393413 if Item <> FActiveList then begin
33403414 ActiveListColumnSave;
3341-
33423415 if (Item is TBBS) or (Item is TCategory) then begin
33433416 ListView.Columns.Clear;
33443417 SetActiveList( Item );
@@ -3352,6 +3425,7 @@ begin
33523425 Screen.Cursor := crDefault;
33533426 end;
33543427 end;
3428+ Sort.SetSortDate(Now());
33553429 SetActiveList( Item );
33563430 end;
33573431 end;
@@ -3560,7 +3634,6 @@ begin
35603634 FTabHintIndex := -1;
35613635 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
35623636 if TBrowserRecord(BrowserTab.Tabs.Objects[i]) = BrowserRecord then begin
3563- BrowserTab.Tabs.BeginUpdate;
35643637 try
35653638 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
35663639 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
@@ -3576,15 +3649,25 @@ begin
35763649 if j <> -1 then
35773650 FBrowsers.Move(j, BROWSER_COUNT - 1);
35783651 end;
3579- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
3580- BrowserTab.Tabs.Delete(i);
3581- if idx > i then begin
3582- BrowserTab.TabIndex := idx - 1;
3583- end else begin
3584- if BrowserTab.Tabs.Count -1 >= idx then
3585- BrowserTab.TabIndex := idx
3586- else
3587- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
3652+ BrowserTab.Tabs.BeginUpdate;
3653+ try
3654+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
3655+ if ( BrowserTab.Tabs.Count - 1 = i ) and
3656+ ( BrowserTab.TabRect(i).Left
3657+ <= BrowserTab.DisplayRect.Left ) then begin
3658+ BrowserTab.ScrollTabs(-1);
3659+ end;
3660+ BrowserTab.Tabs.Delete(i);
3661+ if idx > i then begin
3662+ BrowserTab.TabIndex := idx - 1;
3663+ end else begin
3664+ if BrowserTab.Tabs.Count -1 >= idx then
3665+ BrowserTab.TabIndex := idx
3666+ else
3667+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
3668+ end;
3669+ finally
3670+ BrowserTab.Tabs.EndUpdate;
35883671 end;
35893672 if BrowserTab.Tabs.Count = 0 then begin
35903673 BrowserNullTab.Thread := nil;
@@ -3604,7 +3687,6 @@ begin
36043687 TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Repaint := true;
36053688 FBrowsers.Move(BROWSER_COUNT - 1, 0);
36063689 end;
3607- BrowserTab.Tabs.EndUpdate;
36083690 if( FActiveContent = nil) then
36093691 BrowserTab.OnChange(nil);
36103692 Exit;
@@ -3620,7 +3702,6 @@ begin
36203702 FTabHintIndex := -1;
36213703 for i := 0 to BrowserTab.Tabs.Count - 1 do begin
36223704 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
3623- BrowserTab.Tabs.BeginUpdate;
36243705 try
36253706 if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser <> nil then begin
36263707 doc := TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser.Document;
@@ -3637,15 +3718,25 @@ begin
36373718 if j <> -1 then
36383719 FBrowsers.Move(j, BROWSER_COUNT - 1);
36393720 end;
3640- TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
3641- BrowserTab.Tabs.Delete(i);
3642- if idx > i then begin
3643- BrowserTab.TabIndex := idx - 1;
3644- end else begin
3645- if BrowserTab.Tabs.Count -1 >= idx then
3646- BrowserTab.TabIndex := idx
3647- else
3648- BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
3721+ BrowserTab.Tabs.BeginUpdate;
3722+ try
3723+ TBrowserRecord(BrowserTab.Tabs.Objects[i]).Free;
3724+ if ( BrowserTab.Tabs.Count - 1 = i ) and
3725+ ( BrowserTab.TabRect(i).Left
3726+ <= BrowserTab.DisplayRect.Left ) then begin
3727+ BrowserTab.ScrollTabs(-1);
3728+ end;
3729+ BrowserTab.Tabs.Delete(i);
3730+ if idx > i then begin
3731+ BrowserTab.TabIndex := idx - 1;
3732+ end else begin
3733+ if BrowserTab.Tabs.Count -1 >= idx then
3734+ BrowserTab.TabIndex := idx
3735+ else
3736+ BrowserTab.TabIndex := BrowserTab.Tabs.Count - 1;
3737+ end;
3738+ finally
3739+ BrowserTab.Tabs.EndUpdate;
36493740 end;
36503741 if(BrowserTab.TabIndex <> -1) and
36513742 ( TBrowserRecord(BrowserTab.Tabs.Objects[BrowserTab.TabIndex]).Browser = nil) then begin
@@ -3663,7 +3754,6 @@ begin
36633754 FBrowsers.Move(BROWSER_COUNT - 1, 0);
36643755 end;
36653756
3666- BrowserTab.Tabs.EndUpdate;
36673757 if( FActiveContent = nil) then
36683758 BrowserTab.OnChange(nil);
36693759 Exit;
@@ -3927,52 +4017,53 @@ var
39274017 i, j: Integer;
39284018 idx: Integer;
39294019 begin
4020+ BrowserTab.Tabs.BeginUpdate;
4021+ try
4022+ if not BrowserTab.Dragging then begin
4023+ FTabHintIndex := -1;
4024+ BrowserTab.Hint := '';
4025+ idx := BrowserTab.TabIndex;
4026+ if idx = -1 then begin
4027+ SetContent(BrowserNullTab);
4028+
4029+ end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
4030+ if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
4031+ j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
4032+ if j <> -1 then
4033+ FBrowsers.Move(j ,0);
4034+ end else begin
4035+ if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
4036+ (FActiveContent.Browser <> BrowserNullTab.Browser) and
4037+ (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
4038+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
39304039
3931- if not BrowserTab.Dragging then begin
3932- FTabHintIndex := -1;
3933- BrowserTab.Hint := '';
3934- idx := BrowserTab.TabIndex;
3935- if idx = -1 then begin
3936- SetContent(BrowserNullTab);
3937-
3938- end else if(BrowserTab.Tabs.Objects[idx] <> nil) and (BrowserTab.Tabs.Objects[idx] is TBrowserRecord) then begin
3939- if TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser <> nil then begin
3940- j := FBrowsers.IndexOf(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser);
3941- if j <> -1 then
3942- FBrowsers.Move(j ,0);
3943- end else begin
3944- if( FActiveContent <> nil ) and (FActiveContent.Browser <> nil) and
3945- (FActiveContent.Browser <> BrowserNullTab.Browser) and
3946- (FActiveContent.Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1])) then
3947- FBrowsers.Move(BROWSER_COUNT - 1, 0);
3948-
3949- for i := 0 to BrowserTab.Tabs.Count - 1 do begin
3950- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
3951- ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
3952- break;
4040+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
4041+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
4042+ ReleaseBrowser(TBrowserRecord(BrowserTab.Tabs.Objects[i]));
4043+ break;
4044+ end;
39534045 end;
4046+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
4047+ TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
4048+ FBrowsers.Move(BROWSER_COUNT - 1, 0);
39544049 end;
3955- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser := TWebBrowser(FBrowsers[BROWSER_COUNT - 1]);
3956- TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Repaint := true;
3957- FBrowsers.Move(BROWSER_COUNT - 1, 0);
3958- end;
3959- MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
3960- TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
3961- SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
3962-
3963- if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
3964- AddressComboBox.Text := GetActiveContent.URL;
4050+ MoveWindow(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser.Handle, 0, 0, BrowserPanel.Width, BrowserPanel.Height, false);
4051+ TOleControl(TBrowserRecord(BrowserTab.Tabs.Objects[idx]).Browser).BringToFront;
4052+ SetContent(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
39654053
3966- if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
3967- (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
3968- then
3969- else
3970- GikoDM.SetFocusForBrowserAction.Execute;
4054+ if (GikoSys.Setting.URLDisplay) and (GetActiveContent <> nil) then
4055+ AddressComboBox.Text := GetActiveContent.URL;
39714056
4057+ if ((TreeView.Visible) and (TreeView.Focused)) or ((FavoriteTreeView.Visible) and (FavoriteTreeView.Focused)) or
4058+ (ListView.Focused) or (SelectComboBox.Focused) or (AddressComboBox.Focused)
4059+ then
4060+ else
4061+ GikoDM.SetFocusForBrowserAction.Execute;
4062+ end;
39724063 end;
3973-
4064+ finally
4065+ BrowserTab.Tabs.EndUpdate;
39744066 end;
3975-
39764067 end;
39774068
39784069
@@ -4001,54 +4092,51 @@ end;
40014092
40024093 procedure TGikoForm.SetBrowserTabState;
40034094 var
4004-// i: Integer;
40054095 CoolBand: TCoolBand;
40064096 begin
40074097 BrowserBottomPanel.AutoSize := False;
40084098 if GikoSys.Setting.BrowserTabVisible then begin
4009- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
4010- BrowserTab.Style := tsTabs;
4011- if GikoSys.Setting.BrowserTabPosition = gtpTop then
4012- BrowserTab.TabPosition := tpTop
4013- else
4014- BrowserTab.TabPosition := tpBottom;
4015- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
4016- BrowserTab.TabPosition := tpTop;
4017- BrowserTab.Style := tsButtons;
4018- end else begin
4019- BrowserTab.TabPosition := tpTop;
4020- BrowserTab.Style := tsFlatButtons
4021- end;
4022-
4023- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
4024- BrowserTab.Parent := BrowserTabToolBar;
4025- BrowserBottomPanel.Hide;
4026- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
4027- if CoolBand <> nil then
4028- CoolBand.Visible := True;
4029-// BrowserTab.Parent := BrowserTopPanel;
4030-// BrowserTab.Parent := BrowserCoolBar;
4031-// BrowserTab.Top := 26;
4032-// BrowserTopPanel.Height := 44;
4099+ BrowserTab.Hide;
4100+ BrowserTab.Tabs.BeginUpdate;
4101+ try
4102+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
4103+ BrowserTab.Style := tsTabs;
4104+ if GikoSys.Setting.BrowserTabPosition = gtpTop then
4105+ BrowserTab.TabPosition := tpTop
4106+ else
4107+ BrowserTab.TabPosition := tpBottom;
4108+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
4109+ BrowserTab.TabPosition := tpTop;
4110+ BrowserTab.Style := tsButtons;
4111+ end else begin
4112+ BrowserTab.TabPosition := tpTop;
4113+ BrowserTab.Style := tsFlatButtons
4114+ end;
40334115
4034- end else begin
4035- BrowserTab.Parent := BrowserBottomPanel;
4036- BrowserTab.Top := 0;
4037- BrowserTab.Left := 0;
4038- BrowserBottomPanel.Show;
4039- CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
4040- if CoolBand <> nil then
4041- CoolBand.Visible := False;
4042-// BrowserTopPanel.Height := 26;
4043- end;
4044- BrowserTab.Show;
4116+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
4117+ BrowserTab.Parent := BrowserTabToolBar;
4118+ BrowserBottomPanel.Hide;
4119+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
4120+ if CoolBand <> nil then
4121+ CoolBand.Visible := True;
4122+ end else begin
4123+ BrowserTab.Parent := BrowserBottomPanel;
4124+ BrowserTab.Top := 0;
4125+ BrowserTab.Left := 0;
4126+ BrowserBottomPanel.Show;
4127+ CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
4128+ if CoolBand <> nil then
4129+ CoolBand.Visible := False;
4130+ end;
4131+ finally
4132+ BrowserTab.Tabs.EndUpdate;
4133+ BrowserTab.Show;
4134+ end;
40454135 end else begin
40464136 CoolBand := GetCoolBand(BrowserCoolBar, BrowserTabToolBar);
40474137 if CoolBand <> nil then
40484138 CoolBand.Visible := False;
40494139 BrowserBottomPanel.Visible := False;
4050-// BrowserTab.Visible := False;
4051-// BrowserTopPanel.Height := 26;
40524140 GikoDM.AllTabCloseAction.Execute;
40534141 end;
40544142 end;
@@ -4118,7 +4206,6 @@ var
41184206 doc : Variant;
41194207 threadItem : TThreadItem;
41204208 begin
4121-// AddMessageList('DocumentComplete', nil, gmiWhat);
41224209 if TObject(Sender) is TWebBrowser then begin
41234210 BrowserRecord := nil;
41244211 if TWebBrowser(Sender) <> Browser then begin
@@ -4150,7 +4237,7 @@ begin
41504237 FEvent := nil;
41514238 end;
41524239 end;
4153-
4240+
41544241 end;
41554242
41564243 if (BrowserRecord <> nil) and
@@ -4187,6 +4274,7 @@ begin
41874274 end;
41884275 end;
41894276 end;
4277+ LockWindowUpdate(0);
41904278 end;
41914279
41924280 procedure TGikoForm.RoundNamePopupMenuPopup(Sender: TObject);
@@ -4495,6 +4583,47 @@ begin
44954583 TopPanel.Height := Max(MainCoolBar.Height, AnimePanel.Height);
44964584
44974585 end;
4586+//! Žw’肳‚ꂽƒXƒŒƒbƒh‚ðŠJ‚­(ƒƒO‚ª–³‚¢‚Æ‚« or Žw’èJUMP‚Ü‚Å‘«‚è‚È‚¢‚Æ‚«‚ÍDL‚·‚é)
4587+procedure TGikoForm.OpenThreadItem(Thread: TThreadItem; URL: String);
4588+var
4589+ stRes, edRes : Int64;
4590+ browserRec : TBrowserRecord;
4591+ threadNumber : String;
4592+ doc : Variant;
4593+begin
4594+ stRes := 0;
4595+ edRes := 0;
4596+ // ƒ^ƒu‚𐶐¬
4597+ browserRec := InsertBrowserTab(Thread);
4598+ if (browserRec <> nil) then begin
4599+ // JUMP‚·‚ׂ«ƒŒƒX”ԍ†‚ª‚ ‚é‚©ƒ`ƒFƒbƒN‚·‚é
4600+ threadNumber := ChangeFileExt(Thread.FileName, '');
4601+ GikoSys.GetPopupResNumber( URL, stRes, edRes );
4602+ // ƒXƒŒ‚̔ԍ†‚ðƒŒƒX”Ô‚ÆŒë‚Á‚Ä”FŽ¯‚µ‚Ä‚¢‚é‚Ì‚ðƒNƒŠƒA
4603+ if (StrToInt(threadNumber) = stRes) then begin
4604+ if not (AnsiEndsText(threadNumber + '/' + threadNumber, URL))
4605+ and (Pos('&st=' + threadNumber , URL) = 0) then begin
4606+ stRes := 0;
4607+ end;
4608+ end;
4609+ if ( stRes > 0 ) then begin
4610+ browserRec.Movement := IntToStr( stRes );
4611+ end;
4612+ // ƒƒO‚ðŽ‚Á‚Ä‚¢‚È‚¢‚© JUMP‚·‚ׂ«ƒŒƒX”ԍ†‚܂Ŏ擾‚µ‚Ä‚¢‚È‚¢‚Æ‚«‚ÍDL‚·‚é
4613+ if (not Thread.IsLogFile) or (stRes > Thread.Count) then begin
4614+ DownloadContent(Thread);
4615+ end else if (not browserRec.Repaint) and (browserRec.Movement <> '') then begin
4616+ try
4617+ //SetContent(browserRec);
4618+ browserRec.Move(browserRec.Movement);
4619+ browserRec.Movement := '';
4620+ doc := Idispatch( OleVariant( browserRec.Browser.ControlInterface ).Document ) as IHTMLDocument2;
4621+ Thread.ScrollTop := doc.Body.ScrollTop;
4622+ except
4623+ end;
4624+ end;
4625+ end;
4626+end;
44984627
44994628 procedure TGikoForm.MoveToURL(const inURL: string);
45004629 var
@@ -4507,13 +4636,8 @@ var
45074636 i, bi : Integer;
45084637 boardURL : string;
45094638 tmpThread : TThreadItem;
4510-// category : TCategory;
4511-// categoryNode : TTreeNode;
4512-// boardNode : TTreeNode;
45134639 shiftDown : Boolean;
45144640 ctrlDown : Boolean;
4515- stRes, edRes : Int64;
4516- browserRec : TBrowserRecord;
45174641 begin
45184642
45194643 GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
@@ -4569,30 +4693,11 @@ begin
45694693 if TBoard(ActiveList) = Board then
45704694 ListView.Items.Count := ListView.Items.Count + 1;
45714695 end;
4572- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
4573- browserRec := InsertBrowserTab( ThreadItem );
4574- if (browserRec <> nil) and (stRes > 0) then
4575- browserRec.Movement := IntToStr( stRes );
4576- DownloadContent( ThreadItem );
4577- Exit;
45784696 end else begin
45794697 tmpThread.Free;
4580- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
4581- browserRec := InsertBrowserTab( ThreadItem );
4582- if ThreadItem.IsLogFile then begin
4583- if (browserRec <> nil) and (stRes > 0) then begin
4584- browserRec.Movement := IntToStr( stRes );
4585- if (stRes > ThreadItem.Count) then begin
4586- DownloadContent( ThreadItem );
4587- end;
4588- end;
4589- end else begin
4590- if (browserRec <> nil) and (stRes > 0) then
4591- browserRec.Movement := IntToStr( stRes );
4592- DownloadContent( ThreadItem );
4593- end;
4594- Exit;
45954698 end;
4699+ OpenThreadItem(ThreadItem, inURL);
4700+ Exit;
45964701 end;
45974702 end;
45984703
@@ -4619,15 +4724,6 @@ begin
46194724 if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
46204725 boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
46214726 Board := BBSsFindBoardFromURL( boardURL );
4622- //if Board = nil then
4623- // Board := BBSsFindBoardFromBBSID( BBSID );
4624- { ‚±‚Ì•”•ª‚àBBS‚“FindBoardFromURL‚ÉŽ‚½‚¹‚½@20050523
4625- if Board = nil then begin
4626- // ¦ì‚Á‚Ä‚à’ljÁ‚·‚é‚Æ‚±‚낪–³‚¢‚Ì‚ÅŒƒ‚µ‚­•Û—¯
4627- //@‰ß‹ŽƒƒO‘qŒÉ‚©‚çAƒ_ƒEƒ\‚µ‚½ƒXƒŒ‚ª”­Œ©‚Å‚«‚È‚¢‚Ì‚Å‚±‚±‚Å’T‚·‚悤‚É‚·‚é (2004/01/22)
4628- Board := BBSs[ 0 ].FindBBSID( BBSID );
4629- end;
4630- }
46314727 if Board = nil then begin
46324728 // “ü‚é‚ׂ«”‚ªŒ©‚‚©‚ç‚È‚©‚Á‚½‚̂ŁA•’ʂ̃uƒ‰ƒEƒU‚ÅŠJ‚­
46334729 GikoSys.OpenBrowser(inURL, gbtUserApp);
@@ -4652,55 +4748,26 @@ begin
46524748 if ThreadItem = nil then begin
46534749 ThreadItem := Board.FindThreadFromFileName( BBSKey + '.dat' );
46544750 end;
4655- if ThreadItem = nil then begin
4656- //shift -> Ý’èƒuƒ‰ƒEƒUi–³‚¯‚ê‚ÎIEj
4657- //ctrl -> IE
4658- {shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
4659- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
4660- if shiftDown then
4661- GikoSys.OpenBrowser(URL1, gbtUserApp)
4662- else if ctrlDown then
4663- GikoSys.OpenBrowser(URL1, gbtIE)
4664- else begin
4665- }
4666- ThreadItem := TThreadItem.Create( nil, Board, URL );
4667- ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
4668- if AnsiPos(Host, Board.URL) = 0 then
4669- ThreadItem.DownloadHost := Host
4670- else
4671- ThreadItem.DownloadHost := '';
4672- Board.Insert(0, ThreadItem);
4673- if ActiveList is TBoard then begin
4674- if TBoard(ActiveList) = Board then
4675- ListView.Items.Count := ListView.Items.Count + 1;
4676- end;
4677- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
4678- browserRec := InsertBrowserTab(ThreadItem);
4679- if (browserRec <> nil) and (stRes > 0) then
4680- browserRec.Movement := IntToStr( stRes );
4681- DownloadContent(ThreadItem);
4682- {end;}
4683- end else begin
4684- if ThreadItem.IsLogFile then begin
4685- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
4686- browserRec := InsertBrowserTab(ThreadItem);
4687- if (browserRec <> nil) and (stRes > 0) then begin
4688- browserRec.Movement := IntToStr( stRes );
4689- if (stRes > ThreadItem.Count) then begin
4690- DownloadContent(ThreadItem);
4691- end;
4751+ try
4752+ // ƒXƒŒƒbƒhƒAƒCƒeƒ€‚ª‚È‚¢‚Ȃ琶¬‚·‚éB
4753+ if ThreadItem = nil then begin
4754+ ThreadItem := TThreadItem.Create( nil, Board, URL );
4755+ ThreadItem.FileName := ChangeFileExt(BBSKey, '.dat');
4756+ Board.Insert(0, ThreadItem);
4757+ if ActiveList is TBoard then begin
4758+ if TBoard(ActiveList) = Board then
4759+ ListView.Items.Count := ListView.Items.Count + 1;
46924760 end;
4693- end else begin
4761+ end;
4762+ // ƒƒO‚È‚µƒXƒŒƒbƒh‚Ì‚Æ‚«‚́AƒzƒXƒg–¼‚̃`ƒFƒbƒN‚ð‚·‚é
4763+ if not ThreadItem.IsLogFile then begin
46944764 if AnsiPos(Host, Board.URL) = 0 then
46954765 ThreadItem.DownloadHost := Host
46964766 else
46974767 ThreadItem.DownloadHost := '';
4698- GikoSys.GetPopupResNumber( inURL, stRes, edRes );
4699- browserRec := InsertBrowserTab(ThreadItem);
4700- if (browserRec <> nil) and (stRes > 0) then
4701- browserRec.Movement := IntToStr( stRes );
4702- DownloadContent(ThreadItem);
47034768 end;
4769+ OpenThreadItem(ThreadItem, inURL);
4770+ except
47044771 end;
47054772 end else begin
47064773 Board := BBSsFindBoardFromURL( inURL );
@@ -4710,7 +4777,7 @@ begin
47104777 if FActiveBBS <> Board.ParentCategory.ParenTBBS then
47114778 ShowBBSTree( Board.ParentCategory.ParenTBBS );
47124779 SelectTreeNode( Board, True );
4713- end;
4780+ end;
47144781 end;
47154782 end;
47164783
@@ -6613,6 +6680,7 @@ begin
66136680 Screen.Cursor := crDefault;
66146681 end;
66156682 end;
6683+ Sort.SetSortDate(Now());
66166684 SetActiveList(Node.data);
66176685 end;
66186686
@@ -6687,7 +6755,8 @@ begin
66876755 (FavoriteTreeView.Selected = FavoriteTreeView.GetNodeAt(X, Y)) then begin
66886756 //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
66896757 rect := FavoriteTreeView.Selected.DisplayRect(true);
6690- if ((rect.Left <= X) and (rect.Right >= X)) and
6758+ // ƒAƒCƒRƒ“•ª¶‚É‚¸‚ç‚·
6759+ if ((rect.Left - FavoriteTreeView.Indent <= X) and (rect.Right >= X)) and
66916760 ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
66926761 if ssDouble in Shift then begin
66936762 FClickNode := FavoriteTreeView.Selected;
@@ -7580,61 +7649,6 @@ begin
75807649 MsgBox(Handle, s, 'ˆ—‚³‚ê‚È‚©‚Á‚½—áŠO', MB_OK or MB_ICONSTOP);
75817650 end;
75827651 // *************************************************************************
7583-//! ƒAƒNƒVƒ‡ƒ“‚̃`ƒFƒbƒNó‘Ԃ̏‰Šú‰» Form‚ÌCreate‚ŌĂяo‚µ‚Ä‚à”½‰f‚µ‚È‚¢
7584-// *************************************************************************
7585-procedure TGikoForm.InitActionChecked();
7586-begin
7587- //ƒƒOƒCƒ“ó‘Ô‚ðÄÝ’è
7588- GikoDM.LoginAction.Checked := GikoDM.LoginAction.Checked;
7589- //ƒ~ƒ…[ƒg‚̏ó‘Ô‚ðÝ’è
7590- GikoDM.MuteAction.Checked := GikoSys.Setting.Mute;
7591- //‰æ–Ê‚Ì•ªŠ„‚̏ó‘Ô‚ðÄÝ’è
7592- GikoDM.ArrangeAction.Checked := GikoDM.ArrangeAction.Checked;
7593-
7594- //ƒXƒŒ‘S•”•\Ž¦ƒ{ƒ^ƒ“‚ð‰Ÿ‚³‚ꂽó‘Ô‚É‚·‚é
7595- GikoDM.AllItemAction.Checked := True;
7596- GikoDM.AllResAction.Checked := True;
7597-
7598- // ƒŒƒX•\Ž¦”͈Í
7599- FResRangeMenuSelect := GikoSys.ResRange;
7600- case GikoSys.ResRange of
7601- Ord( grrAll ):
7602- begin
7603- GikoDM.AllResAction.Execute;
7604- end;
7605- Ord( grrSelect ):
7606- begin
7607- SelectComboBox.Text := SelectComboBox.Items[ 1 ];
7608- GikoDM.SelectResAction.Checked := True;
7609- end;
7610- else
7611- case FResRangeMenuSelect of
7612- Ord( grrKoko ): GikoDM.OnlyKokoResAction.Checked := True;
7613- Ord( grrNew ): GikoDM.OnlyNewResAction.Checked := True;
7614- 100: GikoDM.OnlyAHundredResAction.Checked := True;
7615- end;
7616- end;
7617-
7618- // ƒXƒŒƒbƒhˆê——•\Ž¦”͈Í
7619- case GikoSys.Setting.ThreadRange of
7620- gtrAll:
7621- begin
7622- GikoDM.AllItemAction.Checked := True;
7623- ViewType := gvtAll;
7624- end;
7625- gtrLog:
7626- begin
7627- GikoDM.LogItemAction.Checked := True;
7628- ViewType := gvtLog;
7629- end;
7630- gtrNew:
7631- begin
7632- GikoDM.NewItemAction.Checked := True;
7633- ViewType := gvtNew;
7634- end;
7635- end;
7636-end;
7637-// *************************************************************************
76387652 //! ƒ_ƒEƒ“ƒ[ƒhƒRƒ“ƒgƒ[ƒ‹ƒXƒŒƒbƒh‚̐¶¬
76397653 // *************************************************************************
76407654 procedure TGikoForm.CreateControlThread();
@@ -7755,9 +7769,10 @@ begin
77557769 (TreeView.Selected = TreeView.GetNodeAt(X, Y)) then begin
77567770 //ƒ}ƒEƒX‚ªnode‚̏ã‚É‚¢‚é‚©
77577771 rect := TreeView.Selected.DisplayRect(true);
7758- if ((rect.Left <= X) and (rect.Right >= X)) and
7772+ // ƒAƒCƒRƒ“•ª‚¾‚¯¶‚É‚¸‚ç‚·
7773+ if ((rect.Left - TreeView.Indent <= X) and (rect.Right >= X)) and
77597774 ((rect.Bottom >= Y) and (rect.Top <= Y)) then begin
7760- // ƒNƒŠƒbƒN‚ƃ_ƒuƒ‹ƒNƒŠƒbƒN‚ðƒRƒR‚Å”»’è
7775+ // ƒNƒŠƒbƒN‚ƃ_ƒuƒ‹ƒNƒŠƒbƒN‚ðƒRƒR‚Å”»’è
77617776 if ssDouble in Shift then begin
77627777 TreeDoubleClick( TreeView.Selected );
77637778 end else begin
@@ -7768,6 +7783,50 @@ begin
77687783 end;
77697784 end;
77707785 end;
7786+//! ActionList‚ÌGroupIndex‚Ì•Û‘¶
7787+procedure TGikoForm.GetGroupIndex(ActionList: TActionList);
7788+var
7789+ i: Integer;
7790+begin
7791+ if ActionList <> nil then begin
7792+ SetLength(FActionListGroupIndexes, ActionList.ActionCount);
7793+
7794+ for i := 0 to ActionList.ActionCount - 1 do begin
7795+ try
7796+ FActionListGroupIndexes[i] :=
7797+ TCustomAction(ActionList.Actions[i]).GroupIndex;
7798+ TCustomAction(ActionList.Actions[i]).GroupIndex
7799+ := 0;
7800+ except
7801+ ;//Cast‚Å‚«‚È‚¢‚Æ‚«‘΍ô
7802+ end;
7803+ end;
7804+
7805+ end;
7806+end;
7807+//! ActionList‚ÌGroupIndex‚̐ݒè
7808+procedure TGikoForm.SetGroupIndex(ActionList: TActionList);
7809+var
7810+ i: Integer;
7811+begin
7812+ if ActionList <> nil then begin
7813+ if Length( FActionListGroupIndexes ) = ActionList.ActionCount then begin
7814+ for i := 0 to ActionList.ActionCount - 1 do begin
7815+ try
7816+ TCustomAction(ActionList.Actions[i]).GroupIndex
7817+ := FActionListGroupIndexes[i];
7818+ except
7819+ ;//Cast‚Å‚«‚È‚¢‚Æ‚«‘΍ô
7820+ end;
7821+ end;
7822+ end;
7823+ end;
7824+end;
7825+//! ‚±‚̃ŒƒX‚ÌURLŽæ“¾
7826+procedure TGikoForm.GetResURLMenuClick(Sender: TObject);
7827+begin
7828+;
7829+end;
77717830
77727831 initialization
77737832 OleInitialize(nil);
--- a/GikoDataModule.dfm
+++ b/GikoDataModule.dfm
@@ -37,7 +37,7 @@ object GikoDM: TGikoDM
3737 end
3838 object NewBoardAction: TAction
3939 Category = #12501#12449#12452#12523
40- Caption = #26495#26356#26032'(&B)...'
40+ Caption = #26495#19968#35239#26356#26032'(&B)...'
4141 Hint = #12508#12540#12489#26356#26032#12480#12452#12450#12525#12464#12434#34920#31034#12377#12427
4242 OnExecute = NewBoardActionExecute
4343 end
@@ -1201,6 +1201,19 @@ object GikoDM: TGikoDM
12011201 Hint = #12473#12524#12483#12489#12398#23481#37327#12434#12501#12449#12452#12523#12363#12425#20877#35336#31639#12377#12427
12021202 OnExecute = ThreadSizeCalcForFileActionExecute
12031203 end
1204+ object SetInputAssistAction: TAction
1205+ Category = #12484#12540#12523
1206+ Caption = #20837#21147#12450#12471#12473#12488#12398#35373#23450
1207+ Hint = #20837#21147#12450#12471#12473#12488#12398#35373#23450#12501#12457#12540#12512#12434#38283#12367
1208+ OnExecute = SetInputAssistActionExecute
1209+ end
1210+ object OpenFindDialogAction: TAction
1211+ Category = #12473#12524#12483#12489
1212+ Caption = #29694#22312#34920#31034#12375#12390#12356#12427#12473#12524#12483#12489#12398#26908#32034#12480#12452#12450#12525#12464#12434#34920#31034#12377#12427
1213+ Hint = #29694#22312#34920#31034#12375#12390#12356#12427#12473#12524#12483#12489#12398#26908#32034#12480#12452#12450#12525#12464#12434#34920#31034#12377#12427
1214+ ShortCut = 16454
1215+ OnExecute = OpenFindDialogActionExecute
1216+ end
12041217 end
12051218 object ToobarImageList: TImageList
12061219 Left = 44
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -11,7 +11,8 @@ uses
1111 SHDocVw_TLB,
1212 MSHTML_TLB,
1313 {$IFEND}
14- ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs;
14+ ComCtrls, BrowserRecord, Graphics, Messages, Setting, Dialogs,
15+ ActiveX;
1516
1617 const
1718 CAPTION_NAME: string = 'ƒMƒRƒiƒr';
@@ -212,6 +213,8 @@ type
212213 ToobarImageList: TImageList;
213214 SaveDialog: TSaveDialog;
214215 ThreadSizeCalcForFileAction: TAction;
216+ SetInputAssistAction: TAction;
217+ OpenFindDialogAction: TAction;
215218 procedure EditNGActionExecute(Sender: TObject);
216219 procedure ReloadActionExecute(Sender: TObject);
217220 procedure GoFowardActionExecute(Sender: TObject);
@@ -394,6 +397,8 @@ type
394397 procedure AllSelectActionExecute(Sender: TObject);
395398 procedure AllSelectActionUpdate(Sender: TObject);
396399 procedure ThreadSizeCalcForFileActionExecute(Sender: TObject);
400+ procedure SetInputAssistActionExecute(Sender: TObject);
401+ procedure OpenFindDialogActionExecute(Sender: TObject);
397402 private
398403 { Private éŒ¾ }
399404 procedure ClearResFilter;
@@ -434,7 +439,7 @@ uses
434439 ToolBarUtil, NewBoard, HTMLCreate, IndividualAbon,
435440 GikoBayesian, About, ShellAPI,
436441 RoundName, RoundData, Menus, ListViewUtils,
437- ThreadControl, GikoMessage;
442+ ThreadControl, GikoMessage, InputAssist;
438443
439444
440445 {$R *.dfm}
@@ -884,22 +889,16 @@ end;
884889 procedure TGikoDM.SetThreadAreaHorNormal;
885890 begin
886891 //’ʏí•\Ž¦‚É‚·‚é
887- if GikoForm.ActiveContent <> nil then
888- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
889892 GikoForm.ViewPanel.Width := GikoForm.BrowserSizeWidth;
890893 BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
891894 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
892895 GikoSys.Setting.ListWidthState := glsNormal;
893- if GikoForm.ActiveContent <> nil then
894- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
895896 end;
896897 // *************************************************************************
897898 //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloHorizontal@
898899 // *************************************************************************
899900 procedure TGikoDM.SetThreadAreaHorizontal(gls : TGikoListState);
900901 begin
901- if GikoForm.ActiveContent <> nil then
902- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
903902 if GikoSys.Setting.ListWidthState = glsNormal then
904903 GikoForm.BrowserSizeWidth := GikoForm.ViewPanel.Width;
905904 //Å‘å•\Ž¦
@@ -914,8 +913,6 @@ begin
914913 BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
915914 GikoSys.Setting.ListWidthState := glsMin;
916915 end;
917- if GikoForm.ActiveContent <> nil then
918- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
919916 end;
920917 // *************************************************************************
921918 //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA’ʏí•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical
@@ -923,22 +920,16 @@ end;
923920 procedure TGikoDM.SetThreadAreaVerNormal;
924921 begin
925922 //’ʏí•\Ž¦‚É‚·‚é
926- if GikoForm.ActiveContent <> nil then
927- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
928923 GikoForm.ViewPanel.Height := GikoForm.BrowserSizeHeight;
929924 BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
930925 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
931926 GikoSys.Setting.ListHeightState := glsNormal;
932- if GikoForm.ActiveContent <> nil then
933- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
934927 end;
935928 // *************************************************************************
936929 //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒAÅ‘å/Å¬•\Ž¦‚É‚·‚é ’)ListOrientation = gloVertical
937930 // *************************************************************************
938931 procedure TGikoDM.SetThreadAreaVertical(gls : TGikoListState);
939932 begin
940- if GikoForm.ActiveContent <> nil then
941- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 0, 0); //•`‰æ’âŽ~
942933 if GikoSys.Setting.ListHeightState = glsNormal then
943934 GikoForm.BrowserSizeHeight := GikoForm.ViewPanel.Height;
944935 if (gls = glsMin) then begin
@@ -952,8 +943,6 @@ begin
952943 BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
953944 GikoSys.Setting.ListHeightState := glsMax;
954945 end;
955- if GikoForm.ActiveContent <> nil then
956- SendMessage(GikoForm.ActiveContent.Browser.Handle, WM_SETREDRAW, 1, 0); //•`‰æ
957946 end;
958947 // *************************************************************************
959948 //! ƒXƒŒƒbƒh•\Ž¦ƒGƒŠƒA‚ð‘å‚«‚­•\Ž¦‚·‚é
@@ -1062,7 +1051,6 @@ begin
10621051 if Item = nil then Exit;
10631052 Editor := TEditorForm.Create(GikoForm.GetMainForm);
10641053 Editor.SetThreadItem(Item);
1065- GikoSys.LoadKeySetting(Editor.ActionList, GikoSys.GetEditorKeyFileName);
10661054 Editor.Show;
10671055 Editor.BodyEdit.SetFocus;
10681056 end;
@@ -1563,7 +1551,7 @@ begin
15631551 try
15641552 if Dlg.ShowModal = mrOk then begin
15651553 GikoSys.SaveKeySetting(GikoFormActionList, Setting.KEY_SETTING_FILE_NAME);
1566- GikoSys.SaveKeySetting(Dlg.EditorForm.ActionList, Setting.KEY_SETTING_FILE_NAME);
1554+ GikoSys.SaveKeySetting(Dlg.EditorForm.ActionList, Setting.EKEY_SETTING_FILE_NAME);
15671555 GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName );
15681556 end;
15691557
@@ -2227,7 +2215,6 @@ begin
22272215
22282216 Editor := TEditorForm.Create(GikoForm);
22292217 Editor.SetThreadItem(Item);
2230- GikoSys.LoadKeySetting(Editor.ActionList, GikoSys.GetEditorKeyFileName);
22312218 Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
22322219 Editor.Show;
22332220 Editor.BodyEdit.SetFocus;
@@ -2781,6 +2768,7 @@ var
27812768 shiftDown: Boolean;
27822769 begin
27832770 shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
2771+ GikoForm.ActiveListColumnSave;
27842772 if GikoForm.GetActiveList is TCategory then begin
27852773 List := TList.Create;
27862774 try
@@ -3782,6 +3770,53 @@ begin
37823770 GikoForm.ProgressBar.Position := 0;
37833771 ShowMessage('ŒvŽZI—¹‚µ‚Ü‚µ‚½B');
37843772 end;
3773+//! “ü—̓AƒVƒXƒg‚̐ݒèƒtƒH[ƒ€‚ðŒÄ‚яo‚·
3774+procedure TGikoDM.SetInputAssistActionExecute(Sender: TObject);
3775+var
3776+ form : TInputAssistForm;
3777+begin
3778+ form := TInputAssistForm.Create(GikoForm);
3779+ try
3780+ form.SetUpFromMain;
3781+ form.ShowModal;
3782+ finally
3783+ form.Release;
3784+ end;
3785+end;
3786+// WebBrowser‚ÌŒŸõƒ_ƒCƒAƒƒO‚ðŒÄ‚яo‚·
3787+procedure OpenFindDialog(Browser: TWebbrowser);
3788+const
3789+ CGID_WebBrowser: TGUID = '{ED016940-BD5B-11cf-BA4E-00C04FD70816}';
3790+ HTMLID_FIND = 1;
3791+var
3792+ CmdTarget : IOleCommandTarget;
3793+ vaIn, vaOut: OleVariant;
3794+ PtrGUID: PGUID;
3795+begin
3796+ if Browser.Document <> nil then begin
3797+ New(PtrGUID);
3798+ PtrGUID^ := CGID_WebBrowser;
3799+ try
3800+ Browser.Document.QueryInterface(IOleCommandTarget, CmdTarget);
3801+ if CmdTarget <> nil then begin
3802+ try
3803+ CmdTarget.Exec(PtrGUID, HTMLID_FIND, 0, vaIn, vaOut);
3804+ finally
3805+ CmdTarget._Release;
3806+ end;
3807+ end;
3808+ except
3809+ end;
3810+ Dispose(PtrGUID);
3811+ end;
3812+end;
3813+//! Œ»Ý•\Ž¦‚µ‚Ä‚¢‚éƒXƒŒƒbƒh‚ÌŒŸõƒ_ƒCƒAƒƒO‚ð•\Ž¦‚·‚é
3814+procedure TGikoDM.OpenFindDialogActionExecute(Sender: TObject);
3815+begin
3816+ if( GikoForm.ActiveContent <> nil) and (GikoForm.ActiveContent.Browser <> nil) then begin
3817+ OpenFindDialog(GikoForm.ActiveContent.Browser);
3818+ end;
3819+end;
37853820
37863821 end.
37873822
--- a/GikoSystem.pas
+++ b/GikoSystem.pas
@@ -152,6 +152,7 @@ type
152152
153153 function GetMainKeyFileName : String;
154154 function GetEditorKeyFileName: String;
155+ function GetInputAssistFileName: String;
155156 procedure ReadSubjectFile(Board: TBoard);
156157 procedure CreateThreadDat(Board: TBoard);
157158 procedure WriteThreadDat(Board: TBoard);
@@ -254,7 +255,7 @@ const
254255 ZERO_DATE: Integer = 25569;
255256 BETA_VERSION_NAME_E = 'beta';
256257 BETA_VERSION_NAME_J = 'ÊÞÀ';
257- BETA_VERSION = 51;
258+ BETA_VERSION = 52;
258259 BETA_VERSION_BUILD = ''; //!< debug”Å‚È‚Ç
259260 APP_NAME = 'gikoNavi';
260261 BE_PHP_URL = 'http://be.2ch.net/test/p.php?i=';
@@ -3248,7 +3249,11 @@ function TGikoSys.GetEditorKeyFileName: String;
32483249 begin
32493250 Result := Setting.GetEditorKeyFileName;
32503251 end;
3251-
3252+//! “ü—̓AƒVƒXƒg‚̐ݒèƒtƒ@ƒCƒ‹–¼
3253+function TGikoSys.GetInputAssistFileName: String;
3254+begin
3255+ Result := Setting.GetInputAssistFileName;
3256+end;
32523257 //! ƒMƒRƒiƒr‚̃ƒbƒZ[ƒW‚ðÝ’è‚·‚é
32533258 procedure TGikoSys.SetGikoMessage;
32543259 begin
--- a/HTMLCreate.pas
+++ b/HTMLCreate.pas
@@ -15,7 +15,7 @@ uses
1515 {HttpApp,} YofUtils, {URLMon,} BoardGroup, {gzip,} {Dolib,}
1616 {bmRegExp,} AbonUnit, MojuUtils, Setting,
1717 ExternalBoardManager, ExternalBoardPlugInMain{,}
18- {Sort,} ,GikoBayesian, HintWindow;
18+ {Sort,} ,GikoBayesian, HintWindow, ActiveX;
1919
2020 type
2121
@@ -38,10 +38,10 @@ type
3838 constructor Create;
3939
4040 function AddBeProfileLink(AID : string; ANum: Integer):string ;
41- procedure CreateUsePluginHTML(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
42- procedure CreateUseSKINHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList);
43- procedure CreateUseCSSHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
44- procedure CreateDefaultHTML (doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
41+ procedure CreateUsePluginHTML(html:TStringList; ThreadItem: TThreadItem; var sTitle: string);
42+ procedure CreateUseSKINHTML(html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList);
43+ procedure CreateUseCSSHTML(html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
44+ procedure CreateDefaultHTML (html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
4545 procedure ConvertResAnchor(PRes: PResRec);
4646 procedure separateNumber(var st: String; var et: String; const Text, Separator: String);
4747 function checkComma(const s : String; var j : Integer; var No : String) : boolean;
@@ -54,7 +54,7 @@ type
5454 function SkinedRes(const skin: string; PRes: PResRec; const No: string): string;
5555 procedure ConvRes( PRes : PResRec; PResLink : PResLinkRec; DatToHTML: boolean = false); overload;
5656 function ConvRes(const Body, Bbs, Key, ParamBBS, ParamKey, ParamStart, ParamTo, ParamNoFirst, ParamTrue : string; DatToHTML: boolean = false): string; overload;
57- procedure CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
57+ procedure CreateHTML2(doc: IDispatch; ThreadItem: TThreadItem; var sTitle: string);
5858 procedure CreateHTML3(var html: TStringList; ThreadItem: TThreadItem; var sTitle: string);
5959 //ƒŒƒXƒ|ƒbƒvƒAƒbƒv‚̍쐬
6060 procedure SetResPopupText(Hint :TResPopup; threadItem: TThreadItem; StNum, ToNum: Integer; Title, First: Boolean);
@@ -778,7 +778,7 @@ begin
778778 end;
779779
780780 //Plugin‚ð—˜—p‚·‚éBoard‚̃XƒŒƒbƒh‚ÌHTML‚ðì¬‚µ‚Ädoc‚ɏ‘‚«ž‚Þ
781-procedure THTMLCreate.CreateUsePluginHTML(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
781+procedure THTMLCreate.CreateUsePluginHTML(html:TStringList; ThreadItem: TThreadItem; var sTitle: string);
782782 var
783783 i: integer;
784784 NewReceiveNo: Integer;
@@ -791,11 +791,11 @@ begin
791791 // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
792792 UserOptionalStyle := GikoSys.SetUserOptionalStyle;
793793 try
794- doc.open;
794+// doc.open;
795795 // ƒwƒbƒ_
796- doc.Write( boardPlugIn.GetHeader( DWORD( threadItem ),
796+ html.add(boardPlugIn.GetHeader( DWORD( threadItem ),
797797 '<style type="text/css">body {' + UserOptionalStyle + '}</style>' ));
798- doc.Write('<p id="idSearch"></p>');
798+ html.Add('<p id="idSearch"></p>');
799799
800800 for i := 0 to threadItem.Count - 1 do begin
801801 // 1 ‚Í•K‚¸•\Ž¦
@@ -819,56 +819,56 @@ begin
819819 try
820820 if GikoSys.Setting.UseSkin then begin
821821 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
822- doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
822+ html.Add( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
823823 else
824- doc.Write( '<a name="new"></a>');
824+ html.Add( '<a name="new"></a>');
825825 end else if GikoSys.Setting.UseCSS then begin
826- doc.Write('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
826+ html.Add('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
827827 end else begin
828- doc.Write('</dl>');
829- doc.Write('<a name="new"></a>');
830- doc.Write('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
831- doc.Write('<dl>');
828+ html.Add('</dl>');
829+ html.Add('<a name="new"></a>');
830+ html.Add('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
831+ html.Add('<dl>');
832832 end;
833833 except
834- doc.Write( '<a name="new"></a>');
834+ html.Add( '<a name="new"></a>');
835835 end;
836836 end;
837837
838838 // ƒŒƒX
839- doc.Write( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ));
839+ html.Add( boardPlugIn.GetRes( DWORD( threadItem ), i + 1 ));
840840
841841 if ThreadItem.Kokomade = (i + 1) then begin
842842 // ‚±‚±‚Ü‚Å“Ç‚ñ‚¾
843843 try
844844 if GikoSys.Setting.UseSkin then begin
845845 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
846- doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
846+ html.Add( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ))
847847 else
848- doc.Write( '<a name="koko"></a>');
848+ html.Add( '<a name="koko"></a>');
849849 end else if GikoSys.Setting.UseCSS then begin
850- doc.Write('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>');
850+ html.Add('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>');
851851 end else begin
852- doc.Write('</dl>');
853- doc.Write('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
854- doc.Write('<dl>');
852+ html.Add('</dl>');
853+ html.Add('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
854+ html.Add('<dl>');
855855 end;
856856 except
857- doc.Write( '<a name="koko"></a>');
857+ html.Add('<a name="koko"></a>');
858858 end;
859859 end;
860860 end;
861861
862862
863863 // ƒXƒLƒ“(ƒtƒbƒ^)
864- doc.Write( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ));
864+ html.Add( boardPlugIn.GetFooter( DWORD( threadItem ), '<a name="bottom"></a>' ));
865865 finally
866- doc.Close;
866+ //doc.Close;
867867 end;
868868 end;
869869
870870
871-procedure THTMLCreate.CreateUseSKINHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList);
871+procedure THTMLCreate.CreateUseSKINHTML(html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList);
872872 const
873873 KOKO_TAG = '<a name="koko"></a>';
874874 NEW_TAG = '<a name="new"></a>';
@@ -890,9 +890,9 @@ begin
890890 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
891891 ResLink.FKey := ThreadName;
892892 //,
893- doc.open;
893+ //doc.open;
894894 try
895- doc.charset := 'Shift_JIS';
895+ //doc.charset := 'Shift_JIS';
896896
897897 // ƒXƒLƒ“‚̐ݒè
898898 try
@@ -900,14 +900,14 @@ begin
900900 if Length( UserOptionalStyle ) > 0 then
901901 SkinHeader := CustomStringReplace( SkinHeader, '</head>',
902902 '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>');
903- doc.Write( SkinHeader );
903+ html.Add( SkinHeader );
904904 except
905905 end;
906906
907907 SkinNewRes := LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, ThreadItem.Size);
908908 SkinRes := LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, ThreadItem.Size );
909909
910- doc.Write('<p id="idSearch"></p>'#13#10'<a name="top"></a>');
910+ html.Add('<p id="idSearch"></p>'#13#10'<a name="top"></a>');
911911
912912 for i := 0 to ReadList.Count - 1 do begin
913913 // 1 ‚Í•K‚¸•\Ž¦
@@ -929,9 +929,9 @@ begin
929929 // V’…ƒ}[ƒN
930930 if (NewReceiveNo = i + 1) or ((NewReceiveNo = 0) and (i = 0)) then begin
931931 if FileExists( GikoSys.GetSkinNewmarkFileName ) then
932- doc.Write( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
932+ html.Add( LoadFromSkin( GikoSys.GetSkinNewmarkFileName, ThreadItem, ThreadItem.Size ))
933933 else
934- doc.Write( NEW_TAG );
934+ html.Add( NEW_TAG );
935935 end;
936936
937937 if (Trim(ReadList[i]) <> '') then begin
@@ -942,30 +942,30 @@ begin
942942
943943 if NewReceiveNo <= (i + 1) then
944944 // V’…ƒŒƒX
945- doc.Write(SkinedRes(SkinNewRes, @Res, IntToStr(i + 1)))
945+ html.Add(SkinedRes(SkinNewRes, @Res, IntToStr(i + 1)))
946946 else
947947 // ’ʏí‚̃ŒƒX
948- doc.Write(SkinedRes(SkinRes, @Res, IntToStr(i + 1)));
948+ html.Add(SkinedRes(SkinRes, @Res, IntToStr(i + 1)));
949949 end;
950950
951951 if ThreadItem.Kokomade = (i + 1) then begin
952952 // ‚±‚±‚Ü‚Å“Ç‚ñ‚¾
953953 if FileExists( GikoSys.GetSkinBookmarkFileName ) then
954- doc.Write( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ) + #13#10 )
954+ html.Add( LoadFromSkin( GikoSys.GetSkinBookmarkFileName, ThreadItem, ThreadItem.Size ))
955955 else
956- doc.Write( KOKO_TAG );
956+ html.Add( KOKO_TAG );
957957 end;
958958 end;
959959
960- doc.Write('<a name="bottom"></a>');
960+ html.Add('<a name="bottom"></a>');
961961 // ƒXƒLƒ“(ƒtƒbƒ^)
962- doc.Write( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) );
962+ html.Add( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) );
963963 finally
964- doc.close;
964+ //doc.close;
965965 end;
966966 end;
967967
968-procedure THTMLCreate.CreateUseCSSHTML(doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
968+procedure THTMLCreate.CreateUseCSSHTML(html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
969969 const
970970 FORMAT_NOMAIL = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
971971 + '<span class="name_label">–¼‘OF</span> <span class="name"><b>%s</b></span>'
@@ -975,13 +975,12 @@ const
975975 FORMAT_SHOWMAIL = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
976976 + '<span class="name_label"> –¼‘OF </span><a class="name_mail" href="mailto:%s">'
977977 + '<b>%s</b></a><span class="mail"> [%s]</span><span class="date_label"> “Še“úF</span>'
978- + '<span class="date"> %s</span></div><div class="mes">%s </div>';
978+ + '<span class="date"> %s</span></div><div class="mes">%s</div>';
979979
980980 FORMAT_NOSHOW = '<a name="%s"></a><div class="header"><span class="no"><a href="menu:%s">%s</a></span>'
981981 + '<span class="name_label"> –¼‘OF </span><a class="name_mail" href="mailto:%s">'
982982 + '<b>%s</b></a><span class="date_label"> “Še“úF</span><span class="date"> %s</span></div>'
983- + '<div class="mes">%s </div>';
984-
983+ + '<div class="mes">%s</div>';
985984 var
986985 i: integer;
987986 No: string;
@@ -992,9 +991,9 @@ var
992991 ThreadName :String;
993992 ResLink :TResLinkRec;
994993 begin
995- doc.open;
994+ //doc.open;
996995 try
997- doc.charset := 'Shift_JIS';
996+ //doc.charset := 'Shift_JIS';
998997 NewReceiveNo := ThreadItem.NewReceive;
999998 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
1000999 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
@@ -1004,15 +1003,15 @@ begin
10041003 CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
10051004 if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
10061005 //CSSŽg—p
1007- doc.Write('<html><head>');
1008- doc.Write('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1009- doc.Write('<title>' + sTitle + '</title>');
1010- doc.Write('<link rel="stylesheet" href="'+CSSFileName+'" type="text/css">');
1006+ html.Add('<html><head>');
1007+ html.Add('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1008+ html.Add('<title>' + sTitle + '</title>');
1009+ html.Add('<link rel="stylesheet" href="'+CSSFileName+'" type="text/css">');
10111010 if Length( UserOptionalStyle ) > 0 then
1012- doc.Write('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
1013- doc.Write('</head>'#13#10'<body>');
1014- doc.Write('<a name="top"></a>'#13#10'<p id="idSearch"></p>');
1015- doc.Write('<div class="title">' + sTitle + '</div>');
1011+ html.Add('<style type="text/css">body {' + UserOptionalStyle + '}</style>');
1012+ html.Add('</head>'#13#10'<body>');
1013+ html.Add('<a name="top"></a>'#13#10'<p id="idSearch"></p>');
1014+ html.Add('<div class="title">' + sTitle + '</div>');
10161015 for i := 0 to ReadList.Count - 1 do begin
10171016 // 1 ‚Í•K‚¸•\Ž¦
10181017 if i <> 0 then begin
@@ -1031,7 +1030,7 @@ begin
10311030 end;
10321031
10331032 if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
1034- doc.Write('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
1033+ html.Add('<a name="new"></a><div class="new">V’…ƒŒƒX <span class="newdate">' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</span></div>');
10351034 end;
10361035
10371036 if (Trim(ReadList[i]) <> '') then begin
@@ -1041,29 +1040,29 @@ begin
10411040 ConvRes(@Res, @ResLink);
10421041 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
10431042 if Res.FMailTo = '' then
1044- doc.Write(Format(FORMAT_NOMAIL, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]))
1043+ html.Add(Format(FORMAT_NOMAIL, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]))
10451044 else if GikoSys.Setting.ShowMail then
1046- doc.Write(Format(FORMAT_SHOWMAIL, [No, No, No, Res.FMailTo, Res.FName, Res.FMailTo, Res.FDateTime, Res.FBody]))
1045+ html.Add(Format(FORMAT_SHOWMAIL, [No, No, No, Res.FMailTo, Res.FName, Res.FMailTo, Res.FDateTime, Res.FBody]))
10471046 else
1048- doc.Write(Format(FORMAT_NOSHOW, [No, No, No, Res.FName, Res.FDateTime, Res.FBody]));
1047+ html.Add(Format(FORMAT_NOSHOW, [No, No, No, Res.FMailTo, Res.FName, Res.FDateTime, Res.FBody]));
10491048 end;
10501049
10511050 if ThreadItem.Kokomade = (i + 1) then begin
1052- doc.Write('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>');
1051+ html.Add('<a name="koko"></a><div class="koko">ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</div>');
10531052 end;
10541053
10551054 end;
10561055
1057- doc.Write('<a name="bottom"></a>');
1058- doc.Write('<a name="last"></a>');
1059- doc.Write('</body></html>');
1056+ html.Add('<a name="bottom"></a>');
1057+ html.Add('<a name="last"></a>');
1058+ html.Add('</body></html>');
10601059 end;
10611060 finally
1062- doc.Close;
1061+ //doc.Close;
10631062 end;
10641063 end;
10651064
1066-procedure THTMLCreate.CreateDefaultHTML (doc: Variant; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
1065+procedure THTMLCreate.CreateDefaultHTML (html:TStringList; ThreadItem: TThreadItem; ReadList: TStringList; sTitle: string );
10671066 var
10681067 i: integer;
10691068 No: string;
@@ -1072,21 +1071,21 @@ var
10721071 ThreadName: String;
10731072 ResLink : TResLinkRec;
10741073 begin
1075- doc.open;
1074+// doc.open;
10761075 try
1077- doc.charset := 'Shift_JIS';
1076+// doc.charset := 'Shift_JIS';
10781077 NewReceiveNo := ThreadItem.NewReceive;
10791078 ThreadName := ChangeFileExt(ThreadItem.FileName, '');
10801079 ResLink.FBbs := ThreadItem.ParentBoard.BBSID;
10811080 ResLink.FKey := ThreadName;
1082- doc.Write('<html><head>'#13#10);
1083- doc.Write('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">'#13#10);
1084- doc.Write('<title>' + sTitle + '</title></head>'#13#10);
1085- doc.Write('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">'#13#10);
1086- doc.Write('<a name="top"></a>'#13#10);
1087- doc.Write('<font size=+1 color="#FF0000">' + sTitle + '</font>'#13#10);
1088- doc.Write('<dl>'#13#10);
1089- doc.Write('<p id="idSearch"></p>'#13#10);
1081+ html.Add('<html><head>');
1082+ html.Add('<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">');
1083+ html.Add('<title>' + sTitle + '</title></head>');
1084+ html.Add('<body TEXT="#000000" BGCOLOR="#EFEFEF" link="#0000FF" alink="#FF0000" vlink="#660099">');
1085+ html.Add('<a name="top"></a>');
1086+ html.Add('<font size=+1 color="#FF0000">' + sTitle + '</font>');
1087+ html.Add('<dl>');
1088+ html.Add('<p id="idSearch"></p>');
10901089 for i := 0 to ReadList.Count - 1 do begin
10911090 // 1 ‚Í•K‚¸•\Ž¦
10921091 if i <> 0 then begin
@@ -1105,10 +1104,10 @@ begin
11051104 end;
11061105
11071106 if (NewReceiveNo = (i + 1)) or ((NewReceiveNo = 0) and (i = 0)) then begin
1108- doc.Write('</dl>');
1109- doc.Write('<a name="new"></a>');
1110- doc.Write('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
1111- doc.Write('<dl>');
1107+ html.Add('</dl>');
1108+ html.Add('<a name="new"></a>');
1109+ html.Add('<table width="100%" bgcolor="#3333CC" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#6666FF" valign="middle"><font size="-1" color="#ffffff"><b>V’…ƒŒƒX ' + FormatDateTime('yyyy/mm/dd(ddd) hh:mm', ThreadItem.RoundDate) + '</b></font></td></tr></table>');
1110+ html.Add('<dl>');
11121111 end;
11131112
11141113 if (Trim(ReadList[i]) <> '') then begin
@@ -1118,30 +1117,32 @@ begin
11181117 ConvRes(@Res, @ResLink);
11191118 Res.FDateTime := AddBeProfileLink(Res.FDateTime, i + 1);
11201119 if Res.FMailTo = '' then
1121- doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<font color="forestgreen"><b> ' + Res.FName + ' </b></font> “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
1120+ html.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<font color="forestgreen"><b> ' + Res.FName + ' </b></font> “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
11221121 else if GikoSys.Setting.ShowMail then
1123- doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + '] “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
1122+ html.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> [' + Res.FMailTo + '] “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10)
11241123 else
1125- doc.Write('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10);
1124+ html.Add('<a name="' + No + '"></a><dt><a href="menu:' + No + '">' + No + '</a> –¼‘OF<a href="mailto:' + Res.FMailTo + '"><b> ' + Res.FName + ' </B></a> “Še“úF <span class="date">' + Res.FDateTime+ '</span><br><dd>' + Res.Fbody + ' <br><br><br>'#13#10);
11261125 end;
11271126 if ThreadItem.Kokomade = (i + 1) then begin
1128- doc.Write('</dl>');
1129- doc.Write('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
1130- doc.Write('<dl>');
1127+ html.Add('</dl>');
1128+ html.Add('<a name="koko"></a><table width="100%" bgcolor="#55AA55" cellpadding="0" cellspacing="1"><tr><td align="center" bgcolor="#77CC77" valign="middle"><font size="-1" color="#ffffff"><b>ƒRƒR‚Ü‚Å“Ç‚ñ‚¾</b></font></td></tr></table>');
1129+ html.Add('<dl>');
11311130 end;
11321131 end;
1133- doc.Write('</dl>'#13#10'<a name="bottom"></a>'#13#10'</body></html>');
1132+ html.Add('</dl>'#13#10'<a name="bottom"></a>'#13#10'</body></html>');
11341133 finally
1135- doc.Close;
1134+ //doc.Close;
11361135 end;
11371136 end;
11381137
1139-procedure THTMLCreate.CreateHTML2(doc: Variant; ThreadItem: TThreadItem; var sTitle: string);
1138+procedure THTMLCreate.CreateHTML2(doc: IDispatch; ThreadItem: TThreadItem; var sTitle: string);
11401139 var
11411140 ReadList: TStringList;
11421141 CSSFileName: string;
11431142 FileName: string;
11441143 Res: TResRec;
1144+ body : TStringList;
1145+ mStream : TMemoryStream;
11451146 {$IFDEF DEBUG}
11461147 st, rt: Cardinal;
11471148 {$ENDIF}
@@ -1151,45 +1152,60 @@ begin
11511152 st := GetTickCount;
11521153 {$ENDIF}
11531154 if ThreadItem <> nil then begin
1154- if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1155- CreateUsePluginHTML(doc, ThreadItem, sTitle);
1156- end else begin
1157- ShortDayNames[1] := '“ú'; ShortDayNames[2] := 'ŒŽ';
1158- ShortDayNames[3] := '‰Î'; ShortDayNames[4] := '…';
1159- ShortDayNames[5] := '–Ø'; ShortDayNames[6] := '‹à';
1160- ShortDayNames[7] := '“y';
1155+ body := TStringList.Create;
1156+ try
1157+ body.BeginUpdate;
1158+ if ThreadItem.ParentBoard.IsBoardPlugInAvailable then begin
1159+ CreateUsePluginHTML(body, ThreadItem, sTitle);
1160+ end else begin
1161+ ShortDayNames[1] := '“ú'; ShortDayNames[2] := 'ŒŽ';
1162+ ShortDayNames[3] := '‰Î'; ShortDayNames[4] := '…';
1163+ ShortDayNames[5] := '–Ø'; ShortDayNames[6] := '‹à';
1164+ ShortDayNames[7] := '“y';
11611165
1162- ReadList := TStringList.Create;
1163- try
1164- if ThreadItem.IsLogFile then begin
1165- ReadList.BeginUpdate;
1166- FileName := ThreadItem.GetThreadFileName;
1167- ReadList.LoadFromFile(FileName);
1168- ReadList.EndUpdate;
1169- GikoSys.FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
1170- GikoSys.FAbon.Execute(ReadList); // ‚ ‚ځ`‚ñ‚µ‚Ä
1171- GikoSys.FSelectResFilter.Execute(ReadList); //ƒŒƒX‚̃tƒBƒ‹ƒ^ƒŠƒ“ƒO‚ð‚·‚é
1172- if ThreadItem.Title = '' then begin
1173- DivideStrLine(ReadList[0], @Res);
1174- sTitle := Res.FTitle;
1175- end else
1176- sTitle := ThreadItem.Title
1177- end else begin
1178- sTitle := CustomStringReplace(ThreadItem.Title, '—M', ',');
1179- end;
1180- // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
1181- CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1182- if GikoSys.Setting.UseSkin then begin
1183- CreateUseSKINHTML(doc, ThreadItem, ReadList);
1184- end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
1185- CreateUseCSSHTML(doc, ThreadItem, ReadList, sTitle);
1186- end else begin
1187- CreateDefaultHTML(doc, ThreadItem, ReadList, sTitle);
1166+ ReadList := TStringList.Create;
1167+ try
1168+ if ThreadItem.IsLogFile then begin
1169+ ReadList.BeginUpdate;
1170+ FileName := ThreadItem.GetThreadFileName;
1171+ ReadList.LoadFromFile(FileName);
1172+ ReadList.EndUpdate;
1173+ GikoSys.FAbon.IndividualAbon(ReadList, ChangeFileExt(FileName,'.NG'));
1174+ GikoSys.FAbon.Execute(ReadList); // ‚ ‚ځ`‚ñ‚µ‚Ä
1175+ GikoSys.FSelectResFilter.Execute(ReadList); //ƒŒƒX‚̃tƒBƒ‹ƒ^ƒŠƒ“ƒO‚ð‚·‚é
1176+ if ThreadItem.Title = '' then begin
1177+ DivideStrLine(ReadList[0], @Res);
1178+ sTitle := Res.FTitle;
1179+ end else
1180+ sTitle := ThreadItem.Title
1181+ end else begin
1182+ sTitle := CustomStringReplace(ThreadItem.Title, '—M', ',');
1183+ end;
1184+ // ƒtƒHƒ“ƒg‚âƒTƒCƒY‚̐ݒè
1185+ CSSFileName := GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName;
1186+ if GikoSys.Setting.UseSkin then begin
1187+ CreateUseSKINHTML(body, ThreadItem, ReadList);
1188+ end else if GikoSys.Setting.UseCSS and FileExists(CSSFileName) then begin
1189+ CreateUseCSSHTML(body, ThreadItem, ReadList, sTitle);
1190+ end else begin
1191+ CreateDefaultHTML(body, ThreadItem, ReadList, sTitle);
1192+ end;
1193+ body.EndUpdate;
1194+ //WebBrowser‚ɏ‘‚«ž‚Ý
1195+ mStream := TMemoryStream.Create;
1196+ try
1197+ body.SaveToStream(mStream);
1198+ mStream.Seek(soFromBeginning, 0);
1199+ (doc as IPersistStreamInit).Load(TStreamAdapter.Create(mStream));
1200+ finally
1201+ mStream.Free;
1202+ end;
1203+ finally
1204+ ReadList.Free;
11881205 end;
1189-
1190- finally
1191- ReadList.Free;
11921206 end;
1207+ finally
1208+ body.Free;
11931209 end;
11941210 end;
11951211 {$IFDEF DEBUG}
--- /dev/null
+++ b/InputAssist.dfm
@@ -0,0 +1,405 @@
1+object InputAssistForm: TInputAssistForm
2+ Left = 589
3+ Top = 279
4+ Width = 397
5+ Height = 460
6+ Caption = #20837#21147#12450#12471#12473#12488#35373#23450
7+ Color = clBtnFace
8+ Font.Charset = SHIFTJIS_CHARSET
9+ Font.Color = clWindowText
10+ Font.Height = -12
11+ Font.Name = #65325#65331' '#65328#12468#12471#12483#12463
12+ Font.Style = []
13+ OldCreateOrder = False
14+ OnClose = FormClose
15+ OnCreate = FormCreate
16+ PixelsPerInch = 96
17+ TextHeight = 12
18+ object Panel1: TPanel
19+ Left = 0
20+ Top = 0
21+ Width = 389
22+ Height = 200
23+ Align = alTop
24+ BevelOuter = bvLowered
25+ Caption = 'Panel1'
26+ TabOrder = 0
27+ object Panel5: TPanel
28+ Left = 295
29+ Top = 33
30+ Width = 93
31+ Height = 166
32+ Align = alRight
33+ TabOrder = 0
34+ object CloseButton: TButton
35+ Left = 10
36+ Top = 136
37+ Width = 75
38+ Height = 25
39+ Caption = #32066#20102
40+ TabOrder = 0
41+ OnClick = CloseButtonClick
42+ end
43+ object ApplyButton: TButton
44+ Left = 10
45+ Top = 72
46+ Width = 75
47+ Height = 25
48+ Caption = #36969#29992
49+ TabOrder = 1
50+ OnClick = ApplyButtonClick
51+ end
52+ object DeleteButton: TButton
53+ Left = 10
54+ Top = 40
55+ Width = 75
56+ Height = 25
57+ Caption = #21066#38500
58+ TabOrder = 2
59+ OnClick = DeleteButtonClick
60+ end
61+ object AddButton: TButton
62+ Left = 10
63+ Top = 8
64+ Width = 75
65+ Height = 25
66+ Caption = #36861#21152
67+ TabOrder = 3
68+ OnClick = AddButtonClick
69+ end
70+ end
71+ object Panel6: TPanel
72+ Left = 1
73+ Top = 33
74+ Width = 294
75+ Height = 166
76+ Align = alClient
77+ BevelOuter = bvNone
78+ Caption = 'Panel6'
79+ TabOrder = 1
80+ object GikoListView1: TGikoListView
81+ Left = 0
82+ Top = 0
83+ Width = 294
84+ Height = 166
85+ Align = alClient
86+ Columns = <>
87+ ReadOnly = True
88+ RowSelect = True
89+ SmallImages = ColumnImageList
90+ TabOrder = 0
91+ ViewStyle = vsReport
92+ OnColumnClick = GikoListView1ColumnClick
93+ OnCompare = GikoListView1Compare
94+ OnSelectItem = GikoListView1SelectItem
95+ end
96+ end
97+ object Panel7: TPanel
98+ Left = 1
99+ Top = 1
100+ Width = 387
101+ Height = 32
102+ Align = alTop
103+ Caption = 'Panel7'
104+ TabOrder = 2
105+ object CategoryComboLabel: TLabel
106+ Left = 12
107+ Top = 10
108+ Width = 77
109+ Height = 12
110+ Caption = #12459#12486#12468#12522#21517#36984#25246
111+ end
112+ object CategoryComboBox: TComboBox
113+ Left = 105
114+ Top = 6
115+ Width = 176
116+ Height = 20
117+ ItemHeight = 12
118+ TabOrder = 0
119+ Text = 'CategoryComboBox'
120+ OnChange = CategoryComboBoxChange
121+ OnKeyPress = CategoryComboBoxKeyPress
122+ end
123+ object InsertButton: TButton
124+ Left = 297
125+ Top = 4
126+ Width = 75
127+ Height = 25
128+ Action = InsertButtonAction
129+ TabOrder = 1
130+ end
131+ end
132+ end
133+ object Panel2: TPanel
134+ Left = 0
135+ Top = 200
136+ Width = 389
137+ Height = 233
138+ Align = alClient
139+ BevelOuter = bvNone
140+ Caption = 'Panel2'
141+ TabOrder = 1
142+ object Panel3: TPanel
143+ Left = 0
144+ Top = 0
145+ Width = 389
146+ Height = 48
147+ Align = alTop
148+ BevelOuter = bvNone
149+ TabOrder = 0
150+ object KeyNameEdit: TLabeledEdit
151+ Left = 8
152+ Top = 21
153+ Width = 161
154+ Height = 20
155+ Hint = #20837#21147#12395#20351#12358#12461#12540#21517
156+ EditLabel.Width = 36
157+ EditLabel.Height = 12
158+ EditLabel.Caption = #12461#12540#21517
159+ LabelPosition = lpAbove
160+ LabelSpacing = 3
161+ TabOrder = 0
162+ end
163+ object CategoryNameEdit: TLabeledEdit
164+ Left = 176
165+ Top = 21
166+ Width = 121
167+ Height = 20
168+ Hint = #20837#21147#12395#20351#12358#12459#12486#12468#12522#21517
169+ EditLabel.Width = 53
170+ EditLabel.Height = 12
171+ EditLabel.Caption = #12459#12486#12468#12522#21517
172+ LabelPosition = lpAbove
173+ LabelSpacing = 3
174+ TabOrder = 1
175+ end
176+ end
177+ object Panel4: TPanel
178+ Left = 0
179+ Top = 48
180+ Width = 389
181+ Height = 185
182+ Align = alClient
183+ BevelOuter = bvNone
184+ TabOrder = 1
185+ object GroupBox1: TGroupBox
186+ Left = 0
187+ Top = 0
188+ Width = 389
189+ Height = 185
190+ Align = alClient
191+ Caption = #25407#20837#25991#23383#21015
192+ TabOrder = 0
193+ object TextMemo: TMemo
194+ Left = 2
195+ Top = 14
196+ Width = 385
197+ Height = 169
198+ Hint = #25407#20837#12377#12427#25991#23383#21015
199+ Align = alClient
200+ ScrollBars = ssBoth
201+ TabOrder = 0
202+ end
203+ end
204+ end
205+ end
206+ object ColumnImageList: TImageList
207+ Left = 312
208+ Top = 192
209+ Bitmap = {
210+ 494C010102000400040010001000FFFFFFFFFF10FFFFFFFFFFFFFFFF424D3600
211+ 0000000000003600000028000000400000001000000001002000000000000010
212+ 0000000000000000000000000000000000000000000000000000000000000000
213+ 0000000000000000000000000000000000000000000000000000000000000000
214+ 0000000000000000000000000000000000000000000000000000000000000000
215+ 0000000000000000000000000000000000000000000000000000000000000000
216+ 0000000000000000000000000000000000000000000000000000000000000000
217+ 0000000000000000000000000000000000000000000000000000000000000000
218+ 0000000000000000000000000000000000000000000000000000000000000000
219+ 0000000000000000000000000000000000000000000000000000000000000000
220+ 0000000000000000000000000000000000000000000000000000000000000000
221+ 0000000000000000000000000000000000000000000000000000000000000000
222+ 0000000000000000000000000000000000000000000000000000000000000000
223+ 0000000000000000000000000000000000000000000000000000000000000000
224+ 0000000000000000000000000000000000000000000000000000000000000000
225+ 0000000000000000000000000000000000000000000000000000000000000000
226+ 0000000000000000000000000000000000000000000000000000000000000000
227+ 0000000000000000000000000000000000000000000000000000000000000000
228+ 0000000000000000000000000000000000000000000000000000000000000000
229+ 0000000000000000000000000000000000000000000000000000000000000000
230+ 0000000000000000000000000000000000000000000000000000000000000000
231+ 0000000000000000000000000000000000000000000000000000000000000000
232+ 0000000000000000000000000000000000000000000000000000000000000000
233+ 0000000000000000000000000000000000000000000000000000000000000000
234+ 0000000000000000000000000000000000000000000000000000000000000000
235+ 0000000000000000000000000000000000000000000000000000000000000000
236+ 0000000000000000000000000000000000000000000000000000000000000000
237+ 0000000000000000000000000000000000000000000000000000000000000000
238+ 0000000000000000000000000000000000000000000000000000000000000000
239+ 0000000000000000000000000000000000000000000000000000000000000000
240+ 0000000000000000000000000000000000000000000000000000000000000000
241+ 0000000000000000000000000000000000000000000000000000000000000000
242+ 0000000000000000000000000000000000000000000000000000000000000000
243+ 0000000000000000000000000000000000000000000000000000000000000000
244+ 000000000000000000000000000000000000000000000000000000000000FFFF
245+ FF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF00FFFFFF000000
246+ 0000000000000000000000000000000000000000000000000000000000000000
247+ 0000000000000000000080808000FFFFFF000000000000000000000000000000
248+ 0000000000000000000000000000000000000000000000000000000000000000
249+ 0000000000000000000000000000000000000000000000000000000000000000
250+ 0000000000000000000000000000000000000000000000000000000000000000
251+ 0000000000000000000000000000000000000000000000000000000000000000
252+ 0000000000000000000000000000000000000000000000000000000000008080
253+ 80008080800000000000000000000000000000000000FFFFFF00FFFFFF000000
254+ 0000000000000000000000000000000000000000000000000000000000000000
255+ 0000000000008080800080808000FFFFFF00FFFFFF0000000000000000000000
256+ 0000000000000000000000000000000000000000000000000000000000000000
257+ 0000000000000000000000000000000000000000000000000000000000000000
258+ 0000000000000000000000000000000000000000000000000000000000000000
259+ 0000000000000000000000000000000000000000000000000000000000000000
260+ 0000000000000000000000000000000000000000000000000000000000000000
261+ 00008080800000000000000000000000000000000000FFFFFF00000000000000
262+ 0000000000000000000000000000000000000000000000000000000000000000
263+ 000000000000808080000000000000000000FFFFFF0000000000000000000000
264+ 0000000000000000000000000000000000000000000000000000000000000000
265+ 0000000000000000000000000000000000000000000000000000000000000000
266+ 0000000000000000000000000000000000000000000000000000000000000000
267+ 0000000000000000000000000000000000000000000000000000000000000000
268+ 0000000000000000000000000000000000000000000000000000000000000000
269+ 000080808000808080000000000000000000FFFFFF00FFFFFF00000000000000
270+ 0000000000000000000000000000000000000000000000000000000000000000
271+ 000080808000808080000000000000000000FFFFFF00FFFFFF00000000000000
272+ 0000000000000000000000000000000000000000000000000000000000000000
273+ 0000000000000000000000000000000000000000000000000000000000000000
274+ 0000000000000000000000000000000000000000000000000000000000000000
275+ 0000000000000000000000000000000000000000000000000000000000000000
276+ 0000000000000000000000000000000000000000000000000000000000000000
277+ 000000000000808080000000000000000000FFFFFF0000000000000000000000
278+ 0000000000000000000000000000000000000000000000000000000000000000
279+ 00008080800000000000000000000000000000000000FFFFFF00000000000000
280+ 0000000000000000000000000000000000000000000000000000000000000000
281+ 0000000000000000000000000000000000000000000000000000000000000000
282+ 0000000000000000000000000000000000000000000000000000000000000000
283+ 0000000000000000000000000000000000000000000000000000000000000000
284+ 0000000000000000000000000000000000000000000000000000000000000000
285+ 0000000000008080800080808000FFFFFF00FFFFFF0000000000000000000000
286+ 0000000000000000000000000000000000000000000000000000000000008080
287+ 80008080800000000000000000000000000000000000FFFFFF00FFFFFF000000
288+ 0000000000000000000000000000000000000000000000000000000000000000
289+ 0000000000000000000000000000000000000000000000000000000000000000
290+ 0000000000000000000000000000000000000000000000000000000000000000
291+ 0000000000000000000000000000000000000000000000000000000000000000
292+ 0000000000000000000000000000000000000000000000000000000000000000
293+ 0000000000000000000080808000FFFFFF000000000000000000000000000000
294+ 0000000000000000000000000000000000000000000000000000000000008080
295+ 8000808080008080800080808000808080008080800080808000808080000000
296+ 0000000000000000000000000000000000000000000000000000000000000000
297+ 0000000000000000000000000000000000000000000000000000000000000000
298+ 0000000000000000000000000000000000000000000000000000000000000000
299+ 0000000000000000000000000000000000000000000000000000000000000000
300+ 0000000000000000000000000000000000000000000000000000000000000000
301+ 0000000000000000000000000000000000000000000000000000000000000000
302+ 0000000000000000000000000000000000000000000000000000000000000000
303+ 0000000000000000000000000000000000000000000000000000000000000000
304+ 0000000000000000000000000000000000000000000000000000000000000000
305+ 0000000000000000000000000000000000000000000000000000000000000000
306+ 0000000000000000000000000000000000000000000000000000000000000000
307+ 0000000000000000000000000000000000000000000000000000000000000000
308+ 0000000000000000000000000000000000000000000000000000000000000000
309+ 0000000000000000000000000000000000000000000000000000000000000000
310+ 0000000000000000000000000000000000000000000000000000000000000000
311+ 0000000000000000000000000000000000000000000000000000000000000000
312+ 0000000000000000000000000000000000000000000000000000000000000000
313+ 0000000000000000000000000000000000000000000000000000000000000000
314+ 0000000000000000000000000000000000000000000000000000000000000000
315+ 0000000000000000000000000000000000000000000000000000000000000000
316+ 0000000000000000000000000000000000000000000000000000000000000000
317+ 0000000000000000000000000000000000000000000000000000000000000000
318+ 0000000000000000000000000000000000000000000000000000000000000000
319+ 0000000000000000000000000000000000000000000000000000000000000000
320+ 0000000000000000000000000000000000000000000000000000000000000000
321+ 0000000000000000000000000000000000000000000000000000000000000000
322+ 0000000000000000000000000000000000000000000000000000000000000000
323+ 0000000000000000000000000000000000000000000000000000000000000000
324+ 0000000000000000000000000000000000000000000000000000000000000000
325+ 0000000000000000000000000000000000000000000000000000000000000000
326+ 0000000000000000000000000000000000000000000000000000000000000000
327+ 0000000000000000000000000000000000000000000000000000000000000000
328+ 0000000000000000000000000000000000000000000000000000000000000000
329+ 0000000000000000000000000000000000000000000000000000000000000000
330+ 0000000000000000000000000000000000000000000000000000000000000000
331+ 0000000000000000000000000000000000000000000000000000000000000000
332+ 0000000000000000000000000000000000000000000000000000000000000000
333+ 0000000000000000000000000000000000000000000000000000000000000000
334+ 0000000000000000000000000000000000000000000000000000000000000000
335+ 0000000000000000000000000000000000000000000000000000000000000000
336+ 0000000000000000000000000000000000000000000000000000000000000000
337+ 0000000000000000000000000000000000000000000000000000000000000000
338+ 0000000000000000000000000000000000000000000000000000000000000000
339+ 0000000000000000000000000000000000000000000000000000000000000000
340+ 000000000000000000000000000000000000424D3E000000000000003E000000
341+ 2800000040000000100000000100010000000000800000000000000000000000
342+ 000000000000000000000000FFFFFF00FFFFFFFF00000000FFFFFFFF00000000
343+ FFFFFFFF00000000FFFFFFFF00000000E01FFCFF00000000E79FF87F00000000
344+ F7BFFB7F00000000F33FF33F00000000FB7FF7BF00000000F87FE79F00000000
345+ FCFFE01F00000000FFFFFFFF00000000FFFFFFFF00000000FFFFFFFF00000000
346+ FFFFFFFF00000000FFFFFFFF0000000000000000000000000000000000000000
347+ 000000000000}
348+ end
349+ object InputAssistFormActionList: TActionList
350+ Left = 360
351+ Top = 192
352+ object EditCut1: TEditCut
353+ Category = #32232#38598
354+ Caption = #20999#12426#21462#12426'(&T)'
355+ Hint = #20999#12426#21462#12426'|'#36984#25246#37096#20998#12434#20999#12426#21462#12426#12289#12463#12522#12483#12503#12508#12540#12489#12395#36865#12427
356+ ImageIndex = 0
357+ ShortCut = 16472
358+ end
359+ object EditCopy1: TEditCopy
360+ Category = #32232#38598
361+ Caption = #12467#12500#12540'(&C)'
362+ Hint = #12467#12500#12540'|'#36984#25246#37096#20998#12434#12467#12500#12540#12375#12289#12463#12522#12483#12503#12508#12540#12489#12395#36865#12427
363+ ImageIndex = 1
364+ ShortCut = 16451
365+ end
366+ object EditPaste1: TEditPaste
367+ Category = #32232#38598
368+ Caption = #36028#12426#20184#12369'(&P)'
369+ Hint = #36028#12426#20184#12369'|'#12463#12522#12483#12503#12508#12540#12489#12398#20869#23481#12434#36028#12426#20184#12369#12427
370+ ImageIndex = 2
371+ ShortCut = 16470
372+ end
373+ object EditSelectAll1: TEditSelectAll
374+ Category = #32232#38598
375+ Caption = #12377#12409#12390#12434#36984#25246'(&A)'
376+ Hint = #12377#12409#12390#12434#36984#25246'|'#12489#12461#12517#12513#12531#12488#20840#20307#12434#36984#25246#12377#12427
377+ ShortCut = 16449
378+ end
379+ object EditUndo1: TEditUndo
380+ Category = #32232#38598
381+ Caption = #20803#12395#25147#12377'(&U)'
382+ Hint = #20803#12395#25147#12377'|'#30452#21069#12398#22793#26356#12434#20803#12395#25147#12377
383+ ImageIndex = 3
384+ ShortCut = 16474
385+ end
386+ object EditDelete1: TEditDelete
387+ Category = #32232#38598
388+ Caption = #21066#38500'(&D)'
389+ Hint = #21066#38500'|'#36984#25246#37096#20998#12434#21066#38500#12377#12427
390+ ImageIndex = 5
391+ ShortCut = 46
392+ end
393+ object InsertButtonAction: TAction
394+ Category = #32232#38598
395+ Caption = #25407#20837
396+ OnExecute = InsertButtonActionExecute
397+ OnUpdate = InsertButtonActionUpdate
398+ end
399+ object CloseAction: TAction
400+ Category = #32232#38598
401+ Caption = 'CloseAction'
402+ OnExecute = CloseActionExecute
403+ end
404+ end
405+end
--- /dev/null
+++ b/InputAssist.pas
@@ -0,0 +1,319 @@
1+unit InputAssist;
2+
3+interface
4+
5+uses
6+ Windows, Messages, SysUtils, Variants, Classes, Graphics, Controls, Forms,
7+ Dialogs, StdCtrls, ComCtrls, GikoListView, Menus, ExtCtrls, ImgList,
8+ InputAssistDataModule, StdActns, ActnList;
9+
10+type
11+ TInputAssistForm = class(TForm)
12+ Panel1: TPanel;
13+ Panel2: TPanel;
14+ GikoListView1: TGikoListView;
15+ Panel3: TPanel;
16+ KeyNameEdit: TLabeledEdit;
17+ CategoryNameEdit: TLabeledEdit;
18+ Panel4: TPanel;
19+ TextMemo: TMemo;
20+ ColumnImageList: TImageList;
21+ InputAssistFormActionList: TActionList;
22+ EditCut1: TEditCut;
23+ EditCopy1: TEditCopy;
24+ EditPaste1: TEditPaste;
25+ EditSelectAll1: TEditSelectAll;
26+ EditUndo1: TEditUndo;
27+ EditDelete1: TEditDelete;
28+ GroupBox1: TGroupBox;
29+ Panel5: TPanel;
30+ CloseButton: TButton;
31+ ApplyButton: TButton;
32+ DeleteButton: TButton;
33+ AddButton: TButton;
34+ Panel6: TPanel;
35+ Panel7: TPanel;
36+ CategoryComboBox: TComboBox;
37+ CategoryComboLabel: TLabel;
38+ InsertButton: TButton;
39+ InsertButtonAction: TAction;
40+ CloseAction: TAction;
41+ procedure FormCreate(Sender: TObject);
42+ procedure GikoListView1SelectItem(Sender: TObject; Item: TListItem;
43+ Selected: Boolean);
44+ procedure AddButtonClick(Sender: TObject);
45+ procedure DeleteButtonClick(Sender: TObject);
46+ procedure ApplyButtonClick(Sender: TObject);
47+ procedure FormClose(Sender: TObject; var Action: TCloseAction);
48+ procedure GikoListView1Compare(Sender: TObject; Item1,
49+ Item2: TListItem; Data: Integer; var Compare: Integer);
50+ procedure GikoListView1ColumnClick(Sender: TObject;
51+ Column: TListColumn);
52+ procedure CloseButtonClick(Sender: TObject);
53+ procedure CategoryComboBoxKeyPress(Sender: TObject; var Key: Char);
54+ procedure CategoryComboBoxChange(Sender: TObject);
55+ procedure InsertButtonActionUpdate(Sender: TObject);
56+ procedure InsertButtonActionExecute(Sender: TObject);
57+ procedure CloseActionExecute(Sender: TObject);
58+ private
59+ { Private éŒ¾ }
60+ FSortColumn : Integer;
61+ FInsertText : String;
62+ procedure AddListViewItem(ResWord : TResistWord);
63+ public
64+ { Public éŒ¾ }
65+ procedure SetUpFromEditor();
66+ procedure SetUpFromMain();
67+ function GetInsertText(): String;
68+ end;
69+
70+var
71+ InputAssistForm: TInputAssistForm;
72+
73+implementation
74+
75+
76+{$R *.dfm}
77+//! ƒtƒH[ƒ€¶¬‚̃Cƒxƒ“ƒg
78+procedure TInputAssistForm.FormCreate(Sender: TObject);
79+var
80+ i : Integer;
81+ column: TListColumn;
82+begin
83+ FSortColumn := 0;
84+ GikoListView1.Columns.Clear;
85+ column := GikoListView1.Columns.Add;
86+ column.ImageIndex := 0;
87+ column.Caption := 'ƒL[';
88+ column.Width := 150;
89+ column := GikoListView1.Columns.Add;
90+ column.Caption := 'ƒJƒeƒSƒŠ';
91+ column.Width := 80;
92+ for i := 0 to InputAssistDM.ResistWordCount - 1 do begin
93+ AddListViewItem(InputAssistDM.GetResistWord(i));
94+ end;
95+ //ƒ\[ƒgó‘Ô‚ð‰ðœ (‰ðœ‚µ‚È‚¢‚ƃAƒCƒeƒ€‚̃L[–¼‚ð•ÏX‚Å‚«‚È‚¢)
96+ InputAssistDM.Sorted := False;
97+end;
98+//! ˆê——‚ɃAƒCƒeƒ€‚ð’ljÁ‚·‚鏈—
99+procedure TInputAssistForm.AddListViewItem(ResWord : TResistWord);
100+var
101+ item: TListItem;
102+begin
103+ item := GikoListView1.Items.Add;
104+ item.ImageIndex := -1;
105+ item.Caption := resWord.GetKey;
106+ item.SubItems.Add(resWord.GetCategory);
107+ item.Data := resWord;
108+end;
109+//! “o˜^’PŒêˆê——‚©‚çƒAƒCƒeƒ€‚ð‘I‘ð‚µ‚½‚Æ‚«‚̃Cƒxƒ“ƒg
110+procedure TInputAssistForm.GikoListView1SelectItem(Sender: TObject;
111+ Item: TListItem; Selected: Boolean);
112+begin
113+ if (Item <> nil) and (Item.Data <> nil) then begin
114+ KeyNameEdit.Text := TResistWord(Item.Data).GetKey;
115+ CategoryNameEdit.Text := TResistWord(Item.Data).GetCategory;
116+ TextMemo.Lines.Text := TResistWord(Item.Data).GetText;
117+ end else begin
118+ TextMemo.Lines.Text := '';
119+ end;
120+end;
121+//! ’ljÁƒ{ƒ^ƒ“‰Ÿ‰ºŽž‚̃Cƒxƒ“ƒg
122+procedure TInputAssistForm.AddButtonClick(Sender: TObject);
123+var
124+ resWord : TResistWord;
125+begin
126+ if (Length(KeyNameEdit.Text) = 0) then begin
127+ ShowMessage('ƒL[–¼‚ðÝ’肵‚Ä‚­‚¾‚³‚¢B');
128+ end else begin
129+ resWord := InputAssistDM.Add(KeyNameEdit.Text);
130+ resWord.SetCategory(CategoryNameEdit.Text);
131+ resWord.SetText(TextMemo.Text);
132+ AddListViewItem(resWord);
133+ GikoListView1.AlphaSort;
134+ end;
135+end;
136+//! íœƒ{ƒ^ƒ“‰Ÿ‰ºŽž‚̃Cƒxƒ“ƒg
137+procedure TInputAssistForm.DeleteButtonClick(Sender: TObject);
138+begin
139+ if GikoListView1.Selected <> nil then begin
140+ InputAssistDM.DeleteResistWord(GikoListView1.Selected.Data);
141+ GikoListView1.Selected.Data := nil;
142+ GikoListView1.DeleteSelected;
143+ end;
144+end;
145+//! “K—pƒ{ƒ^ƒ“‰Ÿ‰ºŽž‚̃Cƒxƒ“ƒg
146+procedure TInputAssistForm.ApplyButtonClick(Sender: TObject);
147+var
148+ resWord : TResistWord;
149+begin
150+ if GikoListView1.Selected <> nil then begin
151+ if (Length(KeyNameEdit.Text) = 0) then begin
152+ ShowMessage('ƒL[–¼‚𖳂µ‚É‚Í‚Å‚«‚Ü‚¹‚ñB');
153+ end else begin
154+ resWord := TResistWord(GikoListView1.Selected.Data);
155+ resWord.SetKey(KeyNameEdit.Text);
156+ resWord.SetCategory(CategoryNameEdit.Text);
157+ resWord.SetText(TextMemo.Text);
158+ // ˆê——‚̍XV
159+ GikoListView1.Selected.Caption := resWord.GetKey;
160+ GikoListView1.Selected.SubItems[0] := resWord.GetCategory;
161+ GikoListView1.AlphaSort;
162+ end;
163+ end;
164+end;
165+//! ƒtƒH[ƒ€‚ð•Â‚¶‚é‚Æ‚«‚̃Cƒxƒ“ƒg
166+procedure TInputAssistForm.FormClose(Sender: TObject;
167+ var Action: TCloseAction);
168+begin
169+ //ƒ\[ƒgó‘Ԃ̐ݒè
170+ InputAssistDM.Sorted := True;
171+end;
172+//! “o˜^’PŒêˆê——‚̃\[ƒg—p‚Ì”äŠrˆ—
173+procedure TInputAssistForm.GikoListView1Compare(Sender: TObject; Item1,
174+ Item2: TListItem; Data: Integer; var Compare: Integer);
175+begin
176+ if ((FSortColumn and 2) > 0) then begin
177+ // ƒJƒeƒSƒŠ‚Ń\[ƒg
178+ Compare := AnsiCompareStr(Item1.SubItems[0], Item2.SubItems[0]);
179+ if (Compare = 0) then begin
180+ Compare := AnsiCompareStr(Item1.Caption, Item2.Caption);
181+ end;
182+ end else begin
183+ // ƒL[‚Ń\[ƒg
184+ Compare := AnsiCompareStr(Item1.Caption, Item2.Caption);
185+ if (Compare = 0) then begin
186+ Compare := AnsiCompareStr(Item1.SubItems[0], Item2.SubItems[0]);
187+ end;
188+ end;
189+ // ¸‡~‡‚Ì”½“]
190+ if ((FSortColumn and 1) > 0) then begin
191+ Compare := Compare * -1;
192+ end;
193+ ;
194+end;
195+//! “o˜^’PŒêˆê——‚̃ŠƒXƒg‚̃Jƒ‰ƒ€ƒNƒŠƒbƒNƒCƒxƒ“ƒg
196+procedure TInputAssistForm.GikoListView1ColumnClick(Sender: TObject;
197+ Column: TListColumn);
198+var
199+ i : Integer;
200+begin
201+ if Column <> nil then begin
202+ // ƒCƒ[ƒW‚̍폜
203+ for i := 0 to GikoListView1.Columns.Count - 1 do begin
204+ GikoListView1.Column[i].ImageIndex := -1;
205+ end;
206+
207+ // FSortColumn ‹ô”:¸‡ Šï”F~‡
208+ if Column.Caption = 'ƒL[' then begin
209+ if FSortColumn = 0 then begin
210+ FSortColumn := 1;
211+ end else begin
212+ FSortColumn := 0;
213+ end;
214+ end else begin
215+ if FSortColumn = 2 then begin
216+ FSortColumn := 3;
217+ end else begin
218+ FSortColumn := 2;
219+ end;
220+ end;
221+ Column.ImageIndex := (FSortColumn and 1);
222+ GikoListView1.AlphaSort;
223+ end;
224+
225+end;
226+//! I—¹ƒ{ƒ^ƒ“‚ð‰Ÿ‰ºŽž‚̃Cƒxƒ“ƒg
227+procedure TInputAssistForm.CloseButtonClick(Sender: TObject);
228+begin
229+ Close();
230+end;
231+//! ƒJƒeƒSƒŠiž‚݃Rƒ“ƒ{ƒ{ƒbƒNƒX‚ð“ÇŽæê—p‚É‚·‚邽‚߂̃Cƒxƒ“ƒgˆ—
232+procedure TInputAssistForm.CategoryComboBoxKeyPress(Sender: TObject;
233+ var Key: Char);
234+begin
235+ Key := #0;
236+end;
237+//! ƒJƒeƒSƒŠiž‚݃Rƒ“ƒ{ƒ{ƒbƒNƒX‚ł̃JƒeƒSƒŠ•ÏXˆ—
238+procedure TInputAssistForm.CategoryComboBoxChange(Sender: TObject);
239+var
240+ i : Integer;
241+ key : String;
242+begin
243+ LockWindowUpdate(GikoListView1.Handle);
244+ GikoListView1.Clear;
245+ if (CategoryComboBox.ItemIndex <= 0) then begin
246+ for i := 0 to InputAssistDM.ResistWordCount - 1 do begin
247+ AddListViewItem(InputAssistDM.GetResistWord(i));
248+ end;
249+ end else begin
250+ key := CategoryComboBox.Items[CategoryComboBox.ItemIndex];
251+ for i := 0 to InputAssistDM.ResistWordCount - 1 do begin
252+ if (key = InputAssistDM.GetResistWord(i).GetCategory) then begin
253+ AddListViewItem(InputAssistDM.GetResistWord(i));
254+ end;
255+ end;
256+ end;
257+ LockWindowUpdate(0);
258+end;
259+
260+procedure TInputAssistForm.SetUpFromMain();
261+begin
262+ Self.Caption := '“ü—̓AƒVƒXƒgÝ’è';
263+ Panel3.Visible := True;
264+ Panel5.Visible := True;
265+ Panel7.Visible := False;
266+ TextMemo.ReadOnly := False;
267+ FInsertText := '';
268+ CloseAction.ShortCut := TShortCut(0);
269+end;
270+procedure TInputAssistForm.SetUpFromEditor();
271+var
272+ cat : TStringList;
273+begin
274+ Self.Caption := '“ü—̓AƒVƒXƒg';
275+ Panel3.Visible := False;
276+ Panel5.Visible := False;
277+ Panel7.Visible := True;
278+ TextMemo.ReadOnly := True;
279+ FInsertText := '';
280+ CloseAction.ShortCut := ShortCut(VK_ESCAPE, []);
281+ // ŒŸõ—p
282+ cat := TStringList.Create;
283+ try
284+ InputAssistDM.GetCategoryList(cat);
285+ CategoryComboBox.Items.Clear;
286+ CategoryComboBox.Items.Add('');
287+ CategoryComboBox.Items.AddStrings(cat);
288+ CategoryComboBox.ItemIndex := 0;
289+ finally
290+ cat.Free;
291+ end;
292+end;
293+function TInputAssistForm.GetInsertText(): String;
294+begin
295+ Result := FInsertText;
296+end;
297+
298+procedure TInputAssistForm.InsertButtonActionUpdate(Sender: TObject);
299+begin
300+ InsertButtonAction.Enabled := (GikoListView1.Selected <> nil);
301+end;
302+
303+procedure TInputAssistForm.InsertButtonActionExecute(Sender: TObject);
304+begin
305+ if (GikoListView1.Selected = nil) then begin
306+ FInsertText := '';
307+ Self.ModalResult := mrNone;
308+ end else begin
309+ FInsertText := TResistWord(GikoListView1.Selected.Data).GetText;
310+ Self.ModalResult := mrOk;
311+ end;
312+end;
313+
314+procedure TInputAssistForm.CloseActionExecute(Sender: TObject);
315+begin
316+ Self.ModalResult := mrCancel;
317+end;
318+
319+end.
--- /dev/null
+++ b/InputAssistDataModule.dfm
@@ -0,0 +1,9 @@
1+object InputAssistDM: TInputAssistDM
2+ OldCreateOrder = False
3+ OnCreate = DataModuleCreate
4+ OnDestroy = DataModuleDestroy
5+ Left = 582
6+ Top = 174
7+ Height = 150
8+ Width = 215
9+end
--- /dev/null
+++ b/InputAssistDataModule.pas
@@ -0,0 +1,371 @@
1+unit InputAssistDataModule;
2+
3+interface
4+
5+uses
6+ SysUtils, Classes;
7+
8+type
9+ TResistWord = class;
10+
11+ TInputAssistDM = class(TDataModule)
12+ procedure DataModuleDestroy(Sender: TObject);
13+ procedure DataModuleCreate(Sender: TObject);
14+ private
15+ { Private éŒ¾ }
16+ FInit : Boolean;
17+ FDictionary : TStringList; ///< “o˜^’PŒê‚Æ’èŒ^•¶‚ÌŽ«‘
18+ function GetSorted: Boolean; ///< ƒ\[ƒg‚̏ó‘Ԃ̎擾
19+ procedure SetSorted(Value: Boolean); ///< ƒ\[ƒgó‘Ԃ̐ݒè
20+
21+ public
22+ { Public éŒ¾ }
23+ property Sorted : Boolean read GetSorted write SetSorted;
24+ procedure Init(FilePath: String);
25+ procedure SaveToFile(FilePath: String);
26+ function ResistWordCount : Integer; ///<“o˜^’PŒê”Žæ“¾
27+ function GetResistWord(Index: Integer): TResistWord; ///< “o˜^’PŒêŽæ“¾
28+ procedure DeleteResistWord(ResistWord: TResistWord); ///< “o˜^’PŒê‚̍폜
29+ function Add(Key: String): TResistWord; ///< “o˜^’PŒê’ljÁ
30+ procedure ChangeKey(ResistWord: TResistWord); ///< “o˜^’PŒê‚̃L[•ÏX
31+ //! Key‚ðƒL[‚ÉŽ‚“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
32+ function GetStartWithKeyResistWords(Key: String; var list: TStringList): Integer;
33+ //! Key‚ðƒJƒeƒSƒŠ‚ÉŽ‚“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
34+ function GetStartWithCategoryResistWords(Key: String; var list: TStringList): Integer;
35+ //! Key‚̃JƒeƒSƒŠ‚É“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
36+ function GetCategoryResistWords(Key: String; var list: TStringList): Integer;
37+ //! “o˜^Ï‚݃L[‚Ì‘S‚ẴJƒeƒSƒŠƒŠƒXƒgŽæ“¾
38+ procedure GetCategoryList(var list: TStringList);
39+
40+ end;
41+
42+ TResistWord = class(TObject)
43+ private
44+ FKey : String; ///< •ÏŠ·Žž‚̃L[‚É‚È‚é
45+ FCategory : String; ///< •ª—Þ
46+ FText : String; ///< ’èŒ^•¶
47+ public
48+ function GetKey: String;
49+ procedure SetKey(Value: String);
50+ function GetCategory: String;
51+ procedure SetCategory(Value: String);
52+ function GetText: String;
53+ procedure SetText(Value: String);
54+ property Key: String read FKey write FKey;
55+ property Category: String read FCategory write FCategory;
56+ property Text: String read GetText write SetText;
57+ end;
58+
59+ function CategorySort(List: TStringList; Index1, Index2: Integer): Integer;
60+var
61+ InputAssistDM: TInputAssistDM;
62+
63+implementation
64+
65+uses
66+ MojuUtils, IniFiles;
67+
68+{$R *.dfm}
69+//! FKey‚ɐݒ肳‚ê‚Ä‚¢‚é’l‚ðŽæ“¾‚·‚é
70+function TResistWord.GetKey: String;
71+begin
72+ //ƒGƒXƒP[ƒv‚µ‚Ä‚¢‚é=‚𕜌³‚·‚é
73+ Result := MojuUtils.CustomStringReplace(FKey, '&#61;', '=');
74+end;
75+//! FKey‚É’l‚ðÝ’è‚·‚é
76+procedure TResistWord.SetKey(Value: String);
77+begin
78+ //=‚Í•Û‘¶Žž‚ÉŽg‚¤‚̂ŃGƒXƒP[ƒv‚·‚é
79+ FKey := MojuUtils.CustomStringReplace(Value, '=', '&#61;');
80+end;
81+//! FCategory‚ɐݒ肳‚ê‚Ä‚¢‚é’l‚ðŽæ“¾‚·‚é
82+function TResistWord.GetCategory: String;
83+begin
84+ //ƒGƒXƒP[ƒv‚µ‚Ä‚¢‚é=‚𕜌³‚·‚é
85+ Result := MojuUtils.CustomStringReplace(FCategory, '&#61;', '=');
86+end;
87+//! FCategory‚É’l‚ðÝ’è‚·‚é
88+procedure TResistWord.SetCategory(Value: String);
89+begin
90+ //=‚Í•Û‘¶Žž‚ÉŽg‚¤‚̂ŃGƒXƒP[ƒv‚·‚é
91+ FCategory := MojuUtils.CustomStringReplace(Value, '=', '&#61;');
92+end;
93+//! FText‚ɐݒ肳‚ê‚Ä‚¢‚é’l‚ðŽæ“¾‚·‚é
94+function TResistWord.GetText: String;
95+begin
96+ //ƒGƒXƒP[ƒv‚µ‚Ä‚¢‚é=‚𕜌³‚·‚é
97+ Result := MojuUtils.CustomStringReplace(FText, '&#61;', '=');
98+ // #1‚É‚µ‚½‰üsƒR[ƒh‚ð#13#10‚É•œŒ³‚·‚é
99+ Result := MojuUtils.CustomStringReplace(Result, #1, #13#10);
100+end;
101+procedure TResistWord.SetText(Value: String);
102+begin
103+ //=‚Í•Û‘¶Žž‚ÉŽg‚¤‚̂ŃGƒXƒP[ƒv‚·‚é
104+ FText := MojuUtils.CustomStringReplace(Value, '=', '&#61;');
105+ //‰üsƒR[ƒh‚ð#1‚É‚·‚éi1s‚É‚·‚邽‚ß)
106+ FText := MojuUtils.CustomStringReplace(FText, #13#10, #1);
107+end;
108+//! ƒtƒ@ƒCƒ‹‚ð“ǂݍž‚ñ‚ŏ‰Šú‰»‚·‚é
109+procedure TInputAssistDM.Init(FilePath: String);
110+var
111+ ini : TMemIniFile;
112+ sections: TStringList;
113+ keys: TStringList;
114+ i, j : Integer;
115+ resWord : TResistWord;
116+begin
117+ FInit := True;
118+ try
119+ // ƒtƒ@ƒCƒ‹‚Ì‘¶Ý‚ðŠm”F
120+ if FileExists(FilePath) then begin
121+ ini := TMemIniFile.Create(FilePath);
122+ sections := TStringList.Create;
123+ keys := TStringList.Create;
124+ try
125+ ini.ReadSections(sections);
126+
127+ for i :=0 to sections.Count - 1 do begin
128+ keys.Clear;
129+ ini.ReadSection(sections[i], keys);
130+ for j := 0 to keys.Count - 1 do begin
131+ resWord := TResistWord.Create;
132+ resWord.SetCategory(sections[i]);
133+ resWord.SetKey(keys[j]);
134+ resWord.SetText(ini.ReadString(sections[i], keys[j], ''));
135+ FDictionary.AddObject(resWord.GetKey, resWord);
136+ end;
137+ end;
138+ finally
139+ keys.Free;
140+ sections.Free;
141+ ini.Free;
142+ end;
143+ end;
144+
145+ except
146+ FInit := False;
147+ end;
148+end;
149+//! Žw’肳‚ꂽƒpƒX‚̃tƒ@ƒCƒ‹‚É•Û‘¶‚·‚é
150+procedure TInputAssistDM.SaveToFile(FilePath: String);
151+var
152+ ini : TMemIniFile;
153+ i : Integer;
154+ resWord : TResistWord;
155+begin
156+ if FileExists(FilePath) then begin
157+ try
158+ DeleteFile(FilePath);
159+ except
160+ end;
161+ end;
162+ ini := TMemIniFile.Create(FilePath);
163+ try
164+ for i :=0 to FDictionary.Count - 1 do begin
165+ resWord := TResistWord(FDictionary.Objects[i]);
166+ ini.WriteString(resWord.FCategory, resWord.FKey, resWord.FText);
167+ end;
168+ ini.UpdateFile;
169+ finally
170+ ini.Free;
171+ end;
172+end;
173+//! ƒfƒXƒgƒ‰ƒNƒ^
174+procedure TInputAssistDM.DataModuleDestroy(Sender: TObject);
175+var
176+ i : Integer;
177+begin
178+ if (FDictionary <> nil) then begin
179+ for i := FDictionary.Count - 1 downto 0 do begin
180+ TResistWord(FDictionary.Objects[i]).Free;
181+ end;
182+ FDictionary.Clear;
183+ FDictionary.Capacity := 0;
184+ FDictionary.Free;
185+ end;
186+end;
187+//! ƒRƒ“ƒXƒgƒ‰ƒNƒ^
188+procedure TInputAssistDM.DataModuleCreate(Sender: TObject);
189+begin
190+ FDictionary := TStringList.Create;
191+ FDictionary.Duplicates := dupAccept;
192+ FDictionary.Sorted := True;
193+end;
194+//! “o˜^’PŒê”Žæ“¾
195+function TInputAssistDM.ResistWordCount : Integer;
196+begin
197+ Result := 0;
198+ if (FDictionary <> nil) then begin
199+ Result := FDictionary.Count;
200+ end;
201+end;
202+//! “o˜^’PŒêŽæ“¾
203+function TInputAssistDM.GetResistWord(Index: Integer): TResistWord;
204+begin
205+ Result := nil;
206+ if (FDictionary <> nil) then begin
207+ if (Index >= 0) and (Index < FDictionary.Count) then begin
208+ Result := TResistWord(FDictionary.Objects[index]);
209+ end;
210+ end;
211+end;
212+//! “o˜^’PŒê‚̍폜
213+procedure TInputAssistDM.DeleteResistWord(ResistWord: TResistWord);
214+var
215+ i : Integer;
216+begin
217+ if (FDictionary <> nil) then begin
218+ for i := 0 to FDictionary.Count - 1 do begin
219+ if (ResistWord = FDictionary.Objects[i]) then begin
220+ TResistWord(FDictionary.Objects[i]).Free;
221+ FDictionary.Delete(i);
222+ break;
223+ end;
224+ end;
225+ end;
226+end;
227+//! “o˜^’PŒê’ljÁ
228+function TInputAssistDM.Add(Key: String): TResistWord;
229+var
230+ resWord : TResistWord;
231+begin
232+ Result := nil;
233+ if (FDictionary <> nil) then begin
234+ resWord := TResistWord.Create;
235+ resWord.SetKey(Key);
236+ resWord.SetCategory('ƒJƒeƒSƒŠ');
237+ resWord.SetText('’èŒ^•¶');
238+ FDictionary.AddObject(Key, resWord);
239+ Result := resWord;
240+ end;
241+end;
242+//! “o˜^’PŒê‚̃L[•ÏX
243+procedure TInputAssistDM.ChangeKey(ResistWord: TResistWord);
244+var
245+ i : Integer;
246+begin
247+ if (FDictionary <> nil) then begin
248+ for i := 0 to FDictionary.Count - 1 do begin
249+ if (ResistWord = FDictionary.Objects[i]) then begin
250+ FDictionary.Strings[i] := ResistWord.GetKey;
251+ break;
252+ end;
253+ end;
254+ end;
255+end;
256+//! Key‚ðŽ‚Â“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
257+function TInputAssistDM.GetStartWithKeyResistWords(Key: String; var list: TStringList): Integer;
258+var
259+ i : Integer;
260+ resWord : TResistWord;
261+
262+begin
263+ Result := 0;
264+ if (FDictionary <> nil) and (list <> nil) then begin
265+ Key := ZenToHan(Key);
266+ for i := 0 to FDictionary.Count - 1 do begin
267+ if (AnsiPos(Key, ZenToHan(FDictionary.Strings[i])) = 1) then begin
268+ Inc(Result);
269+ resWord := TResistWord(FDictionary.Objects[i]);
270+ list.AddObject(resWord.GetKey + '(' +
271+ resWord.GetCategory + ')', resWord);
272+ end else if (Result > 0) then begin
273+ //ƒ\[ƒg‚³‚ê‚Ä‚¢‚é‚©‚çAƒqƒbƒg‚·‚ê‚ΘA‘±‚·‚é‚Í‚¸
274+ break;
275+ end;
276+ end;
277+ end;
278+end;
279+//! Key‚ðƒJƒeƒSƒŠ‚ÉŽ‚“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
280+function TInputAssistDM.GetStartWithCategoryResistWords(Key: String; var list: TStringList): Integer;
281+var
282+ i : Integer;
283+ resWord : TResistWord;
284+begin
285+ Result := 0;
286+ if (FDictionary <> nil) and (list <> nil) then begin
287+ Key := ZenToHan(Key);
288+ for i := 0 to FDictionary.Count - 1 do begin
289+ resWord := TResistWord(FDictionary.Objects[i]);
290+ if (AnsiPos(Key, ZenToHan(resWord.GetCategory)) = 1) then begin
291+ Inc(Result);
292+ list.AddObject(resWord.GetKey + '(' +
293+ resWord.GetCategory + ')', resWord);
294+ end;
295+ end;
296+ list.CustomSort(CategorySort);
297+ end;
298+end;
299+
300+//! ƒ\[ƒg‚̏ó‘Ԃ̎擾
301+function TInputAssistDM.GetSorted: Boolean;
302+begin
303+ Result := False;
304+ if (FDictionary <> nil) then begin
305+ Result := FDictionary.Sorted;
306+ end;
307+end;
308+//! ƒ\[ƒgó‘Ԃ̐ݒè
309+procedure TInputAssistDM.SetSorted(Value: Boolean);
310+begin
311+ if (FDictionary <> nil) then begin
312+ FDictionary.Sorted := Value;
313+ end;
314+end;
315+//! Key‚̃JƒeƒSƒŠ‚É“o˜^‚³‚ê‚Ä‚¢‚é’PŒê‚ðŽæ“¾
316+function TInputAssistDM.GetCategoryResistWords(Key: String; var list: TStringList): Integer;
317+var
318+ i : Integer;
319+ resWord : TResistWord;
320+begin
321+ Result := 0;
322+ if (FDictionary <> nil) and (list <> nil) then begin
323+ for i := 0 to FDictionary.Count - 1 do begin
324+ resWord := TResistWord(FDictionary.Objects[i]);
325+ if (Key = resWord.GetCategory) then begin
326+ Inc(Result);
327+ list.AddObject(resWord.GetKey + '(' +
328+ resWord.GetCategory + ')', resWord);
329+ end;
330+ end;
331+ list.CustomSort(CategorySort);
332+ end;
333+end;
334+
335+//! “o˜^Ï‚݃L[‚Ì‘S‚ẴJƒeƒSƒŠƒŠƒXƒgŽæ“¾
336+procedure TInputAssistDM.GetCategoryList(var list: TStringList);
337+var
338+ i : Integer;
339+begin
340+ if (FDictionary <> nil) and (list <> nil) then begin
341+ // d•¡ƒ`ƒFƒbƒN‚ðTStringList‚Ì‹@”\‚ōs‚¤
342+ list.Clear;
343+ list.Duplicates := dupIgnore;
344+ list.Sorted := true;
345+ list.BeginUpdate;
346+ for i := 0 to FDictionary.Count - 1 do begin
347+ list.Add(TResistWord(FDictionary.Objects[i]).GetCategory);
348+ end;
349+ list.EndUpdate;
350+ end;
351+end;
352+
353+//! Key‚ðƒJƒeƒSƒŠ‚ÉŽ‚“o˜^’PŒê‚ð•Ô‚·Žž‚̃\[ƒg—p”äŠrƒƒ\ƒbƒh
354+function CategorySort(List: TStringList; Index1, Index2: Integer): Integer;
355+var
356+ resWord1 : TResistWord;
357+ resWord2 : TResistWord;
358+begin
359+ Result := 0;
360+ try
361+ resWord1 := TResistWord(List.Objects[Index1]);
362+ resWord2 := TResistWord(List.Objects[Index2]);
363+ Result := AnsiCompareStr(resWord1.GetCategory, resWord2.GetCategory);
364+ if (Result = 0) then begin
365+ Result := AnsiCompareStr(resWord1.GetKey, resWord2.GetKey);
366+ end;
367+ except
368+ end;
369+end;
370+
371+end.
--- a/KeySetting.pas
+++ b/KeySetting.pas
@@ -111,7 +111,6 @@ begin
111111 if ListView.Items.Count > 0 then
112112 ListView.Selected := ListView.Items[0];
113113 EditorForm := TEditorForm.Create(Self);
114- GikoSys.LoadKeySetting(EditorForm.ActionList, GikoSys.GetEditorKeyFileName);
115114 try
116115 for i := 0 to EditorForm.ActionList.ActionCount - 1 do begin
117116 if EditorForm.ActionList.Actions[i] is TAction then begin
--- a/ListViewUtils.pas
+++ b/ListViewUtils.pas
@@ -10,6 +10,7 @@ type
1010 TListViewUtils = class(TObject)
1111 private
1212 {Private éŒ¾}
13+
1314 class procedure DrawCategoryItem(BBS: TBBS; Item: TListItem; ListView: TListView);
1415 class procedure DrawBoardItem(Category: TCategory; Item: TListItem; ListView: TListView);
1516 class procedure DrawThreadItem(Board: TBoard; Item: TListItem; ListView: TListView);
@@ -30,11 +31,10 @@ type
3031 class procedure ListViewData(Sender: TObject; Item: TListItem);
3132 end;
3233
33-
3434 implementation
3535
3636 uses
37- GikoSystem, Sort, Setting, Giko, MojuUtils, GikoDataModule;
37+ GikoSystem, Sort, Setting, Giko, MojuUtils, GikoDataModule, DateUtils, Math;
3838
3939 const
4040 //ƒcƒŠ[EƒŠƒXƒgƒAƒCƒRƒ“
@@ -612,6 +612,7 @@ end;
612612 class procedure TListViewUtils.DrawItemLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
613613 var
614614 i, idx : Integer;
615+ spanday: Double;
615616 begin
616617 idx := 0;
617618 for i := 0 to ColumnCount - 1 do begin
@@ -655,6 +656,16 @@ begin
655656 Item.SubItems[ idx ] := '';
656657 end else
657658 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.LastModified);
659+ gbcVigor:
660+ begin
661+ spanday := DaySpan(Sort.GetSortDate, Thread.CreateDate);
662+ if (spanday > 0) then begin
663+ Item.SubItems[ idx ] := Format('%f', [Thread.AllResCount / spanday]);
664+ end else begin
665+ Item.SubItems[ idx ] := '';
666+ end;
667+
668+ end;
658669 end;
659670 Inc( idx );
660671 end;
@@ -668,6 +679,7 @@ end;
668679 class procedure TListViewUtils.DrawItemNoLogThread(Thread: TThreadItem; Item: TListItem; ColumnCount: Integer);
669680 var
670681 i, idx: Integer;
682+ spanday: Double;
671683 begin
672684 idx := 0;
673685 for i := 0 to ColumnCount - 1do begin
@@ -686,9 +698,20 @@ begin
686698 Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Thread.CreateDate);
687699 gbcLastModified:
688700 Item.SubItems[ idx ] := '';
701+ gbcVigor:
702+ begin
703+ spanday := DaySpan(Sort.GetSortDate, Thread.CreateDate);
704+ if (spanday > 0) then begin
705+ Item.SubItems[ idx ] := Format('%f', [Thread.AllResCount / spanday]);
706+ end else begin
707+ Item.SubItems[ idx ] := '';
708+ end;
709+
710+ end;
689711 else
690712 Item.SubItems[ idx ] := '';
691713 end;
714+
692715 Inc( idx );
693716 end;
694717 if Thread.NewArrival then
--- a/MojuUtils.pas
+++ b/MojuUtils.pas
@@ -32,6 +32,10 @@ uses
3232 //<font>ƒ^ƒO‚ð‘S‚č폜‚·‚é
3333 function DeleteFontTag( inSource : string) : string;
3434 function RemoveToken(var s: string;const delimiter: string): string;
35+ // –³ŠQ‰»(& -> &amp; " -> &auot; ‚É•ÏŠ·‚·‚é)
36+ function Sanitize(const s: String): String;
37+ // –³ŠQ‰»‰ðœ(&amp; -> & &auot; -> " ‚É•ÏŠ·‚·‚é)
38+ function UnSanitize(const s: String): String;
3539
3640 implementation
3741 // ƒ|ƒCƒ“ƒ^[•ƒAƒZƒ“ƒuƒ‰‚É‚æ‚鍂‘¬ƒ|ƒX
@@ -358,6 +362,17 @@ begin
358362 s := '';
359363 end;
360364 end;
361-
365+//! –³ŠQ‰»(& -> &amp; " -> &auot; ‚É•ÏŠ·‚·‚é)
366+function Sanitize(const s: String): String;
367+begin
368+ Result := CustomStringReplace(s, '&', '&amp;');
369+ Result := CustomStringReplace(Result, '"', '&quot;');
370+end;
371+//! –³ŠQ‰»‰ðœ(&amp; -> & &auot; -> " ‚É•ÏŠ·‚·‚é)
372+function UnSanitize(const s: String): String;
373+begin
374+ Result := CustomStringReplace(s, '&quot;', '"');
375+ Result := CustomStringReplace(Result, '&amp;', '&');
376+end;
362377
363378 end.
--- a/Setting.pas
+++ b/Setting.pas
@@ -73,15 +73,15 @@ type
7373 end;
7474 /// ƒXƒŒƒŠƒXƒg‚̃Jƒ‰ƒ€ ID
7575 type TGikoBoardColumnID = (gbcTitle, gbcAllCount, gbcLocalCount, gbcNonAcqCount,
76- gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified );{gbcLastModified,}
76+ gbcNewCount, gbcUnReadCount, gbcRoundName, gbcRoundDate, gbcCreated, gbcLastModified, gbcVigor );{gbcLastModified,}
7777 /// ƒXƒŒƒŠƒXƒg‚̃Jƒ‰ƒ€–¼
78- const GikoBoardColumnCaption : array[0..9] of string =
78+ const GikoBoardColumnCaption : array[0..10] of string =
7979 ( 'ƒXƒŒƒbƒh–¼', 'ƒJƒEƒ“ƒg', 'Žæ“¾', '–¢Žæ“¾', 'V’…',
80- '–¢“Ç', '„‰ñ—\–ñ', 'Žæ“¾“úŽž', 'ƒXƒŒì¬“úŽž', 'ÅIXV“úŽž' );
81- const GikoBoardColumnAlignment : array[0..9] of TAlignment = (
80+ '–¢“Ç', '„‰ñ—\–ñ', 'Žæ“¾“úŽž', 'ƒXƒŒì¬“úŽž', 'ÅIXV“úŽž', '¨‚¢' );
81+ const GikoBoardColumnAlignment : array[0..10] of TAlignment = (
8282 taLeftJustify, taRightJustify, taRightJustify, taRightJustify,
8383 taRightJustify, taRightJustify, taLeftJustify, taLeftJustify,
84- taLeftJustify, taLeftJustify);
84+ taLeftJustify, taLeftJustify, taRightJustify);
8585 /// ƒXƒŒƒŠƒXƒgƒJƒ‰ƒ€”z—ñ
8686 type TGikoBoardColumnList = class( TList )
8787 private
@@ -259,7 +259,7 @@ type
259259 //ƒŠƒXƒgƒJƒ‰ƒ€ƒwƒbƒ_[ƒTƒCƒY
260260 FBBSColumnWidth: array[0..0] of Integer;
261261 FCategoryColumnWidth: array[0..2] of Integer;
262- FBoardColumnWidth: array[0..9] of Integer;
262+ FBoardColumnWidth: array[0..10] of Integer;
263263
264264 /// ƒJƒeƒSƒŠƒŠƒXƒgƒJƒ‰ƒ€‡˜
265265 FBBSColumnOrder : TGikoBBSColumnList;
@@ -491,7 +491,7 @@ type
491491 function GetMainKeyFileName: String;
492492 function GetEditorKeyFileName: String;
493493 procedure WriteLogFolder(AVal : String);
494-
494+ function GetInputAssistFileName : String;
495495 //ŽóMƒoƒbƒtƒ@ƒTƒCƒY
496496 property RecvBufferSize: Integer read FRecvBufferSize write FRecvBufferSize;
497497 //HTTP1.1Žg—p
@@ -772,7 +772,8 @@ const
772772 MAX_POPUP_RES : Integer = 10;
773773 GESTURE_FILE_NAME = 'Gestures.ini';
774774 SPAMFILTER_FILE_NAME = 'SpamFilter.ini';
775- LANGUAGE_FILE_NAME = 'language.ini';
775+ LANGUAGE_FILE_NAME = 'language.ini';
776+ INPUTASSIST_FILE_NAME = 'InputAssist.ini';
776777
777778
778779
@@ -935,7 +936,7 @@ procedure TSetting.ReadSettingFile();
935936 const
936937 DEFAULT_BBS_WIDTH: array[0..0] of Integer = (140);
937938 DEFAULT_CATEGORY_WIDTH: array[0..2] of Integer = (150, 80, 130);
938- DEFAULT_BOARD_WIDTH: array[0..9] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130);
939+ DEFAULT_BOARD_WIDTH: array[0..10] of Integer = (350, 60, 60, 60, 60, 60, 80, 130, 130, 130, 60);
939940 MAX_WIDTH: Integer = 2000;
940941 var
941942 ini: TMemIniFile;
@@ -1164,8 +1165,12 @@ begin
11641165 end;
11651166 if FBoardColumnOrder.Count = 0 then begin
11661167 // Ý’肪–³‚¢‚̂ō쐬
1167- for i := 0 to Integer( High( TGikoBoardColumnID ) ) do
1168- FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
1168+ for i := 0 to Integer( High( TGikoBoardColumnID ) ) do begin
1169+ // ¨‚¢‚̃Jƒ‰ƒ€‚̓fƒtƒHƒ‹ƒg‚Å”ñ•\Ž¦‚É‚·‚é
1170+ if ( i <> Ord(gbcVigor) ) then begin
1171+ FBoardColumnOrder.Add( TGikoBoardColumnID( i ) );
1172+ end;
1173+ end;
11691174 end;
11701175 finally
11711176 wkList.Free;
@@ -1257,7 +1262,7 @@ begin
12571262 FBoardSortIndex := ini.ReadInteger('ThreadList', 'BoardSortIndex', 0);
12581263 FBoardSortOrder := ini.ReadBool('ThreadList', 'BoardSortOrder', True);
12591264 // DLŒã‚ÌŽ©“®ƒ\[ƒg
1260- FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', True);
1265+ FAutoSortThreadList := ini.ReadBool('ThreadList', 'AutoSort', False);
12611266 //Dat—Ž‚¿ƒXƒŒƒ\[ƒg‡
12621267 FDatOchiSortIndex := ini.ReadInteger('ThreadList', 'DatOchiSortIndex', -1);
12631268 FDatOchiSortOrder := ini.ReadBool('ThreadList', 'DatOchiSortOrder', False);
@@ -2175,8 +2180,13 @@ begin
21752180 end;
21762181 function TSetting.GetEditorKeyFileName: String;
21772182 begin
2178- Result := GetConfigDir + EKEY_SETTING_FILE_NAME;
2183+ Result := GetConfigDir + EKEY_SETTING_FILE_NAME;
2184+end;
2185+function TSetting.GetInputAssistFileName : String;
2186+begin
2187+ Result := GetConfigDir + INPUTASSIST_FILE_NAME;
21792188 end;
2189+
21802190 end.
21812191
21822192
--- a/Sort.pas
+++ b/Sort.pas
@@ -4,7 +4,7 @@ interface
44 uses
55 Windows, Messages, SysUtils, Classes, Controls, Forms,
66 BoardGroup,DateUtils,
7- Setting;
7+ Setting, Math;
88
99 function CategorySortProc(Item1, Item2: Pointer): integer;
1010 function BoardSortProc(List: TStringList; Item1, Item2: Integer): integer;
@@ -12,13 +12,16 @@ uses
1212 function CompareBool(Item1, Item2: Boolean): integer;
1313 function CompareInt(Item1, Item2: Integer): Integer;
1414 function CompareDate(Item1, Item2: TDateTime): Integer;
15-
15+ procedure SetSortDate(Date: TDateTime);
16+ function GetSortDate(): TDateTime;
1617 var
1718 SortOrder: Boolean;
1819 SortIndex: Integer;
1920 SortNoFlag: Boolean;
2021
2122 implementation
23+var
24+ FSortDate: TDateTime;
2225
2326 function CategorySortProc(Item1, Item2: Pointer): integer;
2427 var
@@ -73,6 +76,7 @@ function ThreadItemSortProc(List: TStringList; Item1, Item2: Integer): integer;
7376 var
7477 ThreadItem1: TThreadItem;
7578 ThreadItem2: TThreadItem;
79+ SpanDay1, SpanDay2: Double;
7680 begin
7781 ThreadItem1 := TThreadItem(List.Objects[ Item1 ]);
7882 ThreadItem2 := TThreadItem(List.Objects[ Item2 ]);
@@ -105,6 +109,22 @@ begin
105109 gbcRoundDate: Result := CompareDateTime(ThreadItem1.RoundDate, ThreadItem2.RoundDate); {gbcLastModified:}
106110 gbcCreated: Result := CompareDateTime(ThreadItem1.CreateDate, ThreadItem2.CreateDate);
107111 gbcLastModified: Result := CompareDateTime(ThreadItem1.LastModified, ThreadItem2.LastModified); {gbcLastModified:}
112+ gbcVigor:
113+ begin
114+ SpanDay1 := DaySpan(FSortDate, ThreadItem1.CreateDate);
115+ SpanDay2 := DaySpan(FSortDate, ThreadItem2.CreateDate);
116+ if (SpanDay1 > 0) and (SpanDay2 > 0) then begin
117+ Result := CompareValue(
118+ ThreadItem1.AllResCount / SpanDay1,
119+ ThreadItem2.AllResCount / SpanDay2);
120+ end else if (SpanDay1 > 0) then begin
121+ Result := 1;
122+ end else if (SpanDay2 > 0) then begin
123+ Result := -1;
124+ end else begin
125+ Result := 0;
126+ end;
127+ end;
108128 else
109129 Result := 0;
110130 end;
@@ -163,5 +183,12 @@ begin
163183 else
164184 Result := 0;
165185 end;
166-
186+procedure SetSortDate(Date: TDateTime);
187+begin
188+ FSortDate := Date;
189+end;
190+function GetSortDate(): TDateTime;
191+begin
192+ Result := FSortDate;
193+end;
167194 end.
--- a/gikoNavi.dpr
+++ b/gikoNavi.dpr
@@ -71,7 +71,9 @@ uses
7171 ListViewUtils in 'ListViewUtils.pas',
7272 GikoDataModule in 'GikoDataModule.pas' {GikoDM: TDataModule},
7373 BrowserRecord in 'BrowserRecord.pas',
74- GikoMessage in 'GikoMessage.pas';
74+ GikoMessage in 'GikoMessage.pas',
75+ InputAssist in 'InputAssist.pas' {InputAssistForm},
76+ InputAssistDataModule in 'InputAssistDataModule.pas' {InputAssistDM: TDataModule};
7577
7678 {$R *.RES}
7779 {$R gikoResource.res}
@@ -90,7 +92,11 @@ begin
9092 Wnd := FindWindow('TGikoForm', nil);
9193 if Wnd <> 0 then begin
9294 //Šù‚É‹N“®Ï‚݃MƒRƒiƒr‚̃AƒNƒeƒBƒu‰»•ƒAƒCƒRƒ“‰»‚³‚ê‚Ä‚½‚ç•œŒ³
93- SetForegroundWindow(Wnd);
95+ try
96+ SetForegroundWindow(Wnd);
97+ except
98+ //‰Šú‰»‚ªI‚í‚Á‚Ä‚¢‚È‚¢‚ƃtƒHƒAƒOƒ‰ƒEƒ“ƒh‚Ɉڂ¹‚¸‚É—áŠO”­¶
99+ end;
94100 if IsIconic(Wnd) then
95101 SendMessage(Wnd, WM_SYSCOMMAND, SC_RESTORE, -1);
96102 // AppWnd := GetWindowLong(Wnd, GWL_HWNDPARENT);
@@ -122,6 +128,7 @@ begin
122128 Application.CreateForm(TFavoriteDM, FavoriteDM);
123129 Application.CreateForm(TAddressHistoryDM, AddressHistoryDM);
124130 Application.CreateForm(TGikoDM, GikoDM);
131+ Application.CreateForm(TInputAssistDM, InputAssistDM);
125132 Application.CreateForm(TGikoForm, GikoForm);
126133 Application.Run;
127134 ReleaseMutex(hMutex);
Binary files a/gikoNavi.res and b/gikoNavi.res differ
--- /dev/null
+++ b/readme/InputAssist.ini
@@ -0,0 +1,23 @@
1+[ƒMƒR”L]
2+‚¬‚±=@@@@@@ÈÈ@@`ŒPP(,,߄Dß)@@@UUPU U
3+‚¬‚±Œã‚ë=@@@ ÈÈ@@@(@@,,)@@@/@@|@`iQQj
4+‚¬‚±À‚è=@@ÈÈ@@@(,,߄Dß)@@/ ‚‚`iQQj
5+‚¬‚±—§‚¿=@@ÈÈ@@(,,߄Dß)@ ¼@@‚@ `@@|@@ ‚µM‚i
6+
7+[ƒJƒeƒSƒŠ]
8+‚«‚½[=·À„ª„ª„ª( LÍ`)߁Íß)*߁[ß)¥ƒÖ¥) ߄Dß)L[`)¥Í¥)P°P)L_T`)`„DL)-Q-)L„DM)„ª„ª!!!
9+
10+[‘½”s]
11+‚«‚½[=·À„ª„ª„ª„ª„ª(߁Íß)„ª„ª„ª„ª„ª!!!!·À„ª„ª„ª„ª„ª(߁Íß)„ª„ª„ª„ª„ª!!!!·À„ª„ª„ª„ª„ª(߁Íß)„ª„ª„ª„ª„ª!!!!·À„ª„ª„ª„ª„ª(߁Íß)„ª„ª„ª„ª„ª!!!!·À„ª„ª„ª„ª„ª(߁Íß)„ª„ª„ª„ª„ª!!!!
12+
13+[“®•¨]
14+‚­‚Á‚­‚é=@ @ÉÉÉɁ@@-Q__@@(߁¸ß*)@@„Ÿ_Q___@______P@@˜¦_Ɂ܁_@@____@___@œc^_@/Rƒ~@__@__Q@@@@./É_ƒm_@@Q@@@./^._^RЁ@ß-@@И¦@-__P___________
15+
16+[ƒNƒ}[]
17+‚­‚܁[=@@ ¿QQQ¿ @@ | ƒm@@@@@ R @@/@@œ@@@œ |@ƒNƒ}„Ÿ„ŸII @ |@@@@( _œ_)@ ƒ~ @œc¤@@@|¾|@@¤M_ /@QQ@ Rƒm@/L>@ ) (QQQj@@@/@(_^ @|@@@@@@ / @|@@^_@_ @|@/@@@ )@ ) @¾@@@ i@ _ @@@@@@ _Q)
18+‰£‚é=@@@@@@@@@@@@@@@@@@@@@@Q ^-@ƒC¤_ @@@@@@@@@@ QQ@@@@@ @@^: : : : : : : : : : : ( @@@@@@@@@ qqqq@R@@@@@/: : : : ::;:;: ;: ;:;: ; : : : ::T @@@@@@@@@@q½@@}@@@@@{:: : : :ƒm@--]'@¤__: : ::p @@ ¿QQQ¿@ |@@ |@@@@@ {:: : :ƒm ,_;:;:;ƒm¤ ƒFª S: :::} @@ | ƒm@@@@@ R !@@ !@@@A@@‚Œ: :Ɂ@^“ñ\-¤@|: ::É @@/@@œ@@@œ |@@/@@@C,¥_@@|@/^@ P7/ /::ƒm @ |@@@@( _œ_)@ ƒ~^@, f,ˆ ¥@N@ r(_“ñ„Ÿ-„£{^ @œc¤@@@|¾|@@^@@¤¥æ f@@^¤^/|@PPR /@QQ@ Rƒm@/@@@@@@@@ ^@@ //@|^^_ r (QQQj@@@/@@@@@@@ @/@@@ //@@ /_ ^ @@@@@@@/@@@@@@@ @ / @@@@@@@/@
19+
20+[AA]
21+‚µ‚å‚Ú=(L¥ƒÖ¥`)
22+‚à‚¤‚±‚Ë‚¦‚æ=@@@@@@@@@@@@@@@@@„¡„Ÿ„¢ @@@@@@@@@@@@@@@@@b‚à.b @@@@@@@@@@@@@@@@@b‚¤@| @@@@@@@@@@@@@@@@@„ —ˆ„  @@@@@@@@@@@@@@@@@„ ‚Ë„  @@@@@@@@@@@@@@@@@„ ‚¦ .| @@@@@@@@@@@@@@@@@„ ‚æ .| @@@@@@ÊÞ¶@@@@ºÞÙ§@@„  !!.„  @@@@@@@@@@@@@@@@@„¤„Ÿ„§@@@@ÌßÝÌßÝ @@@@R(`„DL)Ɂ@R(`„DL)Ɂ@@(`„DL)Ɂ@@@ i@`„Dj @@@@|PPP|„Ÿ|PPP|„Ÿ|PPP|„Ÿ i R„¢U ` `@PP@@.PP@@PP@@ |>„£
23+
--- a/readme/Samba.default
+++ b/readme/Samba.default
@@ -9,11 +9,11 @@ comic6=30
99 dso=10
1010 etc3=30
1111 etc4=30
12-ex9=20
13-ex10=20
14-ex11=20
15-ex12=20
16-ex13=20
12+ex9=15
13+ex11=15
14+ex12=15
15+ex13=15
16+ex14=15
1717 food6=30
1818 game9=30
1919 game10=30
@@ -21,12 +21,9 @@ hobby7=30
2121 hobby8=30
2222 human5=30
2323 life7=30
24-live14=15
25-live16=15
26-live18=15
27-live19=15
28-live20=15
29-live21=15
24+live14=10
25+live19=10
26+live22x=10
3027 love3=30
3128 money4=30
3229 music4=30
@@ -43,8 +40,8 @@ school5=30
4340 science4=30
4441 society3=30
4542 sports2=0
46-sports9=30
47-that3=30
43+sports9=60
44+that4=30
4845 tmp5=45
4946 travel2=30
5047 tv7=30
@@ -53,4 +50,4 @@ idol=30
5350 pie=30
5451 sakura01=30
5552 sakura02=30
56-sakura03=30
\ No newline at end of file
53+sakura03=30
--- a/readme/readme.txt
+++ b/readme/readme.txt
@@ -1,4 +1,4 @@
1-¡ƒMƒRƒiƒr Version1.00 ÊÞÀ51 Readme.txt
1+¡ƒMƒRƒiƒr Version1.00 ÊÞÀ52 Readme.txt
22
33
44 ------------------------------
@@ -107,21 +107,28 @@ LICENSE
107107 ------------------------------
108108 —š—ð
109109 ------------------------------
110-200X/XX/XX
110+2006/XX/YY
111+ Version ÊÞÀ52
112+@“ü—̓AƒVƒXƒg‹@\’ljÁ
113+@ƒXƒŒƒbƒhˆê——‚Ɂh¨‚¢hƒJƒ‰ƒ€’ljÁiƒfƒtƒHƒ‹ƒg”ñ•\Ž¦j
114+@‚¨‹C‚É“ü‚èA—š—ðA‘—MƒƒO‚̃XƒŒƒbƒhƒ^ƒCƒgƒ‹–¼‚ðƒTƒjƒ^ƒCƒY‚·‚é‚悤‚ɏC³
115+iƒm[ƒgƒ“‚̌딽‰ž–â‘è‚Ö‚Ì•”•ª“I‘Ήžj
116+
117+2006/01/14
111118 Version ÊÞÀ51
119+@ƒƒCƒ“ƒtƒH[ƒ€ã‚ł̃Vƒ‡[ƒgƒJƒbƒgƒL[‚Ì—Dæ‡ˆÊ‚ªƒMƒRƒiƒrŽ©‘Ì‚ªÅãˆÊ‚ɕύX
112120 @ƒXƒŒƒbƒh•`‰æˆ—‚̍œK‰»
113121 @ƒŒƒX”ÔŽw’èURL‚ðƒNƒŠƒbƒN‚µ‚½‚Æ‚«‚Ì“®ì‚ŁAŽæ“¾Ï‚ÝŠO‚̃ŒƒX”Ԃ̏ꍇŽ©“®‚ÅDL‚·‚é‚悤‚ɕύX
114122 @ƒŒƒXƒGƒfƒBƒ^‚©‚çSamba‚̐ݒè’l‚ð•ÏX‚Å‚«‚é‚悤‚ɕύX
115123 @ƒLƒƒƒrƒlƒbƒgã‚ŃNƒŠƒbƒNEƒ_ƒuƒ‹ƒNƒŠƒbƒNƒCƒxƒ“ƒg‚ª‰ßè‚É”­¶‚·‚é•s‹ï‡‚̏C³
116124 @ƒ}ƒEƒXƒWƒFƒXƒ`ƒƒ[—LŒøŽž‚ɃvƒŒƒrƒ…[ã‚ʼnEƒNƒŠƒbƒN‚Å‚«‚È‚¢•s‹ï‡‚̏C³
117-@ƒƒCƒ“ƒtƒH[ƒ€ã‚ł̃Vƒ‡[ƒgƒJƒbƒgƒL[‚Ì—Dæ‡ˆÊ‚ªƒMƒRƒiƒrŽ©‘Ì‚ªÅãˆÊ‚ɕύX
118125 @ƒƒCƒ“ƒƒjƒ…[‚Ì‚¨‹C‚É“ü‚è‚Ì•`‰æ‚̍‚‘¬‰»
119126 @ƒXƒe[ƒ^ƒXƒo[‚ÉŒ»Ý•\Ž¦‚µ‚Ä‚¢‚éƒXƒŒƒbƒh‚Ì—e—Ê‚ð•\Ž¦‚·‚é‚悤‚É‚µ‚½
120127 @DAT—Ž‚¿‚µ‚½ƒXƒŒ‚Ì—e—Ê‚ðŽæ“¾‚Å‚«‚È‚¢•s‹ï‡‚̏C³
121128 @”XV‚э[ƒJƒ‹ƒtƒ@ƒCƒ‹‚ðŽw’è‚Å‚«‚é‚悤‚ɕύX
122129 @ƒXƒŒƒbƒhˆê——ƒ_ƒEƒ“ƒ[ƒhŒã‚̃\[ƒg‚ðƒIƒvƒVƒ‡ƒ“‰»
123130 @NGƒ[ƒh‚É‘S”¼Šp‚Ђ炪‚ȃJƒ^ƒJƒi‚̈Ⴂ‚𓯈ꎋ‚·‚éƒIƒvƒVƒ‡ƒ“‚̒ljÁ
124-@ƒŒƒX‚̍iž‚Ý‚Å‘S”¼Šp‚Ђ炪‚ȃJƒ^ƒJƒ^‚̈Ⴂ‚𖳎‹‚·‚é‚悤‚ɕύX
131+@ƒŒƒX‚̍iž‚Ý‚Å‘S”¼Šp‚Ђ炪‚ȃJƒ^ƒJƒi‚̈Ⴂ‚𖳎‹‚·‚é‚悤‚ɕύX
125132
126133 2005/10/10
127134 Version ÊÞÀ50 ƒŠƒŠ[ƒX3
--- a/readme/setup.INF
+++ b/readme/setup.INF
@@ -90,6 +90,7 @@ Folder=gikoNavi
9090 87=config\Board\ƒMƒRƒiƒr.txt
9191 88=Samba.default
9292 89=config\language.ini
93+90=config\InputAssist.ini
9394
9495 [Group]
9596 1=ƒMƒRƒiƒr,gikoNavi.exe