• R/O
  • HTTP
  • SSH
  • HTTPS

Commit

Tags
No Tags

Frequently used words (click to add to your profile)

javaandroidc++linuxc#objective-ccocoa誰得qtrubypythongamewindowsbathyscaphephpguic翻訳omegattwitterframeworktestbtronarduinovb.net計画中(planning stage)directxpreviewerゲームエンジンdom

ギコナビ


Commit MetaInfo

Revisionf536d2eb8ba487b95cbcf090fee2238b143fa956 (tree)
Time2007-02-14 00:58:59
Authorh677 <h677>
Commiterh677

Log Message

スレッドの最後に関連キーワードのリンクを加えるオプションを追加
スレッド一覧にカテゴリを表示しているときの名前をコピーを有効にした。

Change Summary

Incremental Difference

--- a/Giko.dfm
+++ b/Giko.dfm
@@ -5147,7 +5147,7 @@ object GikoForm: TGikoForm
51475147 object UrlCopyPMenu: TMenuItem
51485148 Action = GikoDM.SelectItemURLCopyAction
51495149 end
5150- object C2: TMenuItem
5150+ object NameCopyPMenu: TMenuItem
51515151 Action = GikoDM.SelectItemNameCopyAction
51525152 end
51535153 object NameUrlCopyPMenu: TMenuItem
--- a/Giko.pas
+++ b/Giko.pas
@@ -284,7 +284,7 @@ type
284284 SelectItemNameCopyAction1: TMenuItem;
285285 B6: TMenuItem;
286286 T9: TMenuItem;
287- C2: TMenuItem;
287+ NameCopyPMenu: TMenuItem;
288288 SelectComboBox: TComboBox;
289289 MainCoolBarPopupMenu: TPopupMenu;
290290 StdToolBarVisiblePMenu: TMenuItem;
@@ -3555,7 +3555,7 @@ end;
35553555
35563556 procedure TGikoForm.ListPopupMenuPopup(Sender: TObject);
35573557 var
3558- bBoard, bCategory : Boolean;
3558+ bBoard, bCategory, bBBS : Boolean;
35593559 begin
35603560 bBoard := (GetActiveList is TBoard);
35613561 bCategory := (GetActiveList is TCategory);
--- a/GikoDataModule.pas
+++ b/GikoDataModule.pas
@@ -2902,7 +2902,9 @@ begin
29022902 try
29032903 GikoForm.SelectListItem(List);
29042904 for i := 0 to List.Count - 1 do begin
2905- if TObject(List[i]) is TBoard then
2905+ if TObject(List[i]) is TCategory then
2906+ s := s + TCategory(List[i]).Title + #13#10
2907+ else if TObject(List[i]) is TBoard then
29062908 s := s + TBoard(List[i]).Title + #13#10
29072909 else if TObject(List[i]) is TThreadItem then
29082910 s := s + TThreadItem(List[i]).Title + #13#10;
@@ -2918,7 +2920,8 @@ end;
29182920 // *************************************************************************
29192921 procedure TGikoDM.SelectItemNameCopyActionUpdate(Sender: TObject);
29202922 begin
2921- if ((GikoForm.GetActiveList is TBoard) or
2923+ if ((GikoForm.GetActiveList is TBBS) or
2924+ (GikoForm.GetActiveList is TBoard) or
29222925 (GikoForm.GetActiveList is TCategory))and (GikoForm.ListView.SelCount > 0) then
29232926 TAction(Sender).Enabled := True
29242927 else
--- a/HTMLCreate.pas
+++ b/HTMLCreate.pas
@@ -68,6 +68,7 @@ type
6868 function getNumberString(const str: String;var index :Integer; var dbCharlen: Boolean;
6969 sLen :Integer): String;
7070 function isOutsideRange(item: TThreadItem; index: Integer ): Boolean;
71+ function getKeywordLink(item: TThreadItem): String;
7172 public
7273 { Public éŒ¾ }
7374 procedure AddAnchorTag(PRes: PResRec);
@@ -797,7 +798,7 @@ begin
797798 html.Add( KOKO_TAG );
798799 end;
799800 end;
800-
801+ html.Add(getKeywordLink(ThreadItem));
801802 html.Add('<a name="bottom"></a>');
802803 // ƒXƒLƒ“(ƒtƒbƒ^)
803804 html.Add( LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, ThreadItem.Size ) );
@@ -886,7 +887,7 @@ begin
886887 end;
887888
888889 end;
889-
890+ html.Add(getKeywordLink(ThreadItem));
890891 html.Add('<a name="bottom"></a>');
891892 html.Add('<a name="last"></a>');
892893 html.Add('</body></html>');
@@ -956,6 +957,7 @@ begin
956957 html.Add('<dl>');
957958 end;
958959 end;
960+ html.Add(getKeywordLink(ThreadItem));
959961 html.Add('</dl>'#13#10'<a name="bottom"></a>'#13#10'</body></html>');
960962 end;
961963
@@ -1684,7 +1686,17 @@ begin
16841686 end;
16851687 inherited;
16861688 end;
1687-
1689+//! ŠÖ˜AƒL[ƒ[ƒhƒŠƒ“ƒNo—Í
1690+function THTMLCreate.getKeywordLink(item: TThreadItem): String;
1691+const
1692+ PARA_URL = 'http://p2.2ch.io/getf.cgi?';
1693+begin
1694+ Result := '';
1695+ if (GikoSys.Setting.AddKeywordLink) and (item.ParentBoard.Is2ch) then begin
1696+ Result := '<p><span id="keyword"><a href="' + PARA_URL
1697+ + item.URL + '" target="_blank">ŠÖ˜AƒL[ƒ[ƒh</a></span></p>';
1698+ end;
1699+end;
16881700 initialization
16891701 HTMLCreater := THTMLCreate.Create;
16901702
--- a/KuroutSetting.dfm
+++ b/KuroutSetting.dfm
@@ -21,8 +21,8 @@ object KuroutOption: TKuroutOption
2121 Top = 0
2222 Width = 517
2323 Height = 393
24- ActivePage = KakikomiTabSheet
25- TabIndex = 2
24+ ActivePage = TabSheet1
25+ TabIndex = 0
2626 TabOrder = 0
2727 object TabSheet1: TTabSheet
2828 Caption = #35443#32048#35373#23450#65297
@@ -427,8 +427,8 @@ object KuroutOption: TKuroutOption
427427 end
428428 object AHandredGroupBox: TGroupBox
429429 Left = 16
430- Top = 192
431- Width = 465
430+ Top = 184
431+ Width = 473
432432 Height = 65
433433 Caption = '100'#12524#12473#34920#31034#35373#23450
434434 TabOrder = 2
@@ -458,6 +458,22 @@ object KuroutOption: TKuroutOption
458458 Wrap = False
459459 end
460460 end
461+ object HTMLGroupBox: TGroupBox
462+ Left = 16
463+ Top = 256
464+ Width = 473
465+ Height = 65
466+ Caption = #12473#12524#12483#12489#25551#30011
467+ TabOrder = 3
468+ object AddKeywordCheckBox: TCheckBox
469+ Left = 16
470+ Top = 24
471+ Width = 233
472+ Height = 17
473+ Caption = #38306#36899#12461#12540#12527#12540#12489#12398#12522#12531#12463#12434#36861#21152#12377#12427
474+ TabOrder = 0
475+ end
476+ end
461477 end
462478 end
463479 object OkBotton: TButton
--- a/KuroutSetting.pas
+++ b/KuroutSetting.pas
@@ -68,6 +68,8 @@ type
6868 AHandredGroupBox: TGroupBox;
6969 AHandredLabeledEdit: TLabeledEdit;
7070 UpDown1: TUpDown;
71+ HTMLGroupBox: TGroupBox;
72+ AddKeywordCheckBox: TCheckBox;
7173 procedure OkBottonClick(Sender: TObject);
7274 procedure FormCreate(Sender: TObject);
7375 procedure CDeleteButtonClick(Sender: TObject);
@@ -136,6 +138,8 @@ begin
136138 MoveHistoryMaxEdit.Text := IntToStr( GikoSys.Setting.MoveHistorySize );
137139 //@æ“ª•\Ž¦ƒŒƒX”
138140 AHandredLabeledEdit.Text := IntToStr( GikoSys.Setting.HeadResCount );
141+ // ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO
142+ AddKeywordCheckBox.Checked := GikoSys.Setting.AddKeywordLink;
139143 end;
140144
141145 procedure TKuroutOption.SaveSetting;
@@ -172,6 +176,9 @@ begin
172176 StrToIntDef( AHandredLabeledEdit.Text , 1);
173177
174178 GikoSys.Setting.KuroutSettingTabIndex := PageControl1.ActivePageIndex;
179+ // ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO
180+ GikoSys.Setting.AddKeywordLink := AddKeywordCheckBox.Checked;
181+
175182 end;
176183
177184 procedure TKuroutOption.RecvBufferSizeExit(Sender: TObject);
--- a/Setting.pas
+++ b/Setting.pas
@@ -441,6 +441,9 @@ type
441441 FLoopBrowserTabs : Boolean;
442442 //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX”
443443 FHeadResCount : Integer;
444+ //! ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO
445+ FAddKeywordLink: Boolean;
446+
444447 function GetMainCoolSet(Index: Integer): TCoolSet;
445448 function GetBoardCoolSet(Index: Integer): TCoolSet;
446449 function GetBrowserCoolSet(Index: Integer): TCoolSet;
@@ -790,6 +793,8 @@ type
790793 property LoopBrowserTabs : Boolean read FLoopBrowserTabs write FLoopBrowserTabs;
791794 //! 100ƒŒƒX•\Ž¦‚̐擪•\Ž¦ƒŒƒX”
792795 property HeadResCount : Integer read FHeadResCount write FHeadResCount;
796+ //! ŠÖ˜AƒL[ƒ[ƒh’ljÁƒtƒ‰ƒO
797+ property AddKeywordLink: Boolean read FAddKeywordLink write FAddKeywordLink;
793798 end;
794799
795800
@@ -1262,7 +1267,7 @@ begin
12621267
12631268 FStoredTaskTray := ini.ReadBool('Function', 'StroedTaskTray', false);
12641269 FLoopBrowserTabs := ini.ReadBool('Function', 'LoopBrowserTabs', false);
1265-
1270+ FAddKeywordLink := ini.ReadBool('Thread', 'AddKeywordLink', false);
12661271 ini.UpdateFile;
12671272 finally
12681273 ini.Free;
@@ -1640,6 +1645,7 @@ begin
16401645
16411646 ini.WriteBool('Function', 'StroedTaskTray', FStoredTaskTray);
16421647 ini.WriteBool('Function', 'LoopBrowserTabs', FLoopBrowserTabs);
1648+ ini.WriteBool('Thread', 'AddKeywordLink', FAddKeywordLink);
16431649 ini.UpdateFile;
16441650 finally
16451651 ini.Free;