修订版 | 79ca4e6a075ba1deb0aefc5e1704c897005f7665 (tree) |
---|---|
时间 | 2007-08-26 22:00:42 |
作者 | cvs2git <cvs2git> |
Commiter | cvs2git |
This commit was manufactured by cvs2svn to create tag 'v1_57_0_728'.
@@ -115,6 +115,7 @@ type | ||
115 | 115 | //-- |
116 | 116 | function TreatSyria(AString: string): string; |
117 | 117 | //-- |
118 | + function AddToken(AString: string; Invisible: Boolean): Boolean; | |
118 | 119 | end; |
119 | 120 | var |
120 | 121 | Abon1 :TAbon; |
@@ -905,6 +906,32 @@ begin | ||
905 | 906 | Result := Result + AString; |
906 | 907 | end; |
907 | 908 | |
909 | +// NGワードファイルに追加 追加された場合、Trueがかえる | |
910 | +function TAbon.AddToken(AString: string; Invisible: Boolean): Boolean; | |
911 | +var | |
912 | + bufStringList : TStringList; | |
913 | + ngword: String; | |
914 | +begin | |
915 | + Result := False; | |
916 | + if FileExists(GetNGwordpath) then begin | |
917 | + bufStringList := TStringList.Create; | |
918 | + try | |
919 | + bufStringList.LoadFromFile(GetNGwordpath); | |
920 | + if (Invisible) then begin | |
921 | + ngword := #9 + AString; | |
922 | + end else begin | |
923 | + ngword := AString; | |
924 | + end; | |
925 | + if (bufStringList.IndexOf(ngword) = -1) then begin | |
926 | + bufStringList.Add(ngword); | |
927 | + bufStringList.SaveToFile(GetNGwordpath); | |
928 | + Result := True; | |
929 | + end; | |
930 | + finally | |
931 | + bufStringList.Free; | |
932 | + end; | |
933 | + end; | |
934 | +end; | |
908 | 935 | |
909 | 936 | |
910 | 937 | end. |
@@ -1777,9 +1777,6 @@ begin | ||
1777 | 1777 | end; |
1778 | 1778 | |
1779 | 1779 | function TThreadItem.GetCreateDate: TDateTime; |
1780 | -var | |
1781 | - unixtime: Int64; | |
1782 | - tmp: string; | |
1783 | 1780 | begin |
1784 | 1781 | // ファイル名からスレ作成日時を求める |
1785 | 1782 | try |
@@ -1787,18 +1784,7 @@ begin | ||
1787 | 1784 | Result := ZERO_DATE |
1788 | 1785 | else begin |
1789 | 1786 | // ログファイルの拡張子をはずしたものがスレ作成日時 |
1790 | - tmp := ChangeFileExt(FFileName, ''); | |
1791 | - if AnsiPos('_', tmp) <> 0 then | |
1792 | - if AnsiPos('_', tmp) > 9 then | |
1793 | - tmp := Copy(tmp, 1, AnsiPos('_', tmp)-1) | |
1794 | - else | |
1795 | - Delete(tmp, AnsiPos('_', tmp), 1); | |
1796 | - | |
1797 | - if ( Length(tmp) = 9) and ( tmp[1] = '0' ) then | |
1798 | - Insert('1', tmp, 1); | |
1799 | - | |
1800 | - unixtime := StrToInt64Def(tmp, ZERO_DATE); | |
1801 | - Result := UnixToDateTime(unixtime) + OffsetFromUTC; | |
1787 | + Result := GikoSys.GetCreateDateFromName(FFileName); | |
1802 | 1788 | if GikoSys.Setting.FutureThread then begin |
1803 | 1789 | if CompareDateTime(Result, Now) = 1 then |
1804 | 1790 | Result := ZERO_DATE; |
@@ -8419,6 +8419,17 @@ object GikoForm: TGikoForm | ||
8419 | 8419 | object N71: TMenuItem |
8420 | 8420 | Action = GikoDM.IndividualAbonID0Action |
8421 | 8421 | end |
8422 | + object N82: TMenuItem | |
8423 | + Caption = '-' | |
8424 | + end | |
8425 | + object IDNG1: TMenuItem | |
8426 | + Action = GikoDM.AddIDtoNGWord1Action | |
8427 | + Caption = 'NG'#12527#12540#12489#12395#36861#21152 | |
8428 | + end | |
8429 | + object IDNG2: TMenuItem | |
8430 | + Action = GikoDM.AddIDtoNGWord0Action | |
8431 | + Caption = 'NG'#12527#12540#12489#12395#36861#21152'('#36879#26126')' | |
8432 | + end | |
8422 | 8433 | end |
8423 | 8434 | object N52: TMenuItem |
8424 | 8435 | Caption = #20491#21029#12354#12412#65374#12435#35299#38500 |
@@ -8781,4 +8792,11 @@ object GikoForm: TGikoForm | ||
8781 | 8792 | Left = 4 |
8782 | 8793 | Top = 373 |
8783 | 8794 | end |
8795 | + object ResPopupClearTimer: TTimer | |
8796 | + Tag = 1 | |
8797 | + Enabled = False | |
8798 | + OnTimer = ResPopupClearTimerTimer | |
8799 | + Left = 8 | |
8800 | + Top = 440 | |
8801 | + end | |
8784 | 8802 | end |
@@ -24,7 +24,8 @@ uses | ||
24 | 24 | const |
25 | 25 | NGWORDNAME_PANEL = 3; |
26 | 26 | THREADSIZE_PANEL = 2; |
27 | - | |
27 | + USER_RESPOPUPCLEAR = WM_USER + 2005; ///< wParam : TWebBrowser | |
28 | + | |
28 | 29 | type |
29 | 30 | |
30 | 31 | TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser); |
@@ -419,6 +420,10 @@ type | ||
419 | 420 | N80: TMenuItem; |
420 | 421 | SameBoardThreadItem: TMenuItem; |
421 | 422 | N81: TMenuItem; |
423 | + N82: TMenuItem; | |
424 | + IDNG1: TMenuItem; | |
425 | + IDNG2: TMenuItem; | |
426 | + ResPopupClearTimer: TTimer; | |
422 | 427 | procedure FormCreate(Sender: TObject); |
423 | 428 | procedure FormDestroy(Sender: TObject); |
424 | 429 | procedure BrowserStatusTextChange(Sender: TObject; |
@@ -555,6 +560,7 @@ type | ||
555 | 560 | procedure GetResURLMenuClick(Sender: TObject); |
556 | 561 | procedure MainCoolBarContextPopup(Sender: TObject; MousePos: TPoint; |
557 | 562 | var Handled: Boolean); |
563 | + procedure ResPopupClearTimerTimer(Sender: TObject); | |
558 | 564 | private |
559 | 565 | { Private 宣言 } |
560 | 566 | FEnabledCloseButton: Boolean; |
@@ -686,6 +692,10 @@ type | ||
686 | 692 | procedure SameBoardThreadSubItemOnClick(Sender: TObject); |
687 | 693 | //! ポップアップブラウザ作成 |
688 | 694 | procedure CreateResPopupBrowser; |
695 | + //! D&Dを受け取る | |
696 | + procedure WMDropFiles(var Msg: TWMDropFiles); Message WM_DropFiles; | |
697 | + //! ファイルチェック | |
698 | + function isValidFile(FileName: String) : boolean; | |
689 | 699 | protected |
690 | 700 | procedure CreateParams(var Params: TCreateParams); override; |
691 | 701 | procedure WndProc(var Message: TMessage); override; |
@@ -756,6 +766,8 @@ type | ||
756 | 766 | procedure IndividualAbonID(Atype : Integer); |
757 | 767 | //このレスあぼ〜ん |
758 | 768 | procedure IndividualAbon(Atag, Atype : Integer); |
769 | + //同一IDをNGワードに登録 | |
770 | + procedure AddIDtoNGWord(invisible : boolean); | |
759 | 771 | //ブラウザの再描画 true:全てのタブ false:アクティブなタブのみ |
760 | 772 | procedure RepaintAllTabsBrowser(); |
761 | 773 | //リンクバー設定 |
@@ -1312,6 +1324,12 @@ begin | ||
1312 | 1324 | |
1313 | 1325 | //置換設定ファイルの読み込み |
1314 | 1326 | ReplaceDM.LoadFromFile(GikoSys.GetReplaceFileName); |
1327 | + | |
1328 | + //レスポップアップ消去タイマー | |
1329 | + ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait; | |
1330 | + | |
1331 | + // D&Dを受け取る | |
1332 | + DragAcceptFiles(Self.Handle, True); | |
1315 | 1333 | end; |
1316 | 1334 | |
1317 | 1335 | // CoolBar の設定を変数に保存 |
@@ -1467,6 +1485,13 @@ begin | ||
1467 | 1485 | GikoDM.TabsOpenAction.Execute; |
1468 | 1486 | GikoDM.TabsOpenAction.Tag := 0; |
1469 | 1487 | if (GikoSys.Setting.LastCloseTabURL <> '') then begin |
1488 | + PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( FActiveContent.Browser ), 0 ); | |
1489 | + if ( FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
1490 | + while (FActiveContent.Browser.ReadyState <> READYSTATE_COMPLETE) and | |
1491 | + (FActiveContent.Browser.ReadyState <> READYSTATE_INTERACTIVE) do begin | |
1492 | + Application.ProcessMessages; | |
1493 | + end; | |
1494 | + end; | |
1470 | 1495 | item := BBSsFindThreadFromURL( GikoSys.Setting.LastCloseTabURL ); |
1471 | 1496 | if (item <> nil) and (item.IsLogFile) then begin |
1472 | 1497 | OpenThreadItem(item, item.URL); |
@@ -1936,10 +1961,20 @@ begin | ||
1936 | 1961 | if FResPopupBrowser <> nil then begin |
1937 | 1962 | if not(Sender is TResPopupBrowser) then begin |
1938 | 1963 | if (FResPopupBrowser.Visible) then begin |
1939 | - FResPopupBrowser.Clear; | |
1964 | + if ResPopupClearTimer.Interval > 0 then begin | |
1965 | + ResPopupClearTimer.Enabled := True; | |
1966 | + ResPopupClearTimer.Tag := 0; | |
1967 | + end else begin | |
1968 | + FResPopupBrowser.Clear; | |
1969 | + end; | |
1940 | 1970 | end; |
1941 | 1971 | end else begin |
1942 | - TResPopupBrowser(Sender).ChildClear; | |
1972 | + if ResPopupClearTimer.Interval > 0 then begin | |
1973 | + ResPopupClearTimer.Enabled := True; | |
1974 | + ResPopupClearTimer.Tag := 1; | |
1975 | + end else begin | |
1976 | + TResPopupBrowser(Sender).ChildClear; | |
1977 | + end; | |
1943 | 1978 | end; |
1944 | 1979 | end; |
1945 | 1980 | cResPopup := nil; |
@@ -1977,6 +2012,15 @@ begin | ||
1977 | 2012 | e := IHTMLDocument2(TWebBrowser(Sender).Document).elementFromPoint(p.x, p.y); |
1978 | 2013 | if (Assigned(e)) then begin |
1979 | 2014 | CreateResPopupBrowser; |
2015 | + | |
2016 | + if not(Sender is TResPopupBrowser) then begin | |
2017 | + if (FResPopupBrowser.Visible) then begin | |
2018 | + FResPopupBrowser.Clear; | |
2019 | + end; | |
2020 | + end else begin | |
2021 | + TResPopupBrowser(Sender).ChildClear; | |
2022 | + end; | |
2023 | + | |
1980 | 2024 | cResPopup := FResPopupBrowser.CreateNewBrowser; |
1981 | 2025 | tmp2 := ZenToHan(e.Get_outerText); |
1982 | 2026 | if (GikoSys.IsNumeric(tmp2)) then begin |
@@ -1991,6 +2035,16 @@ begin | ||
1991 | 2035 | end; |
1992 | 2036 | end; |
1993 | 2037 | end else begin |
2038 | + CreateResPopupBrowser; | |
2039 | + | |
2040 | + if not(Sender is TResPopupBrowser) then begin | |
2041 | + if (FResPopupBrowser.Visible) then begin | |
2042 | + FResPopupBrowser.Clear; | |
2043 | + end; | |
2044 | + end else begin | |
2045 | + TResPopupBrowser(Sender).ChildClear; | |
2046 | + end; | |
2047 | + | |
1994 | 2048 | threadItem := GetActiveContent(true); |
1995 | 2049 | URL := THTMLCreate.GetRespopupURL(Text2, threadItem.URL); |
1996 | 2050 | PathRec := Gikosys.Parse2chURL2(URL); |
@@ -2043,7 +2097,6 @@ begin | ||
2043 | 2097 | wkIntSt := 1; |
2044 | 2098 | wkIntTo := 1; |
2045 | 2099 | end; |
2046 | - CreateResPopupBrowser; | |
2047 | 2100 | cResPopup := FResPopupBrowser.CreateNewBrowser; |
2048 | 2101 | cResPopup.PopupType := gptThread; |
2049 | 2102 | HTMLCreater.SetResPopupText(cResPopup, threadItem, wkIntSt, wkIntTo, ATitle, PathRec.FFirst ); |
@@ -2051,6 +2104,8 @@ begin | ||
2051 | 2104 | end; |
2052 | 2105 | end; |
2053 | 2106 | if (cResPopup <> nil) then begin |
2107 | + ResPopupClearTimer.Enabled := False; | |
2108 | + | |
2054 | 2109 | if cResPopup.PopupType = gptRaw then begin |
2055 | 2110 | if cResPopup.Title <> '' then begin |
2056 | 2111 | cResPopup.TitlePopup; |
@@ -2740,7 +2795,8 @@ var | ||
2740 | 2795 | begin |
2741 | 2796 | Thread := inThread; |
2742 | 2797 | idx := BrowserTab.TabIndex; |
2743 | - if (FActiveContent <> nil) and | |
2798 | + if (not FStartUp) and | |
2799 | + (FActiveContent <> nil) and | |
2744 | 2800 | (FActiveContent.Thread <> Thread.Thread) and |
2745 | 2801 | (FActiveContent.Browser <> nil) and |
2746 | 2802 | (Assigned(FActiveContent.Browser.Document)) then begin |
@@ -2777,6 +2833,12 @@ begin | ||
2777 | 2833 | ThreadTitle := Thread.Thread.Title; |
2778 | 2834 | ThreadPTitle := Thread.Thread.ParentBoard.Title; |
2779 | 2835 | //ThreadScrollTop := Thread.Thread.ScrollTop; |
2836 | + if Thread.Thread.IsLogFile then begin | |
2837 | + if not FileExists(Thread.Thread.GetThreadFileName) then begin | |
2838 | + Thread.Thread.DeleteLogFile; | |
2839 | + end; | |
2840 | + end; | |
2841 | + | |
2780 | 2842 | ThreadIsLog := Thread.Thread.IsLogFile; |
2781 | 2843 | ThreadItem := Thread.Thread; |
2782 | 2844 | ThreadNewArraical := Thread.Thread.NewArrival; |
@@ -4733,6 +4795,13 @@ begin | ||
4733 | 4795 | senderBrowser := TWebBrowser( Message.WParam ); |
4734 | 4796 | BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url ); |
4735 | 4797 | end; |
4798 | + USER_RESPOPUPCLEAR: | |
4799 | + if (TObject(Message.WParam) is TResPopupBrowser) then begin | |
4800 | + try | |
4801 | + TResPopupBrowser( Message.WParam ).Clear; | |
4802 | + except | |
4803 | + end; | |
4804 | + end; | |
4736 | 4805 | end; |
4737 | 4806 | |
4738 | 4807 | inherited; |
@@ -6611,7 +6680,7 @@ begin | ||
6611 | 6680 | |
6612 | 6681 | end; |
6613 | 6682 | // ************************************************************************* |
6614 | -//! お気に入りツリーのマウスアップイベント | |
6683 | +//! スレッドブラウザクリックイベント | |
6615 | 6684 | // ************************************************************************* |
6616 | 6685 | function TGikoForm.WebBrowserClick(Sender: TObject): WordBool; |
6617 | 6686 | const |
@@ -6662,7 +6731,9 @@ begin | ||
6662 | 6731 | end; |
6663 | 6732 | count := GikoSys.GetSameIDResCount(AID, FActiveContent.Thread); |
6664 | 6733 | limited := LIMIT; |
6665 | - if count > LIMIT then begin | |
6734 | + if not (GikoSys.Setting.LimitResCountMessage) then begin | |
6735 | + limited := -1; | |
6736 | + end else if (count > LIMIT) then begin | |
6666 | 6737 | if (GikoUtil.MsgBox(Handle, |
6667 | 6738 | IntToStr(LIMIT) + '個以上ありますが、すべて表示しますか?', |
6668 | 6739 | 'IDポップアップ警告', |
@@ -6955,10 +7026,11 @@ end; | ||
6955 | 7026 | |
6956 | 7027 | procedure TGikoForm.BrowserPanelResize(Sender: TObject); |
6957 | 7028 | begin |
6958 | - if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
6959 | - MoveWindow(FActiveContent.Browser.Handle, 0, 0, BrowserPanel.ClientWidth, BrowserPanel.ClientHeight, false); | |
6960 | - end; | |
6961 | - | |
7029 | + if (FIsMinimize <> mtMinimizing) then begin | |
7030 | + if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin | |
7031 | + MoveWindow(FActiveContent.Browser.Handle, 0, 0, BrowserPanel.ClientWidth, BrowserPanel.ClientHeight, false); | |
7032 | + end; | |
7033 | + end; | |
6962 | 7034 | end; |
6963 | 7035 | procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar); |
6964 | 7036 | var |
@@ -7091,6 +7163,60 @@ begin | ||
7091 | 7163 | if ThreadItem <> nil then |
7092 | 7164 | InsertBrowserTab( ThreadItem, True ); |
7093 | 7165 | end; |
7166 | +//同一IDをNGワードに登録 | |
7167 | +procedure TGikoForm.AddIDtoNGWord(invisible : boolean); | |
7168 | +var | |
7169 | + ThreadItem : TThreadItem; | |
7170 | + No : Integer; | |
7171 | +{$IFDEF SPAM_FILTER_ENABLED} | |
7172 | + body : TStringList; | |
7173 | + ReadList : TStringList; | |
7174 | + wordCount : TWordCount; | |
7175 | +{$ENDIF} | |
7176 | + id: String; | |
7177 | +begin | |
7178 | + No := KokoPopupMenu.Tag; | |
7179 | + if No = 0 then Exit; | |
7180 | + ThreadItem := GetActiveContent(True); | |
7181 | + if ThreadItem = nil then Exit; | |
7182 | + | |
7183 | + id := GikoSys.GetResID(No, ThreadItem); | |
7184 | + if (id <> '') and (not IsNoValidID(id)) then begin | |
7185 | + if (GikoSys.FAbon.AddToken(id, invisible)) then begin | |
7186 | + GikoSys.FAbon.ReLoadFromNGwordFile; | |
7187 | + FActiveContent.Repaint := True; | |
7188 | + end; | |
7189 | + end else begin | |
7190 | + ShowMessage('IDを取得できませんでした。'); | |
7191 | + end; | |
7192 | +{$IFDEF SPAM_FILTER_ENABLED} | |
7193 | + body := TStringList.Create; | |
7194 | + try | |
7195 | + GikoSys.GetSameIDRes(id, ThreadItem, body); | |
7196 | + ReadList := TStringList.Create; | |
7197 | + wordCount := TWordCount.Create; | |
7198 | + try | |
7199 | + // スパムに設定 | |
7200 | + ReadList.LoadFromFile( ThreadItem.GetThreadFileName ); | |
7201 | + for i := 0 to body.Count - 1 do begin | |
7202 | + GikoSys.SpamCountWord( ReadList[ i ], wordCount ); | |
7203 | + GikoSys.SpamForget( wordCount, False ); // ハムを解除 | |
7204 | + GikoSys.SpamLearn( wordCount, True ); // スパムに設定 | |
7205 | + end; | |
7206 | + finally | |
7207 | + wordCount.Free; | |
7208 | + ReadList.Free; | |
7209 | + end; | |
7210 | + finally | |
7211 | + body.Free; | |
7212 | + end; | |
7213 | +{$ENDIF} | |
7214 | + if (FActiveContent.Repaint) then begin | |
7215 | + ThreadItem.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop; | |
7216 | + if ThreadItem <> nil then | |
7217 | + InsertBrowserTab( ThreadItem, True ); | |
7218 | + end; | |
7219 | +end; | |
7094 | 7220 | |
7095 | 7221 | //同一IDのあぼ〜ん |
7096 | 7222 | procedure TGikoForm.IndividualAbonID(Atype : Integer); |
@@ -7582,6 +7708,103 @@ begin | ||
7582 | 7708 | FResPopupBrowser := TResPopupBrowser.Create(BrowserPanel); |
7583 | 7709 | end; |
7584 | 7710 | end; |
7711 | +//! 外からのD&D処理 | |
7712 | +procedure TGikoForm.WMDropFiles(var Msg: TWMDropFiles); | |
7713 | +var | |
7714 | + FileName: Array[0..MAX_PATH] of Char; | |
7715 | + Cnt, K: Integer; | |
7716 | + Board: TBoard; | |
7717 | + LogFolder: String; | |
7718 | + datList: TStringList; | |
7719 | +begin | |
7720 | + // 表示しているの板のとき以外は拒否 | |
7721 | + if GetActiveList is TBoard then begin | |
7722 | + Board := TBoard(GetActiveList); | |
7723 | + if MsgBox(Handle, Board.Title | |
7724 | + + ' 板に入れていいですか?', 'ギコナビ', MB_YESNO or MB_ICONQUESTION) = IDYES then begin | |
7725 | + // 板の時は、ログフォルダにコピーしてはぐれログ対応と同じ処理? | |
7726 | + datList := TStringList.Create; | |
7727 | + try | |
7728 | + Cnt := DragQueryFile(Msg.Drop, $FFFFFFFF, FileName, SizeOf(FileName)); | |
7729 | + for K := 0 to Cnt - 1 do begin | |
7730 | + DragQueryFile(Msg.Drop, K, FileName, SizeOf(FileName)); | |
7731 | + {FileNameにdropされたファイル名が入っているので、ここで何らかの処理をする。たとえば次の行} | |
7732 | + // ファイルのチェック | |
7733 | + if (isValidFile(FileName)) then begin | |
7734 | + LogFolder := ExtractFilePath(Board.FilePath); | |
7735 | + if (FileExists( LogFolder + ExtractFileName(FileName))) then begin | |
7736 | + GikoUtil.MsgBox(Handle, LogFolder + 'に' + ExtractFileName(FileName) + 'が既に存在します。', 'エラー', MB_ICONSTOP or MB_OK); | |
7737 | + end else begin | |
7738 | + if (not DirectoryExists(LogFolder)) then begin | |
7739 | + if (not GikoSys.ForceDirectoriesEx(LogFolder) ) then begin | |
7740 | + GikoUtil.MsgBox(Handle, LogFolder + 'の生成に失敗しました。', 'エラー', MB_ICONSTOP or MB_OK); | |
7741 | + end; | |
7742 | + end; | |
7743 | + if (not Windows.CopyFile(FileName, PChar(LogFolder + ExtractFileName(FileName)), true)) then begin | |
7744 | + GikoUtil.MsgBox(Handle, FileName + 'のコピーに失敗しました。', 'エラー', MB_ICONSTOP or MB_OK); | |
7745 | + end else begin | |
7746 | + datList.Add(ExtractFileName(FileName)); | |
7747 | + end; | |
7748 | + end; | |
7749 | + end; | |
7750 | + end; | |
7751 | + DragFinish(Msg.Drop); | |
7752 | + if (datList.Count > 0) then begin | |
7753 | + GikoSys.AddOutofIndexDat(Board, datList, False); | |
7754 | + ShowMessage(IntToStr(datList.Count) + '個のdatファイルがコピーされました。' ); | |
7755 | + if GikoForm.TreeView.Visible then | |
7756 | + GikoForm.TreeView.Refresh; | |
7757 | + if GikoForm.ListView.Visible then | |
7758 | + GikoForm.ListView.Refresh; | |
7759 | + end else begin | |
7760 | + ShowMessage('一つもコピーされませんでした。' ); | |
7761 | + end; | |
7762 | + finally | |
7763 | + datList.Free; | |
7764 | + end; | |
7765 | + | |
7766 | + end; | |
7767 | + end else begin | |
7768 | + ShowMessage('板を表示してください。'); | |
7769 | + end; | |
7770 | +end; | |
7771 | +//! ファイルチェック | |
7772 | +function TGikoForm.isValidFile(FileName: String) : boolean; | |
7773 | +var | |
7774 | + dt: TDateTime; | |
7775 | +begin | |
7776 | + Result := True; | |
7777 | + // 存在するか、拡張子dat、ファイル名 | |
7778 | + if ( not FileExists(FileName) ) then begin | |
7779 | + Result := False; | |
7780 | + GikoUtil.MsgBox(Handle, FileName + 'は存在しません。', 'エラー', MB_ICONSTOP or MB_OK); | |
7781 | + end else if (ExtractFileExt(ExtractFileName(FileName)) <> '.dat' ) then begin | |
7782 | + Result := False; | |
7783 | + GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + 'の拡張子が".dat"でありません。', 'エラー', MB_ICONSTOP or MB_OK); | |
7784 | + end else begin | |
7785 | + // ログファイルの拡張子をはずしたものがスレ作成日時 | |
7786 | + try | |
7787 | + dt := GikoSys.GetCreateDateFromName(FileName); | |
7788 | + if ((UnixToDateTime(ZERO_DATE) + OffsetFromUTC) = dt) then begin | |
7789 | + Result := False; | |
7790 | + GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + 'のファイル名が不正です。', 'エラー', MB_ICONSTOP or MB_OK); | |
7791 | + end; | |
7792 | + except | |
7793 | + Result := False; | |
7794 | + GikoUtil.MsgBox(Handle, ExtractFileName(FileName) + 'のファイル名が不正です。', 'エラー', MB_ICONSTOP or MB_OK); | |
7795 | + end; | |
7796 | + end; | |
7797 | +end; | |
7798 | + | |
7799 | +procedure TGikoForm.ResPopupClearTimerTimer(Sender: TObject); | |
7800 | +begin | |
7801 | + ResPopupClearTimer.Enabled := False; | |
7802 | + if ResPopupClearTimer.Tag = 0 then begin | |
7803 | + FResPopupBrowser.Clear; | |
7804 | + end else begin | |
7805 | + FResPopupBrowser.CurrentBrowser.ChildClear; | |
7806 | + end; | |
7807 | +end; | |
7585 | 7808 | |
7586 | 7809 | initialization |
7587 | 7810 | OleInitialize(nil); |
@@ -1344,6 +1344,18 @@ object GikoDM: TGikoDM | ||
1344 | 1344 | OnExecute = NewLinkToClipboardActionExecute |
1345 | 1345 | OnUpdate = DependActiveCntentActionUpdate |
1346 | 1346 | end |
1347 | + object AddIDtoNGWord0Action: TAction | |
1348 | + Category = #12502#12521#12454#12470#12509#12483#12503#12450#12483#12503 | |
1349 | + Caption = 'ID'#12434'NG'#12527#12540#12489#12395#36861#21152'('#36879#26126')' | |
1350 | + Hint = #12524#12473#12398'ID'#12434'NG'#12527#12540#12489#12501#12449#12452#12523#12395#36861#21152#12377#12427#65288#36879#26126#65289 | |
1351 | + OnExecute = AddIDtoNGWord0ActionExecute | |
1352 | + end | |
1353 | + object AddIDtoNGWord1Action: TAction | |
1354 | + Category = #12502#12521#12454#12470#12509#12483#12503#12450#12483#12503 | |
1355 | + Caption = 'ID'#12434'NG'#12527#12540#12489#12395#36861#21152 | |
1356 | + Hint = 'ID'#12434'NG'#12527#12540#12489#12501#12449#12452#12523#12395#36861#21152#12377#12427 | |
1357 | + OnExecute = AddIDtoNGWord1ActionExecute | |
1358 | + end | |
1347 | 1359 | end |
1348 | 1360 | object ToobarImageList: TImageList |
1349 | 1361 | Left = 44 |
@@ -237,6 +237,8 @@ type | ||
237 | 237 | ScrollPageUpAction: TAction; |
238 | 238 | AllLinkToClipboardAction: TAction; |
239 | 239 | NewLinkToClipboardAction: TAction; |
240 | + AddIDtoNGWord0Action: TAction; | |
241 | + AddIDtoNGWord1Action: TAction; | |
240 | 242 | procedure EditNGActionExecute(Sender: TObject); |
241 | 243 | procedure ReloadActionExecute(Sender: TObject); |
242 | 244 | procedure GoFowardActionExecute(Sender: TObject); |
@@ -444,6 +446,8 @@ type | ||
444 | 446 | procedure ScrollPageUpActionExecute(Sender: TObject); |
445 | 447 | procedure AllLinkToClipboardActionExecute(Sender: TObject); |
446 | 448 | procedure NewLinkToClipboardActionExecute(Sender: TObject); |
449 | + procedure AddIDtoNGWord0ActionExecute(Sender: TObject); | |
450 | + procedure AddIDtoNGWord1ActionExecute(Sender: TObject); | |
447 | 451 | private |
448 | 452 | { Private 宣言 } |
449 | 453 | procedure ClearResFilter; |
@@ -2261,9 +2265,11 @@ begin | ||
2261 | 2265 | if item <> nil then |
2262 | 2266 | GikoForm.InsertBrowserTab( item, false ); |
2263 | 2267 | end; |
2264 | - //最初の1枚に設定 アドレスの設定のためのカラ呼び | |
2265 | - if GikoForm.BrowserTab.Tabs.Count > 0 then begin | |
2266 | - GikoForm.BrowserTab.OnChange(nil); | |
2268 | + //最初の1枚に設定 | |
2269 | + if (GikoSys.Setting.URLDisplay) and | |
2270 | + (GikoForm.BrowserTab.Tabs.Count > 0) then begin | |
2271 | + GikoForm.AddressComboBox.Text := | |
2272 | + TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[0]).Thread.URL; | |
2267 | 2273 | end; |
2268 | 2274 | end; |
2269 | 2275 | finally |
@@ -2408,7 +2414,9 @@ begin | ||
2408 | 2414 | if ThreadItem = nil then Exit; |
2409 | 2415 | count := GikoSys.GetSameIDResCount(No, GikoForm.ActiveContent.Thread); |
2410 | 2416 | limited := LIMIT; |
2411 | - if count > LIMIT then begin | |
2417 | + if not (GikoSys.Setting.LimitResCountMessage) then begin | |
2418 | + limited := -1; | |
2419 | + end else if count > LIMIT then begin | |
2412 | 2420 | if ( GikoUtil.MsgBox(GikoForm.Handle, |
2413 | 2421 | IntToStr(LIMIT) + '個以上ありますが、すべて表示しますか?', |
2414 | 2422 | 'IDポップアップ警告', |
@@ -4434,6 +4442,16 @@ begin | ||
4434 | 4442 | end; |
4435 | 4443 | |
4436 | 4444 | |
4445 | +//! このレスのIDをNGワードに追加する(透明) | |
4446 | +procedure TGikoDM.AddIDtoNGWord0ActionExecute(Sender: TObject); | |
4447 | +begin | |
4448 | + GikoForm.AddIDtoNGWord(true); | |
4449 | +end; | |
4450 | +//! このレスのIDをNGワードに追加する | |
4451 | +procedure TGikoDM.AddIDtoNGWord1ActionExecute(Sender: TObject); | |
4452 | +begin | |
4453 | + GikoForm.AddIDtoNGWord(false); | |
4454 | +end; | |
4437 | 4455 | |
4438 | 4456 | end. |
4439 | 4457 |
@@ -116,8 +116,6 @@ type | ||
116 | 116 | function ChooseString(const Text, Separator: string; Index: integer): string; |
117 | 117 | //! 一時ファイルからの復旧 |
118 | 118 | procedure RestoreThreadData(Board: TBoard); |
119 | - //! インデックスにないdat(はぐれdat)の追加 | |
120 | - procedure AddOutofIndexDat(Board: TBoard; DatList: TStringList); | |
121 | 119 | public |
122 | 120 | { Public 宣言 } |
123 | 121 | FAbon : TAbon; |
@@ -129,13 +127,10 @@ type | ||
129 | 127 | property ResRange : Longint read FResRange write FResRange; |
130 | 128 | //! バージョン情報 |
131 | 129 | property Version : String read FVersion; |
132 | -// function MsgBox(Msg: string; Title: string; Flags: Longint): integer; overload; | |
133 | -// function MsgBox(Handle: THandle; Msg: string; Title: string; Flags: Longint): integer; overload; | |
134 | 130 | function IsNumeric(s: string): boolean; |
135 | 131 | function IsFloat(s: string): boolean; |
136 | 132 | function DirectoryExistsEx(const Name: string): Boolean; |
137 | 133 | function ForceDirectoriesEx(Dir: string): Boolean; |
138 | -// function GetVersion: string; | |
139 | 134 | |
140 | 135 | function GetBoardFileName: string; |
141 | 136 | function GetCustomBoardFileName: string; |
@@ -224,7 +219,7 @@ type | ||
224 | 219 | procedure GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); overload; |
225 | 220 | function GetSameIDResCount(const AID : string; ThreadItem: TThreadItem):Integer; overload; |
226 | 221 | function GetSameIDResCount(AIDNum : Integer; ThreadItem: TThreadItem):Integer; overload; |
227 | - | |
222 | + function GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String; | |
228 | 223 | //! 単語解析 |
229 | 224 | procedure SpamCountWord( const text : string; wordCount : TWordCount ); |
230 | 225 | //! 学習クリア |
@@ -257,6 +252,10 @@ type | ||
257 | 252 | function GetOEIndentChar : string; |
258 | 253 | //! 置換設定ファイル取得 |
259 | 254 | function GetReplaceFileName: String; |
255 | + //! インデックスにないdat(はぐれdat)の追加 | |
256 | + procedure AddOutofIndexDat(Board: TBoard; DatList: TStringList; AllCreate: boolean = True); | |
257 | + //! ファイル名からのスレッド作成日の取得 | |
258 | + function GetCreateDateFromName(FileName: String): TDateTime; | |
260 | 259 | end; |
261 | 260 | |
262 | 261 | var |
@@ -266,7 +265,7 @@ const | ||
266 | 265 | ZERO_DATE: Integer = 25569; |
267 | 266 | BETA_VERSION_NAME_E = 'beta'; |
268 | 267 | BETA_VERSION_NAME_J = 'バタ'; |
269 | - BETA_VERSION = 56; | |
268 | + BETA_VERSION = 57; | |
270 | 269 | BETA_VERSION_BUILD = ''; //!< debug版など |
271 | 270 | APP_NAME = 'gikoNavi'; |
272 | 271 | BE_PHP_URL = 'http://be.2ch.net/test/p.php?i='; |
@@ -572,11 +571,18 @@ var | ||
572 | 571 | usePlugIn : Boolean; |
573 | 572 | islog : Boolean; |
574 | 573 | urlHead: String; |
574 | + datFileCheck: Boolean; | |
575 | 575 | {* |
576 | 576 | FavoThreadItem : TFavoriteThreadItem; |
577 | 577 | Node: TTreeNode; |
578 | 578 | *} |
579 | +{$IFDEF DEBUG} | |
580 | + st, rt: Cardinal; | |
581 | +{$ENDIF} | |
579 | 582 | begin |
583 | +{$IFDEF DEBUG} | |
584 | + st := GetTickCount; | |
585 | +{$ENDIF} | |
580 | 586 | if Board.IsThreadDatRead then |
581 | 587 | Exit; |
582 | 588 | Board.Clear; |
@@ -592,12 +598,16 @@ begin | ||
592 | 598 | |
593 | 599 | FileName := Board.GetFolderIndexFileName; |
594 | 600 | |
595 | - FileList := TStringList.Create; | |
596 | - FileList.Sorted := True; | |
597 | - FileList.BeginUpdate; | |
598 | - //IsLogFile用DATファイルリスト | |
599 | - GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False); | |
600 | - FileList.EndUpdate; | |
601 | + // | |
602 | + datFileCheck := (Setting.CheckDatFile) or (not FileExists(FileName)); | |
603 | + if (datFileCheck) then begin | |
604 | + FileList := TStringList.Create; | |
605 | + FileList.Sorted := True; | |
606 | + FileList.BeginUpdate; | |
607 | + //IsLogFile用DATファイルリスト | |
608 | + GetFileList(ExtractFileDir(Board.GetFolderIndexFileName), '*.dat', FileList, False); | |
609 | + FileList.EndUpdate; | |
610 | + end; | |
601 | 611 | |
602 | 612 | // 重複を防ぐ |
603 | 613 | Board.BeginUpdate; |
@@ -609,7 +619,11 @@ begin | ||
609 | 619 | //2行目から(1行目はバージョン) |
610 | 620 | for i := sl.Count - 1 downto 1 do begin |
611 | 621 | Rec := ParseIndexLine(sl[i]); |
612 | - islog := FileList.Find( Rec.FFileName, Index ); | |
622 | + if (datFileCheck) then begin | |
623 | + islog := FileList.Find( Rec.FFileName, Index ); | |
624 | + end else begin | |
625 | + islog := (Rec.FSize <> 0) and (Rec.FCount <> 0); | |
626 | + end; | |
613 | 627 | if usePlugIn then |
614 | 628 | ThreadItem := TThreadItem.Create( |
615 | 629 | Board.BoardPlugIn, |
@@ -636,7 +650,7 @@ begin | ||
636 | 650 | end; |
637 | 651 | |
638 | 652 | ThreadItem.BeginUpdate; |
639 | - if islog then | |
653 | + if (datFileCheck) and (islog) then | |
640 | 654 | FileList.Delete( Index ); |
641 | 655 | |
642 | 656 | ThreadItem.No := Rec.FNo; |
@@ -671,50 +685,75 @@ begin | ||
671 | 685 | if UnRead <> Board.UnRead then |
672 | 686 | Board.UnRead := UnRead; |
673 | 687 | |
674 | - //インデックスに無かったログを追加(腐れインデックス対応) | |
675 | - AddOutofIndexDat(Board, FileList); | |
688 | + if (datFileCheck) then begin | |
689 | + //インデックスに無かったログを追加(腐れインデックス対応) | |
690 | + AddOutofIndexDat(Board, FileList); | |
691 | + end; | |
676 | 692 | Board.EndUpdate; |
677 | 693 | |
678 | 694 | //前回異常終了時チェック |
679 | 695 | RestoreThreadData( Board ); |
680 | 696 | finally |
681 | 697 | sl.Free; |
682 | - FileList.Free; | |
698 | + if (datFileCheck) then begin | |
699 | + FileList.Free; | |
700 | + end; | |
683 | 701 | Board.Sorted := False; |
684 | 702 | end; |
685 | 703 | Board.IsThreadDatRead := True; |
704 | +{$IFDEF DEBUG} | |
705 | + rt := GetTickCount - st; | |
706 | + Writeln('Read Done.' + IntToStr(rt) + ' ms'); | |
707 | +{$ENDIF} | |
686 | 708 | end; |
687 | 709 | {! |
688 | 710 | \brief インデックスにないdat(はぐれdat)の追加 |
689 | 711 | \param Board 追加する板 |
690 | 712 | \param DatList datファイル名 |
691 | 713 | } |
692 | -procedure TGikoSys.AddOutofIndexDat(Board: TBoard; DatList: TStringList); | |
714 | +procedure TGikoSys.AddOutofIndexDat(Board: TBoard; DatList: TStringList; AllCreate: Boolean = True); | |
693 | 715 | var |
694 | 716 | i : Integer; |
695 | 717 | Boardpath,FileName : String; |
696 | 718 | ResRec: TResRec; |
697 | 719 | ThreadItem: TThreadItem; |
720 | + create: Boolean; | |
698 | 721 | begin |
722 | + create := False; | |
699 | 723 | Boardpath := ExtractFilePath(Board.GetFolderIndexFileName); |
700 | 724 | //インデックスに無かったログを追加(腐れインデックス対応) |
701 | 725 | for i := 0 to DatList.Count - 1 do begin |
702 | 726 | FileName := Boardpath + DatList[i]; |
703 | - | |
704 | - //ResRec := DivideStrLine(ReadThreadFile(FileName, 1)); | |
705 | - if Board.IsBoardPlugInAvailable then begin | |
706 | - ThreadItem := TThreadItem.Create( | |
707 | - Board.BoardPlugIn, | |
708 | - Board, | |
709 | - Board.BoardPlugIn.FileName2ThreadURL( DWORD( Board ), DatList[i] ) ); | |
710 | - THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec); | |
711 | - end else begin | |
712 | - ThreadItem := TThreadItem.Create( | |
713 | - nil, | |
714 | - Board, | |
715 | - Get2chBoard2ThreadURL( Board, ChangeFileExt( DatList[i], '' ) ) ); | |
716 | - THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec); | |
727 | + ThreadItem := nil; | |
728 | + if (not AllCreate) then begin | |
729 | + create := False; | |
730 | + ThreadItem := Board.FindThreadFromFileName(DatList[i]); | |
731 | + if (ThreadItem = nil) then begin | |
732 | + create := True; | |
733 | + end else begin | |
734 | + if Board.IsBoardPlugInAvailable then begin | |
735 | + THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec); | |
736 | + end else begin | |
737 | + THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec); | |
738 | + end; | |
739 | + end; | |
717 | 740 | end; |
741 | + if (ThreadItem = nil) then begin | |
742 | + if Board.IsBoardPlugInAvailable then begin | |
743 | + ThreadItem := TThreadItem.Create( | |
744 | + Board.BoardPlugIn, | |
745 | + Board, | |
746 | + Board.BoardPlugIn.FileName2ThreadURL( DWORD( Board ), DatList[i] ) ); | |
747 | + THTMLCreate.DivideStrLine(Board.BoardPlugIn.GetDat( DWORD( ThreadItem ), 1 ), @ResRec); | |
748 | + end else begin | |
749 | + ThreadItem := TThreadItem.Create( | |
750 | + nil, | |
751 | + Board, | |
752 | + Get2chBoard2ThreadURL( Board, ChangeFileExt( DatList[i], '' ) ) ); | |
753 | + THTMLCreate.DivideStrLine(ReadThreadFile(FileName, 1), @ResRec); | |
754 | + end; | |
755 | + end; | |
756 | + | |
718 | 757 | |
719 | 758 | ThreadItem.BeginUpdate; |
720 | 759 | ThreadItem.FileName := DatList[i]; |
@@ -736,7 +775,9 @@ begin | ||
736 | 775 | ThreadItem.ScrollTop := 0; |
737 | 776 | ThreadItem.AgeSage := gasNone; |
738 | 777 | ThreadItem.EndUpdate; |
739 | - Board.Add(ThreadItem); | |
778 | + if (AllCreate) or (create) then begin | |
779 | + Board.Add(ThreadItem); | |
780 | + end; | |
740 | 781 | end; |
741 | 782 | end; |
742 | 783 | {! |
@@ -2849,12 +2890,27 @@ end; | ||
2849 | 2890 | } |
2850 | 2891 | procedure TGikoSys.GetSameIDRes(AIDNum : Integer; ThreadItem: TThreadItem;var body: TStringList); |
2851 | 2892 | var |
2893 | + AID : String; | |
2894 | +begin | |
2895 | + AID := GetResID(AIDNum, ThreadItem); | |
2896 | + if not IsNoValidID(AID) then begin | |
2897 | + GetSameIDRes(AID, ThreadItem, body); | |
2898 | + end; | |
2899 | +end; | |
2900 | +{! | |
2901 | +\brief 投稿 ID 取得 | |
2902 | +\param AIDNum 投稿 レス番号 | |
2903 | +\param ThreadItem 投稿スレッド | |
2904 | +\param body OUT:投稿ID | |
2905 | +} | |
2906 | +function TGikoSys.GetResID(AIDNum: Integer; ThreadItem: TThreadItem): String; | |
2907 | +var | |
2852 | 2908 | Res: TResRec; |
2853 | 2909 | boardPlugIn : TBoardPlugIn; |
2854 | - AID : String; | |
2855 | 2910 | stList: TStringList; |
2856 | 2911 | i : Integer; |
2857 | 2912 | begin |
2913 | + Result := ''; | |
2858 | 2914 | if (ThreadItem <> nil) and (ThreadItem.IsLogFile) |
2859 | 2915 | and (AIDNum > 0) and (AIDNum <= ThreadItem.Count) then begin |
2860 | 2916 | //if ThreadItem.IsBoardPlugInAvailable then begin |
@@ -2866,21 +2922,21 @@ begin | ||
2866 | 2922 | end else begin |
2867 | 2923 | THTMLCreate.DivideStrLine( ReadThreadFile(ThreadItem.GetThreadFileName, AIDNum), @Res); |
2868 | 2924 | end; |
2869 | - AID := Res.FDateTime; | |
2870 | - if AnsiPos('id', AnsiLowerCase(AID)) > 0 then begin | |
2871 | - AID := Copy(AID, AnsiPos('id', AnsiLowerCase(AID)) - 1, 11); | |
2872 | - if AnsiPos(' be:', AnsiLowerCase(AID)) > 0 then begin | |
2873 | - AID := Copy(AID, 1, AnsiPos(' BE:', AnsiLowerCase(AID)) - 1) | |
2925 | + Result := Res.FDateTime; | |
2926 | + if AnsiPos('id', AnsiLowerCase(Result)) > 0 then begin | |
2927 | + Result := Copy(Result, AnsiPos('id', AnsiLowerCase(Result)) - 1, 11); | |
2928 | + if AnsiPos(' be:', AnsiLowerCase(Result)) > 0 then begin | |
2929 | + Result := Copy(Result, 1, AnsiPos(' BE:', AnsiLowerCase(Result)) - 1) | |
2874 | 2930 | end; |
2875 | 2931 | end else begin |
2876 | 2932 | stlist := TStringList.Create; |
2877 | 2933 | try |
2878 | - stList.DelimitedText := AID; | |
2879 | - AID := ''; | |
2934 | + stList.DelimitedText := Result; | |
2935 | + Result := ''; | |
2880 | 2936 | for i := 0 to stList.Count - 1 do |
2881 | 2937 | if Length(WideString(stList[i])) = 8 then begin |
2882 | 2938 | if NotDateorTimeString(stList[i]) then begin |
2883 | - AID := stList[i]; | |
2939 | + Result := stList[i]; | |
2884 | 2940 | break; |
2885 | 2941 | end; |
2886 | 2942 | end; |
@@ -2888,11 +2944,8 @@ begin | ||
2888 | 2944 | stList.Free; |
2889 | 2945 | end; |
2890 | 2946 | end; |
2891 | - if not IsNoValidID(AID) then | |
2892 | - GetSameIDRes(AID, ThreadItem, body); | |
2893 | 2947 | end; |
2894 | 2948 | end; |
2895 | - | |
2896 | 2949 | {! |
2897 | 2950 | \brief 同じ投稿 ID を持つレスをカウント |
2898 | 2951 | \param AID 個人を特定する投稿 ID |
@@ -3309,7 +3362,8 @@ begin | ||
3309 | 3362 | ThreadItem.NewReceive := ini.ReadInteger(SECTION, 'NewReceive', 0); |
3310 | 3363 | |
3311 | 3364 | ThreadItem.Size := ini.ReadInteger(SECTION, 'Size', 0); |
3312 | - if(ThreadItem.Size = 0) and (FileExists(ThreadItem.GetThreadFileName)) then begin | |
3365 | + ThreadItem.IsLogFile := FileExists(ThreadItem.GetThreadFileName); | |
3366 | + if(ThreadItem.Size = 0) and (ThreadItem.IsLogFile) then begin | |
3313 | 3367 | try |
3314 | 3368 | ThreadItem.Size := GetFileSize(ThreadItem.GetThreadFileName) - ThreadItem.Count; |
3315 | 3369 | except |
@@ -3399,6 +3453,26 @@ function TGikoSys.GetReplaceFileName: String; | ||
3399 | 3453 | begin |
3400 | 3454 | Result := Setting.GetReplaceFileName; |
3401 | 3455 | end; |
3456 | +//! ファイル名からのスレッド作成日の取得 | |
3457 | +function TGikoSys.GetCreateDateFromName(FileName: String): TDateTime; | |
3458 | +var | |
3459 | + tmp : String; | |
3460 | + unixtime: Int64; | |
3461 | +begin | |
3462 | + // ログファイルの拡張子をはずしたものがスレ作成日時 | |
3463 | + tmp := ChangeFileExt(FileName, ''); | |
3464 | + if AnsiPos('_', tmp) <> 0 then | |
3465 | + if AnsiPos('_', tmp) > 9 then | |
3466 | + tmp := Copy(tmp, 1, AnsiPos('_', tmp)-1) | |
3467 | + else | |
3468 | + Delete(tmp, AnsiPos('_', tmp), 1); | |
3469 | + | |
3470 | + if ( Length(tmp) = 9) and ( tmp[1] = '0' ) then | |
3471 | + Insert('1', tmp, 1); | |
3472 | + | |
3473 | + unixtime := StrToInt64Def(tmp, ZERO_DATE); | |
3474 | + Result := UnixToDateTime(unixtime) + OffsetFromUTC; | |
3475 | +end; | |
3402 | 3476 | |
3403 | 3477 | initialization |
3404 | 3478 | GikoSys := TGikoSys.Create; |
@@ -18,6 +18,7 @@ type | ||
18 | 18 | FOnClick: TDocumentContextMenuEvent; |
19 | 19 | FOnMouseMove: TDocumentContextMenuEvent; |
20 | 20 | FOnMouseDown: TDocumentContextMenuEvent; |
21 | + FOnDoubleClick: TDocumentContextMenuEvent; | |
21 | 22 | protected |
22 | 23 | { IUnknown } |
23 | 24 | function QueryInterface(const IID:TGUID; out Obj): HRESULT; stdcall; |
@@ -37,6 +38,7 @@ type | ||
37 | 38 | property OnClick: TDocumentContextMenuEvent read FOnClick write FOnClick; |
38 | 39 | property OnMouseMove: TDocumentContextMenuEvent read FOnMouseMove write FOnMouseMove; |
39 | 40 | property OnMouseDown: TDocumentContextMenuEvent read FOnMouseDown write FOnMouseDown; |
41 | + property OnDoubleClick: TDocumentContextMenuEvent read FOnDoubleClick write FOnDoubleClick; | |
40 | 42 | end; |
41 | 43 | |
42 | 44 | implementation |
@@ -100,6 +102,10 @@ begin | ||
100 | 102 | if Assigned(FOnClick) then begin |
101 | 103 | PVariant(VarResult)^ := FOnClick(FOwner); |
102 | 104 | end; |
105 | + DISPID_DBLCLICK: | |
106 | + if Assigned(FOnDoubleClick) then begin | |
107 | + PVariant(VarResult)^ := FOnDoubleClick(FOwner); | |
108 | + end; | |
103 | 109 | 1023: |
104 | 110 | if Assigned(FOnContextMenu) then begin |
105 | 111 | PVariant(VarResult)^ := FOnContextMenu(FOwner); |
@@ -189,12 +189,19 @@ var | ||
189 | 189 | begin |
190 | 190 | if GikoListView1.Selected <> nil then begin |
191 | 191 | if (ValidateKey(KeyNameEdit.Text, CategoryNameComboBox.Text)) then begin |
192 | - if (not InputAssistDM.IsDupulicate( | |
192 | + resWord := TResistWord(GikoListView1.Selected.Data); | |
193 | + // 変更前のキー/カテゴリと同一もしくは、他と重複無し | |
194 | + if ((resWord.GetKey = KeyNameEdit.Text) | |
195 | + and (resWord.GetCategory = CategoryNameComboBox.Text)) or | |
196 | + (not InputAssistDM.IsDupulicate( | |
193 | 197 | KeyNameEdit.Text, CategoryNameComboBox.Text) ) then begin |
194 | - resWord := TResistWord(GikoListView1.Selected.Data); | |
195 | - resWord.SetKey(KeyNameEdit.Text); | |
196 | - resWord.SetCategory(CategoryNameComboBox.Text); | |
197 | - resWord.SetText(TextMemo.Text); | |
198 | + resWord.SetCategory(CategoryNameComboBox.Text); | |
199 | + resWord.SetText(TextMemo.Text); | |
200 | + // キーが変わるときは、ChangeKeyを呼ぶ | |
201 | + if (resWord.GetKey <> KeyNameEdit.Text) then begin | |
202 | + resWord.SetKey(KeyNameEdit.Text); | |
203 | + InputAssistDM.ChangeKey(resWord); | |
204 | + end; | |
198 | 205 | // 一覧の更新 |
199 | 206 | GikoListView1.Selected.Caption := resWord.GetKey; |
200 | 207 | GikoListView1.Selected.SubItems[0] := resWord.GetCategory; |
@@ -21,8 +21,8 @@ object KuroutOption: TKuroutOption | ||
21 | 21 | Top = 0 |
22 | 22 | Width = 517 |
23 | 23 | Height = 393 |
24 | - ActivePage = KakikomiTabSheet | |
25 | - TabIndex = 2 | |
24 | + ActivePage = RespopupTabSheet | |
25 | + TabIndex = 4 | |
26 | 26 | TabOrder = 0 |
27 | 27 | object TabSheet1: TTabSheet |
28 | 28 | Caption = #35443#32048#35373#23450#65297 |
@@ -562,6 +562,128 @@ object KuroutOption: TKuroutOption | ||
562 | 562 | TabOrder = 1 |
563 | 563 | end |
564 | 564 | end |
565 | + object LogGroupBox: TGroupBox | |
566 | + Left = 16 | |
567 | + Top = 160 | |
568 | + Width = 465 | |
569 | + Height = 65 | |
570 | + Caption = #12525#12464 | |
571 | + TabOrder = 1 | |
572 | + object CheckDatFileCheckBox: TCheckBox | |
573 | + Left = 22 | |
574 | + Top = 14 | |
575 | + Width = 369 | |
576 | + Height = 17 | |
577 | + Caption = #12473#12524#12483#12489#19968#35239#65288'Folder.idx'#65289#35501#12415#36796#12415#26178#12395'dat'#12501#12449#12452#12523#12434#12481#12455#12483#12463#12377#12427#12290 | |
578 | + TabOrder = 0 | |
579 | + end | |
580 | + end | |
581 | + end | |
582 | + object RespopupTabSheet: TTabSheet | |
583 | + Caption = #35443#32048#35373#23450'5' | |
584 | + ImageIndex = 4 | |
585 | + object RespopuGroupBox: TGroupBox | |
586 | + Left = 8 | |
587 | + Top = 16 | |
588 | + Width = 473 | |
589 | + Height = 105 | |
590 | + Caption = #12524#12473#12509#12483#12503#12450#12483#12503 | |
591 | + TabOrder = 0 | |
592 | + object Label16: TLabel | |
593 | + Left = 16 | |
594 | + Top = 48 | |
595 | + Width = 292 | |
596 | + Height = 12 | |
597 | + Caption = '( '#12510#12454#12473#12459#12540#12477#12523#20301#32622#12363#12425#12398#12378#12425#12375#20301#32622' -25 px '#65374' 25'#12288'px)' | |
598 | + end | |
599 | + object Label19: TLabel | |
600 | + Left = 192 | |
601 | + Top = 72 | |
602 | + Width = 96 | |
603 | + Height = 12 | |
604 | + Caption = '(0 ms '#65374' 5000 ms)' | |
605 | + end | |
606 | + object DeltaXLabeledEdit: TLabeledEdit | |
607 | + Left = 120 | |
608 | + Top = 24 | |
609 | + Width = 49 | |
610 | + Height = 20 | |
611 | + EditLabel.Width = 97 | |
612 | + EditLabel.Height = 12 | |
613 | + EditLabel.Caption = #12509#12483#12503#12450#12483#12503#20301#32622' X' | |
614 | + LabelPosition = lpLeft | |
615 | + LabelSpacing = 10 | |
616 | + TabOrder = 0 | |
617 | + Text = '0' | |
618 | + OnExit = DeltaXLabeledEditExit | |
619 | + end | |
620 | + object DeltaYLabeledEdit: TLabeledEdit | |
621 | + Left = 304 | |
622 | + Top = 24 | |
623 | + Width = 49 | |
624 | + Height = 20 | |
625 | + EditLabel.Width = 97 | |
626 | + EditLabel.Height = 12 | |
627 | + EditLabel.Caption = #12509#12483#12503#12450#12483#12503#20301#32622' Y' | |
628 | + LabelPosition = lpLeft | |
629 | + LabelSpacing = 10 | |
630 | + TabOrder = 1 | |
631 | + Text = '0' | |
632 | + OnExit = DeltaYLabeledEditExit | |
633 | + end | |
634 | + object DeltaXUpDown: TUpDown | |
635 | + Left = 169 | |
636 | + Top = 24 | |
637 | + Width = 16 | |
638 | + Height = 20 | |
639 | + Associate = DeltaXLabeledEdit | |
640 | + Min = -25 | |
641 | + Max = 25 | |
642 | + Position = 0 | |
643 | + TabOrder = 2 | |
644 | + Wrap = False | |
645 | + end | |
646 | + object DeltaYUpDown: TUpDown | |
647 | + Left = 353 | |
648 | + Top = 24 | |
649 | + Width = 16 | |
650 | + Height = 20 | |
651 | + Associate = DeltaYLabeledEdit | |
652 | + Min = -25 | |
653 | + Max = 25 | |
654 | + Position = 0 | |
655 | + TabOrder = 3 | |
656 | + Wrap = False | |
657 | + end | |
658 | + object RespopupWaitLabeledEdit: TLabeledEdit | |
659 | + Left = 76 | |
660 | + Top = 66 | |
661 | + Width = 92 | |
662 | + Height = 20 | |
663 | + EditLabel.Width = 52 | |
664 | + EditLabel.Height = 12 | |
665 | + EditLabel.Caption = #12463#12522#12450'Wait' | |
666 | + LabelPosition = lpLeft | |
667 | + LabelSpacing = 10 | |
668 | + TabOrder = 4 | |
669 | + Text = '100' | |
670 | + OnExit = RespopupWaitLabeledEditExit | |
671 | + end | |
672 | + object RespopupWaitUpDown: TUpDown | |
673 | + Left = 168 | |
674 | + Top = 66 | |
675 | + Width = 17 | |
676 | + Height = 20 | |
677 | + Associate = RespopupWaitLabeledEdit | |
678 | + Min = 0 | |
679 | + Max = 5000 | |
680 | + Increment = 100 | |
681 | + Position = 100 | |
682 | + TabOrder = 5 | |
683 | + Thousands = False | |
684 | + Wrap = False | |
685 | + end | |
686 | + end | |
565 | 687 | end |
566 | 688 | end |
567 | 689 | object OkBotton: TButton |
@@ -81,6 +81,18 @@ type | ||
81 | 81 | Label14: TLabel; |
82 | 82 | ExtListLabeledEdit: TLabeledEdit; |
83 | 83 | Label15: TLabel; |
84 | + LogGroupBox: TGroupBox; | |
85 | + CheckDatFileCheckBox: TCheckBox; | |
86 | + RespopupTabSheet: TTabSheet; | |
87 | + RespopuGroupBox: TGroupBox; | |
88 | + DeltaXLabeledEdit: TLabeledEdit; | |
89 | + DeltaYLabeledEdit: TLabeledEdit; | |
90 | + DeltaXUpDown: TUpDown; | |
91 | + DeltaYUpDown: TUpDown; | |
92 | + Label16: TLabel; | |
93 | + RespopupWaitLabeledEdit: TLabeledEdit; | |
94 | + RespopupWaitUpDown: TUpDown; | |
95 | + Label19: TLabel; | |
84 | 96 | procedure OkBottonClick(Sender: TObject); |
85 | 97 | procedure FormCreate(Sender: TObject); |
86 | 98 | procedure CDeleteButtonClick(Sender: TObject); |
@@ -94,6 +106,9 @@ type | ||
94 | 106 | procedure MoveHistoryMaxEditExit(Sender: TObject); |
95 | 107 | procedure AHandredLabeledEditExit(Sender: TObject); |
96 | 108 | procedure ExtListLabeledEditExit(Sender: TObject); |
109 | + procedure DeltaXLabeledEditExit(Sender: TObject); | |
110 | + procedure DeltaYLabeledEditExit(Sender: TObject); | |
111 | + procedure RespopupWaitLabeledEditExit(Sender: TObject); | |
97 | 112 | private |
98 | 113 | { Private 宣言 } |
99 | 114 | procedure SetValue; |
@@ -156,6 +171,12 @@ begin | ||
156 | 171 | ReplaceDatCheckBox.Checked := GikoSys.Setting.ReplaceDat; |
157 | 172 | SentIniFileSizeUpDown.Position := GikoSys.Setting.SentIniFileSize; |
158 | 173 | ExtListLabeledEdit.Text := GikoSys.Setting.ExtList; |
174 | + // Folder.idx読み込み時datチェック | |
175 | + CheckDatFileCheckBox.Checked := GikoSys.Setting.CheckDatFile; | |
176 | + DeltaXUpDown.Position := GikoSys.Setting.RespopupDeltaX; | |
177 | + DeltaYUpDown.Position := GikoSys.Setting.RespopupDeltaY; | |
178 | + RespopupWaitUpDown.Position := GikoSys.Setting.RespopupWait; | |
179 | + | |
159 | 180 | end; |
160 | 181 | |
161 | 182 | procedure TKuroutOption.SaveSetting; |
@@ -198,6 +219,13 @@ begin | ||
198 | 219 | GikoSys.Setting.ReplaceDat := ReplaceDatCheckBox.Checked; |
199 | 220 | GikoSys.Setting.SentIniFileSize := SentIniFileSizeUpDown.Position; |
200 | 221 | GikoSys.Setting.ExtList := ExtListLabeledEdit.Text; |
222 | + // Folder.idx読み込み時datチェック | |
223 | + GikoSys.Setting.CheckDatFile := CheckDatFileCheckBox.Checked; | |
224 | + | |
225 | + GikoSys.Setting.RespopupDeltaX := StrToInt(DeltaXLabeledEdit.Text); | |
226 | + GikoSys.Setting.RespopupDeltaY := StrToInt(DeltaYLabeledEdit.Text); | |
227 | + GikoSys.Setting.RespopupWait := StrToInt(RespopupWaitLabeledEdit.Text); | |
228 | + GikoForm.ResPopupClearTimer.Interval := GikoSys.Setting.RespopupWait; | |
201 | 229 | end; |
202 | 230 | |
203 | 231 | procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject); |
@@ -229,6 +257,9 @@ begin | ||
229 | 257 | MoveHistoryMaxEditExit(Sender); |
230 | 258 | AHandredLabeledEditExit(Sender); |
231 | 259 | ExtListLabeledEditExit(Sender); |
260 | + DeltaXLabeledEditExit(Sender); | |
261 | + DeltaYLabeledEditExit(Sender); | |
262 | + RespopupWaitLabeledEditExit(Sender); | |
232 | 263 | PostColumnData(); |
233 | 264 | SaveSetting; |
234 | 265 | end; |
@@ -448,8 +479,38 @@ begin | ||
448 | 479 | if AnsiEndsStr(';', ExtListLabeledEdit.Text) then begin |
449 | 480 | ExtListLabeledEdit.Text := |
450 | 481 | Copy(ExtListLabeledEdit.Text, 0, |
451 | - Length(ExtListLabeledEdit.Text) - 1); | |
482 | + Length(ExtListLabeledEdit.Text) - 1); | |
452 | 483 | end; |
453 | 484 | end; |
485 | +// レスポップアップ位置X | |
486 | +procedure TKuroutOption.DeltaXLabeledEditExit(Sender: TObject); | |
487 | +begin | |
488 | + if not GikoSys.IsNumeric(DeltaXLabeledEdit.Text) then | |
489 | + DeltaXLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaX); | |
490 | + if StrToInt(DeltaXLabeledEdit.Text) < DeltaXUpDown.Min then | |
491 | + DeltaXLabeledEdit.Text := IntToStr(DeltaXUpDown.Min); | |
492 | + if StrToInt(DeltaXLabeledEdit.Text) > DeltaXUpDown.Max then | |
493 | + DeltaXLabeledEdit.Text:= IntToStr(DeltaXUpDown.Max); | |
494 | +end; | |
495 | +// レスポップアップ位置Y | |
496 | +procedure TKuroutOption.DeltaYLabeledEditExit(Sender: TObject); | |
497 | +begin | |
498 | + if not GikoSys.IsNumeric(DeltaYLabeledEdit.Text) then | |
499 | + DeltaYLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupDeltaY); | |
500 | + if StrToInt(DeltaYLabeledEdit.Text) < DeltaYUpDown.Min then | |
501 | + DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Min); | |
502 | + if StrToInt(DeltaYLabeledEdit.Text) > DeltaYUpDown.Max then | |
503 | + DeltaYLabeledEdit.Text := IntToStr(DeltaYUpDown.Max); | |
504 | +end; | |
505 | + | |
506 | +procedure TKuroutOption.RespopupWaitLabeledEditExit(Sender: TObject); | |
507 | +begin | |
508 | + if not GikoSys.IsNumeric(RespopupWaitLabeledEdit.Text) then | |
509 | + RespopupWaitLabeledEdit.Text := IntToStr(GikoSys.Setting.RespopupWait); | |
510 | + if StrToInt(RespopupWaitLabeledEdit.Text) < RespopupWaitUpDown.Min then | |
511 | + RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Min); | |
512 | + if StrToInt(RespopupWaitLabeledEdit.Text) > RespopupWaitUpDown.Max then | |
513 | + RespopupWaitLabeledEdit.Text := IntToStr(RespopupWaitUpDown.Max); | |
514 | +end; | |
454 | 515 | |
455 | 516 | end. |
@@ -1,6 +1,6 @@ | ||
1 | 1 | object OptionDialog: TOptionDialog |
2 | - Left = 417 | |
3 | - Top = 435 | |
2 | + Left = 300 | |
3 | + Top = 166 | |
4 | 4 | BorderStyle = bsDialog |
5 | 5 | Caption = #12458#12503#12471#12519#12531 |
6 | 6 | ClientHeight = 428 |
@@ -61,9 +61,9 @@ object OptionDialog: TOptionDialog | ||
61 | 61 | Top = 4 |
62 | 62 | Width = 509 |
63 | 63 | Height = 389 |
64 | - ActivePage = TabSheet1 | |
64 | + ActivePage = ThreadSheet | |
65 | 65 | MultiLine = True |
66 | - TabIndex = 5 | |
66 | + TabIndex = 4 | |
67 | 67 | TabOrder = 3 |
68 | 68 | OnChange = OptionTabChange |
69 | 69 | object ConnectSheet: TTabSheet |
@@ -870,7 +870,7 @@ object OptionDialog: TOptionDialog | ||
870 | 870 | Left = 12 |
871 | 871 | Top = 92 |
872 | 872 | Width = 477 |
873 | - Height = 121 | |
873 | + Height = 157 | |
874 | 874 | Caption = #12522#12531#12463#12463#12522#12483#12463#26178#21205#20316 |
875 | 875 | TabOrder = 1 |
876 | 876 | object AppFolderLabel: TLabel |
@@ -915,13 +915,21 @@ object OptionDialog: TOptionDialog | ||
915 | 915 | TabOrder = 3 |
916 | 916 | OnClick = URLAppCheckBoxClick |
917 | 917 | end |
918 | + object ResAnchorCheckBox: TCheckBox | |
919 | + Left = 12 | |
920 | + Top = 125 | |
921 | + Width = 333 | |
922 | + Height = 17 | |
923 | + Caption = #12524#12473#12450#12531#12459#12540#12398#22580#21512#12289#12381#12398#12524#12473#12414#12391#12472#12515#12531#12503#12377#12427 | |
924 | + TabOrder = 4 | |
925 | + end | |
918 | 926 | end |
919 | 927 | object GroupBox6: TGroupBox |
920 | 928 | Left = 12 |
921 | - Top = 220 | |
929 | + Top = 260 | |
922 | 930 | Width = 477 |
923 | - Height = 49 | |
924 | - Caption = #12525#12464#21066#38500 | |
931 | + Height = 77 | |
932 | + Caption = #30906#35469#12513#12483#12475#12540#12472 | |
925 | 933 | TabOrder = 2 |
926 | 934 | object LogDeleteMessageCheckBox: TCheckBox |
927 | 935 | Left = 12 |
@@ -932,21 +940,14 @@ object OptionDialog: TOptionDialog | ||
932 | 940 | TabOrder = 0 |
933 | 941 | OnClick = URLAppCheckBoxClick |
934 | 942 | end |
935 | - end | |
936 | - object ResAnchorGroupBox: TGroupBox | |
937 | - Left = 12 | |
938 | - Top = 279 | |
939 | - Width = 477 | |
940 | - Height = 49 | |
941 | - Caption = #12524#12473#12450#12531#12459#12540#12463#12522#12483#12463#26178#21205#20316 | |
942 | - TabOrder = 3 | |
943 | - object ResAnchorCheckBox: TCheckBox | |
943 | + object IgnoreLimitResCountCheckBox: TCheckBox | |
944 | 944 | Left = 12 |
945 | - Top = 21 | |
946 | - Width = 165 | |
945 | + Top = 46 | |
946 | + Width = 389 | |
947 | 947 | Height = 17 |
948 | - Caption = #12381#12398#12524#12473#12414#12391#12472#12515#12531#12503#12377#12427 | |
949 | - TabOrder = 0 | |
948 | + Caption = #21516'ID'#12524#12473#12450#12531#12459#12540#34920#31034#12391#21046#38480#25968#36234#12360#12398#30906#35469#12513#12483#12475#12540#12472#12434#34920#31034#12377#12427'(&R)' | |
949 | + TabOrder = 1 | |
950 | + OnClick = URLAppCheckBoxClick | |
950 | 951 | end |
951 | 952 | end |
952 | 953 | end |
@@ -116,8 +116,6 @@ type | ||
116 | 116 | OpenMailerCheckBox: TCheckBox; |
117 | 117 | GroupBox6: TGroupBox; |
118 | 118 | LogDeleteMessageCheckBox: TCheckBox; |
119 | - ResAnchorGroupBox: TGroupBox; | |
120 | - ResAnchorCheckBox: TCheckBox; | |
121 | 119 | TabSheet1: TTabSheet; |
122 | 120 | TabAddRadioGroup: TRadioGroup; |
123 | 121 | GroupBox8: TGroupBox; |
@@ -219,6 +217,8 @@ type | ||
219 | 217 | gppLeftBottomRB: TRadioButton; |
220 | 218 | gppBottomRB: TRadioButton; |
221 | 219 | gppRighBottomRB: TRadioButton; |
220 | + ResAnchorCheckBox: TCheckBox; | |
221 | + IgnoreLimitResCountCheckBox: TCheckBox; | |
222 | 222 | procedure FormCreate(Sender: TObject); |
223 | 223 | procedure FormDestroy(Sender: TObject); |
224 | 224 | procedure ApplyButtonClick(Sender: TObject); |
@@ -766,6 +766,8 @@ begin | ||
766 | 766 | |
767 | 767 | //ログ削除時メッセージ |
768 | 768 | LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg; |
769 | + //同IDレスアンカー表示の制限数越えメッセージ | |
770 | + IgnoreLimitResCountCheckBox.Checked := GikoSys.Setting.LimitResCountMessage; | |
769 | 771 | |
770 | 772 | //終了時確認ダイアログ |
771 | 773 | ShowDialogForEndCheckBox.Checked := GikoSys.Setting.ShowDialogForEnd; |
@@ -1031,6 +1033,8 @@ begin | ||
1031 | 1033 | |
1032 | 1034 | GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked; |
1033 | 1035 | GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked; |
1036 | + GikoSys.Setting.LimitResCountMessage := IgnoreLimitResCountCheckBox.Checked; | |
1037 | + | |
1034 | 1038 | //終了時確認ダイアログ |
1035 | 1039 | GikoSys.Setting.ShowDialogForEnd := ShowDialogForEndCheckBox.Checked; |
1036 | 1040 | //AllTabClose |
@@ -10,7 +10,6 @@ uses | ||
10 | 10 | SHDocVw_TLB |
11 | 11 | {$IFEND} |
12 | 12 | ; |
13 | - | |
14 | 13 | type |
15 | 14 | TPreviewBrowser = class(TWebBrowser) |
16 | 15 | private |
@@ -29,6 +28,9 @@ uses MojuUtils, GikoSystem, Setting; | ||
29 | 28 | const |
30 | 29 | //プレビューファイル名 |
31 | 30 | HTML_FILE_NAME = 'temp_preview.html'; |
31 | + // マウスカーソルからのずらし位置 | |
32 | + DIV_X = 15; | |
33 | + DIV_Y = 15; | |
32 | 34 | |
33 | 35 | constructor TPreviewBrowser.Create(AOwner: TComponent); |
34 | 36 | begin |
@@ -148,26 +150,26 @@ begin | ||
148 | 150 | end; |
149 | 151 | |
150 | 152 | Result := Rect(0, 0, WindowWidth, WindowHeight); |
151 | - | |
153 | + // bata55以前は左右が間違ってた | |
152 | 154 | // 出し位置による補正 |
153 | 155 | case GikoSys.Setting.PopupPosition of |
154 | - gppRightTop: OffsetRect(Result, | |
155 | - Point.x - WindowWidth - 15, Point.y - WindowHeight - 15); | |
156 | - gppRight: OffsetRect(Result, | |
157 | - Point.x - WindowWidth - 15, Point.y - (WindowHeight div 2)); | |
158 | - gppRightBottom: OffsetRect(Result, | |
159 | - Point.x - WindowWidth - 15, Point.y + 15); | |
156 | + gppLeftTop: OffsetRect(Result, | |
157 | + Point.x - WindowWidth - DIV_X, Point.y - WindowHeight - DIV_Y); | |
158 | + gppLeft: OffsetRect(Result, | |
159 | + Point.x - WindowWidth - DIV_X, Point.y - (WindowHeight div 2)); | |
160 | + gppLeftBottom: OffsetRect(Result, | |
161 | + Point.x - WindowWidth - DIV_X, Point.y + DIV_Y); | |
160 | 162 | gppTop: OffsetRect(Result, |
161 | - Point.x - (WindowWidth div 2), Point.y - WindowHeight - 15); | |
163 | + Point.x - (WindowWidth div 2), Point.y - WindowHeight - DIV_Y); | |
162 | 164 | gppCenter: OffsetRect(Result, |
163 | 165 | Point.x - (WindowWidth div 2), Point.y - (WindowHeight div 2)); |
164 | 166 | gppBottom: OffsetRect(Result, |
165 | - Point.x - (WindowWidth div 2), Point.y + 15); | |
166 | - gppLeftTop: OffsetRect(Result, | |
167 | - Point.x + 15, Point.y - WindowHeight - 15); | |
168 | - gppLeft: OffsetRect(Result, | |
169 | - Point.x + 15, Point.y - (WindowHeight div 2)); | |
170 | - gppLeftBottom: OffsetRect(Result, Point.x + 15, Point.y + 15); //ギコナビスレ パート1の453氏に感謝 | |
167 | + Point.x - (WindowWidth div 2), Point.y + DIV_Y); | |
168 | + gppRightTop: OffsetRect(Result, | |
169 | + Point.x + DIV_X, Point.y - WindowHeight - DIV_Y); | |
170 | + gppRight: OffsetRect(Result, | |
171 | + Point.x + DIV_X, Point.y - (WindowHeight div 2)); | |
172 | + gppRightBottom: OffsetRect(Result, Point.x + DIV_X, Point.y + DIV_Y); //ギコナビスレ パート1の453氏に感謝 | |
171 | 173 | end; |
172 | 174 | |
173 | 175 | end; |
@@ -29,6 +29,7 @@ type | ||
29 | 29 | function GetTitle(OnlyTitle: Boolean): string; |
30 | 30 | function CalcRect(WorkArea: TRect; Scroll: Boolean): TRect; |
31 | 31 | function ResPopupBrowserClick(Sender: TObject): WordBool; |
32 | + function ResPopupBrowserDbClick(Sender: TObject): WordBool; | |
32 | 33 | function GetThread: TThreadItem; |
33 | 34 | protected |
34 | 35 | procedure CreateParams(var Params: TCreateParams); override; |
@@ -53,8 +54,7 @@ type | ||
53 | 54 | end; |
54 | 55 | |
55 | 56 | implementation |
56 | -uses MojuUtils, GikoSystem, Setting, Giko, GikoDataModule; | |
57 | - | |
57 | +uses MojuUtils, GikoSystem, Setting, Giko, GikoDataModule, Preview; | |
58 | 58 | |
59 | 59 | constructor TResPopupBrowser.Create(AOwner: TComponent); |
60 | 60 | begin |
@@ -157,7 +157,7 @@ procedure TResPopupBrowser.Write(ADocument: String; OnlyTitle: Boolean = False); | ||
157 | 157 | var |
158 | 158 | p: TPoint; |
159 | 159 | doc: Variant; |
160 | - ARect, rect: TRect; | |
160 | + ARect: TRect; | |
161 | 161 | FDispHtmlDocument: DispHTMLDocument; |
162 | 162 | begin |
163 | 163 | try |
@@ -186,7 +186,7 @@ begin | ||
186 | 186 | FDispHtmlDocument := Idispatch(OleVariant(Self.ControlInterface).Document) as DispHTMLDocument; |
187 | 187 | FEvent := THTMLDocumentEventSink.Create(Self, FDispHtmlDocument, HTMLDocumentEvents2); |
188 | 188 | FEvent.OnClick := ResPopupBrowserClick; |
189 | - | |
189 | + FEvent.OnDoubleClick := ResPopupBrowserDbClick; | |
190 | 190 | Self.Visible := True; |
191 | 191 | SetWindowPos(Self.Handle, HWND_TOPMOST, |
192 | 192 | ARect.Left, ARect.Top, |
@@ -261,6 +261,7 @@ var | ||
261 | 261 | ele: IHTMLElement2; |
262 | 262 | h, w, dx1, dx2, dy1, dy2: Integer; |
263 | 263 | MaxWidth, MaxHeight: Integer; |
264 | + DIV_X, DIV_Y: Integer; | |
264 | 265 | begin |
265 | 266 | GetCursorpos(p); |
266 | 267 | ele := ((Self.Document as IHTMLDocument2).body as IHTMLElement2); |
@@ -272,6 +273,9 @@ begin | ||
272 | 273 | w := ele.scrollWidth + 10; |
273 | 274 | end; |
274 | 275 | |
276 | + DIV_X := GikoSys.Setting.RespopupDeltaX; | |
277 | + DIV_Y := GikoSys.Setting.RespopupDeltaY; | |
278 | + | |
275 | 279 | dx1 := 0; dx2 := 0; |
276 | 280 | dy1 := 0; dy2 := 0; |
277 | 281 |
@@ -279,44 +283,44 @@ begin | ||
279 | 283 | case GikoSys.Setting.PopupPosition of |
280 | 284 | gppRightTop: |
281 | 285 | begin |
282 | - dx1 := 0; dx2 := -2; | |
283 | - dy1 := -h; dy2 := -2; | |
286 | + dx1 := 0; dx2 := + DIV_X; | |
287 | + dy1 := -h; dy2 := - DIV_Y; | |
284 | 288 | end; |
285 | 289 | gppRight: |
286 | 290 | begin |
287 | - dx1 := 0; dx2 := -2; | |
291 | + dx1 := 0; dx2 := + DIV_X; | |
288 | 292 | dy1 := - (h div 2); dy2 := 0; |
289 | 293 | end; |
290 | 294 | gppRightBottom: |
291 | 295 | begin |
292 | - dx1 := 0; dx2 := -2; | |
293 | - dy1 := 0; dy2 := +2; | |
296 | + dx1 := 0; dx2 := + DIV_X; | |
297 | + dy1 := 0; dy2 := + DIV_Y; | |
294 | 298 | end; |
295 | 299 | gppTop: |
296 | 300 | begin |
297 | 301 | dx1 := - (w div 2); dx2 := 0; |
298 | - dy1 := -h; dy2 := -2; | |
302 | + dy1 := -h; dy2 := - DIV_Y; | |
299 | 303 | end; |
300 | 304 | // 廃止 gppCenter: OffsetRect(Result, p.x - (w div 2), p.y - (h div 2)); |
301 | 305 | gppBottom: |
302 | 306 | begin |
303 | 307 | dx1 := - (w div 2); dx2 := 0; |
304 | - dy1 := 0; dy2 := +2; | |
308 | + dy1 := 0; dy2 := + DIV_Y; | |
305 | 309 | end; |
306 | 310 | gppLeftTop: |
307 | 311 | begin |
308 | - dx1 := -w; dx2 := +2; | |
309 | - dy1 := -h; dy2 := -2; | |
312 | + dx1 := -w; dx2 := - DIV_X ; | |
313 | + dy1 := -h; dy2 := - DIV_Y; | |
310 | 314 | end; |
311 | 315 | gppLeft: |
312 | 316 | begin |
313 | - dx1 := -w; dx2 := +2; | |
317 | + dx1 := -w; dx2 := - DIV_X; | |
314 | 318 | dy1 := - (h div 2); dy2 := 0; |
315 | 319 | end; |
316 | 320 | gppLeftBottom: |
317 | 321 | begin |
318 | - dx1 := -w; dx2 := +2; | |
319 | - dy1 := 0; dy2 := +2; | |
322 | + dx1 := -w; dx2 := - DIV_X; | |
323 | + dy1 := 0; dy2 := + DIV_Y; | |
320 | 324 | end; |
321 | 325 | end; |
322 | 326 | // 初期位置に移動 |
@@ -440,7 +444,14 @@ begin | ||
440 | 444 | FOleInPlaceActiveObject := Self.ControlInterface as IOleInPlaceActiveObject; |
441 | 445 | FOleInPlaceActiveObject.OnFrameWindowActivate(False); |
442 | 446 | end; |
443 | - | |
447 | +function TResPopupBrowser.ResPopupBrowserDbClick(Sender: TObject): WordBool; | |
448 | +begin | |
449 | + // ギコナビのフォーカスを奪ってるのでフォームに無理やり返す | |
450 | + Blur; | |
451 | + // 自分で自分は消せないので、メッセージ経由で消してもらう | |
452 | + PostMessage( GikoForm.Handle , USER_RESPOPUPCLEAR, Integer( Self ), 0 ); | |
453 | + Result := True; | |
454 | +end; | |
444 | 455 | initialization |
445 | 456 | OleInitialize(nil); |
446 | 457 |
@@ -20,9 +20,9 @@ type | ||
20 | 20 | TGikoListOrientation = (gloHorizontal, gloVertical); // リスト垂直・水平 |
21 | 21 | TGikoListState = (glsMax, glsNormal, glsMin); // リストサイズ状態 |
22 | 22 | // ポップアップ表示位置 |
23 | - TGikoPopupPosition = (gppRightTop, gppTop, gppLeftTop, | |
24 | - gppRight, gppCenter, gppLeft, | |
25 | - gppRightBottom, gppBottom, gppLeftBottom); | |
23 | + TGikoPopupPosition = (gppLeftTop = 0, gppTop, gppRightTop, | |
24 | + gppLeft, gppCenter, gppRight, | |
25 | + gppLeftBottom, gppBottom, gppRightBottom); | |
26 | 26 | //プレビューサイズ |
27 | 27 | TGikoPreviewSize = (gpsXLarge, gpsLarge, gpsMedium, gpsSmall, gpsXSmall); |
28 | 28 | TGikoBrowserAutoMaximize = (gbmNone, gbmClick, gbmDoubleClick); |
@@ -450,6 +450,16 @@ type | ||
450 | 450 | FExtList: String; |
451 | 451 | //! Skin関連 |
452 | 452 | FSkinFiles: TSkinFiles; |
453 | + //! indexファイルを読み時にdatを検索する | |
454 | + FCheckDatFile: Boolean; | |
455 | + //! 同IDレスアンカー表示 | |
456 | + FLimitResCountMessage: Boolean; | |
457 | + //! レスポップアップ表示位置deltaX | |
458 | + FRespopupDeltaX: Integer; | |
459 | + //! レスポップアップ表示位置deltaY | |
460 | + FRespopupDeltaY: Integer; | |
461 | + //! レスポップアップタイマー | |
462 | + FRespopupWait: Integer; | |
453 | 463 | function GetMainCoolSet(Index: Integer): TCoolSet; |
454 | 464 | function GetBoardCoolSet(Index: Integer): TCoolSet; |
455 | 465 | function GetBrowserCoolSet(Index: Integer): TCoolSet; |
@@ -807,7 +817,15 @@ type | ||
807 | 817 | property ExtList: String read FExtList write FExtList; |
808 | 818 | //! Skinファイル管理 |
809 | 819 | property SkinFiles: TSkinFiles read FSkinFiles; |
810 | - | |
820 | + //! インデックス読み込み時datファイルチェック | |
821 | + property CheckDatFile: Boolean read FCheckDatFile write FCheckDatFile; | |
822 | + property LimitResCountMessage: Boolean read FLimitResCountMessage write FLimitResCountMessage; | |
823 | + //! レスポップアップ表示位置deltaX | |
824 | + property RespopupDeltaX: Integer read FRespopupDeltaX write FRespopupDeltaX; | |
825 | + //! レスポップアップ表示位置deltaY | |
826 | + property RespopupDeltaY: Integer read FRespopupDeltaY write FRespopupDeltaY; | |
827 | + //! レスポップアップタイマー | |
828 | + property RespopupWait: Integer read FRespopupWait write FRespopupWait; | |
811 | 829 | end; |
812 | 830 | |
813 | 831 |
@@ -1147,6 +1165,10 @@ begin | ||
1147 | 1165 | if (FPopupPosition = gppCenter) then begin |
1148 | 1166 | FPopupPosition := gppTop; |
1149 | 1167 | end; |
1168 | + FRespopupDeltaX := ini.ReadInteger('Browser', 'RespopupDelteX', 5); | |
1169 | + FRespopupDeltaY := ini.ReadInteger('Browser', 'RespopupDelteY', 5); | |
1170 | + FRespopupWait := ini.ReadInteger('Browser', 'RespopupWait', 1000); | |
1171 | + | |
1150 | 1172 | //アドレスバー |
1151 | 1173 | FURLDisplay := ini.ReadBool('AddressBar', 'URLDisplay', False); |
1152 | 1174 | FAddressBarTabStop := ini.ReadBool('AddressBar', 'TabStop', True); |
@@ -1293,6 +1315,9 @@ begin | ||
1293 | 1315 | |
1294 | 1316 | FSentIniFileSize := ini.ReadInteger('Function', 'SentIniFileSize', 3); |
1295 | 1317 | FExtList := ini.ReadString('Function', 'ExtList', '*.gif;*.jpg;*.jpeg;*.png;*.zip;*.rar'); |
1318 | + | |
1319 | + FCheckDatFile := ini.ReadBool('ThreadList', 'CheckDatFile', True); | |
1320 | + FLimitResCountMessage := ini.ReadBool('Thread', 'LimitResCountMessage', True); | |
1296 | 1321 | ini.UpdateFile; |
1297 | 1322 | finally |
1298 | 1323 | ini.Free; |
@@ -1517,6 +1542,9 @@ begin | ||
1517 | 1542 | |
1518 | 1543 | //ポップアップ位置 |
1519 | 1544 | ini.WriteInteger('Browser', 'PopupPosition', Ord(FPopupPosition)); |
1545 | + ini.WriteInteger('Browser', 'RespopupDelteX', FRespopupDeltaX); | |
1546 | + ini.WriteInteger('Browser', 'RespopupDelteY', FRespopupDeltaY); | |
1547 | + ini.WriteInteger('Browser', 'RespopupWait', FRespopupWait); | |
1520 | 1548 | |
1521 | 1549 | //アドレスバー |
1522 | 1550 | ini.WriteBool('AddressBar', 'URLDisplay', FURLDisplay); |
@@ -1675,6 +1703,8 @@ begin | ||
1675 | 1703 | ini.WriteBool('Thread', 'ReplaceDat', FReplaceDat); |
1676 | 1704 | ini.WriteInteger('Function', 'SentIniFileSize', FSentIniFileSize); |
1677 | 1705 | ini.WriteString('Function', 'ExtList', FExtList); |
1706 | + ini.WriteBool('ThreadList', 'CheckDatFile', FCheckDatFile); | |
1707 | + ini.WriteBool('Thread', 'LimitResCountMessage', FLimitResCountMessage); | |
1678 | 1708 | ini.UpdateFile; |
1679 | 1709 | finally |
1680 | 1710 | ini.Free; |
@@ -10,11 +10,11 @@ VersionInfoDescription= | ||
10 | 10 | DefaultGroupName=ギコナビ |
11 | 11 | ; 自分の環境に合わせてください |
12 | 12 | SourceDir=G:\Release |
13 | -OutputDir=G:\Output | |
13 | +OutputDir=G:\InnoSetup\Output | |
14 | 14 | SetupIconFile="G:\gikoNaviSFX_102\MainIcon.ico" |
15 | 15 | ; ギコナビのバージョンにあわせてください |
16 | -VersionInfoVersion=1.56.0.714 | |
17 | -OutputBaseFilename=gikoNavi_1.56.0.714_2_setup | |
16 | +VersionInfoVersion=1.56.1.716 | |
17 | +OutputBaseFilename=gikoNavi_b56_setup | |
18 | 18 | |
19 | 19 | |
20 | 20 | [Tasks] |
@@ -90,7 +90,7 @@ begin | ||
90 | 90 | begin |
91 | 91 | DelTree(path, True, True, True); |
92 | 92 | end; |
93 | - | |
93 | + | |
94 | 94 | path := ExpandConstant('{app}') + '\config'; |
95 | 95 | if MsgBox(path + 'フォルダ以下を完全に消去してよろしいでしょうか?', mbConfirmation, MB_YESNO) = IDYES then |
96 | 96 | begin |
@@ -1,4 +1,4 @@ | ||
1 | -■ギコナビ Version1.00 バタ56 Readme.txt | |
1 | +■ギコナビ Version1.00 バタ57 Readme.txt | |
2 | 2 | |
3 | 3 | |
4 | 4 | ------------------------------ |
@@ -108,6 +108,16 @@ LICENSE | ||
108 | 108 | ------------------------------ |
109 | 109 | 履歴 |
110 | 110 | ------------------------------ |
111 | +2007/XX/XX | |
112 | + Version バタ57 | |
113 | + | |
114 | +2007/08/18 | |
115 | + Version バタ56 リリース2 | |
116 | + 入力アシストの設定で、挿入文字列をだけを変更できない不具合の修正 | |
117 | + 一部環境で、ギコナビを最小化して復元するとスレッドがスクロールする不具合の修正 | |
118 | + バタ55以前からアップデートするとレスポップアップ位置の設定の左右が逆転する不具合の修正 | |
119 | + | |
120 | + | |
111 | 121 | 2007/08/05 |
112 | 122 | Version バタ56 |
113 | 123 | レスポップアップの多段対応 |
@@ -1,44 +1,36 @@ | ||
1 | 1 | [Setting] |
2 | -@ascii2d=30 | |
3 | -@chiri=30 | |
4 | -@gline=30 | |
5 | 2 | @newsplus=120 |
6 | -@operate=30 | |
7 | -@tv=30 | |
8 | -aa6=30 | |
3 | +@skate=60 | |
9 | 4 | academy6=30 |
10 | -anime2=45 | |
11 | -book4=30 | |
12 | -bubble5=30 | |
5 | +anime2=60 | |
6 | +bubble6=30 | |
13 | 7 | etc6=30 |
14 | 8 | ex20=30 |
15 | 9 | ex21=30 |
16 | -ex22=30 | |
17 | -food7=30 | |
10 | +ex23=20 | |
11 | +food8=30 | |
18 | 12 | game11=30 |
19 | 13 | game12=30 |
20 | 14 | hobby9=30 |
21 | -human6=30 | |
15 | +human7=30 | |
22 | 16 | life8=30 |
23 | 17 | live23=10 |
24 | 18 | live24=10 |
25 | 19 | live25=10 |
26 | -love5=30 | |
27 | -money5=30 | |
20 | +love6=30 | |
21 | +money6=30 | |
28 | 22 | music8=30 |
29 | 23 | news21=30 |
30 | 24 | news22=30 |
31 | -off4=30 | |
32 | -pc9=30 | |
25 | +news23=128 | |
33 | 26 | pc11=30 |
34 | 27 | qb5=30 |
35 | -school6=30 | |
28 | +school7=30 | |
36 | 29 | science6=30 |
37 | -sports10=60 | |
30 | +sports11=60 | |
38 | 31 | tmp6=45 |
39 | -travel3=30 | |
40 | 32 | tv11=60 |
41 | -wwwww=20 | |
33 | +wwwww=15 | |
42 | 34 | |
43 | 35 | idol=30 |
44 | 36 | pie=30 |