ToolMenu: TMenuItem;
Find1: TMenuItem;
RoundMenu: TMenuItem;
+ Search1: TMenuItem;
MMSep04: TMenuItem;
OptionMenu: TMenuItem;
HelpMenu: TMenuItem;
URLPATHINFO1: TMenuItem;
URLQUERYSTRING1: TMenuItem;
N86: TMenuItem;
+ K4: TMenuItem;
+ WikiFAQ1: TMenuItem;
+ ThrNGEdit: TMenuItem;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure SaveSettingAll();
FUpdateExePath: string; ///\83M\83R\83i\83r\8dX\90V\83C\83\93\83X\83g\81[\83\89\83p\83X
FUpdateExeArgs: string; ///\83M\83R\83i\83r\8dX\90V\83C\83\93\83X\83g\81[\83\89\88ø\90\94
FKokoPopupThreadItem: TThreadItem;
+ FCwSave: Word; // 8087CW\92l\95Û\91¶
procedure DownloadEnd(Sender: TObject; Item: TDownloadItem);
procedure DownloadMsg(Sender: TObject; Item: TDownloadItem; Msg: string; Icon: TGikoMessageIcon);
procedure WorkBegin(Sender: TObject; AWorkMode: TWorkMode; const AWorkCountMax: Integer; Number: Integer; const AWorkTitle: string);
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;
property WorkCount: Integer read FWorkCount write FWorkCount;
property UpdateExePath: string read FUpdateExePath write FUpdateExePath;
property UpdateExeArgs: string read FUpdateExeArgs write FUpdateExeArgs;
-
+
procedure SetContent(inThread: TBrowserRecord);
function GetActiveContent(popup :Boolean = false): TThreadItem;
function GetActiveList: TObject;
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;
var
GikoForm: TGikoForm;
+ g_AppTerminated: Boolean = False;
implementation
Writeln('============================================================');
{$ENDIF}
//try
+ // \83[\83\8d\8a\84\97á\8aO\82Ì\8c»\8dÝ\82Ì\90Ý\92è\82ð\95Û\91¶\82·\82é
+ FCwSave := Get8087CW;
+ if ( AnsiPos('9.0', GikoSys.GetIEVersion()) = 1 ) then begin
+ // IE 9\82Ì\8fê\8d\87\82¾\82¯\81A\96³\8cø\83r\83b\83g\82ð\97§\82Ä\82é
+ Set8087CW(FCwSave or $0004);
+ end;
Sort.SetSortDate(Now());
FTreeType := gttNone;
ProgressBar.Height := StatusBar.Height - 2;
ProgressBar.Position := 0;
+ // \83X\83\8c\83b\83h\96¼NG\83\8a\83X\83g
+ ThreadNgList := TThreadNgList.Create;
+
// \8aO\95\94\94Â\83v\83\89\83O\83C\83\93\82ð\83\8d\81[\83h(ReadBoardFile, LoadHistory \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
InitializeBoardPlugIns;
if GikoSys.Setting.AutoLogin then
GikoDM.LoginAction.Execute;
- GikoSys.Setting.BeLogin := GikoSys.Setting.BeAutoLogin;
+ if GikoSys.Setting.BeAutoLogin then
+ GikoDM.BeLogInOutAction.Execute;
//\83L\83\83\83v\83V\83\87\83\93\82ª\8fã\8f\91\82«\82³\82ê\82Ä\82µ\82Ü\82¤\82Ì\82Å\81A\82±\82±\82Å\8dÄ\90Ý\92è
FavoriteAddToolButton.Caption := '\92Ç\89Á...';
procedure TGikoForm.FormShow(Sender: TObject);
var
item : TThreadItem;
+ MonCnt: Integer;
+ MonOk: Boolean;
+ MonR: Integer;
+ MonB: Integer;
+ Right: Integer;
+ Bottom: Integer;
begin
if FStartUp then begin
FStartUp := false;
//ShowWindow(Self.Handle, SW_SHOW);
end;
end;
+
+//===== \83}\83\8b\83`\83\82\83j\83^\8aÂ\8b«\82ÅFormCreate\82Å\82Í\83t\83H\81[\83\80\88Ê\92u\82ª\90³\82µ\82\94½\89f\82³\82ê\82È\82¢\8fê\8d\87
+//===== \82ª\82 \82é\82½\82ßFormShow\8f\89\89ñ\82Å\8dÀ\95W\90Ý\92è\82ð\8ds\82¤
+ Top := GikoSys.Setting.WindowTop;
+ Left := GikoSys.Setting.WindowLeft;
+ Height := GikoSys.Setting.WindowHeight;
+ Width := GikoSys.Setting.WindowWidth;
+
+ //\83E\83B\83\93\83h\83E\82ª\89æ\96Ê\8aO\82È\82ç\89æ\96Ê\93à\82É\88Ú\93®\82·\82é
+ Right := Left + Width;
+ Bottom := Top + Height;
+ MonOk := False;
+ MonCnt := 0;
+ while (MonCnt < Screen.MonitorCount) do begin
+ MonR := Screen.Monitors[MonCnt].Left + Screen.Monitors[MonCnt].Width;
+ MonB := Screen.Monitors[MonCnt].Top + Screen.Monitors[MonCnt].Height;
+
+ if ((Left >= Screen.Monitors[MonCnt].Left) and (Left < MonR) and
+ (Top >= Screen.Monitors[MonCnt].Top) and (Top < MonB) and
+ (Right > Screen.Monitors[MonCnt].Left) and (Right <= MonR) and
+ (Bottom > Screen.Monitors[MonCnt].Top) and (Bottom <= MonB)) then begin
+ MonOk := True;
+ Break;
+ end;
+
+ MonCnt := MonCnt + 1;
+ end;
+
+ if (MonOk = False) then begin
+ Left := 0;
+ Top := 0;
+ end;
+
+ if GikoSys.Setting.WindowMax then
+ WindowState := wsMaximized;
+//==========================================================================
end;
end;
Exit;
end;
+ g_AppTerminated := True;
+
GikoSys.Setting.LastCloseTabURL := '';
if GikoSys.Setting.TabAutoLoadSave then begin
GikoDM.TabsSaveAction.Execute;
//OnDestory\82¾\82Æ\8dÄ\8bN\93®\82ð\82©\82¯\82½\82Æ\82«\82È\82Ç\82É\95Û\91¶\82³\82ê\82È\82¢\82Ì\82ÅOnCloseQuery\82Å\90Ý\92è\95Û\91¶
SaveSettingAll();
-
+
Application.Terminate;
end;
WindowPlacement: TWindowPlacement;
begin
try
+ GikoDM.SaveThreadSearchSetting;
+ except
+ end;
+
+ try
ActiveListColumnSave;
except
end;
except
end;
+ ThreadNgList.Free;
+
try
if FEvent <> nil then
FEvent.Free;
// \83A\83b\83v\83f\81[\83g\8eÀ\8ds
GikoSys.CreateProcess(FUpdateExePath, FUpdateExeArgs);
end;
+ // \83[\83\8d\8a\84\97á\8aO\82ð\8c³\82É\96ß\82·
+ Set8087CW(FCwSave);
end;
// \8ae\8f\8a\82É\82 \82é\83L\83\83\83r\83l\83b\83g\81E BBS \83\81\83j\83\85\81[\82ð\83Z\83b\83g\81^\8dX\90V
if FResPopupBrowser <> nil then begin
if not(Sender is TResPopupBrowser) then begin
- if (FResPopupBrowser.Visible) then begin
+ if ((doc <> nil) and (FResPopupBrowser.Visible)) then begin
if ResPopupClearTimer.Interval > 0 then begin
ResPopupClearTimer.Enabled := True;
ResPopupClearTimer.Tag := 0;
end;
s := '';
Ext := AnsiLowerCase(ExtractFileExt(Text2));
- if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
+// if (Pos('http://', Text2) = 1) and (GikoSys.Setting.PreviewVisible) and
+ if ((Pos('http://', Text2) = 1) or (Pos('https://', Text2) = 1)) and (GikoSys.Setting.PreviewVisible) and
((Ext = '.jpg') or (Ext = '.jpeg') or (Ext = '.gif') or (Ext = '.png')) or
(Pos('http://www.nicovideo.jp/watch/', Text2) = 1) then begin
if FPreviewBrowser = nil then begin
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ª
SenderNode.Selected := False;
FavoriteDragDrop( SenderNode, Source );
- SetLinkBar;
-
+ PostMessage( Handle, USER_SETLINKBAR, 0, 0 );
end;
procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
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