Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
ComCtrls, StdCtrls, ExtCtrls, Dialogs, FileCtrl, MMSystem,
GikoSystem, GikoUtil, Buttons, UrlMon, Menus, ImgList, OleCtrls,
- SHDocVw_TLB, BoardGroup;
+{$IF Defined(DELPRO) }
+ SHDocVw,
+ MSHTML,
+{$ELSE}
+ SHDocVw_TLB,
+ MSHTML_TLB,
+{$IFEND}
+ BoardGroup, BrowserRecord;
type
TOptionDialog = class(TForm)
- OkBotton: TButton;
CancelBotton: TButton;
- OptionTab: TPageControl;
- ConnectSheet: TTabSheet;
- Font1Sheet: TTabSheet;
- ApplyButton: TButton;
+ ApplyButton: TButton;
FontDialog: TFontDialog;
ColorDialog: TColorDialog;
- ReadProxyGroupBox: TGroupBox;
- ReadAddressLabel: TLabel;
- ReadPortLabel: TLabel;
- ReadProxyCheck: TCheckBox;
- ReadProxyAddressEdit: TEdit;
- ReadPortEdit: TEdit;
- ReadProxyUserIDEdit: TEdit;
- ReadProxyPasswordEdit: TEdit;
- ReadUserIDLabel: TLabel;
- ReadPasswordLabel: TLabel;
- FolderSheet: TTabSheet;
- FolderGroupBox: TGroupBox;
- LogFolderEdit: TEdit;
- LogFolderButton: TButton;
- Label1: TLabel;
- Label2: TLabel;
- ThreadSheet: TTabSheet;
- SoundSheet: TTabSheet;
- SoundEventGroupBox: TGroupBox;
- SoundListView: TListView;
- SoundReferButton: TButton;
- SoundFileEdit: TEdit;
- OpenDialog: TOpenDialog;
- WriteProxyGroupBox: TGroupBox;
- WriteAddressLabel: TLabel;
- WritePortLabel: TLabel;
- WriteUserIDLabel: TLabel;
- WritePasswordLabel: TLabel;
- WriteProxyCheck: TCheckBox;
- WriteProxyAddressEdit: TEdit;
- WritePortEdit: TEdit;
- WriteProxyUserIDEdit: TEdit;
- WriteProxyPasswordEdit: TEdit;
- BoardSheet: TTabSheet;
- GroupBox4: TGroupBox;
- BoardURL2chEdit: TEdit;
- Label13: TLabel;
- UserIDSheet: TTabSheet;
- GroupBox3: TGroupBox;
- Label9: TLabel;
- Label10: TLabel;
- UserIDEdit: TEdit;
- PasswordEdit: TEdit;
- SoundPlayButton: TBitBtn;
- AutoLoginCheckBox: TCheckBox;
- Tora3URLLabel: TLabel;
- Label12: TLabel;
- Label5: TLabel;
- GroupBox5: TGroupBox;
- ComboBox1: TComboBox;
- Label6: TLabel;
- Label7: TLabel;
- Label8: TLabel;
- ComboBox2: TComboBox;
- ComboBox3: TComboBox;
- Label4: TLabel;
- Edit1: TEdit;
- Button1: TButton;
- CabinetFontBotton: TButton;
- CabinetColorBotton: TButton;
- CabinetDefaultButton: TButton;
- CabinetMemo: TMemo;
- ListMemo: TMemo;
- ListFontBotton: TButton;
- ListColorBotton: TButton;
- ListDefaultBotton: TButton;
- HintFontButton: TButton;
- HintBackButton: TButton;
- HintDefaultButton: TButton;
- HintMemo: TMemo;
- EditorMemo: TMemo;
- EditorFontBotton: TButton;
- EditorColorBotton: TButton;
- EditorDefaultBotton: TButton;
- BrowserTabMemo: TMemo;
- BruwserTabFontButton: TButton;
- BrowserTabDefaultButton: TButton;
- Bevel1: TBevel;
- Bevel2: TBevel;
- GroupBox1: TGroupBox;
- GroupBox2: TGroupBox;
- URLAppCheckBox: TCheckBox;
- AppFolderLabel: TLabel;
- AppFolderEdit: TEdit;
- AppFolderButton: TButton;
- OpenMailerCheckBox: TCheckBox;
- TabSheet1: TTabSheet;
- PopupPositionRadioGroup: TRadioGroup;
- TabAddRadioGroup: TRadioGroup;
- TabSheet2: TTabSheet;
- GroupBox7: TGroupBox;
- URLDisplayCheckBox: TCheckBox;
- Label3: TLabel;
- Label11: TLabel;
- TabStopAddressBarCheckBox: TCheckBox;
- AddressHistoryCountEdit: TEdit;
- LinkAddCheckBox: TCheckBox;
- GroupBox8: TGroupBox;
- PreviewVisibleCheckBox: TCheckBox;
- PreviewSizeComboBox: TComboBox;
- Label14: TLabel;
- Label15: TLabel;
- PreviewWaitEdit: TEdit;
- Label16: TLabel;
- ShowMailCheckBox: TCheckBox;
- TabSheet3: TTabSheet;
- GroupBox9: TGroupBox;
- ThreadListIconCheckBox: TCheckBox;
- GroupBox6: TGroupBox;
- LogDeleteMessageCheckBox: TCheckBox;
- GroupBox10: TGroupBox;
- UnActivePopupCheckBox: TCheckBox;
- GroupBox11: TGroupBox;
- RecvBufferSize: TEdit;
+ OpenDialog: TOpenDialog;
+ Label26: TLabel;
+ CroutOption: TButton;
+ OptionTab: TPageControl;
+ ConnectSheet: TTabSheet;
+ ReadProxyGroupBox: TGroupBox;
+ ReadAddressLabel: TLabel;
+ ReadPortLabel: TLabel;
+ ReadUserIDLabel: TLabel;
+ ReadPasswordLabel: TLabel;
+ ReadProxyCheck: TCheckBox;
+ ReadProxyAddressEdit: TEdit;
+ ReadPortEdit: TEdit;
+ ReadProxyUserIDEdit: TEdit;
+ ReadProxyPasswordEdit: TEdit;
+ WriteProxyGroupBox: TGroupBox;
+ WriteAddressLabel: TLabel;
+ WritePortLabel: TLabel;
+ WriteUserIDLabel: TLabel;
+ WritePasswordLabel: TLabel;
+ WriteProxyCheck: TCheckBox;
+ WriteProxyAddressEdit: TEdit;
+ WritePortEdit: TEdit;
+ WriteProxyUserIDEdit: TEdit;
+ WriteProxyPasswordEdit: TEdit;
+ Font1Sheet: TTabSheet;
+ Bevel1: TBevel;
+ Bevel2: TBevel;
+ Label19: TLabel;
+ Bevel5: TBevel;
+ Label20: TLabel;
+ Label21: TLabel;
+ Label22: TLabel;
+ Label23: TLabel;
+ lblSFont: TLabel;
+ CabinetFontBotton: TButton;
+ CabinetColorBotton: TButton;
+ CabinetDefaultButton: TButton;
+ CabinetMemo: TMemo;
+ ListMemo: TMemo;
+ ListFontBotton: TButton;
+ ListColorBotton: TButton;
+ ListDefaultBotton: TButton;
+ HintFontButton: TButton;
+ HintBackButton: TButton;
+ HintDefaultButton: TButton;
+ HintMemo: TMemo;
+ EditorMemo: TMemo;
+ EditorFontBotton: TButton;
+ EditorColorBotton: TButton;
+ EditorDefaultBotton: TButton;
+ BrowserTabMemo: TMemo;
+ BruwserTabFontButton: TButton;
+ BrowserTabDefaultButton: TButton;
+ OddResNumCheckBox: TCheckBox;
+ OddResNumColorBox: TColorBox;
+ CSSTabSheet: TTabSheet;
+ GroupBox12: TGroupBox;
+ CSSListLabel: TLabel;
+ CSSCheckBox: TCheckBox;
+ CSSListView: TListView;
+ CSSBrowser: TWebBrowser;
+ CSSFontCheckBox: TCheckBox;
+ CSSBackColorCheckBox: TCheckBox;
+ CSSFontButton: TButton;
+ CSSBackColorButton: TButton;
+ TabSheet3: TTabSheet;
+ GroupBox9: TGroupBox;
+ ThreadListIconCheckBox: TCheckBox;
+ GroupBox16: TGroupBox;
+ CreationTimeLogsCheckBox: TCheckBox;
+ FutureThreadCheckBox: TCheckBox;
+ GroupBox5: TGroupBox;
+ BrowserMaxLabel: TLabel;
+ BrowserMaxCombo: TComboBox;
+ GroupBox17: TGroupBox;
+ SelectIntervalLabel: TLabel;
+ Label4: TLabel;
+ Label6: TLabel;
+ SelectIntervalEdit: TEdit;
+ GroupBox18: TGroupBox;
+ DatOchiSortCombo: TComboBox;
+ ThreadSheet: TTabSheet;
+ GroupBox1: TGroupBox;
+ ShowMailCheckBox: TCheckBox;
+ ResRangeHoldCheckBox: TCheckBox;
+ ResRangeHoldComboBox: TComboBox;
+ GroupBox2: TGroupBox;
+ AppFolderLabel: TLabel;
+ URLAppCheckBox: TCheckBox;
+ AppFolderEdit: TEdit;
+ AppFolderButton: TButton;
+ OpenMailerCheckBox: TCheckBox;
+ GroupBox6: TGroupBox;
+ LogDeleteMessageCheckBox: TCheckBox;
+ TabSheet1: TTabSheet;
+ TabAddRadioGroup: TRadioGroup;
+ GroupBox8: TGroupBox;
+ Label14: TLabel;
+ Label15: TLabel;
+ Label16: TLabel;
+ PreviewVisibleCheckBox: TCheckBox;
+ PreviewSizeComboBox: TComboBox;
+ PreviewWaitEdit: TEdit;
+ GroupBox10: TGroupBox;
+ UnActivePopupCheckBox: TCheckBox;
+ ResPopupBoldCheckBox: TCheckBox;
+ TabSheet2: TTabSheet;
+ GroupBox7: TGroupBox;
+ Label3: TLabel;
+ Label11: TLabel;
+ URLDisplayCheckBox: TCheckBox;
+ AddressHistoryCountEdit: TEdit;
+ TabStopAddressBarCheckBox: TCheckBox;
+ LinkAddCheckBox: TCheckBox;
+ GroupBox15: TGroupBox;
+ ShowDialogForEndCheckBox: TCheckBox;
+ AllTabCloseCheckBox: TCheckBox;
+ SambaGroupBox: TGroupBox;
+ UseSambaCheckBox: TCheckBox;
+ TabAutoSaveLoad: TGroupBox;
+ TabLoadSave: TCheckBox;
+ SoundSheet: TTabSheet;
+ SoundEventGroupBox: TGroupBox;
+ SoundListView: TListView;
+ SoundReferButton: TButton;
+ SoundFileEdit: TEdit;
+ SoundPlayButton: TBitBtn;
+ FolderSheet: TTabSheet;
+ FolderGroupBox: TGroupBox;
+ Label1: TLabel;
+ Label2: TLabel;
+ Label5: TLabel;
+ LogFolderEdit: TEdit;
+ LogFolderButton: TButton;
+ NGwordSheet: TTabSheet;
+ GroupBox14: TGroupBox;
+ RloCheckBox: TCheckBox;
+ ReplaceulCheckBox: TCheckBox;
+ PopUpAbonCheckBox: TCheckBox;
+ ShowNGLineCheckBox: TCheckBox;
+ AddResAnchorCheckBox: TCheckBox;
+ DeleteSyriaCheckBox: TCheckBox;
+ UserIDSheet: TTabSheet;
+ GroupBox3: TGroupBox;
+ Label9: TLabel;
+ Label10: TLabel;
+ ForcedLoginLabel: TLabel;
+ UserIDEdit: TEdit;
+ PasswordEdit: TEdit;
+ AutoLoginCheckBox: TCheckBox;
+ ForcedLoginCheckBox: TCheckBox;
+ GroupBox4: TGroupBox;
+ Label13: TLabel;
+ BoardURLComboBox: TComboBox;
+ AddURLButton: TButton;
+ RemoveURLButton: TButton;
+ OkBotton: TButton;
+ SpamFilterGroupBox: TGroupBox;
+ SpamFilterAlgorithmComboBox: TComboBox;
+ TabSheet4: TTabSheet;
+ GroupBox13: TGroupBox;
+ UseUndecidedCheckBox: TCheckBox;
+ Tora3URLLabel: TLabel;
+ Label12: TLabel;
+ GroupBox11: TGroupBox;
+ Label7: TLabel;
+ BeUserIDEdit: TEdit;
+ Label8: TLabel;
+ BeCodeEdit: TEdit;
+ BeAutoLoginCheckBox: TCheckBox;
+ GroupBox19: TGroupBox;
Label17: TLabel;
- ProxyProtocolCheckBox: TCheckBox;
- ProtocolCheckBox: TCheckBox;
+ MaxRecordCountEdit: TEdit;
Label18: TLabel;
- Label19: TLabel;
- Bevel5: TBevel;
- Label20: TLabel;
- Label21: TLabel;
- Label22: TLabel;
- Label23: TLabel;
- CSSTabSheet: TTabSheet;
- lblSFont: TLabel;
- GroupBox12: TGroupBox;
- CSSCheckBox: TCheckBox;
- CSSListLabel: TLabel;
- CSSListView: TListView;
- GroupBox13: TGroupBox;
- PostTimeCheckBox: TCheckBox;
+ UnFocusedBoldCheckBox: TCheckBox;
+ IgnoreKanaCheckBox: TCheckBox;
+ UseKatjuTypeSkinCheckBox: TCheckBox;
+ GroupBox20: TGroupBox;
+ AutoSortCheckBox: TCheckBox;
Label24: TLabel;
- Label25: TLabel;
- PostTimeEdit: TEdit;
- PostTimeLabel: TLabel;
- Label27: TLabel;
- PutPostTimeRadioButton: TRadioButton;
- BackPostTimeRadioButton: TRadioButton;
- ResPopupBoldCheckBox: TCheckBox;
- NGwordSheet: TTabSheet;
- GroupBox14: TGroupBox;
- RloCheckBox: TCheckBox;
- ReplaceulCheckBox: TCheckBox;
- PopUpAbonCheckBox: TCheckBox;
- CSSBrowser: TWebBrowser;
- CSSFontCheckBox: TCheckBox;
- CSSBackColorCheckBox: TCheckBox;
- CSSFontButton: TButton;
- CSSBackColorButton: TButton;
+ GroupBox21: TGroupBox;
+ StoredTaskTrayCB: TCheckBox;
+ GroupBox22: TGroupBox;
+ LoopBrowserTabsCB: TCheckBox;
+ GroupBox23: TGroupBox;
+ IgnoreContextCheckBox: TCheckBox;
+ GroupBox24: TGroupBox;
+ gppRightTopRB: TRadioButton;
+ gppTopRB: TRadioButton;
+ gppLeftTopRB: TRadioButton;
+ gppLeftRB: TRadioButton;
+ gppRightRB: TRadioButton;
+ gppLeftBottomRB: TRadioButton;
+ gppBottomRB: TRadioButton;
+ gppRighBottomRB: TRadioButton;
+ ResAnchorCheckBox: TCheckBox;
+ IgnoreLimitResCountCheckBox: TCheckBox;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure ApplyButtonClick(Sender: TObject);
procedure SoundReferButtonClick(Sender: TObject);
procedure SoundPlayButtonClick(Sender: TObject);
procedure SoundListViewChanging(Sender: TObject; Item: TListItem;
- Change: TItemChange; var AllowChange: Boolean);
+ Change: TItemChange; var AllowChange: Boolean);
procedure SoundFileEditChange(Sender: TObject);
procedure OptionTabChange(Sender: TObject);
procedure AppFolderButtonClick(Sender: TObject);
procedure URLAppCheckBoxClick(Sender: TObject);
procedure BruwserTabFontButtonClick(Sender: TObject);
procedure BrowserTabDefaultButtonClick(Sender: TObject);
- procedure AddressHistoryCountEditExit(Sender: TObject);
- procedure PreviewWaitEditExit(Sender: TObject);
- procedure RecvBufferSizeExit(Sender: TObject);
- procedure CSSCheckBoxClick(Sender: TObject);
- procedure PostTimeEditExit(Sender: TObject);
- procedure PostTimeCheckBoxClick(Sender: TObject);
- procedure CSSFontButtonClick(Sender: TObject);
- procedure CSSBackColorButtonClick(Sender: TObject);
- procedure CSSFontCheckBoxClick(Sender: TObject);
- procedure CSSBackColorCheckBoxClick(Sender: TObject);
- procedure CSSListViewChange(Sender: TObject; Item: TListItem;
- Change: TItemChange);
+ procedure AddressHistoryCountEditExit(Sender: TObject);
+ procedure PreviewWaitEditExit(Sender: TObject);
+ procedure CSSCheckBoxClick(Sender: TObject); procedure CSSFontButtonClick(Sender: TObject);
+ procedure CSSBackColorButtonClick(Sender: TObject);
+ procedure CSSFontCheckBoxClick(Sender: TObject);
+ procedure CSSBackColorCheckBoxClick(Sender: TObject);
+ procedure CSSListViewChange(Sender: TObject; Item: TListItem;
+ Change: TItemChange);
+ procedure AddURLButtonClick(Sender: TObject);
+ procedure RemoveURLButtonClick(Sender: TObject);
+ procedure OddResNumCheckBoxClick(Sender: TObject);
+ procedure ResRangeHoldCheckBoxClick(Sender: TObject);
+ procedure CroutOptionClick(Sender: TObject);
+ procedure MaxRecordCountEditExit(Sender: TObject);
private
{ Private \90é\8c¾ }
FClose: Boolean;
- FCSSFont: TFont;
- FCSSBackColor: TColor;
+ FRepaintList: Boolean;
+ FRepaintThread: Boolean;
+ FCSSFont: TFont;
+ FCSSBackColor: TColor;
+ FCSSStrings: TStringList;
function GetMemoText(font: TFont; text: string): string;
// function GetFontText(Font: TFont; Text: string): string;
procedure SetValue;
function CheckFolder: Boolean;
procedure SetAbonpropertys;
procedure CSSSetContent(Content: string);
- procedure CSSPreview;
+ procedure CSSPreview;
+ //! CSS\83v\83\8c\83r\83\85\81[\97pHTMLBody\90¶\90¬
+ function CreatePreviewBody(Res: array of TResRec): string;
+ //! CSS/SKIN\83v\83\8c\83r\83\85\81[\97pStyle\95¶\8e\9a\97ñ\8eæ\93¾
+ function GetPreviewUserStyle(): string;
public
{ Public \90é\8c¾ }
end;
implementation
uses
- Giko, Editor, Setting, ActnList;
+ Giko, Editor, Setting, ActnList, KuroutSetting, Math, HTMLCreate;
const
FONT_TEXT: string = '%s %d pt';
DEFAULT_TABFONT_NAME: string = '\82l\82r \82o\83S\83V\83b\83N';
DEFAULT_TABFONT_SIZE: Integer = 9;
URL_TORA3: WideString = 'http://2ch.tora3.net/';
+ DEFAULT_CSS_FILENAME = 'default.css';
{$R *.DFM}
procedure TOptionDialog.FormCreate(Sender: TObject);
begin
- CSSBrowser.Navigate('about:blank');
+
+ CSSBrowser.Navigate('about:blank');
FClose := True;
OptionTab.ActivePage := ConnectSheet;
lblSFont.Caption := '\81\9a\8fd\97v\81\9a'#13#10#13#10
+ '\83X\83\8c\83b\83h\95\\8e¦\83G\83\8a\83A\82Ì\83t\83H\83\93\83g\95Ï\8dX\82Í\81A'#13#10
+ '\81uCSS \82Æ\83X\83L\83\93\81v\83^\83u\82Å\90Ý\92è\8fo\97\88\82Ü\82·';
- CSSCheckBoxClick(Sender);
- PostTimeCheckBoxClick(Sender);
+ ForcedLoginLabel.Caption := '- \83`\83F\83b\83N\82ð\93ü\82ê\82é\82Ì\82Í\83Z\83L\83\85\83\8a\83e\83B\8fã\8dD\82Ü\82µ\82\82 \82è\82Ü\82¹\82ñ\81B' + #13#10
+ + '\81@\82â\82Þ\82ð\93¾\82È\82¢\8e\9e\82¾\82¯\82É\82µ\82Ä\82\82¾\82³\82¢\81B';
+ CSSCheckBoxClick(Sender);
+ BrowserMaxLabel.Caption :=
+ '\83u\83\89\83E\83U\82ª\8dÅ\8f¬\89»\82³\82ê\82Ä\82¢\82é\82Æ\82«\82É\88È\89º\82Ì\91\80\8dì\82Å\83u\83\89\83E\83U\82ð\8dÅ\91å\89»\82µ\82Ü\82·\81B'#13#10 +
+ '\82Ü\82½\81A\83z\83C\81[\83\8b\83N\83\8a\83b\83N\82É\82æ\82è\8dÅ\91å\89»\82ð\83L\83\83\83\93\83Z\83\8b\82·\82é\82±\82Æ\82ª\8fo\97\88\82Ü\82·\81B';
+ if OptionTab.PageCount > GikoSys.Setting.OptionDialogTabIndex then begin
+ OptionTab.ActivePageIndex := GikoSys.Setting.OptionDialogTabIndex;
+ OptionTabChange( nil );
+ end;
+
end;
procedure TOptionDialog.FormDestroy(Sender: TObject);
begin
+ CSSListView.OnChange := nil;
+ if FCSSStrings <> nil then
+ FCSSStrings.Free;
+ if FCSSFont <> nil then
+ FCSSFont.Free;
sndPlaySound(nil, SND_ASYNC);
+
end;
procedure TOptionDialog.OkBottonClick(Sender: TObject);
begin
FClose := True;
- RecvBufferSizeExit(Sender);
ReadPortEditExit(Sender);
WritePortEditExit(Sender);
AddressHistoryCountEditExit(Sender);
+ MaxRecordCountEditExit(Sender);
PreviewWaitEditExit(Sender);
- PostTimeEditExit(Sender);
if not CheckFolder then begin
FClose := False;
Exit;
end;
+ SetAbonpropertys;
SaveSetting;
SettingApply;
- SetAbonpropertys;
+
end;
procedure TOptionDialog.ApplyButtonClick(Sender: TObject);
begin
- RecvBufferSizeExit(Sender);
ReadPortEditExit(Sender);
WritePortEditExit(Sender);
AddressHistoryCountEditExit(Sender);
+ MaxRecordCountEditExit(Sender);
PreviewWaitEditExit(Sender);
- PostTimeEditExit(Sender);
if not CheckFolder then begin
FClose := False;
Exit;
end;
+ SetAbonpropertys;
SaveSetting;
SettingApply;
- SetAbonpropertys;
FClose := False;
end;
idx: Integer;
FileList: TStringList;
begin
- //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
- RecvBufferSize.Text := IntToStr(Gikosys.Setting.RecvBufferSize);
- //HTTP1.1\8eg\97p
- ProtocolCheckBox.Checked := GikoSys.Setting.Protocol;
- //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
- ProxyProtocolCheckBox.Checked := Gikosys.Setting.ProxyProtocol;
//\93Ç\82Ý\8d\9e\82Ý\97p\83v\83\8d\83L\83V
ReadProxyCheck.Checked := GikoSys.Setting.ReadProxy;
CabinetMemo.Font.Name := GikoSys.Setting.CabinetFontName;
CabinetMemo.Font.Size := GikoSys.Setting.CabinetFontSize;
CabinetMemo.Font.Color := GikoSys.Setting.CabinetFontColor;
+ CabinetMemo.Font.Style := [];
+ if GikoSys.Setting.CabinetFontBold then
+ CabinetMemo.Font.Style := [fsBold];
+ if GikoSys.Setting.CabinetFontItalic then
+ CabinetMemo.Font.Style := CabinetMemo.Font.Style + [fsItalic];
CabinetMemo.Color := GikoSys.Setting.CabinetBackColor;
+
//\83X\83\8c\83b\83h\83\8a\83X\83g\83t\83H\83\93\83g
ListMemo.Font.Name := GikoSys.Setting.ListFontName;
ListMemo.Font.Size := GikoSys.Setting.ListFontSize;
ListMemo.Font.Color := GikoSys.Setting.ListFontColor;
+ ListMemo.Font.Style := [];
+ if GikoSys.Setting.ListFontBold then
+ ListMemo.Font.Style := ListMemo.Font.Style + [fsBold];
+ if GikoSys.Setting.ListFontItalic then
+ ListMemo.Font.Style := ListMemo.Font.Style + [fsItalic];
+
ListMemo.Color := GikoSys.Setting.ListBackColor;
+ //\83\8c\83X\90\94\91\9d\8c¸\83X\83\8c\8b\92²\95\\8e¦\83`\83F\83b\83N\83{\83b\83N\83X\81\95\83J\83\89\81[\83_\83C\83A\83\8d\83O
+ OddResNumCheckBox.Checked := GikoSys.Setting.UseOddColorOddResNum;
+ OddResNumColorBox.Selected := GikoSys.Setting.OddColor;
+ OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
+ UnFocusedBoldCheckBox.Checked := GikoSys.Setting.UnFocusedBold;
+ UnFocusedBoldCheckBox.Enabled := OddResNumCheckBox.Checked;
+
//\83u\83\89\83E\83U\83|\83b\83v\83A\83b\83v\83t\83H\83\93\83g
HintMemo.Font.Name := GikoSys.Setting.HintFontName;
HintMemo.Font.Size := GikoSys.Setting.HintFontSize;
EditorMemo.Color := GikoSys.Setting.EditorBackColor;
//CSS\95\\8e¦
CSSCheckBox.Checked := GikoSys.Setting.UseCSS;
- FCSSFont := TFont.Create;
- if (GikoSys.Setting.BrowserFontName <> '') or
- (GikoSys.Setting.BrowserFontSize <> 0) or
- (GikoSys.Setting.BrowserFontBold <> 0) or
- (GikoSys.Setting.BrowserFontItalic <> 0) or
- (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
- CSSFontCheckBox.Checked := True;
-
- FCSSFont.Name := GikoSys.Setting.BrowserFontName;
- FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
- FCSSFont.Style := [];
- if GikoSys.Setting.BrowserFontBold = 1 then
- FCSSFont.Style := FCSSFont.Style + [fsBold];
- if GikoSys.Setting.BrowserFontItalic = 1 then
- FCSSFont.Style := FCSSFont.Style + [fsItalic];
- i := GikoSys.Setting.BrowserFontColor;
- i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
- FCSSFont.Color := i;
- end;
- if GikoSys.Setting.BrowserBackColor <> -1 then begin
- CSSBackColorCheckBox.Checked := True;
+ //\82©\82¿\82ã\83X\83L\83\93\8eg\97p
+ UseKatjuTypeSkinCheckBox.Checked := GikoSys.Setting.UseKatjushaType;
+ if FCSSFont <> nil then
+ FCSSFont.Free;
+ FCSSFont := TFont.Create;
+ if (GikoSys.Setting.BrowserFontName <> '') or
+ (GikoSys.Setting.BrowserFontSize <> 0) or
+ (GikoSys.Setting.BrowserFontBold <> 0) or
+ (GikoSys.Setting.BrowserFontItalic <> 0) or
+ (GikoSys.Setting.BrowserFontColor <> -1 ) then begin
+ CSSFontCheckBox.Checked := True;
+ FCSSFont.Name := GikoSys.Setting.BrowserFontName;
+ FCSSFont.Size := GikoSys.Setting.BrowserFontSize;
+ FCSSFont.Style := [];
+ if GikoSys.Setting.BrowserFontBold = 1 then
+ FCSSFont.Style := FCSSFont.Style + [fsBold];
+ if GikoSys.Setting.BrowserFontItalic = 1 then
+ FCSSFont.Style := FCSSFont.Style + [fsItalic];
+ i := GikoSys.Setting.BrowserFontColor;
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ FCSSFont.Color := i;
+ end;
+ if GikoSys.Setting.BrowserBackColor <> -1 then begin
+ CSSBackColorCheckBox.Checked := True;
- i := GikoSys.Setting.BrowserBackColor;
- i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
- FCSSBackColor := i;
- end;
+ i := GikoSys.Setting.BrowserBackColor;
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ FCSSBackColor := i;
+ end;
//
//\83X\83^\83C\83\8b\83V\81[\83g\83t\83@\83C\83\8b\96¼\88ê\97\97
FileList := TStringList.Create;
try
+ FileList.BeginUpdate;
GikoSys.GetFileList(GikoSys.GetStyleSheetDir, '*.css', FileList, True, True);
-
+ FileList.EndUpdate;
Idx := Length(GikoSys.GetStyleSheetDir);
for i := 0 to FileList.Count - 1 do
FileList[i] := Copy(FileList[i], Idx + 1, Length(FileList[i]));
FileList.Sort;
for i := 0 to FileList.Count - 1 do begin
//s := ExtractFileName(FileList[i]);
- if LowerCase(FileList[i]) = 'default.css' then
+ if LowerCase(FileList[i]) = DEFAULT_CSS_FILENAME then
Item := CSSListView.Items.Insert(0)
else
Item := CSSListView.Items.Add;
FileList.Free;
end;
//\83X\83L\83\93\83t\83@\83C\83\8b\96¼\88ê\97\97
- FileList := TStringList.Create;
+ //FileList := TStringList.Create;
+ if FCSSStrings <> nil then
+ FCSSStrings.Clear;
+ FCSSStrings := TStringList.Create;
try
- GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FileList, False);
+ GikoSys.GetDirectoryList(GikoSys.GetSkinDir, '*', FCSSStrings, False);
- Idx := Length(GikoSys.GetSkinDir);
- FileList.Sort;
- for i := 0 to FileList.Count - 1 do begin
- //s := ExtractFileName(FileList[i]);
+ Idx := Length(GikoSys.GetSkinDir);
+ FCSSStrings.Sort;
+ for i := 0 to FCSSStrings.Count - 1 do begin
Item := CSSListView.Items.Add;
- Item.Data := PChar( FileList[i] );
- Item.Caption := Copy( FileList[i], Idx + 1, Length(FileList[i]) );
- if LowerCase(FileList[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
+ Item.Data := PChar( FCSSStrings[i] );
+ Item.Caption := Copy( FCSSStrings[i], Idx + 1, Length(FCSSStrings[i]) );
+ if LowerCase(FCSSStrings[i]) = LowerCase(GikoSys.Setting.CSSFileName) then
Item.Selected := True;
end;
finally
- // Item.Data \82É\83|\83C\83\93\83^\93Ë\82Á\8d\9e\82ñ\82Å\82é\82©\82ç\8aJ\95ú\82Å\82«\82È\82¢\82æ\82§\81`
- //FileList.Free;
end;
if (CSSListView.ItemIndex = -1) and (CSSListView.Items.Count > 0) then
- CSSListView.Items[0].Selected := True;
+ CSSListView.Items[0].Selected := True;
//Mail\97\93\95\\8e¦
ShowMailCheckBox.Checked := GikoSys.Setting.ShowMail;
+
+ // \8bN\93®\8e\9e\83\8c\83X\95\\8e¦\94Í\88Í\82Ì\8cÅ\92è
+ ResRangeHoldCheckBox.Checked := GikoSys.Setting.ResRangeHold;
+ case GikoSys.Setting.ResRange of
+ Ord( grrAll ): ResRangeHoldComboBox.ItemIndex := 0;
+ Ord( grrKoko ): ResRangeHoldComboBox.ItemIndex := 2;
+ Ord( grrNew ): ResRangeHoldComboBox.ItemIndex := 3;
+ 10..65535: ResRangeHoldComboBox.ItemIndex := 1;
+ end;
+ ResRangeHoldComboBox.Enabled := GikoSys.Setting.ResRangeHold;
//\83^\83u\92Ç\89Á\88Ê\92u
TabAddRadioGroup.ItemIndex := Ord(GikoSys.Setting.BrowserTabAppend);
//\94Â\8dX\90VURL
- BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
+ //BoardURL2chEdit.Text := GikoSys.Setting.BoardURL2ch;
+ BoardURLComboBox.Clear;
+ BoardURLComboBox.Items.AddStrings(GikoSys.Setting.BoardURLs);
+ try
+ BoardURLComboBox.ItemIndex := GikoSys.Setting.BoardURLSelected - 1;
+ except
+ BoardURLComboBox.ItemIndex := 0;
+ end;
//\94F\8fØ
UserIDEdit.Text := GikoSys.Setting.UserID;
PasswordEdit.Text := GikoSys.Setting.Password;
AutoLoginCheckBox.Checked := GikoSys.Setting.AutoLogin;
+ ForcedLoginCheckBox.Checked := GikoSys.Setting.ForcedLogin;
//\83\8d\83O\83t\83H\83\8b\83_
if GikoSys.Setting.NewLogFolder = '' then
LogFolderEdit.Text := GikoSys.Setting.LogFolder
//\83\8d\83O\8dí\8f\9c\8e\9e\83\81\83b\83Z\81[\83W
LogDeleteMessageCheckBox.Checked := GikoSys.Setting.DeleteMsg;
-
+ //\93¯ID\83\8c\83X\83A\83\93\83J\81[\95\\8e¦\82Ì\90§\8cÀ\90\94\89z\82¦\83\81\83b\83Z\81[\83W
+ IgnoreLimitResCountCheckBox.Checked := GikoSys.Setting.LimitResCountMessage;
+
+ //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
+ ShowDialogForEndCheckBox.Checked := GikoSys.Setting.ShowDialogForEnd;
+ //AllTabClose
+ AllTabCloseCheckBox.Checked := GikoSys.Setting.ShowDialogForAllTabClose;
+ //Samba
+ UseSambaCheckBox.Checked := GikoSys.Setting.UseSamba;
+ ResAnchorCheckBox.Checked := GikoSys.Setting.ResAnchorJamp;
+ // \83u\83\89\83E\83U\8dÅ\91å\89»
+ BrowserMaxCombo.ItemIndex := Ord( GikoSys.Setting.BrowserAutoMaximize );
//\83|\83b\83v\83A\83b\83v\88Ê\92u
case GikoSys.Setting.PopupPosition of
- gppRightTop: PopupPositionRadioGroup.ItemIndex := 0;
- gppRight: PopupPositionRadioGroup.ItemIndex := 1;
- gppRightBottom: PopupPositionRadioGroup.ItemIndex := 2;
- gppTop: PopupPositionRadioGroup.ItemIndex := 3;
- gppCenter: PopupPositionRadioGroup.ItemIndex := 4;
- gppBottom: PopupPositionRadioGroup.ItemIndex := 5;
- gppLeftTop: PopupPositionRadioGroup.ItemIndex := 6;
- gppLeft: PopupPositionRadioGroup.ItemIndex := 7;
- gppLeftBottom: PopupPositionRadioGroup.ItemIndex := 8;
+ gppRightTop: gppRightTopRB.Checked := True;
+ gppRight: gppRightRB.Checked := True;
+ gppRightBottom: gppRighBottomRB.Checked := True;
+ gppTop: gppTopRB.Checked := True;
+ gppCenter: gppTopRB.Checked := True; // \93Ç\82Ý\8d\9e\82Ý\82Å\95Ï\8a·\82µ\82Ä\82é\82Í\82¸
+ gppBottom: gppBottomRB.Checked := True;
+ gppLeftTop: gppLeftTopRB.Checked := True;
+ gppLeft: gppLeftRB.Checked := True;
+ gppLeftBottom: gppLeftBottomRB.Checked := True;
end;
//\94ñ\83A\83N\83e\83B\83u\8e\9e\83|\83b\83v\83A\83b\83v\95\\8e¦
//\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
ThreadListIconCheckBox.Checked := GikoSys.Setting.ListIconVisible;
-
- //\8f\91\82«\8d\9e\82Ý\8e\9e\83}\83V\83\93\8e\9e\8aÔ\8eg\97p\90Ý\92è
- PostTimeCheckBox.Checked := GikoSys.Setting.UseMachineTime;
- PostTimeEdit.Text := IntToStr(GikoSys.Setting.TimeAdjustSec);
- if GikoSys.Setting.TimeAdjust then
- PutPostTimeRadioButton.Checked := True
+ CreationTimeLogsCheckBox.Checked := GikoSys.Setting.CreationTimeLogs;
+ FutureThreadCheckBox.Checked := GikoSys.Setting.FutureThread;
+ SelectIntervalEdit.Text := IntToStr(GikoSys.Setting.SelectInterval);
+
+ //dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
+ case TGikoBoardColumnID( GikoSys.Setting.DatOchiSortIndex ) of
+ gbcTitle:
+ if GikoSys.Setting.DatOchiSortOrder then
+ DatOchiSortCombo.ItemIndex := 1
+ else
+ DatOchiSortCombo.ItemIndex := 2;
+ gbcRoundDate://gbcLastModified:
+ if GikoSys.Setting.DatOchiSortOrder then
+ DatOchiSortCombo.ItemIndex := 3
+ else
+ DatOchiSortCombo.ItemIndex := 4;
+ gbcCreated:
+ if GikoSys.Setting.DatOchiSortOrder then
+ DatOchiSortCombo.ItemIndex := 5
+ else
+ DatOchiSortCombo.ItemIndex := 6;
+ gbcLastModified:
+ if GikoSys.Setting.DatOchiSortOrder then
+ DatOchiSortCombo.ItemIndex := 7
+ else
+ DatOchiSortCombo.ItemIndex := 8;
else
- BackPostTimeRadioButton.Checked := True;
- //\82 \82Ú\81`\82ñ
- RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
- ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
- PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
-
+ DatOchiSortCombo.ItemIndex := 0;
+ end;
+ AutoSortCheckBox.Checked := GikoSys.Setting.AutoSortThreadList;
+
+ //\82 \82Ú\81`\82ñ
+ RloCheckBox.Checked := GikoSys.Setting.AbonDeleterlo;
+ ReplaceulCheckBox.Checked := GikoSys.Setting.AbonReplaceul;
+ PopUpAbonCheckBox.Checked := GikoSys.Setting.PopUpAbon;
+ ShowNGLineCheckBox.Checked := GikoSys.Setting.ShowNGLinesNum;
+ AddResAnchorCheckBox.Checked := GikoSys.Setting.AddResAnchor;
+ DeleteSyriaCheckBox.Checked := GikoSys.Setting.DeleteSyria;
+ IgnoreKanaCheckBox.Checked := GikoSys.Setting.IgnoreKana;
+{$IFDEF SPAM_FILTER_ENABLED}
+ // \83X\83p\83\80\83t\83B\83\8b\83^\82Ì\90Ý\92è\82ð\95\\8e¦\82·\82é
+ SpamFilterGroupBox.Visible := True;
+{$ENDIF}
+ // \8eg\97p\82·\82é\83X\83p\83\80\83t\83B\83\8b\83^
+{$IFDEF DEBUG}
+ SpamFilterAlgorithmComboBox.Clear;
+ SpamFilterAlgorithmComboBox.AddItem( '\8eg\97p\82µ\82È\82¢', nil );
+ SpamFilterAlgorithmComboBox.AddItem( 'Paul Graham \96@', nil );
+ SpamFilterAlgorithmComboBox.AddItem( 'Gary Robinson \96@', nil );
+ SpamFilterAlgorithmComboBox.AddItem( 'Gary Robinson-Fisher \96@', nil );
+{$ENDIF}
+ SpamFilterAlgorithmComboBox.ItemIndex :=
+ Ord( GikoSys.Setting.SpamFilterAlgorithm );
+
+ //TabAutoLoad
+ TabLoadSave.Checked := Gikosys.Setting.TabAutoLoadSave;
+ UseUndecidedCheckBox.Checked := GikoSys.Setting.UseUndecided;
+
+ //Be2ch\94F\8fØ
+ BeUserIDEdit.Text := GikoSys.Setting.BeUserID;
+ BeCodeEdit.Text := GikoSys.Setting.BeCode;
+ BeAutoLoginCheckBox.Checked := GikoSys.Setting.BeAutoLogin;
+ //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91¶\90\94
+ MaxRecordCountEdit.Text := IntToStr(GikoSys.Setting.MaxRecordCount);
+ // \8dÅ\8f¬\89»\8e\9e\82É\83^\83X\83N\83g\83\8c\83C\82É\8ai\94[\82·\82é\82©
+ StoredTaskTrayCB.Checked := GikoSys.Setting.StoredTaskTray;
+ // \83u\83\89\83E\83U\83^\83u\82Ì\88Ú\93®\82Å\83\8b\81[\83v\82ð\8b\96\89Â\82·\82é\82©
+ LoopBrowserTabsCB.Checked := GikoSys.Setting.LoopBrowserTabs;
+ //
+ IgnoreContextCheckBox.Checked := GikoSys.Setting.GestureIgnoreContext;
end;
procedure TOptionDialog.SaveSetting;
var
i: Integer;
+ tmp: string;
// Item: TListItem;
begin
- //\8eó\90M\83o\83b\83t\83@\83T\83C\83Y
- Gikosys.Setting.RecvBufferSize := StrToInt(RecvBufferSize.Text);
- //HTTP1.1\8eg\97p
- GikoSys.Setting.Protocol := ProtocolCheckBox.Checked;
- //\83v\83\8d\83L\83V\90Ú\91±HTTP1.1\8eg\97p
- Gikosys.Setting.ProxyProtocol := ProxyProtocolCheckBox.Checked;
+ GikoSys.Setting.OptionDialogTabIndex := OptionTab.TabIndex;
GikoSys.Setting.ReadProxy := ReadProxyCheck.Checked;
GikoSys.Setting.ReadProxyAddress := ReadProxyAddressEdit.Text;
GikoSys.Setting.CabinetFontName := CabinetMemo.Font.Name;
GikoSys.Setting.CabinetFontSize := CabinetMemo.Font.Size;
GikoSys.Setting.CabinetFontColor := CabinetMemo.Font.Color;
+ GikoSys.Setting.CabinetFontBold := fsBold in CabinetMemo.Font.Style;
+ GikoSys.Setting.CabinetFontItalic:= fsItalic in CabinetMemo.Font.Style;
GikoSys.Setting.CabinetBackColor := CabinetMemo.Color;
- GikoSys.Setting.ListFontName := ListMemo.Font.Name;
- GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
- GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
+ GikoSys.Setting.ListFontName := ListMemo.Font.Name;
+ GikoSys.Setting.ListFontSize := ListMemo.Font.Size;
+ GikoSys.Setting.ListFontColor := ListMemo.Font.Color;
+ GikoSys.Setting.ListFontBold := fsBold in ListMemo.Font.Style;
+ GikoSys.Setting.ListFontItalic := fsItalic in ListMemo.Font.Style;
GikoSys.Setting.ListBackColor := ListMemo.Color;
+ GikoSys.Setting.UseOddColorOddResNum := OddResNumCheckBox.Checked;
+ GikoSys.Setting.OddColor := OddResNumColorBox.Selected;
+ GikoSys.Setting.UnFocusedBold := (UnFocusedBoldCheckBox.Enabled) and
+ (UnFocusedBoldCheckBox.Checked);
GikoSys.Setting.HintFontName := HintMemo.Font.Name;
GikoSys.Setting.HintFontSize := HintMemo.Font.Size;
GikoSys.Setting.BrowserTabFontName := BrowserTabMemo.Font.Name;
GikoSys.Setting.BrowserTabFontSize := BrowserTabMemo.Font.Size;
-
+ GikoSys.Setting.BrowserTabFontBold := fsBold in BrowserTabMemo.Font.Style;
+ GikoSys.Setting.BrowserTabFontItalic := fsItalic in BrowserTabMemo.Font.Style;
GikoSys.Setting.EditorFontName := EditorMemo.Font.Name;
GikoSys.Setting.EditorFontSize := EditorMemo.Font.Size;
GikoSys.Setting.EditorFontColor := EditorMemo.Font.Color;
GikoSys.Setting.EditorBackColor := EditorMemo.Color;
+ {FRepaintThread : \95\\8e¦\8dÏ\82Ý\83X\83\8c\83b\83h\82Ì\8dÄ\95`\89æ\82ª\95K\97v\82©\82Ç\82¤\82©
+ \90Ý\92è\82ª\95Ï\82í\82Á\82Ä\82¢\82½\8fê\8d\87\81Atrue\82É\82µ\82Ä\8aù\82É\95\\8e¦\82µ\82Ä\82¢\82é\91S\82Ä\82Ì
+ \83X\83\8c\83b\83h\82ÌRepaint\82ðtrue\82É\82·\82é
+ }
//CSS\95\\8e¦
+ if GikoSys.Setting.UseCSS <> CSSCheckBox.Checked then FRepaintThread := true;
GikoSys.Setting.UseCSS := CSSCheckBox.Checked;
+ GikoSys.Setting.UseKatjushaType := UseKatjuTypeSkinCheckBox.Checked;
//CSS\83t\83@\83C\83\8b\96¼
- GikoSys.Setting.CSSFileName := 'default.css';
+ tmp := GikoSys.Setting.CSSFileName;
+ GikoSys.Setting.CSSFileName := DEFAULT_CSS_FILENAME;
if CSSListView.Items.Count > 0 then begin
try
- if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
+ if CSSListView.Items[CSSListView.ItemIndex].Data <> nil then
GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
- else
+ else
GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
except
end;
end;
- // CSS \82Ì\83t\83H\83\93\83g\8ew\92è
- if CSSFontCheckBox.Checked then begin
- GikoSys.Setting.BrowserFontName := FCSSFont.Name;
- GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
- if fsBold in FCSSFont.Style then
- GikoSys.Setting.BrowserFontBold := 1
- else
- GikoSys.Setting.BrowserFontBold := -1;
- if fsItalic in FCSSFont.Style then
- GikoSys.Setting.BrowserFontItalic := 1
- else
- GikoSys.Setting.BrowserFontItalic := -1;
- i := ColorToRGB( FCSSFont.Color );
- GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
- end else begin
- GikoSys.Setting.BrowserFontName := '';
- GikoSys.Setting.BrowserFontSize := 0;
- GikoSys.Setting.BrowserFontBold := 0;
- GikoSys.Setting.BrowserFontItalic := 0;
- GikoSys.Setting.BrowserFontColor := -1;
- end;
- if CSSBackColorCheckBox.Checked then begin
- i := ColorToRGB( FCSSBackColor );
- GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
- end else begin
- GikoSys.Setting.BrowserBackColor := -1;
- end;
+ if tmp <> GikoSys.Setting.CSSFileName then FRepaintThread := true;
+ // CSS \82Ì\83t\83H\83\93\83g\8ew\92è
+ if CSSFontCheckBox.Checked then begin
+ if GikoSys.Setting.BrowserFontName <> FCSSFont.Name then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontName := FCSSFont.Name;
+ if GikoSys.Setting.BrowserFontSize <> FCSSFont.Size then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontSize := FCSSFont.Size;
+ if fsBold in FCSSFont.Style then begin
+ if GikoSys.Setting.BrowserFontBold <> 1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontBold := 1;
+ end else begin
+ if GikoSys.Setting.BrowserFontBold <> -1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontBold := -1;
+ end;
+ if fsItalic in FCSSFont.Style then begin
+ if GikoSys.Setting.BrowserFontItalic <> 1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontItalic := 1;
+ end else begin
+ if GikoSys.Setting.BrowserFontItalic <> -1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontItalic := -1;
+ end;
+ i := ColorToRGB( FCSSFont.Color );
+ if (GikoSys.Setting.BrowserFontColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
+ FRepaintThread := true;
+ GikoSys.Setting.BrowserFontColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ end else begin
+ if GikoSys.Setting.BrowserFontName <> '' then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontName := '';
+ if GikoSys.Setting.BrowserFontSize <> 0 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontSize := 0;
+ if GikoSys.Setting.BrowserFontBold <> 0 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontBold := 0;
+ if GikoSys.Setting.BrowserFontItalic <> 0 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontItalic := 0;
+ if GikoSys.Setting.BrowserFontColor <> -1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserFontColor := -1;
+ end;
+ if CSSBackColorCheckBox.Checked then begin
+ i := ColorToRGB( FCSSBackColor );
+ if(GikoSys.Setting.BrowserBackColor <> (i shr 16) or (i and $ff00) or ((i and $ff) shl 16)) then
+ FRepaintThread := true;
+ GikoSys.Setting.BrowserBackColor := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+ end else begin
+ if GikoSys.Setting.BrowserBackColor <> -1 then FRepaintThread := true;
+ GikoSys.Setting.BrowserBackColor := -1;
+ end;
//Mail\97\93\95\\8e¦
+ if GikoSys.Setting.ShowMail <> ShowMailCheckBox.Checked then FRepaintThread := true;
GikoSys.Setting.ShowMail := ShowMailCheckBox.Checked;
+ // \8bN\93®\8e\9e\83\8c\83X\95\\8e¦\94Í\88Í\82Ì\8cÅ\92è
+ GikoSys.Setting.ResRangeHold := ResRangeHoldCheckBox.Checked;
+ case ResRangeHoldComboBox.ItemIndex of
+ 0: GikoSys.Setting.ResRange := Ord( grrAll );
+ 1: GikoSys.Setting.ResRange := GikoSys.Setting.ResRangeExCount;
+ 2: GikoSys.Setting.ResRange := Ord( grrKoko );
+ 3: GikoSys.Setting.ResRange := Ord( grrNew );
+ end;
GikoSys.Setting.BrowserTabAppend := TGikoTabAppend(TabAddRadioGroup.ItemIndex);
- GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
-
+// GikoSys.Setting.BoardURL2ch := BoardURL2chEdit.Text;
+ GikoSys.Setting.BoardURLs.Clear;
+ GikoSys.Setting.BoardURLs.AddStrings(BoardURLComboBox.Items);
+ GikoSys.Setting.BoardURLSelected := BoardURLComboBox.ItemIndex + 1;
GikoSys.Setting.UserID := UserIDEdit.Text;
GikoSys.Setting.Password := PasswordEdit.Text;
GikoSys.Setting.AutoLogin := AutoLoginCheckBox.Checked;
-
+ GikoSys.Setting.ForcedLogin := ForcedLoginCheckBox.Checked;
GikoSys.Setting.URLApp := URLAppCheckBox.Checked;
GikoSys.Setting.URLAppFile := AppFolderEdit.Text;
GikoSys.Setting.OpenMailer := OpenMailerCheckBox.Checked;
GikoSys.Setting.DeleteMsg := LogDeleteMessageCheckBox.Checked;
-
+ GikoSys.Setting.LimitResCountMessage := IgnoreLimitResCountCheckBox.Checked;
+
+ //\8fI\97¹\8e\9e\8am\94F\83_\83C\83A\83\8d\83O
+ GikoSys.Setting.ShowDialogForEnd := ShowDialogForEndCheckBox.Checked;
+ //AllTabClose
+ GikoSys.Setting.ShowDialogForAllTabClose := AllTabCloseCheckBox.Checked;
+ //Samba
+ GikoSys.Setting.UseSamba := UseSambaCheckBox.Checked;
+ GikoSys.Setting.ResAnchorJamp := ResAnchorCheckBox.Checked;
+ // \83u\83\89\83E\83U\8dÅ\91å\89»
+ GikoSys.Setting.BrowserAutoMaximize := TGikoBrowserAutoMaximize( BrowserMaxCombo.ItemIndex );
//\83|\83b\83v\83A\83b\83v\88Ê\92u
- case PopupPositionRadioGroup.ItemIndex of
- 0: GikoSys.Setting.PopupPosition := gppRightTop;
- 1: GikoSys.Setting.PopupPosition := gppRight;
- 2: GikoSys.Setting.PopupPosition := gppRightBottom;
- 3: GikoSys.Setting.PopupPosition := gppTop;
- 4: GikoSys.Setting.PopupPosition := gppCenter;
- 5: GikoSys.Setting.PopupPosition := gppBottom;
- 6: GikoSys.Setting.PopupPosition := gppLeftTop;
- 7: GikoSys.Setting.PopupPosition := gppLeft;
- 8: GikoSys.Setting.PopupPosition := gppLeftBottom;
- end;
-
+ if (gppRightTopRB.Checked) then GikoSys.Setting.PopupPosition := gppRightTop;
+ if (gppRightRB.Checked) then GikoSys.Setting.PopupPosition := gppRight;
+ if (gppRighBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppRightBottom;
+ if (gppTopRB.Checked) then GikoSys.Setting.PopupPosition := gppTop;
+ if (gppBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppBottom;
+ if (gppLeftTopRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftTop;
+ if (gppLeftRB.Checked) then GikoSys.Setting.PopupPosition := gppLeft;
+ if (gppLeftBottomRB.Checked) then GikoSys.Setting.PopupPosition := gppLeftBottom;
//\94ñ\83A\83N\83e\83B\83u\8e\9e\83|\83b\83v\83A\83b\83v\95\\8e¦
GikoSys.Setting.UnActivePopup := UnActivePopupCheckBox.Checked;
//\83\8c\83X\83|\83b\83v\83A\83b\83v\83{\81[\83\8b\83h\95\\8e¦
//\83X\83\8c\83b\83h\88ê\97\97\8dX\90V\83A\83C\83R\83\93
GikoSys.Setting.ListIconVisible := ThreadListIconCheckBox.Checked;
- //\8f\91\82«\8d\9e\82Ý\8e\9e\83}\83V\83\93\8e\9e\8aÔ\8eg\97p\90Ý\92è
- GikoSys.Setting.UseMachineTime := PostTimeCheckBox.Checked;
- if GikoSys.IsNumeric(PostTimeEdit.Text) then
- GikoSys.Setting.TimeAdjustSec := StrToInt(PostTimeEdit.Text)
+ GikoSys.Setting.CreationTimeLogs := CreationTimeLogsCheckBox.Checked;
+ GikoSys.Setting.FutureThread := FutureThreadCheckBox.Checked;
+ if StrToIntDef(SelectIntervalEdit.Text, 110) > 55 then
+ GikoSys.Setting.SelectInterval := StrToIntDef(SelectIntervalEdit.Text, 110)
else
- GikoSys.Setting.TimeAdjustSec := 0;
- GikoSys.Setting.TimeAdjust := PutPostTimeRadioButton.Checked;
-
+ GikoSys.Setting.SelectInterval := 55;
+
+ //dat\97\8e\82¿\83X\83\8c\83\\81[\83g\8f\87
+ case DatOchiSortCombo.ItemIndex of
+ 0: GikoSys.Setting.DatOchiSortIndex := -1; //\95À\82Ñ\91Ö\82¦\82µ\82È\82¢
+ 1: begin //\83X\83\8c\94Ô\8d\86(\8f¸\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := true;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
+ end;
+ 2: begin //\83X\83\8c\94Ô\8d\86(\8d~\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := false;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcTitle );
+ end;
+ 3: begin //\8eæ\93¾\93ú\8e\9e(\8f¸\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := true;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
+ end;
+ 4: begin //\8eæ\93¾\93ú\8e\9e(\8d~\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := false;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcRoundDate );{gbcLastModified}
+ end;
+ 5: begin //\83X\83\8c\8dì\90¬\93ú\8e\9e(\8f¸\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := true;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
+ end;
+ 6: begin //\83X\83\8c\8dì\90¬\93ú\8e\9e(\8d~\8f\87)
+ GikoSys.Setting.DatOchiSortOrder := false;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcCreated );
+ end;
+ 7: begin //\83X\83\8c\8dÅ\8fI\8dX\90V\93ú\8e\9e\81i\8f¸\8f\87\81j
+ GikoSys.Setting.DatOchiSortOrder := true;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
+ end;
+ 8: begin //\83X\83\8c\8dÅ\8fI\8dX\90V\93ú\8e\9e\81i\8d~\8f\87\81j
+ GikoSys.Setting.DatOchiSortOrder := false;
+ GikoSys.Setting.DatOchiSortIndex := Ord( gbcLastModified );{gbcLastModified}
+ end;
+ end;
+ GikoSys.Setting.AutoSortThreadList := AutoSortCheckBox.Checked;
GikoSys.Setting.WriteSystemSettingFile;
+ GikoSys.Setting.WriteBoardURLSettingFile;
// GikoForm.SetBrowserTabState;
if LogFolderEdit.Text <> '' then begin
GikoSys.Setting.SoundFileName[i] := '';
end;
- //\82 \82Ú\81`\82ñ
- GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
- GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
- GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
+ //\82 \82Ú\81`\82ñ
+ GikoSys.Setting.AbonDeleterlo := RloCheckBox.Checked;
+ GikoSys.Setting.AbonReplaceul := ReplaceulCheckBox.Checked;
+ GikoSys.Setting.PopUpAbon := PopUpAbonCheckBox.Checked;
+ GikoSys.Setting.ShowNGLinesNum := ShowNGLineCheckBox.Checked;
+ GikoSys.Setting.AddResAnchor := AddResAnchorCheckBox.Checked;
+ GikoSys.Setting.DeleteSyria := DeleteSyriaCheckBox.Checked;
+ GikoSys.Setting.IgnoreKana := IgnoreKanaCheckBox.Checked;
+ GikoSys.FAbon.IgnoreKana := GikoSys.Setting.IgnoreKana;
+ // \8eg\97p\82·\82é\83X\83p\83\80\83t\83B\83\8b\83^
+ if GikoSys.Setting.SpamFilterAlgorithm <> TGikoSpamFilterAlgorithm(
+ SpamFilterAlgorithmComboBox.ItemIndex ) then begin
+ GikoSys.Setting.SpamFilterAlgorithm := TGikoSpamFilterAlgorithm(
+ SpamFilterAlgorithmComboBox.ItemIndex );
+ FRepaintThread := True;
+ end;
+
+ //Tab\8e©\93®\95Û\91¶
+ GikoSys.Setting.TabAutoLoadSave := TabLoadSave.Checked;
+ GikoSys.Setting.UseUndecided := UseUndecidedCheckBox.Checked;
+ //Be2ch
+ GikoSys.Setting.BeUserID := BeUserIDEdit.Text;
+ GikoSys.Setting.BeCode := BeCodeEdit.Text;
+ GikoSys.Setting.BeAutoLogin := BeAutoLoginCheckBox.Checked;
+ //\97\9a\97ð\82Ì\8dÅ\91å\95Û\91¶\90\94
+ GikoSys.Setting.MaxRecordCount := Max(StrToInt64Def(MaxRecordCountEdit.Text,100),1);
+ GikoSys.Setting.StoredTaskTray := StoredTaskTrayCB.Checked;
+ GikoSys.Setting.LoopBrowserTabs := LoopBrowserTabsCB.Checked;
+
+ GikoSys.Setting.GestureIgnoreContext := IgnoreContextCheckBox.Checked;
end;
procedure TOptionDialog.SettingApply;
i: Integer;
begin
GikoForm.TreeView.Items.BeginUpdate;
+ GikoForm.FavoriteTreeView.Items.BeginUpdate;
GikoForm.ListView.Items.BeginUpdate;
try
GikoForm.TreeView.Font.Name := GikoSys.Setting.CabinetFontName;
GikoForm.TreeView.Font.Color := GikoSys.Setting.CabinetFontColor;
GikoForm.TreeView.Color := GikoSys.Setting.CabinetBackColor;
+ GikoForm.FavoriteTreeView.Font.Assign(GikoForm.TreeView.Font);
+ GikoForm.FavoriteTreeView.Color := GikoSys.Setting.CabinetBackColor;
+
GikoForm.ListView.Font.Name := GikoSys.Setting.ListFontName;
GikoForm.ListView.Font.Size := GikoSys.Setting.ListFontSize;
GikoForm.ListView.Font.Color := GikoSys.Setting.ListFontColor;
- GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
+ GikoForm.ListView.Font.Style := [];
+ if GikoSys.Setting.ListFontBold then
+ GikoForm.ListView.Font.Style := [fsbold];
+ if GikoSys.Setting.ListFontItalic then
+ GikoForm.ListView.Font.Style := GikoForm.ListView.Font.Style + [fsitalic];
+
+ //GikoForm.ListView.Color := GikoSys.Setting.ListBackColor;
+ GikoForm.ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
+ GikoForm.UseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
+ GikoForm.OddColor := GikoSys.Setting.OddColor;
+ GikoSys.Setting.UnFocusedBold := (UnFocusedBoldCheckBox.Enabled) and
+ (UnFocusedBoldCheckBox.Checked);
GikoForm.BrowserTab.Font.Name := GikoSys.Setting.BrowserTabFontName;
GikoForm.BrowserTab.Font.Size := GikoSys.Setting.BrowserTabFontSize;
+ GikoForm.BrowserTab.Font.Style := [];
+ if GikoSys.Setting.BrowserTabFontBold then
+ GikoForm.BrowserTab.Font.Style := [fsBold];
+ if GikoSys.Setting.BrowserTabFontItalic then
+ GikoForm.BrowserTab.Font.Style := GikoForm.BrowserTab.Font.Style + [fsItalic];
// GikoForm.BrowserTab.Height := (GikoSys.Setting.BrowserTabFontSize * 2) + 1;
// GikoForm.BrowserBottomPanel.Height := GikoForm.BrowserTab.Height;
finally
GikoForm.TreeView.Items.EndUpdate;
+ GikoForm.FavoriteTreeView.Items.EndUpdate;
GikoForm.ListView.Items.EndUpdate;
end;
GikoForm.AddressComboBox.Items.Delete(i);
end;
GikoForm.AddressComboBox.TabStop := GikoSys.Setting.AddressBarTabStop;
+
+ //\83X\83\8c\88ê\97\97\82Ì\83\8a\83t\83\8c\83b\83V\83\85
+ if FRepaintList then begin
+ // SetActiveList\82ð\8eÀ\8ds
+ GikoForm.ActiveList := GikoForm.ActiveList;
+ end;
+
+ // \83X\83\8c\83b\83h\82Ì\83\8a\83t\83\8c\83b\83V\83\85
+ if FRepaintThread then begin
+ for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
+ TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Repaint := true;
+ end;
+ GikoForm.BrowserTab.OnChange(nil);
+ end;
end;
procedure TOptionDialog.ReadProxyCheckClick(Sender: TObject);
function TOptionDialog.CheckFolder: Boolean;
begin
if Trim(LogFolderEdit.Text) = '' then
- LogFolderEdit.Text := ExtractFilePath(Application.ExeName) + 'Log';
+ LogFolderEdit.Text := GikoSys.GetAppDir + 'Log';
if DirectoryExists(LogFolderEdit.Text) then begin
Result := True;
sndPlaySound(nil, SND_ASYNC);
if OpenDialog.Execute then begin
SoundFileEdit.Text := OpenDialog.FileName;
+ // \83A\83v\83\8a\94z\89º\82Ì\83t\83@\83C\83\8b\82Ì\8fê\8d\87\91\8a\91Î\83p\83X\82É\95Ï\8a·\82·\82é\81B
+ if (AnsiPos(GikoSys.Setting.GetAppDir,SoundFileEdit.Text) = 1) then begin
+ // .\ \82ª\82Â\82©\82È\82¢\82Ì\82Å\81A.\\82ð\92Ç\89Á
+ SoundFileEdit.Text := '.\' + ExtractRelativePath(
+ GikoSys.Setting.GetAppDir,
+ SoundFileEdit.Text);
+
+ end;
end;
end;
procedure TOptionDialog.SoundPlayButtonClick(Sender: TObject);
+var
+ s : String;
begin
- if not FileExists(SoundFileEdit.Text) then begin
+ SetCurrentDir(GikoSys.Setting.GetAppDir);
+ s := ExpandFileName(SoundFileEdit.Text);
+ if not FileExists(s) then begin
MsgBox(Handle, '\91¶\8dÝ\82µ\82È\82¢\83t\83@\83C\83\8b\82Å\82·', '\83G\83\89\81[', MB_ICONSTOP or MB_OK);
SoundFileEdit.Text := '';
Exit;
end;
- if not sndPlaySound(PChar(SoundFileEdit.Text), SND_ASYNC or SND_NOSTOP) then begin
+ if not sndPlaySound(PChar(s), SND_ASYNC or SND_NOSTOP) then begin
sndPlaySound(nil, SND_ASYNC);
end;
end;
procedure TOptionDialog.SoundListViewChanging(Sender: TObject;
- Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
+ Item: TListItem; Change: TItemChange; var AllowChange: Boolean);
begin
if Item.SubItems.Count > 0 then
SoundFileEdit.Text := Item.SubItems[0];
Item := SoundListView.Selected;
if Item = nil then Exit;
- if FileExists(SoundFileEdit.Text) then
+ SetCurrentDir(GikoSys.Setting.GetAppDir);
+ if FileExists(ExpandFileName(SoundFileEdit.Text)) then
Item.SubItems[0] := SoundFileEdit.Text;
if Trim(SoundFileEdit.Text) = '' then
Item.SubItems[0] := '';
begin
sndPlaySound(nil, SND_ASYNC);
- if OptionTab.ActivePage = CSSTabSheet then
- CSSPreview;
+ if OptionTab.ActivePage = CSSTabSheet then
+ CSSPreview;
end;
procedure TOptionDialog.AppFolderButtonClick(Sender: TObject);
PreviewWaitEdit.Text := '9999';
end;
-procedure TOptionDialog.RecvBufferSizeExit(Sender: TObject);
-begin
- if not GikoSys.IsNumeric(RecvBufferSize.Text) then
- RecvBufferSize.Text := '4096';
- if StrToInt(RecvBufferSize.Text) < 256 then
- RecvBufferSize.Text := '4096';
-end;
-
procedure TOptionDialog.CSSCheckBoxClick(Sender: TObject);
begin
CSSListLabel.Enabled := CSSCheckBox.Checked;
CSSListView.Enabled := CSSCheckBox.Checked;
end;
-procedure TOptionDialog.PostTimeEditExit(Sender: TObject);
-begin
- if not GikoSys.IsNumeric(PostTimeEdit.Text) then
- PostTimeEdit.Text := '0';
-end;
-
-procedure TOptionDialog.PostTimeCheckBoxClick(Sender: TObject);
-begin
- PostTimeLabel.Enabled := PostTimeCheckBox.Checked;
- PostTimeEdit.Enabled := PostTimeCheckBox.Checked;
- PutPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
- BackPostTimeRadioButton.Enabled := PostTimeCheckBox.Checked;
-end;
procedure TOptionDialog.SetAbonpropertys;
begin
- //\82 \82Ú\81`\82ñ
- GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
- GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
- GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
-
+ //\82 \82Ú\81`\82ñ
+ GikoSys.FAbon.Deleterlo := RloCheckBox.Checked;
+ GikoSys.FAbon.Replaceul := ReplaceulCheckBox.Checked;
+ GikoSys.FAbon.AbonPopupRes := PopUpAbonCheckBox.Checked;
+ GikoSys.FAbon.ReturnNGwordLineNum := ShowNGLineCheckBox.Checked;
+ GikoSys.FAbon.SetNGResAnchor := AddResAnchorCheckBox.Checked;
+ GikoSys.FAbon.DeleteSyria := DeleteSyriaCheckBox.Checked;
end;
procedure TOptionDialog.CSSFontButtonClick(Sender: TObject);
begin
FontDialog.Font.Assign(FCSSFont);
if FontDialog.Execute then begin
FontDialog.Font.Style := FontDialog.Font.Style - [fsUnderline] - [fsStrikeout];
- FCSSFont := FontDialog.Font;
+ FCSSFont.Assign(FontDialog.Font);
+ //FCSSFont := FontDialog.Font;
end;
- CSSPreview;
+ CSSPreview;
end;
ColorDialog.Color := FCSSBackColor;
if ColorDialog.Execute then begin
- FCSSBackColor := ColorDialog.Color;
+ FCSSBackColor := ColorDialog.Color;
end;
- CSSPreview;
+ CSSPreview;
end;
begin
CSSFontButton.Enabled := CSSFontCheckBox.Checked;
- CSSPreview;
+ CSSPreview;
end;
begin
CSSBackColorButton.Enabled := CSSBackColorCheckBox.Checked;
- CSSPreview;
+ CSSPreview;
end;
procedure TOptionDialog.CSSSetContent(Content: string);
var
- doc : Variant;
+ doc : OleVariant;
begin
if CSSBrowser.Document <> nil then begin
- doc := CSSBrowser.Document;
+ doc := CSSBrowser.OleObject.Document;
doc.open;
doc.Clear;
doc.charset := 'Shift_JIS';
doc.Write(Content);
doc.Close;
- end;
+ end;
end;
procedure TOptionDialog.CSSPreview;
var
+ Board: TBoard;
ThreadItem: TThreadItem;
html: string;
- sTitle: string;
- Res: array [0..1] of TResRec;
- UserOptionalStyle: string;
- i: Integer;
- fileName: string;
+ Res: array [0..1] of TResRec;
+ fileName: string;
begin
fileName := GikoSys.Setting.CSSFileName;
- GikoSys.Setting.CSSFileName := 'default.css';
+ GikoSys.Setting.CSSFileName := DEFAULT_CSS_FILENAME;
if CSSListView.Items.Count > 0 then begin
try
if CSSListView.ItemIndex >= 0 then begin
GikoSys.Setting.CSSFileName := string( CSSListView.Items[CSSListView.ItemIndex].data )
else
GikoSys.Setting.CSSFileName := CSSListView.Items[CSSListView.ItemIndex].Caption + '.css';
- end;
+ end;
except
end;
end;
- ThreadItem := TThreadItem.Create;
-
- try
- ThreadItem.AllResCount := 2;
- ThreadItem.NewResCount := 1;
- ThreadItem.NewReceive := 2;
-
- sTitle := '\83T\83\93\83v\83\8b\83v\83\8c\83r\83\85\81[';
-
- Res[0].FName := '\96¼\96³\82µ\82³\82ñ';
- Res[0].FMailTo := 'sage';
- Res[0].FDateTime := 'ID:Sample';
- Res[0].FBody := 'CSS \82Æ\83X\83L\83\93\82Ì\83T\83\93\83v\83\8b';
- Res[1].FName := '\96¼\96³\82µ\82³\82ñ';
- Res[1].FMailTo := 'age';
- Res[1].FDateTime := 'ID:Sample';
- Res[1].FBody := '\83I\83}\83G\83\82\83i\81[';
-
- // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
- if CSSFontCheckBox.Checked then begin
- i := ColorToRGB( FCSSFont.Color );
- i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
-
- UserOptionalStyle := UserOptionalStyle +
- 'font-family:"' + FCSSFont.Name + '";' +
- 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
- 'color:#' + IntToHex( i, 6 ) + ';';
- if fsBold in FCSSFont.Style then
- UserOptionalStyle := UserOptionalStyle + 'font-weight:bold;'
- else
- UserOptionalStyle := UserOptionalStyle + 'font-weight:normal;';
- if fsItalic in FCSSFont.Style then
- UserOptionalStyle := UserOptionalStyle + 'font-style:italic;'
- else
- UserOptionalStyle := UserOptionalStyle + 'font-style:normal;';
- end;
- if CSSBackColorCheckBox.Checked then begin
- i := ColorToRGB( FCSSBackColor );
- i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
-
- UserOptionalStyle := UserOptionalStyle +
- 'background-color:#' + IntToHex( i, 6 ) + ';';
- end;
-
- if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
- html :=
- GikoSys.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, sTitle, 0 ) +
- '<a name="top"></a>' +
- GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, sTitle, 0 ), Res[0], '1' ) +
- GikoSys.SkinedRes( GikoSYs.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, sTitle, 0 ), Res[1], '2' ) +
- '<a name="bottom"></a>' +
- GikoSys.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, sTitle, 0 );
-
- html := StringReplace( html, '</head>',
- '<style type="text/css">body {' + UserOptionalStyle + '}</style></head>', [rfReplaceAll] );
- end else begin
- html :=
- '<html><head>' +
- '<meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
- '<title>' + sTitle + '</title>' +
- '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
- '<style type="text/css">body {' + UserOptionalStyle + '}</style>' +
- '</head><body>' +
- '<div class="title">' + sTitle + '</div>';
-
- for i := 0 to High( Res ) do
- begin
- html := html +
- '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
- '<span class="name_label"> \96¼\91O\81F </span>' +
- '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
- '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
- '<span class="date_label"> \93\8a\8de\93ú\81F</span>' +
- '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
- '<div class="mes">' + Res[i].FBody + ' </div>';
- end;
+ Board := TBoard.Create( nil, 'about://sample/' );
+ ThreadItem := TThreadItem.Create( nil, Board, 'about://sample/test/read.cgi/sample/' );
- html := html + '</body></html>';
- end;
+ try
+ Board.Title := '\83T\83\93\83v\83\8b\94Â';
+ ThreadItem.ParentBoard := Board;
+ ThreadItem.AllResCount := High( Res );
+ ThreadItem.NewResCount := 1;
+ ThreadItem.NewReceive := 2;
+ ThreadItem.Title := '\83T\83\93\83v\83\8b\83v\83\8c\83r\83\85\81[';
+
+ Res[0].FName := '\96¼\96³\82µ\82³\82ñ';
+ Res[0].FMailTo := 'sage';
+ Res[0].FDateTime := 'ID:Sample';
+ Res[0].FBody := 'CSS \82Æ\83X\83L\83\93\82Ì\83T\83\93\83v\83\8b';
+ Res[1].FName := '\96¼\96³\82µ\82³\82ñ';
+ Res[1].FMailTo := 'age';
+ Res[1].FDateTime := 'ID:Sample';
+ Res[1].FBody := '\83I\83}\83G\83\82\83i\81[';
+
+
+ if FileExists( GikoSys.GetSkinHeaderFileName ) then begin
+ html :=
+ HTMLCreater.LoadFromSkin( GikoSys.GetSkinHeaderFileName, ThreadItem, 0 ) +
+ '<a name="top"></a>' +
+ HTMLCreater.SkinedRes( HTMLCreater.LoadFromSkin( GikoSys.GetSkinResFileName, ThreadItem, 0 ), @Res[0], '1' ) +
+ HTMLCreater.SkinedRes( HTMLCreater.LoadFromSkin( GikoSys.GetSkinNewResFileName, ThreadItem, 0 ), @Res[1], '2' ) +
+ '<a name="bottom"></a>' +
+ HTMLCreater.LoadFromSkin( GikoSys.GetSkinFooterFileName, ThreadItem, 0 );
+
+ html := StringReplace( html, '</head>',
+ '<style type="text/css">body {' + GetPreviewUserStyle + '}</style></head>', [rfReplaceAll] );
+ end else begin
+ html :=
+ '<html><head><meta http-equiv="Content-type" content="text/html; charset=Shift_JIS">' +
+ '<title>' + ThreadItem.Title + '</title>' +
+ '<link rel="stylesheet" href="' + GikoSys.GetStyleSheetDir + GikoSys.Setting.CSSFileName + '" type="text/css">' +
+ '<style type="text/css">body {' + GetPreviewUserStyle + '}</style>' +
+ '</head><body><div class="title">' + ThreadItem.Title + '</div>';
+
+ html := html + CreatePreviewBody(Res) + '</body></html>';
+ end;
- try
- CSSSetContent( html );
- except
- end;
+ try
+ CSSSetContent( html );
+ except
+ end;
- finally
- ThreadItem.Free;
- GikoSys.Setting.CSSFileName := fileName;
- end;
+ finally
+ ThreadItem.Free;
+ Board.Free;
+ GikoSys.Setting.CSSFileName := fileName;
+ end;
end;
+function TOptionDialog.CreatePreviewBody(Res: array of TResRec): string;
+var
+ i : Integer;
+begin
+ Result := '';
+ for i := 0 to High( Res ) do
+ begin
+ Result := Result +
+ '<div class="header"><span class="no">' + IntToStr( i + 1 ) + '</span>' +
+ '<span class="name_label"> \96¼\91O\81F </span>' +
+ '<a class="name_mail" href="mailto:' + Res[i].FMailTo + '">' +
+ '<b>' + Res[i].FName + '</b></a><span class="mail"> [' + Res[i].FMailTo + ']</span>' +
+ '<span class="date_label"> \93\8a\8de\93ú\81F</span>' +
+ '<span class="date"> ' + Res[i].FDateTime+ '</span></div>' +
+ '<div class="mes">' + Res[i].FBody + ' </div>';
+ end;
+end;
+
+function TOptionDialog.GetPreviewUserStyle(): string;
+var
+ i : Integer;
+begin
+ Result := '';
+ // \83t\83H\83\93\83g\82â\83T\83C\83Y\82Ì\90Ý\92è
+ if CSSFontCheckBox.Checked then begin
+ i := ColorToRGB( FCSSFont.Color );
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+
+ Result := Result +
+ 'font-family:"' + FCSSFont.Name + '";' +
+ 'font-size:' + IntToStr( FCSSFont.Size ) + 'pt;' +
+ 'color:#' + IntToHex( i, 6 ) + ';';
+ if fsBold in FCSSFont.Style then
+ Result := Result + 'font-weight:bold;'
+ else
+ Result := Result + 'font-weight:normal;';
+ if fsItalic in FCSSFont.Style then
+ Result := Result + 'font-style:italic;'
+ else
+ Result := Result + 'font-style:normal;';
+ end;
+ if CSSBackColorCheckBox.Checked then begin
+ i := ColorToRGB( FCSSBackColor );
+ i := (i shr 16) or (i and $ff00) or ((i and $ff) shl 16);
+
+ Result := Result +
+ 'background-color:#' + IntToHex( i, 6 ) + ';';
+ end;
+
+end;
procedure TOptionDialog.CSSListViewChange(Sender: TObject; Item: TListItem;
- Change: TItemChange);
+ Change: TItemChange);
begin
- if OptionTab.ActivePage <> CSSTabSheet then
- exit;
+ if OptionTab.ActivePage = CSSTabSheet then
+ CSSPreview;
- CSSPreview;
+end;
+
+procedure TOptionDialog.AddURLButtonClick(Sender: TObject);
+begin
+ BoardURLComboBox.Items.Append(BoardURLComboBox.Text);
+ BoardURLComboBox.ItemIndex := BoardURLComboBox.Items.Count - 1;
+end;
+
+procedure TOptionDialog.RemoveURLButtonClick(Sender: TObject);
+begin
+ BoardURLComboBox.DeleteSelected;
+end;
+
+procedure TOptionDialog.OddResNumCheckBoxClick(Sender: TObject);
+begin
+ OddResNumColorBox.Enabled := OddResNumCheckBox.Checked;
+ UnFocusedBoldCheckBox.Enabled := OddResNumCheckBox.Checked;
+end;
+procedure TOptionDialog.ResRangeHoldCheckBoxClick(Sender: TObject);
+begin
+ ResRangeHoldComboBox.Enabled := ResRangeHoldCheckBox.Checked;
+end;
+
+procedure TOptionDialog.CroutOptionClick(Sender: TObject);
+var
+ KuroutOption: TKuroutOption;
+begin
+ KuroutOption := TKuroutOption.Create(Self);
+ try
+ KuroutOption.ShowModal;
+ finally
+ KuroutOption.Release;
+ end;
+end;
+
+procedure TOptionDialog.MaxRecordCountEditExit(Sender: TObject);
+begin
+ if not GikoSys.IsNumeric(MaxRecordCountEdit.Text) then
+ MaxRecordCountEdit.Text := '100'
+ else if StrToIntDef(MaxRecordCountEdit.Text, 100) <= 0 then
+ MaxRecordCountEdit.Text := '1';
end;
end.