ScrollPageUpAction: TAction;
AllLinkToClipboardAction: TAction;
NewLinkToClipboardAction: TAction;
+ AddIDtoNGWord0Action: TAction;
+ AddIDtoNGWord1Action: TAction;
+ ExtractSameIDAction: TAction;
+ ShowTabListAction: TAction;
+ DereferenceResAction: TAction;
+ UpdateGikonaviAction: TAction;
procedure EditNGActionExecute(Sender: TObject);
procedure ReloadActionExecute(Sender: TObject);
procedure GoFowardActionExecute(Sender: TObject);
procedure ScrollPageUpActionExecute(Sender: TObject);
procedure AllLinkToClipboardActionExecute(Sender: TObject);
procedure NewLinkToClipboardActionExecute(Sender: TObject);
+ procedure AddIDtoNGWord0ActionExecute(Sender: TObject);
+ procedure AddIDtoNGWord1ActionExecute(Sender: TObject);
+ procedure ExtractSameIDActionExecute(Sender: TObject);
+ procedure ShowTabListActionExecute(Sender: TObject);
+ procedure DereferenceResActionExecute(Sender: TObject);
+ procedure UpdateGikonaviActionExecute(Sender: TObject);
private
{ Private \90é\8c¾ }
procedure ClearResFilter;
procedure DependActiveCntentActionUpdate(Sender: TObject);
//! TAction\82ÅGetActiveContent\82ªnil\88È\8aO\82©\82Â\83\8d\83O\82ð\8e\9d\82Á\82Ä\82¢\82é\82Æ\97L\8cø\82É\82È\82é
procedure DependActiveCntentLogActionUpdate(Sender: TObject);
- //! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+ //! TAction\82ÅActiveList\82ªTBoard(\94ñ\93Á\8eê\94Â)\82Å\97L\8cø\82É\82È\82é
procedure DependActiveListTBoardActionUpdate(Sender: TObject);
+ //! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+ procedure DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
end;
var
GikoBayesian, About, ShellAPI,
RoundName, RoundData, Menus, ListViewUtils,
ThreadControl, GikoMessage, InputAssist,
- DefaultFileManager, Forms, NewBoardURL;
+ DefaultFileManager, Forms, NewBoardURL, UpdateCheck;
const
MSG_ERROR : string = '\83G\83\89\81[';
and (GikoForm.GetActiveContent.IsLogFile);
end;
// *************************************************************************
-//! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+//! TAction\82ÅActiveList\82ªTBoard(\94ñ\93Á\8eê\94Â)\82Å\97L\8cø\82É\82È\82é
// *************************************************************************
procedure TGikoDM.DependActiveListTBoardActionUpdate(Sender: TObject);
begin
+ TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard) and
+ (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
+end;
+// *************************************************************************
+//! TAction\82ÅActiveList\82ªTBoard\82Å\97L\8cø\82É\82È\82é
+// *************************************************************************
+procedure TGikoDM.DependActiveListTBoardWithSpeciapActionUpdate(Sender: TObject);
+begin
TAction(Sender).Enabled := (GikoForm.GetActiveList is TBoard);
end;
// *************************************************************************
GikoForm.DeleteHistory(ThreadItem);
GikoForm.DeleteTab(ThreadItem);
ThreadItem.DeleteLogFile;
-
- GikoForm.TreeView.Refresh; // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
end;
+ GikoForm.TreeView.Refresh; // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
GikoForm.ListView.Refresh;
finally
List.Free;
ThreadItem: TThreadItem;
begin
No := GikoForm.KokoPopupMenu.Tag;
- if No = 0 then Exit;
+ if No = 0
+ then Exit;
ThreadItem := GikoForm.GetActiveContent(True);
- if ThreadItem = nil then Exit;
+ if not Assigned(ThreadItem) then
+ Exit;
ThreadItem.Kokomade := No;
- GikoForm.ActiveContent.Thread.ScrollTop :=
- OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop;
+ GikoForm.ActiveContent.Thread.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop;
GikoForm.ActiveContent.Repaint := true;
GikoForm.InsertBrowserTab(GikoForm.ActiveContent.Thread, true);
//INFO 2005/11/19 \88ê\92U\89B\95Á\81A\95K\97v\82È\82çGikoForm\82Ì\95û\82É\83\81\83\\83b\83h\82ð\92Ç\89Á\82·\82é
ThreadItem := GikoForm.GetActiveContent(True);
if ThreadItem = nil then Exit;
ThreadItem.Kokomade := -1;
- GikoForm.ActiveContent.Thread.ScrollTop :=
- OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop;
+ GikoForm.ActiveContent.Thread.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop;
GikoForm.ActiveContent.Repaint := true;
GikoForm.InsertBrowserTab(GikoForm.ActiveContent.Thread, true);
//INFO 2005/11/19 \88ê\92U\89B\95Á\81A\95K\97v\82È\82çGikoForm\82Ì\95û\82É\83\81\83\\83b\83h\82ð\92Ç\89Á\82·\82é
LIMIT = 20;
var
ThreadItem : TThreadItem;
- No, count: Integer;
- body : string;
- limited: Integer;
+ No : Integer;
+ AID: string;
begin
No := GikoForm.KokoPopupMenu.Tag;
if No = 0 then Exit;
ThreadItem := GikoForm.GetActiveContent(True);
if ThreadItem = nil then Exit;
- count := GikoSys.GetSameIDResCount(No, GikoForm.ActiveContent.Thread);
- limited := LIMIT;
- if count > LIMIT then begin
- if ( GikoUtil.MsgBox(GikoForm.Handle,
- IntToStr(LIMIT) + '\8cÂ\88È\8fã\82 \82è\82Ü\82·\82ª\81A\82·\82×\82Ä\95\\8e¦\82µ\82Ü\82·\82©\81H',
- 'ID\83|\83b\83v\83A\83b\83v\8cx\8d\90',
- MB_YESNO or MB_ICONQUESTION) = ID_YES ) then begin
- limited := -1;
- end;
- end;
- body := GikoSys.GetSameIDResAnchor(No, ThreadItem, limited);
- GikoForm.ActiveContent.IDAnchorPopup(body);
+
+ AID := GikoSys.GetResID(No, ThreadItem);
+ if not IsNoValidID(AID) then begin
+ GikoForm.ShowSameIDAncher(AID);
+ end;
end;
// *************************************************************************
//! \82±\82Ì\83\8c\83X\82 \82Ú\81`\82ñ\81@\81i\92Ê\8fí\81j
IndividualForm := TIndividualAbonForm.Create(GikoForm);
try
ThreadItem := GikoForm.GetActiveContent(True);
- ThreadItem.ScrollTop :=
- OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop;
+ ThreadItem.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop;
if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
ReadList := TStringList.Create;
IndividualForm := TIndividualAbonForm.Create(GikoForm);
try
ThreadItem := GikoForm.GetActiveContent(True);
- ThreadItem.ScrollTop :=
- OleVariant(IHTMLDocument2(GikoForm.ActiveContent.Browser.Document)).Body.ScrollTop;
+ ThreadItem.ScrollTop := GikoForm.ActiveContent.Browser.OleObject.Document.Body.ScrollTop;
if (ThreadItem <> nil) and (ThreadItem.IsLogFile) then begin
if IndividualForm.SetThreadLogFileName(ThreadItem.GetThreadFileName) then begin
if (IndividualForm.ShowModal = mrOK) then begin
// *************************************************************************
procedure TGikoDM.UpFolderActionUpdate(Sender: TObject);
begin
- UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS);
+ UpFolderAction.Enabled := not (GikoForm.GetActiveList is TBBS) and
+ (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
end;
// *************************************************************************
//! \95\\8e¦\81@\95\\8e¦\83\8a\83X\83g\82Ì\83\82\81[\83h\95Ï\8dX
begin
if (GikoForm.GetActiveList is TCategory) and (GikoForm.ListView.SelCount > 0) then
TAction(Sender).Enabled := True
- else if GikoForm.GetActiveList is TBoard then
- TAction(Sender).Enabled := True
- else
+ else if GikoForm.GetActiveList is TBoard then begin
+ TAction(Sender).Enabled :=
+ (GikoForm.GetActiveList <> BoardGroup.SpecialBoard);
+ end else
TAction(Sender).Enabled := False;
end;
// *************************************************************************
// *************************************************************************
procedure TGikoDM.LogFolderOpenActionUpdate(Sender: TObject);
begin
- if ((GikoForm.GetActiveList is TBoard) or (GikoForm.GetActiveList is TCategory))
- and (GikoForm.ListView.SelCount > 0) then
+ if (((GikoForm.GetActiveList is TBoard) and
+ (GikoForm.GetActiveList <> BoardGroup.SpecialBoard))
+ or (GikoForm.GetActiveList is TCategory))
+ and (GikoForm.ListView.SelCount > 0) then
TAction(Sender).Enabled := True
else
TAction(Sender).Enabled := False;
procedure TGikoDM.BackToHistory(item: TMoveHistoryItem);
var
browser : TWebBrowser;
- doc : OleVariant;
+ doc : IHTMLDocument2;
begin
if ( item <> nil ) then begin
if ( GikoForm.GetActiveContent = item.ThreadItem ) then begin
.Objects[GikoForm.BrowserTab.TabIndex]).Browser;
if (browser <> nil) then begin
try
- doc := Idispatch( olevariant(browser.ControlInterface).Document) as IHTMLDocument2;
- doc.Body.ScrollTop := item.ScrollTop;
+ doc := browser.ControlInterface.Document as IHTMLDocument2;
+ (doc.body as IHTMLElement2).ScrollTop := item.ScrollTop;
except
end;
end;
var
browser : TWebBrowser;
elem : IHTMLElement;
+ doc : IHTMLDocument2;
begin
if (GikoForm.GetActiveContent <> nil) then begin
if (GikoForm.BrowserTab.Tabs.Count > 0) and
.Objects[GikoForm.BrowserTab.TabIndex]).Browser;
if (browser <> nil) then begin
try
- elem := IHTMLDocument2(browser.Document).activeElement;
- elem.click;
+ doc := browser.ControlInterface.Document as IHTMLDocument2;
+ if Assigned(doc) then begin
+ elem := doc.activeElement;
+ if Assigned(elem) then begin
+ elem.click;
+ end;
+ end;
except
end;
end;
function TGikoDM.GetActiveThreadLinks : IHTMLElementCollection;
var
browser : TWebBrowser;
+ doc : IHTMLDocument2;
begin
Result := nil;
if (GikoForm.GetActiveContent <> nil) then begin
.Objects[GikoForm.BrowserTab.TabIndex]).Browser;
if (browser <> nil) then begin
try
- Result := IHTMLDocument2(browser.Document).links;
+ doc := browser.ControlInterface.Document as IHTMLDocument2;
+ if Assigned(doc) then begin
+ Result := doc.links;
+ end;
except
Result := nil;
end;
// \83\8c\83X\82Ì\94Ô\8d\86\82ð\8dX\90V
if (Pos('menu:', url) > 0) then begin
index := StrToInt64Def(
- Copy(url, 5, Length(url)), index + 1
+ Copy(url, 6, Length(url)), index + 1
);
end else begin
// \8aJ\8en\83\8c\83X\94Ô\8d\86\88È\8d~\82©\83`\83F\83b\83N
end;
+//! \82±\82Ì\83\8c\83X\82ÌID\82ðNG\83\8f\81[\83h\82É\92Ç\89Á\82·\82é\81i\93§\96¾)
+procedure TGikoDM.AddIDtoNGWord0ActionExecute(Sender: TObject);
+begin
+ GikoForm.AddIDtoNGWord(true);
+end;
+//! \82±\82Ì\83\8c\83X\82ÌID\82ðNG\83\8f\81[\83h\82É\92Ç\89Á\82·\82é
+procedure TGikoDM.AddIDtoNGWord1ActionExecute(Sender: TObject);
+begin
+ GikoForm.AddIDtoNGWord(false);
+end;
+//! \83N\83\8a\83b\83v\83{\81[\83h\82Ì\95¶\8e\9a\97ñ\82ðID\82Æ\82µ\82Ä\93¯\88êID\83\8c\83X\83A\83\93\83J\81[\95\\8e¦
+procedure TGikoDM.ExtractSameIDActionExecute(Sender: TObject);
+var
+ ID: String;
+begin
+ ID := Trim(Clipboard.AsText);
+ if (Length(ID) > 0) then begin
+ if not IsNoValidID(ID) then begin
+ GikoForm.ShowSameIDAncher(ID);
+ end;
+ end;
+end;
+//! \83^\83u\82Ì\83X\83\8c\83b\83h\88ê\97\97\82ð\95\\8e¦\82·\82é
+procedure TGikoDM.ShowTabListActionExecute(Sender: TObject);
+var
+ i : Integer;
+begin
+ GikoForm.ListView.Items.BeginUpdate;
+ GikoForm.ListView.Items.Clear;
+ BoardGroup.SpecialBoard.Clear;
+ for i := GikoForm.BrowserTab.Tabs.Count - 1 downto 0 do begin
+ BoardGroup.SpecialBoard.Add(
+ TBrowserRecord(GikoForm.BrowserTab.Tabs.Objects[i]).Thread);
+ end;
+ GikoForm.ListView.Items.EndUpdate;
+ GikoForm.SetActiveList(BoardGroup.SpecialBoard);
+end;
+//! \8bt\8eQ\8fÆ\82µ\82Ä\82¢\82é\83\8c\83X\82ð\92Ç\89Á\82·\82é
+procedure TGikoDM.DereferenceResActionExecute(Sender: TObject);
+var
+ i, currentNo, No : Integer;
+ links : IHTMLElementCollection;
+ threadItem : TThreadItem;
+ item : IHTMLElement;
+ url, url2 : string;
+ resNo : TStringList;
+ alreadyExist : Boolean;
+ PathRec: TPathRec;
+begin
+ No := GikoForm.KokoPopupMenu.Tag;
+ if No = 0 then Exit;
+
+ ThreadItem := GikoForm.GetActiveContent;
+ // \83A\83N\83e\83B\83u\83^\83u\82©\82ç\91S\82Ä\82Ì\83\8a\83\93\83N\82ð\8eæ\93¾\82·\82é
+ links := GetActiveThreadLinks;
+ if (ThreadItem <> nil) and (links <> nil) then begin
+ resNo := TStringList.Create;
+ try
+ currentNo := 0;
+ alreadyExist := False;
+ // \83\8a\83\93\83N\82ð\91S\82Ä\91\96\8d¸\82·\82é
+ for i := 0 to links.length - 1 do begin
+ item := links.item(i, 0) as IHTMLElement;
+ if (item <> nil) then begin
+ url := item.getAttribute('href', 0);
+ // \83\8c\83X\82Ì\94Ô\8d\86\82ð\8dX\90V
+ if (Pos('menu:', url) > 0) then begin
+ currentNo := StrToInt64Def(
+ Copy(url, 6, Length(url)), currentNo + 1
+ );
+ alreadyExist := False;
+ end else if (currentNo <> -1) and (not alreadyExist) then begin
+ // IE7\91Î\89\9e
+ if Pos('about:..', url) = 1 then begin
+ url := 'about:blank..' + Copy( url, Length('about:..')+1, Length(url) )
+ end;
+ // \8e©\95ª\82Ö\82Ì\83\8a\83\93\83N\82©\82ç\83\8c\83X\83|\83b\83v\97p\82Ì\94Ô\8d\86\8eæ\93¾
+ if Pos('about:blank..', url) = 1 then begin
+ // No \94Ô\82Ö\82Ì\83\8a\83\93\83N\82ª\82 \82ê\82Î\8eQ\8fÆ\82 \82è
+ url2 := THTMLCreate.GetRespopupURL(url, ThreadItem.URL);
+ PathRec := Gikosys.Parse2chURL2(url2);
+ if (not PathRec.FNoParam) then begin
+ Gikosys.GetPopupResNumber(url2,PathRec.FSt,PathRec.FTo);
+ end;
+ // \91Î\8fÛ\83\8c\83X\82à\82µ\82\82Í\82»\82ê\82ð\8aÜ\82Þ\82È\82ç\8eQ\8fÆ\82 \82è\82Æ\82·\82é
+ if (PathRec.FSt = No) or
+ ((PathRec.FSt <= No) and (PathRec.FTo >= No)) then begin
+ alreadyExist := True;
+ resNo.Add(IntToStr(currentNo));
+ end;
+ end;
+ end;
+ end;
+ end;
+ // \96³\90§\8cÀ\82È\82Ì\82Å-1\8cÅ\92è
+ GikoForm.ActiveContent.IDAnchorPopup(
+ GikoSys.CreateResAnchor(resNo, ThreadItem, -1));
+ finally
+ resNo.Clear;
+ resNo.Free;
+ end;
+ end;
+end;
+
+procedure TGikoDM.UpdateGikonaviActionExecute(Sender: TObject);
+var
+ form : TUpdateCheckForm;
+ Msg: string;
+ shutdown: boolean;
+begin
+ if (EditorFormExists) then begin
+ Msg := '\83\8c\83X\83G\83f\83B\83^\82ð\91S\82Ä\95Â\82¶\82Ä\82\82¾\82³\82¢';
+ MsgBox(GikoForm.Handle, Msg, MSG_ERROR, MB_OK or MB_ICONSTOP);
+ Exit;
+ end;
+ GikoForm.UpdateExePath := '';
+ GikoForm.UpdateExeArgs := '';
+ form := TUpdateCheckForm.Create(Self);
+ try
+ form.ShowModal;
+ shutdown := form.Allowshutdown;
+ if shutdown then begin
+ GikoForm.UpdateExePath := form.ExecPath;
+ GikoForm.UpdateExeArgs := form.ExecArgs;
+ end;
+ finally
+ form.Release;
+ end;
+ if shutdown then begin
+ // \83M\83R\83i\83r\8fI\97¹
+ GikoForm.Close;
+ end;
+
+end;
end.