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 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;
// *************************************************************************
var
No: Integer;
ThreadItem: TThreadItem;
- doc : IHTMLDocument2;
begin
No := GikoForm.KokoPopupMenu.Tag;
if No = 0
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 not (GikoSys.Setting.LimitResCountMessage) then begin
- limited := -1;
- end else 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
// *************************************************************************
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;
// \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
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.