procedure LoadIcon();
//! \83|\83b\83v\83A\83b\83v\83\81\83j\83\85\81[\93Ç\82Ý\8d\9e\82Ý
procedure LoadPopupMenu();
+ //! \83X\83\8c\83^\83C\8eæ\93¾
+ function GetThreadTitle(OrgTitle: String): String;
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
procedure StoredTaskTray;
//! \93¯ID\83\8c\83X\83A\83\93\83J\81[\95\\8e¦
procedure ShowSameIDAncher(const AID: String);
+ //! \83X\83\8c\83^\83C\95\\8e¦\8dX\90V
+ procedure UpdateThreadTitle;
published
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
end;
if (Thread <> nil) and (ThreadItem <>nil) then begin
BrowserBoardNameLabel.Caption := ThreadPTitle;
ItemIcon16.GetBitmap(4, ItemBoardImage.Picture.Bitmap);
- BrowserNameLabel.Caption := ThreadTitle;
+ BrowserNameLabel.Caption := GetThreadTitle(ThreadTitle);
ItemImage.Picture := nil;
if ThreadIsLog then
if ThreadNewArraical then
end;
end else begin
- Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + ThreadTitle + ']';
+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + GetThreadTitle(ThreadTitle) + ']';
//\83X\83e\81[\83^\83X\83o\81[\82É\95\\8e¦\82µ\82Ä\82¢\82é\83X\83\8c\82Ì\97e\97Ê\82ð\95\\8e¦
StatusBar.Panels[THREADSIZE_PANEL].Text := Format('%6.2f kB', [ThreadItem.Size / 1024]);
StatusBar.Panels[THREADSIZE_PANEL].Width :=
if (FActiveContent <> nil) and (FActiveContent.Thread <> nil)
and (FActiveContent.Thread.IsLogFile) then begin
try
- Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + FActiveContent.Thread.Title + ']'
+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + GetThreadTitle(FActiveContent.Thread.Title) + ']'
except
on E: Exception do begin
//\83X\83\8c\88ê\97\97DL\8cã\82È\82Ç\82ÉFActiveContent\82Ì\8e\9d\82ÂThread\82ª
GikoSys.Setting.GetAppDir + ICONTOOL, clPurple);
end;
end;
+
+//! \83X\83\8c\83^\83C\95\\8e¦\8dX\90V
+procedure TGikoForm.UpdateThreadTitle;
+var
+ i: Integer;
+ DspTitle: String;
+begin
+ BrowserTab.Tabs.BeginUpdate;
+ for i := 0 to BrowserTab.Tabs.Count - 1 do begin
+ BrowserTab.Tabs.Strings[i] :=
+ GikoSys.GetShortName(TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread.Title, 20);
+ end;
+ BrowserTab.Tabs.EndUpdate;
+
+ if (FActiveContent <> nil) and (FActiveContent.Thread <> nil) then begin
+ DspTitle := GetThreadTitle(FActiveContent.Thread.Title);
+ BrowserNameLabel.Caption := DspTitle;
+ Self.Caption := GikoDataModule.CAPTION_NAME + ' - [' + DspTitle + ']';
+ end;
+end;
+
+//! \83X\83\8c\83^\83C\8eæ\93¾
+function TGikoForm.GetThreadTitle(OrgTitle: String): String;
+var
+ Idx: Integer;
+ ResTitle: String;
+begin
+ if (GikoSys.Setting.ThreadTitleTrim = False) then begin
+ Result := OrgTitle;
+ end else begin
+ ResTitle := OrgTitle;
+ while (True) do begin
+ Idx := Pos('[\93]\8dÚ\8bÖ\8e~]', ResTitle);
+ if (Idx < 1) then
+ Break;
+ Delete(ResTitle, Idx, 10);
+ end;
+ while (True) do begin
+ Idx := Pos('©2ch.net', ResTitle);
+ if (Idx < 1) then
+ Break;
+ Delete(ResTitle, Idx, 13);
+ end;
+ Result := Trim(ResTitle);
+ end;
+end;
+
//! \83|\83b\83v\83A\83b\83v\83\81\83j\83\85\81[\93Ç\82Ý\8d\9e\82Ý
procedure TGikoForm.LoadPopupMenu();
begin
Chr : array [0..255] of char;
S : string;
i : integer;
+ Idx: Integer;
begin
s := Trim(LongName);
+ if (Setting.ThreadTitleTrim = True) then begin
+ while (True) do begin
+ Idx := Pos('[\93]\8dÚ\8bÖ\8e~]', s);
+ if (Idx < 1) then
+ Break;
+ Delete(s, Idx, 10);
+ end;
+ while (True) do begin
+ Idx := Pos('©2ch.net', s);
+ if (Idx < 1) then
+ Break;
+ Delete(s, Idx, 13);
+ end;
+ s := Trim(s);
+ end;
if (Length(s) <= ALength) then begin
Result := s;
end else begin
BoardCnt: Integer;
RepStr: String;
i: Integer;
+ Idx: Integer;
begin
//===== \83X\83\8c\83\8a\83X\83g =====
if GikoSys.Setting.ListIconVisible then
RepStr := CustomStringReplace(RepStr, '&', '&' );
//RepStr := StringReplace(RepStr, '\81\97\81M', ',', [rfReplaceAll]);
- if (ThreadNgList.IsNG(RepStr) = True) then
- RepStr := '\81\83\82 \82Ú\81`\82ñ\81\84';
+ if (ThreadNgList.IsNG(RepStr) = True) then begin
+ RepStr := '\81\83\82 \82Ú\81`\82ñ\81\84'
+ end else if (GikoSys.Setting.ThreadTitleTrim = True) then begin
+ while (True) do begin
+ Idx := Pos('[\93]\8dÚ\8bÖ\8e~]', RepStr);
+ if (Idx < 1) then
+ Break;
+ Delete(RepStr, Idx, 10);
+ end;
+ while (True) do begin
+ Idx := Pos('©2ch.net', RepStr);
+ if (Idx < 1) then
+ Break;
+ Delete(RepStr, Idx, 13);
+ end;
+ RepStr := Trim(RepStr);
+ end;
if Item.SubItems.Count <> ListView.Columns.Count then begin
Item.SubItems.Clear;
Top = 4
Width = 509
Height = 389
- ActivePage = ThreadSheet
+ ActivePage = TabSheet2
MultiLine = True
TabOrder = 3
OnChange = OptionTabChange
Top = 43
Width = 417
Height = 20
- ItemHeight = 0
+ ItemHeight = 12
TabOrder = 0
Text = 'BoardURLComboBox'
end
Left = 12
Top = 8
Width = 477
- Height = 121
+ Height = 105
Caption = #12450#12489#12524#12473#12496#12540
TabOrder = 0
object Label3: TLabel
Left = 12
- Top = 96
+ Top = 82
Width = 73
Height = 12
Caption = 'URL'#20445#23384#25968'(&S)'
end
object Label11: TLabel
Left = 152
- Top = 96
+ Top = 82
Width = 12
Height = 12
Caption = #20491
end
object URLDisplayCheckBox: TCheckBox
Left = 12
- Top = 20
+ Top = 18
Width = 389
Height = 17
Caption = #12473#12524#12483#12489#12434#38283#12356#12383#12392#12365#12395#12289#12450#12489#12524#12473#12496#12540#12395'URL'#12434#34920#31034#12377#12427'(&D)'
end
object AddressHistoryCountEdit: TEdit
Left = 100
- Top = 92
+ Top = 78
Width = 45
Height = 20
TabOrder = 3
end
object TabStopAddressBarCheckBox: TCheckBox
Left = 12
- Top = 44
+ Top = 38
Width = 389
Height = 17
Caption = #12479#12502#12461#12540#12391#12450#12489#12524#12473#12496#12540#12395#31227#21205#12391#12365#12427#12424#12358#12395#12377#12427'(&T)'
end
object LinkAddCheckBox: TCheckBox
Left = 12
- Top = 68
+ Top = 58
Width = 413
Height = 17
Caption = #12502#12521#12454#12470#12398#12522#12531#12463#12434#12463#12522#12483#12463#12375#12383#12392#12365#12395' '#12450#12489#12524#12473#12496#12540#23653#27508#12395'URL'#12434#36861#21152#12377#12427'(&L)'
end
object GroupBox15: TGroupBox
Left = 12
- Top = 132
+ Top = 116
Width = 478
- Height = 79
+ Height = 64
Caption = #30906#35469#12480#12452#12450#12525#12464
TabOrder = 1
object ShowDialogForEndCheckBox: TCheckBox
Left = 12
- Top = 21
+ Top = 18
Width = 204
Height = 17
Caption = #32066#20102#26178#12395#30906#35469#12480#12452#12450#12525#12464#12434#34920#31034#12377#12427
end
object AllTabCloseCheckBox: TCheckBox
Left = 12
- Top = 48
+ Top = 38
Width = 344
Height = 17
Caption = #20840#12390#12398#12479#12502#12434#38281#12376#12427#12392#12365#12395#30906#35469#12480#12452#12450#12525#12464#12434#34920#31034#12377#12427
end
object SambaGroupBox: TGroupBox
Left = 12
- Top = 216
+ Top = 184
Width = 477
- Height = 48
+ Height = 44
Caption = 'Samba24'#23550#31574
TabOrder = 2
object UseSambaCheckBox: TCheckBox
Left = 12
- Top = 19
+ Top = 18
Width = 153
Height = 17
Caption = 'Samba24'#23550#31574#27231#33021#12434#20351#12358
end
object TabAutoSaveLoad: TGroupBox
Left = 11
- Top = 271
+ Top = 236
Width = 478
- Height = 50
+ Height = 44
Caption = 'Tab'#33258#21205#20445#23384#12539#24489#20803
TabOrder = 3
object TabLoadSave: TCheckBox
- Left = 13
+ Left = 12
Top = 18
Width = 212
Height = 17
TabOrder = 0
end
end
+ object GroupBox27: TGroupBox
+ Left = 11
+ Top = 288
+ Width = 478
+ Height = 44
+ Caption = #12473#12524#12479#12452
+ TabOrder = 4
+ object ThreadTitleTrimCheckBox: TCheckBox
+ Left = 12
+ Top = 18
+ Width = 341
+ Height = 17
+ Caption = #12473#12524#12479#12452#12398'['#36578#36617#31105#27490']'#12392#12300'&©2ch.net'#12301#12434#34920#31034#12375#12394#12356
+ TabOrder = 0
+ end
+ end
end
object TabSheet4: TTabSheet
Caption = #12381#12398#20182#21205#20316#65298
Top = 20
Width = 140
Height = 20
- ItemHeight = 0
+ ItemHeight = 12
TabOrder = 0
Text = 'BoukenComboBox'
OnChange = BoukenComboBoxChange
UseUnicodeCB: TCheckBox;
Label27: TLabel;
DispImageCheckBox: TCheckBox;
+ GroupBox27: TGroupBox;
+ ThreadTitleTrimCheckBox: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ApplyButtonClick(Sender: TObject);
// \83\8c\83X\83G\83f\83B\83^Unicode\93ü\97Í
UseUnicodeCB.Checked := Gikosys.Setting.UseUnicode;
+ // \83X\83\8c\83^\83C\93Á\92è\95¶\8e\9a\97ñ\8f\9c\8b\8e
+ ThreadTitleTrimCheckBox.Checked := GikoSys.Setting.ThreadTitleTrim;
//Be2ch\94F\8fØ
BeUserIDEdit.Text := GikoSys.Setting.BeUserID;
// \83\8c\83X\83G\83f\83B\83^Unicode\93ü\97Í
Gikosys.Setting.UseUnicode := UseUnicodeCB.Checked;
+ // \83X\83\8c\83^\83C\93Á\92è\95¶\8e\9a\97ñ\8f\9c\8b\8e
+ GikoSys.Setting.ThreadTitleTrim := ThreadTitleTrimCheckBox.Checked;
end;
end;
GikoForm.BrowserTab.OnChange(nil);
end;
+
+ // \83^\83u\82Ì\83X\83\8c\83^\83C\8dX\90V
+ GikoForm.UpdateThreadTitle;
end;
procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
FResPopupHeaderBold: Boolean;
// BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
FIconImageDisplay: Boolean;
+ // \83X\83\8c\83^\83C\93Á\92è\95¶\8e\9a\97ñ\8f\9c\8b\8e
+ FThreadTitleTrim: Boolean;
//\83\8d\83O\83t\83H\83\8b\83_
FLogFolder: string;
property UnActivePopup: Boolean read FUnActivePopup write FUnActivePopup;
property ResPopupHeaderBold: Boolean read FResPopupHeaderBold write FResPopupHeaderBold;
property IconImageDisplay: Boolean read FIconImageDisplay write FIconImageDisplay;
+ property ThreadTitleTrim: Boolean read FThreadTitleTrim write FThreadTitleTrim;
property LogFolder: string read FLogFolder write WriteLogFolder;
property LogFolderP: string read FLogFolderP;
FResPopupHeaderBold := ini.ReadBool('Thread', 'ResPopupHeaderBold', True);
// BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
FIconImageDisplay := ini.ReadBool('Thread', 'IconImageDisplay', True);
+ // \83X\83\8c\83^\83C\93Á\92è\95¶\8e\9a\97ñ\8f\9c\8b\8e
+ FThreadTitleTrim := ini.ReadBool('Thread', 'ThreadTitleTrim', False);
//\8dí\8f\9c\8am\94F
FDeleteMsg := ini.ReadBool('Function', 'LogDeleteMessage', True);
//\8fI\97¹\8am\94F
ini.WriteBool('Thread', 'ResPopupHeaderBold', FResPopupHeaderBold);
// BE\83A\83C\83R\83\93\81EEmoticon\89æ\91\9c\95\\8e¦
ini.WriteBool('Thread', 'IconImageDisplay', FIconImageDisplay);
+ // \83X\83\8c\83^\83C\93Á\92è\95¶\8e\9a\97ñ\8f\9c\8b\8e
+ ini.WriteBool('Thread', 'ThreadTitleTrim', FThreadTitleTrim);
//ini.WriteString('BoardURL', '2ch', FBoardURL2ch);
//\94F\8fØ\97p\83\86\81[\83UID\81E\83p\83X\83\8f\81[\83h