TGikoTreeType = (gttNone, gtt2ch, gttHistory, gttFavorite);
TToolBarSettingSenderType = (tssNone, tssMain, tssList, tssBrowser);
TMinimizeType = (mtNone, mtMinimizing, mtMinimized);
+ TResizeType = (rtNone, rtResizing);
TBrowserRecord = class;
N65: TMenuItem;
BBSSelectPopupMenu: TPopupMenu;
PlugInMenu: TMenuItem;
- TmpToolBar: TToolBar;
+ TmpToolBar: TToolBar;
TreeSelectNameCopy: TAction;
TreeSelectNamePupupMenu: TMenuItem;
BrowserPanel: TPanel;
OpenLogFolder: TMenuItem;
Browser: TWebBrowser;
TabSave: TMenuItem;
- TabOpen: TMenuItem;
+ TabOpen: TMenuItem;
TabsSaveAction: TAction;
TabsOpenAction: TAction;
ResRangePopupMenu: TPopupMenu;
N69: TMenuItem;
S7: TMenuItem;
ThreadRangeButton: TToolButton;
- TabAutoSaveAction: TAction;
+ TabAutoSaveAction: TAction;
TabAutoLoadAction: TAction;
+ ListColumnPopupMenu: TPopupMenu;
+ JumpToNumOfResAction: TAction;
+ FavoriteTreeViewCollapseAction: TAction;
procedure FormCreate(Sender: TObject);
procedure FormDestroy(Sender: TObject);
procedure CabinetPanelHide(Sender: TObject);
- procedure FormClose(Sender: TObject; var Action: TCloseAction);
procedure ListViewData(Sender: TObject; Item: TListItem);
procedure ListViewDataFind(Sender: TObject; Find: TItemFind;
const FindString: String; const FindPosition: TPoint;
procedure SelectComboBoxExit(Sender: TObject);
procedure SelectResActionExecute(Sender: TObject);
procedure SelectResActionUpdate(Sender: TObject);
- procedure FormKeyUp(Sender: TObject; var Key: Word;
- Shift: TShiftState);
procedure AllResActionExecute(Sender: TObject);
procedure AllResActionUpdate(Sender: TObject);
procedure ReloadClick(Sender: TObject);
var Handled: Boolean);
procedure KoreCopyExecute(Sender: TObject);
procedure BrowserTabPopupMenuPopup(Sender: TObject);
- procedure MenuToolBarResize(Sender: TObject);
+ procedure MenuToolBarResize(Sender: TObject);
procedure StdToolBarResize(Sender: TObject);
procedure LinkToolBarResize(Sender: TObject);
procedure ListNameToolBarResize(Sender: TObject);
procedure SetFocusForBrowserActionUpdate(Sender: TObject);
procedure SetFocusForThreadListActionExecute(Sender: TObject);
procedure SetFocusForCabinetActionExecute(Sender: TObject);
- procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
+ procedure BrowserMaxAndFocusActionExecute(Sender: TObject);
procedure BrowserMaxAndFocusActionUpdate(Sender: TObject);
procedure ThreadlistMaxAndFocusActionExecute(Sender: TObject);
procedure ListViewExit(Sender: TObject);
procedure OnlyAHundredResActionExecute(Sender: TObject);
procedure OnlyKokoResActionExecute(Sender: TObject);
procedure OnlyNewResActionExecute(Sender: TObject);
- procedure BrowsBoradHeadActionExecute(Sender: TObject);
+ procedure BrowsBoradHeadActionExecute(Sender: TObject);
procedure BrowsBoradHeadActionUpdate(Sender: TObject);
procedure EditNGActionExecute(Sender: TObject);
procedure ThreadRangeActionUpdate(Sender: TObject);
procedure ThreadRangeActionExecute(Sender: TObject);
- procedure TabAutoSaveActionExecute(Sender: TObject);
+ procedure TabAutoSaveActionExecute(Sender: TObject);
procedure TabAutoLoadActionExecute(Sender: TObject);
+ procedure ListViewColumnRightClick(Sender: TObject;
+ Column: TListColumn; Point: TPoint);
+ procedure JumpToNumOfResActionExecute(Sender: TObject);
+ procedure JumpToNumOfResActionUpdate(Sender: TObject);
+ procedure FavoriteTreeViewCollapseActionExecute(Sender: TObject);
private
{ Private \90é\8c¾ }
//RoundList : TRoundList;
FDropSpaceNode: TTreeNode;
- FDragTime : Cardinal; //\83\8a\83\93\83N\82ÌD&D\97p
- FDragButton : TToolButton; //\83\8a\83\93\83N\82ÌD&D\97p\82ÉDrag\82µ\82Ä\82éButton\95Û\91¶
- FDragWFirst : Boolean; //WebTab\82ÌD&D\97p
+ FDragTime : Cardinal; ///< \83\8a\83\93\83N\82ÌD&D\97p
+ FDragButton : TToolButton; ///< \83\8a\83\93\83N\82ÌD&D\97p\82ÉDrag\82µ\82Ä\82éButton\95Û\91¶
+ FDragWFirst : Boolean; ///< WebTab\82ÌD&D\97p
- FListViewBackGroundColor : TColor; //ListView\82ÌBackGroundColor
- FUseOddResOddColor : Boolean; //\8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88á\82Á\82½\82Æ\82«\82É\91¼\82Ì\90F\82Å\95\\8e¦
- FOddColor : TColor; //\82»\82Ì\90F
+ FListViewBackGroundColor : TColor; ///< ListView\82ÌBackGroundColor
+ FUseOddResOddColor : Boolean; ///< \8eæ\93¾\83\8c\83X\90\94\82Æ\83X\83\8c\83b\83h\82Ì\83\8c\83X\90\94\82ª\88á\82Á\82½\82Æ\82«\82É\91¼\82Ì\90F\82Å\95\\8e¦
+ FOddColor : TColor; ///< \82»\82Ì\90F
- FSelectResWord : string; // \83\8c\83X\8di\8d\9e\83\8f\81[\83h
- FIsIgnoreResize : Boolean; // \83\8a\83T\83C\83Y\83C\83x\83\93\83g\82ð\96³\8e\8b\82·\82é\82©\82Ç\82¤\82©
- FIsMinimize : TMinimizeType; // \8dÅ\8f¬\89»\82µ\82Ä\82¢\82é\8dÅ\92\86\82©
- FOldFormWidth : Integer; // \92¼\91O\82Ì\83E\83B\83\93\83h\83E\82Ì\95\9d
- FToolBarSettingSender : TToolBarSettingSenderType; // \83c\81[\83\8b\83o\81[\90Ý\92è\82ð\83N\83\8a\83b\83N\82µ\82½\83N\81[\83\8b\83o\81[
- FMouseDownPos : TPoint; // \83u\83\89\83E\83U\83^\83u\82Å\83}\83E\83X\82ð\89\9f\82µ\82½\82Æ\82«\82Ì\8dÀ\95W
+ FSelectResWord : string; ///< \83\8c\83X\8di\8d\9e\83\8f\81[\83h
+ FIsIgnoreResize : TResizeType; ///< \83\8a\83T\83C\83Y\83C\83x\83\93\83g\82ð\96³\8e\8b\82·\82é\82©\82Ç\82¤\82©
+ FIsMinimize : TMinimizeType; ///< \8dÅ\8f¬\89»\82µ\82Ä\82¢\82é\8dÅ\92\86\82©
+ FOldFormWidth : Integer; ///< \92¼\91O\82Ì\83E\83B\83\93\83h\83E\82Ì\95\9d
+ FToolBarSettingSender : TToolBarSettingSenderType; ///< \83c\81[\83\8b\83o\81[\90Ý\92è\82ð\83N\83\8a\83b\83N\82µ\82½\83N\81[\83\8b\83o\81[
+ FMouseDownPos : TPoint; ///< \83u\83\89\83E\83U\83^\83u\82Å\83}\83E\83X\82ð\89\9f\82µ\82½\82Æ\82«\82Ì\8dÀ\95W
FBrowsers: TList;
- FResRangeMenuSelect : Longint; ///< ResRangeButton \82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\8d\80\96Ú (\83t\83H\81[\83}\83b\83g\82Í ResRange \8cÝ\8a·)
+ FResRangeMenuSelect : Longint; ///< ResRangeButton \82Å\91I\91ð\82³\82ê\82Ä\82¢\82é\8d\80\96Ú (\83t\83H\81[\83}\83b\83g\82Í ResRange \8cÝ\8a·)
+ FStartUp : Boolean;
+ FIsHandledWheel : Boolean; ///< \8aù\82É\8eó\82¯\8eæ\82Á\82½ WM_MOUSEWHEEL \82©\82Ç\82¤\82©
procedure SetBoardTreeNode( inBBS : TBBS );
function SetCategoryListItem(ABBS2ch: TBBS): Integer;
function SetBoardListItem(Category: TCategory): Integer;
procedure WorkEnd(Sender: TObject; AWorkMode: TWorkMode; Number: Integer);
procedure Work(Sender: TObject; AWorkMode: TWorkMode; const AWorkCount: Integer; Number: Integer);
- procedure SetActiveList(Obj: TObject);
+
procedure ListClick;
procedure ListDoubleClick(Shift: TShiftState);
procedure BrowserMovement(const AName: string); overload;
procedure BBSMenuItemOnClick( Sender : TObject );
//
procedure KonoresCopy(Number: Integer; ReplaceTag : Boolean);
- // CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
+ /// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
procedure SaveCoolBarSettings;
- // CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82©\82ç\95\9c\8c³
+ /// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82©\82ç\95\9c\8c³
procedure LoadCoolBarSettings;
- // \8dÅ\8f¬\89»\82³\82ê\82é
+ /// \8dÅ\8f¬\89»\82³\82ê\82é
procedure OnMinimize;
- // \8dÅ\8f¬\89»\82³\82ê\82½
+ /// \8dÅ\8f¬\89»\82³\82ê\82½
procedure OnMinimized;
- // CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
+ /// CoolBar \82ª\83T\83C\83Y\95Ï\8dX\82³\82ê\82½
procedure CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
- // TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
+ /// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
procedure TreeClick( Node : TTreeNode );
- // TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
+ /// TreeView \82ª\83_\83u\83\8b\83N\83\8a\83b\83N\82³\82ê\82½
procedure TreeDoubleClick( Node : TTreeNode );
- // \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
+ /// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
procedure HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
- // \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
- // \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
+ /// \83u\83\89\83E\83U\82Ì\83L\81[\83_\83E\83\93\83C\83x\83\93\83g
+ /// \83C\83x\83\93\83g\82ð\8eæ\82è\88µ\82Á\82½\8fê\8d\87\82Í True \82ð\95Ô\82·
function BrowserKeydown(var Msg: TMsg; Key: Word; State:TShiftState) : Boolean;
- // \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
+ /// \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
procedure SetBBSMenu;
function WebBrowserClick(Sender: TObject): WordBool;
procedure SkinorCSSFilesCopy(path: string);
- // \83^\83u\8eæ\93¾
+ /// \83^\83u\8eæ\93¾
function GetTabURLs(AStringList: TStringList) : Boolean;
- // \83^\83u\95Û\91¶
+ /// \83^\83u\95Û\91¶
function SaveTabURLs : Boolean;
- // \83^\83u\93Ç\82Ý\8fo\82µ
+ /// \83^\83u\93Ç\82Ý\8fo\82µ
function LoadTabURLs : Boolean;
- // \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
+ /// \83o\83\93\83h\95\9d\82ð\8dÄ\8cv\8eZ\81E\8dÄ\90Ý\92è\82·\82é
procedure ResetBandInfo( bar : TGikoCoolBar; band : TToolBar );
+ /// ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
+ function ActiveListTrueColumn( column : TListColumn ) : TListColumn;
+ /// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+ procedure ListColumnPopupMenuOnClick( Sender : TObject );
protected
procedure CreateParams(var Params: TCreateParams); override;
procedure WndProc(var Message: TMessage); override;
{ Public \90é\8c¾ }
// FDownload: TDownload;
FControlThread: TThreadControl;
- procedure MoveToURL(URL: string);
- procedure InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
+ procedure MoveToURL(const inURL: string);
+ function InsertBrowserTab(
+ ThreadItem : TThreadItem;
+ ActiveTab : Boolean = True
+ ) : TBrowserRecord;
procedure ReloadBBS;
function GetHttpState: Boolean;
procedure SetEnabledCloseButton(Enabled: Boolean);
function GetActiveContent: TThreadItem;
function GetActiveList: TObject;
- property ActiveList: TObject read GetActiveList write SetActiveList;
+
// property LastRoundTime: TDateTime read FLastRoundTime write FLastRoundTime;
procedure SetListViewType(AViewType: TGikoViewType); overload;
// property Favorite: TFavorite read FFavorite write FFavorite;
procedure SetToolBarPopup;
procedure ShowFavoriteAddDialog( Item : TObject );
- procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
- procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
+ procedure FavoritesURLReplace(oldURLs: TStringList; newURLs: TStringList);
+ procedure RoundListURLReplace(oldURLs: TStringList; newURLs: TStringList);
property ListViewBackGroundColor: TColor read FListViewBackGroundColor write SetListViewBackGroundColor;
property UseOddResOddColor : Boolean read FUseOddResOddColor write FUseOddResOddColor;
property OddColor : TColor read FOddColor write FOddColor;
function FindToolBarButton( bar : TToolBar; action : TAction ) : TToolButton;
procedure OnPlugInMenuItem( Sender : TObject );
- procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
-
+ procedure TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
+ /// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶ KuroutSetting\82©\82ç\82æ\82Ñ\82¾\82µ\82½\82¢\82Ì\82Å
+ procedure ActiveListColumnSave;
+ procedure SetActiveList(Obj: TObject);
+ property ActiveList: TObject read GetActiveList write SetActiveList;
published
property EnabledCloseButton: Boolean read FEnabledCloseButton write SetEnabledCloseButton;
end;
TBrowserRecord = class( TObject )
private
FBrowser : TWebBrowser;
- FEvent: THTMLDocumentEventSink;//\83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
+ FEvent: THTMLDocumentEventSink; //!< \83u\83\89\83E\83U\83h\83L\83\85\83\81\83\93\83g\83C\83x\83\93\83g
FThread : TThreadItem;
FLastSize : Integer;
FRepaint : Boolean;
- // FOnlyHundred: Boolean;
+ FMovement : string; //!< \83X\83N\83\8d\81[\83\8b\90æ\83A\83\93\83J\81[
public
destructor Destroy; override;
property Browser : TWebBrowser read FBrowser write FBrowser;
property Thread : TThreadItem read FThread write FThread;
property LastSize : Integer read FLastSize write FLastSize;
property Repaint : Boolean read FRepaint write FRepaint;
-// property OnlyHundred : Boolean read FOnlyHundred write FOnlyHundred;
+ property Movement : string read FMovement write FMovement;
end;
var
USER_RESIZED = WM_USER + 2001;
USER_MINIMIZED = WM_USER + 2002;
USER_SETLINKBAR = WM_USER + 2003;
+ USER_DOCUMENTCOMPLETE = WM_USER + 2004; ///< wParam : TWebBrowser
SELECTTIME_INTERBAL = 110;
BROWSER_COUNT = 5; //\83u\83\89\83E\83U\82Ì\90\94
Writeln(' \8fI\97¹\8e\9e\82Í\81A\83M\83R\83i\83r\83E\83B\83\93\83h\83E\82ð\95Â\82¶\82Ä\82\82¾\82³\82¢');
Writeln('============================================================');
{$ENDIF}
+ FStartUp := false;
Application.OnDeactivate := AppFormDeactivate;
Self.OnDeactivate := AppFormDeactivate;
Application.HookMainWindow(Hook);
Application.OnMessage := HandleAppMessage; //\82È\82ñ\82©\96³\82\82Ä\82à\91å\8fä\95v\82É\82È\82Á\82½\81@by\81@\82à\82¶\82ã
- Self.DoubleBuffered := true;
+// Self.DoubleBuffered := true;
FTreeType := gttNone;
FSearchDialog := nil;
newBrowser.Align := alNone;
newBrowser.Left := 0;
newBrowser.Top := 0;
- //newBrowser.DoubleBuffered := true;
+ newBrowser.StatusBar := false;
+ newBrowser.MenuBar := false;
+ newBrowser.AddressBar := false;
newBrowser.OnDocumentComplete := BrowserDocumentComplete;
newBrowser.OnBeforeNavigate2 := BrowserBeforeNavigate2;
newBrowser.OnEnter := BrowserEnter;
newBrowser.OnNewWindow2 := BrowserNewWindow2;
newBrowser.OnStatusTextChange := BrowserStatusTextChange;
- //newBrowser.OnTitleChange := BrowserTitleChange;
newBrowser.Navigate(BLANK_HTML);
ShowWindow(newBrowser.Handle, SW_HIDE);
ShowWindow(BrowserNullTab.Browser.Handle, SW_SHOW);
// \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô
- FIsIgnoreResize := True;
+ FIsIgnoreResize := rtResizing;
//\8eè\82Ì\83J\81[\83\\83\8b
Screen.Cursors[5] := LoadCursor(HInstance, 'GIKOHAND');
//\83A\83h\83\8c\83X\97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
AddressHistoryDM.ReadHistory(AddressComboBox.Items, GikoSys.Setting.AddressHistoryCount);
- // \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;
-
EnabledCloseButton := True;
-
- //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
- RoundList := TRoundList.Create;
- RoundList.LoadRoundBoardFile;
-
- // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
- GikoSys.ListBoardFile;
-
- RoundList.LoadRoundThreadFile;
-
- if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
- GikoSys.ListBoardFile;
-
- // \83\81\83j\83\85\81[\82É\92Ç\89Á
- SetBBSMenu;
-
- // \83q\83X\83g\83\8a\83\8a\83X\83g(LoadHistory \82æ\82è\82à\90æ\82É\8ds\82¤\82±\82Æ)
- FHistoryList := TList.Create;
-
- // \97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
- LoadHistory;
-
- //\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
-// FFavorite := TFavorite.Create(FavoriteTreeView);
- FavoriteDM.SetFavTreeView(FavoriteTreeView);
- FavoriteDM.ReadFavorite;
-
//\83\8a\83X\83g\83X\83^\83C\83\8b
ListView.ViewStyle := GikoSys.Setting.ListStyle;
ListView.Font.Name := GikoSys.Setting.ListFontName;
ListView.Font.Size := GikoSys.Setting.ListFontSize;
ListView.Font.Color := GikoSys.Setting.ListFontColor;
- //ListView.Color := GikoSys.Setting.ListBackColor;
- ListViewBackGroundColor := GikoSys.Setting.ListBackColor;
+ ListViewBackGroundColor := clWhite; // \83f\83t\83H\83\8b\83g\82É\90Ý\92è\82µ\82½\82Ì\82¿
+ ListViewBackGroundColor := GikoSys.Setting.ListBackColor; // \83\86\81[\83U\92è\8b`\82É\95Ï\8dX
FUseOddResOddColor := GikoSys.Setting.UseOddColorOddResNum;
FOddColor := GikoSys.Setting.OddColor;
FBrowserSizeHeight := GikoSys.Setting.ListHeight;
FBrowserSizeWidth := GikoSys.Setting.ListWidth;
+ // \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;
+
+ //\8f\84\89ñ\83f\81[\83^\93Ç\82Ý\8d\9e\82Ý
+ RoundList := TRoundList.Create;
+ RoundList.LoadRoundBoardFile;
+
+ // \83{\81[\83h\83t\83@\83C\83\8b\97ñ\8b\93(ReadFavorite \82æ\82è\90æ\82É\8ds\82¤\82±\82Æ)
+ GikoSys.ListBoardFile;
+
+ RoundList.LoadRoundThreadFile;
+
+ if RoundList.OldFileRead or ( RoundList.Count[grtItem] > 0 ) then
+ GikoSys.ListBoardFile;
+
+ // \83\81\83j\83\85\81[\82É\92Ç\89Á
+ SetBBSMenu;
+
+ // \83q\83X\83g\83\8a\83\8a\83X\83g(LoadHistory \82æ\82è\82à\90æ\82É\8ds\82¤\82±\82Æ)
+ FHistoryList := TList.Create;
+
+ // \97\9a\97ð\93Ç\82Ý\8d\9e\82Ý
+ LoadHistory;
+
+ //\82¨\8bC\82É\93ü\82è\93Ç\82Ý\8d\9e\82Ý
+// FFavorite := TFavorite.Create(FavoriteTreeView);
+ FavoriteDM.SetFavTreeView(FavoriteTreeView);
+ FavoriteDM.ReadFavorite;
+
ArrangeAction.Checked := not (GikoSys.Setting.ListOrientation = gloVertical);
ArrangeAction.Execute;
if GikoSys.Setting.CabinetIndex < Length( BBSs ) then
ShowBBSTree( BBSs[ GikoSys.Setting.CabinetIndex ] );
// \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 2
- FIsIgnoreResize := True;
+ FIsIgnoreResize := rtResizing;
CabinetBBSAction.Execute;
end;
end else begin
end;
// \8bN\93®\8e\9e\82É\95Û\91¶\82³\82ê\82Ä\82µ\82Ü\82¤\91Î\8dô 3
- FIsIgnoreResize := True;
+ FIsIgnoreResize := rtResizing;
//\83I\81[\83g\83\8d\83O\83C\83\93
if GikoSys.Setting.AutoLogin then
//Samba24\82Ì\83t\83@\83C\83\8b\83`\83F\83b\83N
GikoSys.SambaFileExists();
- //\83^\83u\8e©\93®\93Ç\82Ý\8d\9e\82Ý (AV\94\90¶\82Ì\82½\82ß\88ê\8e\9e\95\95\88ó)
+ //\82É\82¿\82á\82ñ\8cê\83t\83@\83C\83\8b\93Ç\82Ý\8fo\82µ
end;
// CoolBar \82Ì\90Ý\92è\82ð\95Ï\90\94\82É\95Û\91¶
CoolSet : TCoolSet;
begin
- if IsIconic( Handle ) or FIsIgnoreResize then
+ if IsIconic( Handle ) or (FIsIgnoreResize <> rtNone) then
Exit;
//\83N\81[\83\8b\83o\81[\95Û\91¶(Main)
for i := MAIN_COOLBAND_COUNT - 1 downto 0 do begin
CoolSet := GikoSys.Setting.MainCoolSet[i];
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
- FIsIgnoreResize := False;
+ FIsIgnoreResize := rtNone;
SaveCoolBarSettings;
Exit;
end;
for i := LIST_COOLBAND_COUNT - 1 downto 0 do begin
CoolSet := GikoSys.Setting.ListCoolSet[i];
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
- FIsIgnoreResize := False;
+ FIsIgnoreResize := rtNone;
SaveCoolBarSettings;
Exit;
end;
for i := BROWSER_COOLBAND_COUNT - 1 downto 0 do begin
CoolSet := GikoSys.Setting.BrowserCoolSet[i];
if (CoolSet.FCoolID = -1) or (CoolSet.FCoolWidth = -1) then begin
- FIsIgnoreResize := False;
+ FIsIgnoreResize := rtNone;
SaveCoolBarSettings;
Exit;
end;
//
procedure TGikoForm.FormShow(Sender: TObject);
begin
- ShowWindow(Application.Handle, SW_HIDE);
-
- //FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
- //\83c\81[\83\8b\83o\81[\95\\8e¦
- StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
- StdToolBarVisibleActionExecute( nil );
- AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
- AddressBarVisibleActionExecute( nil );
- LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
- LinkBarVisibleActionExecute( nil );
- ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
- ListToolBarVisibleActionExecute( nil );
- ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
- ListNameBarVisibleActionExecute( nil );
- BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
- BrowserToolBarVisibleActionExecute( nil );
- BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
- BrowserNameBarVisibleActionExecute( nil );
-
- //\83u\83\89\83E\83U\83^\83u
- BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
- BrowserTabVisibleActionExecute(nil);
-
- if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
- BrowserTabTopAction.Checked := True;
- BrowserTabTopActionExecute(nil);
- end else begin
- BrowserTabBottomAction.Checked := True;
- BrowserTabBottomActionExecute(nil);
- end;
+ if not FStartUp then begin
+ ShowWindow(Application.Handle, SW_HIDE);
+
+ //FormCreate\82Å\82â\82é\82Æ\89Â\8e\8b\90Ý\92è\82ª\94½\89f\82³\82ê\82È\82¢\8fê\8d\87\82ª\82 \82é\82Ì\82ÅFormShow\82Å\82â\82é\82±\82Æ\82É\82µ\82½
+ //\83c\81[\83\8b\83o\81[\95\\8e¦
+ StdToolBarVisibleAction.Checked := GikoSys.Setting.StdToolBarVisible;
+ StdToolBarVisibleActionExecute( nil );
+ AddressBarVisibleAction.Checked := GikoSys.Setting.AddressBarVisible;
+ AddressBarVisibleActionExecute( nil );
+ LinkBarVisibleAction.Checked := GikoSys.Setting.LinkBarVisible;
+ LinkBarVisibleActionExecute( nil );
+ ListToolBarVisibleAction.Checked := GikoSys.Setting.ListToolBarVisible;
+ ListToolBarVisibleActionExecute( nil );
+ ListNameBarVisibleAction.Checked := GikoSys.Setting.ListNameBarVisible;
+ ListNameBarVisibleActionExecute( nil );
+ BrowserToolBarVisibleAction.Checked := GikoSys.Setting.BrowserToolBarVisible;
+ BrowserToolBarVisibleActionExecute( nil );
+ BrowserNameBarVisibleAction.Checked := GikoSys.Setting.BrowserNameBarVisible;
+ BrowserNameBarVisibleActionExecute( nil );
+
+ //\83u\83\89\83E\83U\83^\83u
+ BrowserTabVisibleAction.Checked := GikoSys.Setting.BrowserTabVisible;
+ BrowserTabVisibleActionExecute(nil);
- if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
- BrowserTabTabStyleAction.Checked := True;
- BrowserTabTabStyleActionExecute(nil);
- end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
- BrowserTabButtonStyleAction.Checked := True;
- BrowserTabButtonStyleActionExecute(nil);
- end else begin
- BrowserTabFlatStyleAction.Checked := True;
- BrowserTabFlatStyleActionExecute(nil);
- end;
+ if GikoSys.Setting.BrowserTabPosition = gtpTop then begin
+ BrowserTabTopAction.Checked := True;
+ BrowserTabTopActionExecute(nil);
+ end else begin
+ BrowserTabBottomAction.Checked := True;
+ BrowserTabBottomActionExecute(nil);
+ end;
+
+ if GikoSys.Setting.BrowserTabStyle = gtsTab then begin
+ BrowserTabTabStyleAction.Checked := True;
+ BrowserTabTabStyleActionExecute(nil);
+ end else if GikoSys.Setting.BrowserTabStyle = gtsButton then begin
+ BrowserTabButtonStyleAction.Checked := True;
+ BrowserTabButtonStyleActionExecute(nil);
+ end else begin
+ BrowserTabFlatStyleAction.Checked := True;
+ BrowserTabFlatStyleActionExecute(nil);
+ end;
+
+ // ListView \82Ì\83w\83b\83_\83h\83\89\83b\83O
+// ListView.FullDrag := True;
- // CoolBar \95\9c\8c³
- LoadCoolBarSettings;
+ // CoolBar \95\9c\8c³
+ LoadCoolBarSettings;
- FIsIgnoreResize := False;
+ FIsIgnoreResize := rtNone;
- //TabAutoLoad
- //FormCrete\82©\82ç\88Ú\93®\81B
- if GikoSys.Setting.TabAutoLoadSave then begin
- TabAutoLoadAction.Execute;
- end;
+ //TabAutoLoad
+ //FormCrete\82©\82ç\88Ú\93®\81B
+ if GikoSys.Setting.TabAutoLoadSave then begin
+ TabAutoLoadAction.Execute;
+ end;
+ //\82É\82¿\82á\82ñ\8cê\88Ä\93à\83T\83|\81[\83g\8b@\94\
+ if GikoSys.Setting.GengoSupport then begin
+ //\97\\92è\92n
+ //Test\8cü\82¯
+ end;
+ FStartUp := true;
+ end;
end;
procedure TGikoForm.FormCloseQuery(Sender: TObject; var CanClose: Boolean);
// Application.OnDeactivate := nil;
// Self.OnDeactivate := nil;
try
- //column\95\9d
- if GetActiveList is TBBS then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TCategory then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TBoard then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
- end;
+ ActiveListColumnSave;
except
end;
try
end;
-//\83t\83H\81[\83\80\83N\83\8d\81[\83Y
-procedure TGikoForm.FormClose(Sender: TObject; var Action: TCloseAction);
-begin
-end;
//\83L\83\83\83r\83l\83b\83g\81~\83{\83^\83\93\83N\83\8a\83b\83N
procedure TGikoForm.CabinetPanelHide(Sender: TObject);
begin
Root.ImageIndex := ITEM_ICON_2CH1;
Root.SelectedIndex := ITEM_ICON_2CH2;
Root.Data := inBBS;
- for i := 0 to inBBS.Count - 1 do begin
+ for i := inBBS.Count - 1 downto 0 do begin
Category := TCategory(inBBS.Items[i]);
- CategoryNode := TreeView.Items.AddChild(Root, Category.Title);
+ CategoryNode := TreeView.Items.AddChildFirst(Root, Category.Title);
CategoryNode.Data := Category;
CategoryNode.ImageIndex := ITEM_ICON_CATEGORY1;
CategoryNode.SelectedIndex := ITEM_ICON_CATEGORY2;
Category.CustomSort(BoardSortProc);
end;
- for j := 0 to Category.Count - 1 do begin
+ for j := Category.Count - 1 downto 0 do begin
Board := TBoard(Category.Items[j]);
Board.BeginUpdate;
- BoardNode := TreeView.Items.AddChild(CategoryNode, Board.Title);
+ BoardNode := TreeView.Items.AddChildFirst(CategoryNode, Board.Title);
BoardNode.Data := Board;
//if (Board.LastGetTime = 0) or (Board.LastGetTime = ZERO_DATE) then begin
if not Board.IsLogFile then begin
end;
function TGikoForm.SetCategoryListItem(ABBS2ch: TBBS): Integer;
-const
- COLUMN: array[0..0] of string = ('\83J\83e\83S\83\8a\96¼');
var
- ListColumn: TListColumn;
- i: Integer;
+ TitleColumn : TListColumn;
+ ListColumn : TListColumn;
+ i, id, idx : Integer;
begin
ListView.Items.BeginUpdate;
try
Screen.Cursor := crHourGlass;
ListView.Columns.Clear;
- for i := 0 to Length(COLUMN) - 1 do begin
- ListColumn := ListView.Columns.Add;
- ListColumn.Caption := COLUMN[i];
- ListColumn.Width := GikoSys.Setting.BBSColumnWidth[i];
+ TitleColumn := ListView.Columns.Add;
+ TitleColumn.Caption := GikoBBSColumnCaption[ Ord( gbbscTitle ) ];
+ TitleColumn.Width := GikoSys.Setting.BBSColumnWidth[ Ord( gbbscTitle ) ];
+ idx := 0;
+ for i := 0 to GikoSys.Setting.BBSColumnOrder.Count - 1 do begin
+ if GikoSys.Setting.BBSColumnOrder[ i ] = gbbscTitle then begin
+ TitleColumn.Tag := i;
+ idx := i;
+ end else begin
+ id := Ord( GikoSys.Setting.BBSColumnOrder[ i ] );
+ if (Integer( Low( TGikoBBSColumnID ) ) <= id) and
+ (id <= Integer( High( TGikoBBSColumnID ) )) then begin
+ ListColumn := ListView.Columns.Add;
+ // ListColumn.Tag := id;
+ ListColumn.Tag := i;
+ ListColumn.Caption := GikoBBSColumnCaption[ id ];
+ ListColumn.Width := GikoSys.Setting.BBSColumnWidth[ id ];
+ end;
+ end;
end;
+ TitleColumn.Index := idx;
ListView.Items.Count := 0;
ListView.Items.Clear;
FSortIndex := GikoSys.Setting.BBSSortIndex;
FSortOrder := GikoSys.Setting.BBSSortOrder;
- if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
- ListViewSort(nil, ListView.Column[FSortIndex]);
+ for i := ListView.Columns.Count - 1 downto 0 do begin
+ idx := ListView.Column[ i ].Tag;
+ if FSortIndex = Ord( GikoSys.Setting.BBSColumnOrder[ idx ] ) then
+ ListViewSort( nil, ListView.Column[ i ] );
+ end;
Result := ABBS2ch.Count;
finally
end;
function TGikoForm.SetBoardListItem(Category: TCategory): Integer;
-const
- COLUMN: array[0..2] of string = ('\94Â\96¼', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e');
var
- ListColumn: TListColumn;
- i: Integer;
+ TitleColumn : TListColumn;
+ ListColumn : TListColumn;
+ i, id, idx : Integer;
begin
ListView.Items.BeginUpdate;
try
Screen.Cursor := crHourGlass;
ListView.Columns.Clear;
- for i := 0 to Length(COLUMN) - 1 do begin
- ListColumn := ListView.Columns.Add;
- ListColumn.Caption := COLUMN[i];
- ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[i];
+ TitleColumn := ListView.Columns.Add;
+ TitleColumn.Caption := GikoCategoryColumnCaption[ Ord( gccTitle ) ];
+ TitleColumn.Width := GikoSys.Setting.CategoryColumnWidth[ Ord( gccTitle ) ];
+ idx := 0;
+ for i := 0 to GikoSys.Setting.CategoryColumnOrder.Count - 1 do begin
+ if GikoSys.Setting.CategoryColumnOrder[ i ] = gccTitle then begin
+ TitleColumn.Tag := i;
+ idx := i;
+ end else begin
+ id := Ord( GikoSys.Setting.CategoryColumnOrder[ i ] );
+ if (Integer( Low( TGikoCategoryColumnID ) ) <= id) and
+ (id <= Integer( High( TGikoCategoryColumnID ) )) then begin
+ ListColumn := ListView.Columns.Add;
+// ListColumn.Tag := id;
+ ListColumn.Tag := i;
+ ListColumn.Caption := GikoCategoryColumnCaption[ id ];
+ ListColumn.Width := GikoSys.Setting.CategoryColumnWidth[ id ];
+ end;
+ end;
end;
+ TitleColumn.Index := idx;
ListView.Items.Count := 0;
ListView.Items.Clear;
FSortIndex := GikoSys.Setting.CategorySortIndex;
FSortOrder := GikoSys.Setting.CategorySortOrder;
- if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
- ListViewSort(nil, ListView.Column[FSortIndex]);
+ for i := ListView.Columns.Count - 1 downto 0 do begin
+ idx := ListView.Column[ i ].Tag;
+ if FSortIndex = Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] ) then
+ ListViewSort( nil, ListView.Column[ i ] );
+ end;
Result := Category.Count;
finally
end;
function TGikoForm.SetThreadListItem(Board: TBoard): Integer;
-const
- COLUMN: array[0..7] of string = ('\83X\83\8c\83b\83h\96¼', '\83J\83E\83\93\83g', '\8eæ\93¾', '\90V\92\85',
- '\96¢\93Ç', '\8f\84\89ñ\97\\96ñ', '\8eæ\93¾\93ú\8e\9e', '\83X\83\8c\8dì\90¬\93ú\8e\9e');
- COLUMN_NONACQUIREDCOUNT: string = '\96¢\8eæ\93¾';
- COLUMN_ALIGNMENT: array[0..7] of TAlignment = (taLeftJustify, taRightJustify,
- taRightJustify, taRightJustify,
- taRightJustify, taLeftJustify,
- taLeftJustify, taLeftJustify);
- //No, \83X\83\8c\83b\83h\96¼, \83J\83E\83\93\83g, \8f\84\89ñ\97\\96ñ, \8eæ\93¾\93ú\8e\9e
-var
- ListColumn: TListColumn;
- i: Integer;
+var
+ TitleColumn : TListColumn;
+ ListColumn : TListColumn;
+ i, id, idx : Integer;
begin
ListView.Items.BeginUpdate;
try
Screen.Cursor := crHourGlass;
+{*
// \83`\83\89\82Â\82«\96h\8e~\82Ì\82½\82ß\81A\95Ï\8dX\82³\82ê\82Ä\82¢\82é\8fê\8d\87\82Ì\82Ý
// \81¦\96¼\8fÌ\82Í\88á\82¤\82ª\83J\83\89\83\80\90\94\82ª\93¯\82¶\81A\82Æ\82¢\82Á\82½\8fê\8d\87\82É\91Î\8f\88\82Å\82«\82È\82¢\82Ì\82Å\92\8d\88Ó
- if ListView.Columns.Count <> (High( COLUMN ) - Low( COLUMN ) + 1) then
+ if ListView.Columns.Count <> GikoSys.Setting.BoardColumnOrder.Count then
+*}
begin
ListView.Columns.Clear;
- for i := 0 to Length(COLUMN) - 1 do begin
- ListColumn := ListView.Columns.Add;
- ListColumn.Caption := COLUMN[i];
- ListColumn.Width := GikoSys.Setting.BoardColumnWidth[i];
- ListColumn.Alignment := COLUMN_ALIGNMENT[i];
+ TitleColumn := ListView.Columns.Add;
+ TitleColumn.Caption := GikoBoardColumnCaption[ Ord( gbcTitle ) ];
+ TitleColumn.Width := GikoSys.Setting.BoardColumnWidth[ Ord( gbcTitle ) ];
+ idx := 0;
+ for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
+ if GikoSys.Setting.BoardColumnOrder[ i ] = gbcTitle then begin
+ TitleColumn.Tag := i;
+ idx := i;
+ end else begin
+ id := Ord( GikoSys.Setting.BoardColumnOrder[ i ] );
+ if (Integer( Low( TGikoBoardColumnID ) ) <= id) and
+ (id <= Integer( High( TGikoBoardColumnID ) )) then begin
+ ListColumn := ListView.Columns.Add;
+ ListColumn.Caption := GikoBoardColumnCaption[ id ];
+ // ListColumn.Tag := id;
+ ListColumn.Tag := i;
+ ListColumn.Width := GikoSys.Setting.BoardColumnWidth[ id ];
+ ListColumn.Alignment := GikoBoardColumnAlignment[ id ];
+ end;
+ end;
end;
+ TitleColumn.Index := idx;
end;
- if GikoSys.Setting.NonAcquiredCount then
- ListView.Columns[2].Caption := COLUMN_NONACQUIREDCOUNT
- else
- ListView.Columns[2].Caption := COLUMN[2];
ListView.Items.Count := 0;
ListView.Items.Clear;
FSortIndex := GikoSys.Setting.BoardSortIndex;
FSortOrder := GikoSys.Setting.BoardSortOrder;
- if (FSortIndex >= 0) and (FSortIndex < Length(COLUMN)) then
- ListViewSort(nil, ListView.Column[FSortIndex]);
+ for i := ListView.Columns.Count - 1 downto 0 do begin
+ idx := ListView.Column[ i ].Tag;
+ if FSortIndex = Ord( GikoSys.Setting.BoardColumnOrder[ idx ] ) then
+ ListViewSort( nil, ListView.Column[ i ] );
+ end;
Result := Board.Count;
finally
ThreadItem: TThreadItem;
RepStr: string;
ActivListObj : TObject;
+ i, idx : Integer;
begin
ActivListObj := ActiveList;
if ActivListObj is TBBS then begin
+ //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
BBS := TBBS(ActivListObj);
ListView.StateImages := nil;
Item.ImageIndex := ITEM_ICON_CATEGORY1;
Item.Data := Category;
+
end else if ActivListObj is TCategory then begin
+
+ //===== \94Â\83\8a\83X\83g =====
Category := TCategory(ActivListObj);
ListView.StateImages := nil;
else
Item.Caption := Board.Title;
- if Item.SubItems.Count <> 2 then begin
+ if Item.SubItems.Count <> ListView.Columns.Count then begin
Item.SubItems.Clear;
- Item.SubItems.Add('');
- Item.SubItems.Add('');
+ for i := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 1 do
+ Item.SubItems.Add('');
end;
Item.ImageIndex := ITEM_ICON_BOARD1;
- if Board.Round then
- Item.SubItems[0] := Board.RoundName // '\97\\96ñ'
- else
- Item.SubItems[0] := '';
+ idx := 0;
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ if GikoSys.Setting.CategoryColumnOrder.Count <= i then
+ Break;
+// case TGikoCategoryColumnID( ListView.Column[ i ].Tag ) of
+ case GikoSys.Setting.CategoryColumnOrder[ i ] of
+ gccTitle:
+ // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+ Dec( idx );
+
+ gccRoundName:
+ if Board.Round then
+ Item.SubItems[ idx ] := Board.RoundName // '\97\\96ñ'
+ else
+ Item.SubItems[ idx ] := '';
+
+ gccLastModified:
+ if Board.RoundDate = ZERO_DATE then begin
+ Item.SubItems[ idx ] := '';
+ end else
+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
+ end;
+ Inc( idx );
+ end;
- if Board.RoundDate = ZERO_DATE then begin
- Item.SubItems[1] := '';
- end else
- Item.SubItems[1] := FormatDateTime('yyyy/mm/dd hh:mm:ss', Board.RoundDate);
Item.Data := Board;
+
end else if ActivListObj is TBoard then begin
+
+ //===== \83X\83\8c\83\8a\83X\83g =====
Board := TBoard(ActivListObj);
if GikoSys.Setting.ListIconVisible then
RepStr := CustomStringReplace(RepStr, '&', '&' );
//RepStr := StringReplace(RepStr, '\81\97\81M', ',', [rfReplaceAll]);
- if Item.SubItems.Count <> 7 then begin
+ if Item.SubItems.Count <> ListView.Columns.Count then begin
Item.SubItems.Clear;
- Item.SubItems.Add('');
- Item.SubItems.Add('');
- Item.SubItems.Add('');
- Item.SubItems.Add('');
- Item.SubItems.Add('');
- Item.SubItems.Add('');
- Item.SubItems.Add('');
+ for i := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 1 do
+ Item.SubItems.Add('');
end;
if ListNumberVisibleAction.Checked then
end;
if ThreadItem.IsLogFile then begin
- Item.ImageIndex := ITEM_ICON_THREADLOG1;
- Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
- if GikoSys.Setting.NonAcquiredCount then
- Item.SubItems[1] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count)
- else
- Item.SubItems[1] := IntToStr(ThreadItem.Count);
- if ThreadItem.NewResCount = 0 then
- Item.SubItems[2] := ''
- else
- Item.SubItems[2] := IntToStr(ThreadItem.NewResCount);
- Item.SubItems[3] := '';
- if ThreadItem.Round then
- Item.SubItems[4] := ThreadItem.RoundName
- else
- Item.SubItems[4] := '';
- if ThreadItem.RoundDate = ZERO_DATE then begin
- Item.SubItems[5] := '';
- end else
- Item.SubItems[5] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
- if ThreadItem.NewArrival then
- Item.ImageIndex := ITEM_ICON_THREADNEW1;
- if ThreadItem.CreateDate = ZERO_DATE then begin
- Item.SubItems[6] := '';
- end else
- Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+ idx := 0;
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ if GikoSys.Setting.BoardColumnOrder.Count <= i then
+ Break;
+// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
+ case GikoSys.Setting.BoardColumnOrder[ i ] of
+ gbcTitle:
+ // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+ Dec( idx );
+
+ gbcAllCount:
+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
+
+ gbcLocalCount:
+ Item.SubItems[ idx ] := IntToStr(ThreadItem.Count);
+
+ gbcNonAcqCount:
+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount - ThreadItem.Count);
+
+ gbcNewCount:
+ if ThreadItem.NewResCount = 0 then
+ Item.SubItems[ idx ] := ''
+ else
+ Item.SubItems[ idx ] := IntToStr(ThreadItem.NewResCount);
+
+ gbcUnReadCount:
+ Item.SubItems[ idx ] := '';
+
+ gbcRoundName:
+ if ThreadItem.Round then
+ Item.SubItems[ idx ] := ThreadItem.RoundName
+ else
+ Item.SubItems[ idx ] := '';
+
+ gbcRoundDate://gbcLastModified:
+ if (ThreadItem.RoundDate = ZERO_DATE) then begin
+ Item.SubItems[ idx ] := '';
+ end else
+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.RoundDate);
+ gbcCreated:
+ if ThreadItem.CreateDate = ZERO_DATE then begin
+ Item.SubItems[ idx ] := '';
+ end else
+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+
+ gbcLastModified:
+ if (ThreadItem.LastModified = ZERO_DATE) then begin
+ Item.SubItems[ idx ] := '';
+ end else
+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.LastModified);
+
+
+ end;
+ Inc( idx );
+ end;
+
+ if ThreadItem.NewArrival then
+ Item.ImageIndex := ITEM_ICON_THREADNEW1
+ else
+ Item.ImageIndex := ITEM_ICON_THREADLOG1;
end else begin
- Item.ImageIndex := ITEM_ICON_THREAD1;
- Item.SubItems[0] := IntToStr(ThreadItem.AllResCount);
- Item.SubItems[1] := '';
- Item.SubItems[2] := '';
- Item.SubItems[3] := '';
- Item.SubItems[4] := '';
- Item.SubItems[5] := '';
- if not GikoSys.Setting.CreationTimeLogs then
- if ThreadItem.CreateDate = ZERO_DATE then
- Item.SubItems[6] := ''
- else
- Item.SubItems[6] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+ idx := 0;
+ for i := 0 to GikoSys.Setting.BoardColumnOrder.Count - 1 do begin
+// case TGikoBoardColumnID( ListView.Column[ i ].Tag ) of
+ case GikoSys.Setting.BoardColumnOrder[ i ] of
+ gbcTitle:
+ // Item.Caption \82Í SubItems \82É\8aÜ\82Ü\82ê\96³\82¢\82Ì\82Å
+ Dec( idx );
+
+ gbcAllCount:
+ Item.SubItems[ idx ] := IntToStr(ThreadItem.AllResCount);
+
+ gbcRoundDate://gbcLastModified:
+ Item.SubItems[ idx ] := '';
+
+ gbcCreated:
+ if ThreadItem.CreateDate = ZERO_DATE then begin
+ Item.SubItems[ idx ] := '';
+ end else
+ Item.SubItems[ idx ] := FormatDateTime('yyyy/mm/dd hh:mm:ss', ThreadItem.CreateDate);
+
+ gbcLastModified:
+ Item.SubItems[ idx ] := '';
+
+ else
+ Item.SubItems[ idx ] := '';
+ end;
+ Inc( idx );
+ end;
+ if ThreadItem.NewArrival then
+ Item.ImageIndex := ITEM_ICON_THREADNEW1
+ else
+ Item.ImageIndex := ITEM_ICON_THREAD1;
end;
Item.Data := ThreadItem;
+
end;
end;
ActiveFileName: string;
e: IHTMLElement;
Ext: string;
- buf: string;
+ buf, buf2: string;
PathRec: TPathRec;
begin
if not( TObject(Sender) is TWebBrowser )then
end else begin
threadItem := GetActiveContent;
if Pos('about:blank..', Text) = 1 then begin
- if AnsiPos('http://jbbs.shitaraba.com/', threadItem.URL) <> 0 then begin
- URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
- Gikosys.GetPopupResNumber(Text,PathRec.FSt,PathRec.FTo);
- if ( PathRec.FSt <> 0 ) and ( PathRec.FTo <> 0 ) then
- buf := IntToStr(PathRec.FSt) + '-' + IntToStr(PathRec.FTo)
- else if( PathRec.FSt <> 0 ) then
- buf := IntToStr(PathRec.FSt);
- end else if AnsiPos('machi.to/bbs/', threadItem.URL) <> 0 then begin
- URL := threaditem.URL;
- buf := Copy(Text,AnsiPos('&st=',Text),Length(Text)-AnsiPos('&st=',Text) + 1);
+ wkInt := LastDelimiter( '/', threadItem.URL );
+ if Pos( '?', Copy( threadItem.URL, wkInt, MaxInt ) ) = 0 then begin
+ // Thread.URL \82Í PATH_INFO \93n\82µ
+ URL := Copy( threadItem.URL, 1, LastDelimiter( '/', threadItem.URL ) );
+ wkInt := LastDelimiter( '/', Text );
+ if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then
+ // Text \82à PATH_INFO \93n\82µ
+ URL := URL + Copy( Text, LastDelimiter( '/', Text ) + 1, MaxInt )
+ else
+ // Text \82Í QUERY_STRING \93n\82µ
+ URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt );
end else begin
- URL := Copy(threadItem.URL, 1, LastDelimiter('/',threadItem.URL));
- buf := Copy(Text,LastDelimiter('/',Text)+1,Length(Text)-LastDelimiter('/',Text));
+ // Thread.URL \82Í QUERY_STRING \93n\82µ
+ URL := Copy( threadItem.URL, 1, LastDelimiter( '?', threadItem.URL ) );
+ wkInt := LastDelimiter( '/', Text );
+ if Pos( '?', Copy( Text, wkInt, MaxInt ) ) = 0 then begin
+ // Text \82Í PATH_INFO \93n\82µ
+ // URL \82É\94Â\82Æ\83L\81[\82ª\91«\82ç\82È\82¢\82Ì\82Å Text \82©\82ç\92¸\91Õ\82·\82é
+ wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
+ wkInt := LastDelimiter( '/', Copy( Text, 1, wkInt - 1 ) );
+ URL := Copy( URL, 1, Length( URL ) - 1 ) + Copy( Text, wkInt, MaxInt );
+ end else begin
+ // Text \82à QUERY_STRING \93n\82µ
+ URL := URL + Copy( Text, LastDelimiter( '?', Text ) + 1, MaxInt )
+ end;
end;
- URL := URL + buf;
end else begin
URL := Text;
end;
+
PathRec := Gikosys.Parse2chURL2(URL);
if (PathRec.FNoParam) then begin
PathRec.FSt := 1;
PathRec.FTo := 1;
- end else
+ end else begin
Gikosys.GetPopupResNumber(URL,PathRec.FSt,PathRec.FTo);
+ end;
GikoSys.ParseURI( URL, Protocol, Host, Path, Document, Port, Bookmark );
if PathRec.FDone or (not GikoSys.Is2chHost( Host )) then begin
// wkIntTo := 1;
//if PathRec.FFirst then
// wkIntSt := 1;
- if PathRec.FStBegin then
- wkIntSt := 1;
- if PathRec.FToEnd then
- wkIntTo := 9999;
+ //if PathRec.FStBegin then //http://\81`\81`\81`\81`/-50\82Æ\82¢\82¤\82Æ\82«
+ // wkIntSt := 1; //
+ //if PathRec.FToEnd then //http://\81`\81`\81`\81`/50-\82Æ\82¢\82¤\82Æ\82«
+ // wkIntTo := 9999; // \82Ç\82¿\82ç\82Ì\8fê\8d\87\82à\81AGetPopupResNumber\82Å\82¤\82Ü\82\94Ô\8d\86\82ð\92²\90®\82·\82é\82Ì\82Å\82Ó\82æ\82¤\81B
//ATitle := ActiveFileName <> PathRec.FKey;
if (FActiveContent <> nil) and (FActiveContent.Thread.URL = URL) then
procedure TGikoForm.ListViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
+var
+ pos : TPoint;
begin
if GetActiveList is TBoard then begin
- if Key = VK_BACK then begin
-// UpFolderButtonClick(Sender);
- end else if Key = VK_SPACE then begin
- ListDoubleClick(Shift);
- end else if Key = VK_RETURN then begin
- ListClick;
+ case Key of
+ VK_BACK:; // UpFolderButtonClick(Sender);
+ VK_SPACE: ListDoubleClick(Shift);
+ VK_RETURN: ListClick;
+ VK_APPS:
+ begin
+ if ListView.Selected <> nil then begin
+ pos.X := ListView.Column[ 0 ].Width;
+ pos.Y := ListView.Selected.Top;
+ end else begin
+ pos.X := ListView.Left;
+ pos.Y := ListView.Top;
+ end;
+ Windows.ClientToScreen( ListView.Handle, pos );
+ ListPopupMenu.Popup( pos.X, pos.Y );
+ end;
end;
end else begin // TBBS, TCategory
- if Key = VK_BACK then begin
-// UpFolderButtonClick(Sender);
- end else if Key = VK_SPACE then begin
- ListClick;
- end else if Key = VK_RETURN then begin
- ListDoubleClick(Shift);
+ case Key of
+ VK_BACK:; // UpFolderButtonClick(Sender);
+ VK_SPACE: ListClick;
+ VK_RETURN: ListDoubleClick(Shift);
+ VK_APPS:
+ begin
+ if ListView.Selected <> nil then begin
+ pos.X := ListView.Column[ 0 ].Width;
+ pos.Y := ListView.Selected.Top;
+ end else begin
+ pos.X := ListView.Left;
+ pos.Y := ListView.Top;
+ end;
+ Windows.ClientToScreen( ListView.Handle, pos );
+ ListPopupMenu.Popup( pos.X, pos.Y );
+ end;
end;
end;
end;
Result := FHttpState;
end;
+{*!
+\brief ListView \82Ì Column \82ð\90^\82Ì\83J\83\89\83\80\82É\95Ï\8a·
+
+Delphi 6 Personal \82Å\82Ì ListView \82Å\82Í ListViewColumnClick \83C\83x\83\93\83g\82Å
+\90³\82µ\82¢\83J\83\89\83\80\82ª\93n\82³\82ê\82È\82¢\82½\82ß\81A\90³\82µ\82¢\83J\83\89\83\80\82É\95Ï\8a·\82µ\82Ü\82·\81B
+*}
+function TGikoForm.ActiveListTrueColumn( column : TListColumn ) : TListColumn;
+{*
+var
+ i, idx : Integer;
+ orderList : TList;
+*}
+begin
+
+ // \90³\82µ\82\95Ï\8a·\82·\82é\95û\96@\82ª\95ª\82©\82ç\82È\82¢\82Ì\82Å\95Û\97¯
+ Result := column;
+ Exit;
+{*
+ Result := column;
+
+ if TObject( FActiveList ) is TBBS then
+ orderList := GikoSys.Setting.BBSColumnOrder
+ else if TObject( FActiveList ) is TCategory then
+ orderList := GikoSys.Setting.CategoryColumnOrder
+ else if TObject( FActiveList ) is TBoard then
+ orderList := GikoSys.Setting.BoardColumnOrder
+ else
+ Exit;
+
+ idx := column.Tag;
+
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ if Integer( orderList[ ListView.Column[ i ].Tag ] ) = 0 then begin
+ if idx = 0 then
+ Result := ListView.Column[ i ]
+ else if idx <= i then
+ Result := ListView.Column[ idx - 1 ];
+ Exit;
+ end;
+ end;
+*}
+
+end;
+
procedure TGikoForm.ListViewColumnClick(Sender: TObject;
Column: TListColumn);
var
- i: Integer;
- wkBBS: TBBS;
- wkCategory: TCategory;
- wkBoard: TBoard;
+ id, idx : Integer;
+ orderList : TList;
begin
- if FSortIndex = Column.Index then
+ idx := ActiveListTrueColumn( Column ).Tag;
+
+ if TObject( FActiveList ) is TBBS then
+ orderList := GikoSys.Setting.BBSColumnOrder
+ else if TObject( FActiveList ) is TCategory then
+ orderList := GikoSys.Setting.CategoryColumnOrder
+ else if TObject( FActiveList ) is TBoard then
+ orderList := GikoSys.Setting.BoardColumnOrder
+ else
+ Exit;
+
+ id := Integer( orderList[ idx ] );
+
+ if FSortIndex = id then
FSortOrder := not FSortOrder
else
FSortOrder := False;
+
ListViewSort(Sender, Column);
end;
procedure TGikoForm.ListViewSort(Sender: TObject; Column: TListColumn);
var
- i: Integer;
+ i, id, idx : Integer;
+ orderList : TList;
wkBBS: TBBS;
wkCategory: TCategory;
wkBoard: TBoard;
begin
- for i := 0 to ListView.Columns.Count - 1 do
+ idx := ActiveListTrueColumn( Column ).Tag;
+
+ for i := 0 to ListView.Columns.Count - 1 do begin
ListView.Column[i].ImageIndex := -1;
+ end;
+
if FSortOrder then
- ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT1
+ ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT1
else
- ListView.Column[Column.Index].ImageIndex := ITEM_ICON_SORT2;
+ ListView.Column[ idx ].ImageIndex := ITEM_ICON_SORT2;
Sort.SortNoFlag := ListNumberVisibleAction.Checked;
if TObject( FActiveList ) is TBBS then begin
//wkBBS := TBBS(TreeView.Selected.Data);
wkBBS := TBBS( FActiveList );
+ orderList := GikoSys.Setting.BBSColumnOrder;
+ id := Integer( orderList[ idx ] );
Sort.SortOrder := FSortOrder;
- Sort.SortIndex := Column.Index;
- GikoSys.Setting.BBSSortIndex := Column.Index;
+ Sort.SortIndex := id;
+ GikoSys.Setting.BBSSortIndex := id;
GikoSys.Setting.BBSSortOrder := FSortOrder;
wkBBS.Sort(CategorySortProc);
- ListView.Refresh;
//end else if TObject(TreeView.Selected.Data) is TCategory then begin
end else if TObject( FActiveList ) is TCategory then begin
//wkCategory := TCategory(TreeView.Selected.Data);
wkCategory := TCategory( FActiveList );
+ orderList := GikoSys.Setting.CategoryColumnOrder;
+ id := Integer( orderList[ idx ] );
Sort.SortOrder := FSortOrder;
- Sort.SortIndex := Column.Index;
- GikoSys.Setting.CategorySortIndex := Column.Index;
+ Sort.SortIndex := id;
+ GikoSys.Setting.CategorySortIndex := id;
GikoSys.Setting.CategorySortOrder := FSortOrder;
wkCategory.CustomSort(BoardSortProc);
- ListView.Refresh;
//end else if TObject(TreeView.Selected.Data) is TBoard then begin
end else if TObject( FActiveList ) is TBoard then begin
//wkBoard := TBoard(TreeView.Selected.Data);
wkBoard := TBoard( FActiveList );
+ orderList := GikoSys.Setting.BoardColumnOrder;
+ id := Integer( orderList[ idx ] );
Sort.SortOrder := FSortOrder;
- Sort.SortIndex := Column.Index;
- Sort.SortNonAcquiredCountFlag := GikoSys.Setting.NonAcquiredCount;
- GikoSys.Setting.BoardSortIndex := Column.Index;
+ Sort.SortIndex := id;
+ GikoSys.Setting.BoardSortIndex := id;
GikoSys.Setting.BoardSortOrder := FSortOrder;
wkBoard.CustomSort(ThreadItemSortProc);
- ListView.Refresh;
+ end else begin
+ id := 0;
end;
- FSortIndex := Column.Index;
+
+ ListView.Refresh;
+ FSortIndex := id;
end;
procedure TGikoForm.MenuToolBarCustomDrawButton(Sender: TToolBar;
if TObject(Item.Data) is TThreadItem then begin
ThreadItem := TThreadItem(Item.Data);
if ( FUseOddResOddColor ) and ( ThreadItem.Count <> 0 ) and ( ThreadItem.AllResCount <> ThreadItem.Count) then begin
- ListView.Canvas.Brush.Color := FOddColor;
- end else begin
- ListView.Canvas.Brush.Color := FListViewBackGroundColor;
- end;
+ ListView.Canvas.Brush.Color := FOddColor;
+ end else begin
+ ListView.Canvas.Brush.Color := FListViewBackGroundColor;
+ end;
// if (ThreadItem.Kokomade <> ThreadItem.Count) and (ThreadItem.IsLogFile) then
if ThreadItem.UnRead then
TListView(Sender).Canvas.Font.Style := [fsBold];
s: string;
boardPlugIn : TBoardPlugIn;
i: Integer;
+ browserRec : TBrowserRecord;
begin
try
if Item.DownType = gdtBoard then
ATitle := GikoSys.DivideStrLine(GikoSys.ReadThreadFile(Item.ThreadItem.GetThreadFileName, 1)).FTitle;
end;
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
- if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then
+ if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = Item.ThreadItem then begin
TBrowserRecord(BrowserTab.Tabs.Objects[i]).Repaint := true;
+ break;
+ end;
end;
if GikoSys.Setting.BrowserTabVisible then begin
if GetActiveContent = Item.ThreadItem then
- InsertBrowserTab(Item.ThreadItem)
+ browserRec := InsertBrowserTab(Item.ThreadItem)
else if (ListView.Selected <> nil ) and ( TObject(ListView.Selected.Data) is TThreadItem ) and ( Item.ThreadItem = TThreadItem(ListView.Selected.Data)) then
- InsertBrowserTab(Item.ThreadItem, True)
+ browserRec := InsertBrowserTab(Item.ThreadItem, True)
else
- InsertBrowserTab(Item.ThreadItem, False);
+ browserRec := InsertBrowserTab(Item.ThreadItem, False);
+ if browserRec.Thread = BrowserNullTab.Thread then begin
+ browserRec.Movement := BrowserNullTab.Movement;
+ BrowserNullTab.Movement := '';
+ end;
end else begin
if (GetActiveContent = Item.ThreadItem) or (FActiveContent = nil) or(FActiveContent.Browser = BrowserNullTab.Browser) then
InsertBrowserTab(Item.ThreadItem);
end;
-
+ Application.ProcessMessages;
if Item.State = gdsComplete then begin
PlaySound('New');
AddMessageList(ATitle + ' [\83X\83\8c\8eæ\93¾\8a®\97¹]', nil, gmiOK);
end;
end;}
-procedure TGikoForm.InsertBrowserTab(ThreadItem: TThreadItem; ActiveTab: Boolean = True);
-
+function TGikoForm.InsertBrowserTab(
+ ThreadItem : TThreadItem;
+ ActiveTab : Boolean = True
+) : TBrowserRecord;
var
- i, j, idx: Integer;
- favItem : TFavoriteThreadItem;
+ i, j, idx : Integer;
+ favItem : TFavoriteThreadItem;
newBrowser : TBrowserRecord;
begin
+ Result := nil;
if Threaditem = nil then Exit;
if ThreadItem.IsLogFile then begin
for i := 0 to BrowserTab.Tabs.Count - 1 do begin
if TObject(BrowserTab.Tabs.Objects[i]) is TBrowserRecord then begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Thread = ThreadItem then begin
+ Result := TBrowserRecord( BrowserTab.Tabs.Objects[i] );
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).FBrowser = nil then begin
for j := BrowserTab.Tabs.Count - 1 downto 0 do begin
if TBrowserRecord(BrowserTab.Tabs.Objects[j]).FBrowser = TWebBrowser(FBrowsers[BROWSER_COUNT - 1]) then begin
BrowserTab.TabIndex := i;
end;
end;
+ Result := newBrowser;
if(ActiveTab) or (idx = -1) then begin
BrowserTab.OnChange(nil);
end;
BrowserNullTab.Browser := Browser;
end;
BrowserNullTab.thread := ThreadItem;
+ Result := BrowserNullTab;
BrowserTab.TabIndex := -1;
SetContent(BrowserNullTab);
end;
s: string;
// OldCursor: TCursor;
i: Integer;
- url: OleVariant;
idx: Integer;
ThreadItem: TThreadItem;
Thread: TBrowserRecord;
ThreadScrollTop: Integer;
ThreadIsLog, ThreadUnRead, ThreadNewArraical: boolean;
begin
+// AddMessageList('SetContent', nil, gmiWhat);
Thread := inThread;
idx := BrowserTab.TabIndex;
if (FActiveContent <> nil) and
try
+ {
if ThreadItem.UnRead then begin
ThreadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
if ThreadItem.ParentBoard.UnRead < 0 then ThreadItem.ParentBoard.UnRead := 0;
TreeView.Refresh;
end;
- // LockWindowUpdate(Self.Handle);
+ }
if(FActiveContent <> nil) and (FActiveContent <> Thread) then begin
if (FActiveContent.Browser <> BrowserNullTab.Browser) then
ShowWindow(FActiveContent.Browser.Handle, SW_HIDE);
end;
+
ShowWindow(Thread.FBrowser.Handle, SW_SHOW);
- //LockWindowUpdate(0);
if (not Assigned(Thread.Browser.Document)) then begin
Thread.Browser.Navigate('about:blank');
end;
Self.Caption := CAPTION_NAME + ' - [' + ThreadTitle + ']';
//Thread.Repaint\82Í\81A\83X\83L\83\93\93\99\82Ì\90Ý\92è\82ð\95Ï\8dX\82µ\82½\82Æ\82«\81AThread\82ð\83_\83E\83\93\83\8d\81[\83h\82µ\82½\82Æ\82«
//\90V\8bK\82ÉThread\82ð\8aJ\82¢\82½\82Æ\82«\82É\90^\82É\82È\82Á\82Ä\82¢\82é\81B
-// if(Thread.Repaint) or (Thread.OnlyHundred <> GikoSys.OnlyAHundredRes)then begin
if Thread.Repaint then begin
//Thread.LastSize := ThreadItem.Size;
Thread.Repaint := false;
- try
- Thread.Browser.OnStatusTextChange := nil;
- doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
- GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
-
- // if (Assigned(Thread.Browser)) and (Thread.Browser <> nil) then
- Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
- //\82È\82º\82©\82±\82±\82Å\96¾\8e¦\93I\82ÉDocumentComplete\82ð\8cÄ\82Î\82È\82¢\82Æ\82¤\82Ü\82\82¢\82©\82È\82¢
- //\92Ç\8bL\81@200406/19
- //Visible\82Ì\82Æ\82«\82µ\82©DocumentComplete\82Í\8cÄ\82Î\82ê\82È\82¢\82ç\82µ\82¢
- Thread.FBrowser.OnDocumentComplete(Thread.FBrowser, Thread.FBrowser.Parent, url);
-// Thread.OnlyHundred := GikoSys.OnlyAHundredRes;
- Application.ProcessMessages;
- //\82±\82±\82ÅApplication.ProcessMessages\82ð\8cÄ\82Ô\82±\82Æ\82É\82æ\82Á\82ÄWebBrowser\82ð\8dX\90V\82³\82¹\82é\81B
- //\91\8a\82µ\82È\82¢\82Æ\88ê\89æ\96Ê\95ª\82µ\82©\95`\89æ\82Å\82«\82Ä\82È\82¢\82Ì\82Å\82»\82ê\88È\8fã\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\8ew\92è\82µ\82Ä\82à\96³\8cø\82É\82È\82é
- //\81@by\82à\82¶\82ã(2004/01/20)
- try
- //if (Assigned(Thread)) and (Assigned(ThreadItem))then begin
- if(Thread <> nil) and (ThreadItem <>nil) then begin
- if ThreadUnRead then
- BrowserMovement('new', Thread)
- else if ThreadScrollTop <> 0 then begin
- try
- doc.Body.ScrollTop := ThreadScrollTop;
- except
- on E: Exception do
- MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
- end;
- end;
- // end;
- end else begin
- FActiveContent := nil;
- BrowserTab.Repaint;
- Exit;
- end;
- except
- FActiveContent := nil;
- BrowserTab.Repaint;
- Exit;
- end;
- finally
- // Application.ProcessMessages;
+
+ Thread.Browser.OnStatusTextChange := nil;
+ doc := Idispatch( olevariant(Thread.Browser.ControlInterface).Document) as IHTMLDocument2;
+ GikoSys.CreateHTML2(doc, ThreadItem, sTitle);
+ Thread.Browser.OnStatusTextChange := BrowserStatusTextChange;
+ PostMessage( Handle, USER_DOCUMENTCOMPLETE, Integer( Thread.Browser ), 0 );
+ if ThreadItem = nil then begin
+ FActiveContent := nil;
+ BrowserTab.Repaint;
+ Exit;
end;
end;
- ThreadItem.UnRead := False;
ListView.Refresh;
end;
if (Assigned(Thread)) and (Assigned(Thread.Thread)) and (Thread <> nil) and (ThreadItem <>nil) then begin
procedure TGikoForm.SetActiveList(Obj: TObject);
var
- i : Integer;
idx : Integer;
begin
// if FActiveList <> Obj then begin
Self.Caption := CAPTION_NAME;
//Application.Title := CAPTION_NAME;
+// ActiveListColumnSave;
+
if Obj is TBBS then begin
- for i := 0 to ListView.Columns.Count - 1 do
- ListView.Column[i].Width := GikoSys.Setting.BBSColumnWidth[i];
SetCategoryListItem(TBBS(Obj));
end else if Obj is TCategory then begin
- for i := 0 to ListView.Columns.Count - 1 do
- ListView.Column[i].Width := GikoSys.Setting.CategoryColumnWidth[i];
SetBoardListItem(TCategory(Obj));
end else if Obj is TBoard then begin
SetThreadListItem(TBoard(Obj));
procedure TGikoForm.SetListViewType(AViewType: TGikoViewType; SelectText: string; KubetsuChk: Boolean);
var
Board: TBoard;
+ i: Integer;
begin
if ActiveList is TBoard then begin
+ for i := Length( BBSs ) - 1 downto 0 do begin
+ BBSs[i].SelectText := SelectText;
+ BBSs[i].KubetsuChk := KubetsuChk;
+ end;
Board := TBoard(ActiveList);
-
- Board.ParentCategory.ParenTBBS.SelectText := SelectText;
- Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
+// Board.ParentCategory.ParenTBBS.SelectText := SelectText;
+// Board.ParentCategory.ParenTBBS.KubetsuChk := KubetsuChk;
// Board.SelectText := SelectText;
// Board.KubetsuChk := KubetsuChk;
ViewType := AViewType;
bbs := nil;
if (FTreeType = gtt2ch) and (FActiveBBS = bbs) then begin
- ChangeEvent := nil;
- ChangingEvent := nil;
+ if Item <> FActiveList then begin
+ ChangeEvent := nil;
+ ChangingEvent := nil;
- if not CallEvent then begin
- ChangeEvent := TreeView.OnChange;
- ChangingEvent := TreeView.OnChanging;
- end;
- try
if not CallEvent then begin
- TreeView.OnChange := nil;
- TreeView.OnChanging := nil;
+ ChangeEvent := TreeView.OnChange;
+ ChangingEvent := TreeView.OnChanging;
end;
- //Application.ProcessMessages;
- for i := 0 to TreeView.Items.Count - 1 do begin
- if TreeView.Items[i].Data = Item then begin
- TreeView.Items[i].Selected := True;
- if CallEvent then
- TreeClick(TreeView.Items[i]);
- Break;
+ try
+ if not CallEvent then begin
+ TreeView.OnChange := nil;
+ TreeView.OnChanging := nil;
+ end;
+ //Application.ProcessMessages;
+ for i := 0 to TreeView.Items.Count - 1 do begin
+ if TreeView.Items[i].Data = Item then begin
+ TreeView.Items[i].Selected := True;
+ if CallEvent then
+ TreeClick(TreeView.Items[i]);
+ Break;
+ end;
+ end;
+ //Application.ProcessMessages;
+ finally
+ if not CallEvent then begin
+ TreeView.OnChange := ChangeEvent;
+ TreeView.OnChanging := ChangingEvent;
end;
- end;
- //Application.ProcessMessages;
- finally
- if not CallEvent then begin
- TreeView.OnChange := ChangeEvent;
- TreeView.OnChanging := ChangingEvent;
end;
end;
end else begin
- if GetActiveList is TBBS then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TCategory then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TBoard then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
- end;
-
- if (Item is TBBS) or (Item is TCategory) then begin
- ListView.Columns.Clear;
- SetActiveList( Item );
- end else if Item is TBoard then begin
- if not TBoard( Item ).IsThreadDatRead then begin
- Screen.Cursor := crHourGlass;
- try
- if not TBoard( Item ).IsThreadDatRead then
- GikoSys.ReadSubjectFile(TBoard( Item ));
- finally
- Screen.Cursor := crDefault;
+ if Item <> FActiveList then begin
+ ActiveListColumnSave;
+
+ if (Item is TBBS) or (Item is TCategory) then begin
+ ListView.Columns.Clear;
+ SetActiveList( Item );
+ end else if Item is TBoard then begin
+ if not TBoard( Item ).IsThreadDatRead then begin
+ Screen.Cursor := crHourGlass;
+ try
+ if not TBoard( Item ).IsThreadDatRead then
+ GikoSys.ReadSubjectFile(TBoard( Item ));
+ finally
+ Screen.Cursor := crDefault;
+ end;
end;
+ SetActiveList( Item );
end;
- SetActiveList( Item );
end;
+ end;
- if Item is TBoard then begin // not TCategory
- if GikoSys.Setting.ListOrientation = gloHorizontal then begin
- if GikoSys.Setting.ListWidthState = glsMax then begin
- BrowserMinAction.Execute;
- if GikoForm.Visible then
- ListView.SetFocus;
- end;
- end else begin
- if GikoSys.Setting.ListHeightState = glsMax then begin
- BrowserMinAction.Execute;
- if GikoForm.Visible then
- ListView.SetFocus;
- end;
+ if Item is TBoard then begin // not TCategory
+ if GikoSys.Setting.ListOrientation = gloHorizontal then begin
+ if GikoSys.Setting.ListWidthState = glsMax then begin
+ BrowserMinAction.Execute;
+ if GikoForm.Visible then
+ ListView.SetFocus;
+ end;
+ end else begin
+ if GikoSys.Setting.ListHeightState = glsMax then begin
+ BrowserMinAction.Execute;
+ if GikoForm.Visible then
+ ListView.SetFocus;
end;
end;
end;
var
listItem : TListItem;
threadItem : TThreadItem;
+ pos : TPoint;
// t: Cardinal;
begin
case Button of
else
ListClick;
end;
+ mbRight:
+ begin
+ pos.X := X;
+ pos.Y := Y;
+ Windows.ClientToScreen( ListView.Handle, pos );
+ ListPopupMenu.Popup( pos.X, pos.Y );
+ end;
end;
{ if ssDouble in Shift then begin
DoubleClickOccurred[Button] := True;
top := 0;
nm := AName;
item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
+ item.focus();
repeat
top := top + item.offsetTop;
item := item.offsetParent;
until AnsiCompareText(item.tagName, 'body' ) = 0;
-
OleVariant(activeBrower.Document as IHTMLDocument2).body.scrollTop := top;
except
end;
top := 0;
nm := AName;
item := OleVariant( activeBrower.Document as IHTMLDocument2).anchors.item(nm);
+ item.focus();
repeat
top := top + item.offsetTop;
item := item.offsetParent;
case GikoSys.Setting.ListWidthState of
glsMax: begin
//\92Ê\8fí\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
ViewPanel.Width := FBrowserSizeWidth;
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsNormal;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
end;
glsMin, glsNormal: begin
//\8dÅ\91å\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
if GikoSys.Setting.ListWidthState = glsNormal then
FBrowserSizeWidth := ViewPanel.Width;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
ViewPanel.Width := 1;
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
case GikoSys.Setting.ListHeightState of
glsMax: begin
//\92Ê\8fí\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
ViewPanel.Height := FBrowserSizeHeight;
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsNormal;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
end;
glsMin, glsNormal: begin
//\8dÅ\91å\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
if GikoSys.Setting.ListHeightState = glsNormal then
FBrowserSizeHeight := ViewPanel.Height;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
ViewPanel.Height := 1;
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
case GikoSys.Setting.ListWidthState of
glsMax, glsNormal: begin
//\8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
if GikoSys.Setting.ListWidthState = glsNormal then
FBrowserSizeWidth := ViewPanel.Width;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
ViewPanel.Width := ThreadMainPanel.Width - 80;
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_NORMAL;
end;
glsMin: begin
//\92Ê\8fí\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
ViewPanel.Width := FBrowserSizeWidth;
BrowserMaxAction.ImageIndex := TOOL_ICON_WIDTH_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_WIDTH_MIN;
GikoSys.Setting.ListWidthState := glsNormal;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
end;
end;
end else begin
case GikoSys.Setting.ListHeightState of
glsMax, glsNormal: begin
//\8dÅ\8f¬\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
if GikoSys.Setting.ListHeightState = glsNormal then
FBrowserSizeHeight := ViewPanel.Height;
ViewPanel.Height := ThreadMainPanel.Height - BrowserCoolBar.Height - 7;
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_NORMAL;
GikoSys.Setting.ListHeightState := glsMin;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
end;
glsMin: begin
//\92Ê\8fí\95\\8e¦\82É\82·\82é
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 0, 0); //\95`\89æ\92â\8e~
ViewPanel.Height := FBrowserSizeHeight;
BrowserMaxAction.ImageIndex := TOOL_ICON_HEIGHT_MAX;
BrowserMinAction.ImageIndex := TOOL_ICON_HEIGHT_MIN;
GikoSys.Setting.ListHeightState := glsNormal;
+ if FActiveContent <> nil then
+ SendMessage(FActiveContent.FBrowser.Handle, WM_SETREDRAW, 1, 0); //\95`\89æ
end;
end;
end;
var
Editor: TEditorForm;
Item: TThreadItem;
- msg: string;
begin
Item := GetActiveContent;
if Item = nil then Exit;
end;
procedure TGikoForm.FormResize(Sender: TObject);
-var
- doc : Variant;
begin
+
MessageListView.Column[0].Width := MessageListView.ClientWidth - 32;
MainCoolBar.Width := TopPanel.Width - TopRightPanel.Width;
end;
end;
- if FIsMinimize = mtMinimized then begin
- if FActiveContent <> nil then begin
- //Application.ProcessMessages;
- doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
- doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
- FIsMinimize := mtNone;
- end;
- end;
-
- FIsIgnoreResize := True;
+ FIsIgnoreResize := rtResizing;
PostMessage( Handle, USER_RESIZED, 0, 0 );
+
+
end;
procedure TGikoForm.ScrollTopActionUpdate(Sender: TObject);
procedure TGikoForm.LogDeleteActionExecute(Sender: TObject);
const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
- DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+ DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+ DEL_SAME_MSG = '\82±\82ê\82ç ^0 \8cÂ\82Ì\83X\83\8c\83b\83h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
DEL_TITLE = '\8dí\8f\9c\8am\94F';
var
ThreadItem: TThreadItem;
DeleteHistory(ThreadItem);
DeleteTab(ThreadItem);
ThreadItem.DeleteLogFile;
+
+ TreeView.Refresh; // UnRead \82Ì\95\\8e¦\82ð\8dX\90V
end;
ListView.Refresh;
finally
var
Editor: TEditorForm;
Item: TThreadItem;
- msg: string;
Number: Integer;
begin
Number := KokoPopupMenu.Tag;
Editor := TEditorForm.Create(Self);
Editor.SetThreadItem(Item);
+ GikoSys.LoadEditorKeySetting(Editor.ActionList);
Editor.BodyEdit.Text := '>>' + IntToStr(Number) + #13#10;
Editor.Show;
Editor.BodyEdit.SetFocus;
FDispHtmlDocument: DispHTMLDocument;
BrowserRecord :TBrowserRecord;
i :Integer;
+ doc : Variant;
+ threadItem : TThreadItem;
begin
-// AddMessageList('DocumentComplete', nil);
+// AddMessageList('DocumentComplete', nil, gmiWhat);
if TObject(Sender) is TWebBrowser then begin
+ BrowserRecord := nil;
if TWebBrowser(Sender) <> Browser then begin
- BrowserRecord := nil;
for i := BrowserTab.Tabs.Count - 1 downto 0 do begin
if TBrowserRecord(BrowserTab.Tabs.Objects[i]).Browser = TWebBrowser(Sender) then begin
BrowserRecord := TBrowserRecord(BrowserTab.Tabs.Objects[i]);
BrowserRecord.FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
end;
end else begin
- if GetActiveContent <> nil then begin
+ if GetActiveContent <> nil then begin
FDispHtmlDocument := Idispatch(OleVariant(Browser.ControlInterface).Document) as DispHTMLDocument;
if FEvent <> nil then
FEvent.Free;
FEvent.OnClick := WebBrowserClick; //\92Ç\89Á\82µ\82½OnClick\83C\83x\83\93\83g
end;
end;
+
+ if (BrowserRecord <> nil) and
+ Assigned( BrowserRecord.Thread ) then begin
+ threadItem := BrowserRecord.Thread;
+
+ if (BrowserRecord <> nil) and (Length( BrowserRecord.Movement ) > 0) then begin
+ if threadItem.UnRead then begin
+ threadItem.UnRead := False;
+ threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
+ if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
+ TreeView.Refresh;
+ ListView.Refresh;
+ end;
+ BrowserMovement( BrowserRecord.Movement, BrowserRecord );
+ BrowserRecord.Movement := '';
+ end else if threadItem.UnRead then begin
+ threadItem.UnRead := False;
+ threadItem.ParentBoard.UnRead := ThreadItem.ParentBoard.UnRead - 1;
+ if threadItem.ParentBoard.UnRead < 0 then threadItem.ParentBoard.UnRead := 0;
+ TreeView.Refresh;
+ BrowserMovement( 'new', BrowserRecord );
+ ListView.Refresh;
+ end else if threadItem.ScrollTop <> 0 then begin
+ try
+ doc := Idispatch( OleVariant( BrowserRecord.Browser.ControlInterface ).Document ) as IHTMLDocument2;
+ doc.Body.ScrollTop := threadItem.ScrollTop;
+ except
+ on E: Exception do
+ MsgBox(Handle, E.Message, 'SetContent[ScrollTop<-]', 0);
+ end;
+ end;
+ end;
end;
end;
procedure TGikoForm.ActiveLogDeleteActionExecute(Sender: TObject);
const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+ DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
DEL_TITLE = '\8dí\8f\9c\8am\94F';
var
idx: Integer;
end;
end;
-procedure TGikoForm.MoveToURL(URL: string);
-
+procedure TGikoForm.MoveToURL(const inURL: string);
var
protocol, host, path, document, port, bookmark : string;
- URL2, protocol2, host2, path2, document2, port2, bookmark2 : string;
+ URL, protocol2, host2, path2, document2, port2, bookmark2 : string;
tmp1, tmp2: string;
BBSID, BBSKey: string;
- Board: TBoard;
+ tmpBoard, Board: TBoard;
ThreadItem: TThreadItem;
i, bi : Integer;
boardURL : string;
// boardNode : TTreeNode;
shiftDown : Boolean;
ctrlDown : Boolean;
+ stRes, edRes : Int64;
+ browserRec : TBrowserRecord;
begin
- GikoSys.ParseURI( URL, protocol, host, path, document, port, bookmark );
- GikoSys.Parse2chURL( URL, path, document, BBSID, BBSKey );
+ GikoSys.ParseURI( inURL, protocol, host, path, document, port, bookmark );
+ GikoSys.Parse2chURL( inURL, path, document, BBSID, BBSKey );
shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
- ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
- if shiftDown then begin
- GikoSys.OpenBrowser(URL, gbtUserApp);
- Exit;
- end else if ctrlDown then begin
- GikoSys.OpenBrowser(URL, gbtIE);
- Exit;
+ ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
+ if shiftDown then begin
+ GikoSys.OpenBrowser(inURL, gbtUserApp);
+ Exit;
+ end else if ctrlDown then begin
+ GikoSys.OpenBrowser(inURL, gbtIE);
+ Exit;
end;
//===== \83v\83\89\83O\83C\83\93
bi := High( BoardPlugIns );
for i := Low( BoardPlugIns ) to bi do begin
if Assigned( Pointer( BoardPlugIns[ i ].Module ) ) then begin
- case BoardPlugIns[ i ].AcceptURL( URL ) of
+ case BoardPlugIns[ i ].AcceptURL( inURL ) of
atThread:
begin
- tmpThread := TThreadItem.Create( BoardPlugIns[ i ], URL );
+ tmpThread := TThreadItem.Create( BoardPlugIns[ i ], inURL );
boardURL := tmpThread.BoardPlugIn.GetBoardURL( DWORD( tmpThread ) );
Board := BBSsFindBoardFromURL( boardURL );
if Board = nil then begin
+ //break;
// \81¦\8dì\82Á\82Ä\82à\92Ç\89Á\82·\82é\82Æ\82±\82ë\82ª\96³\82¢\82Ì\82Å\8c\83\82µ\82\95Û\97¯
- //GikoSys.OpenBrowser(URL, gbtUserApp);
+ //GikoSys.OpenBrowser(inURL, gbtUserApp);
//Exit;
{
Board := GikoSys.GetUnknownBoard( tmpThread.BoardPlugIn, boardURL );
GikoSys.ReadSubjectFile( Board );
Exit;
end;
- end;
-
- ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
- if ThreadItem = nil then begin
- ThreadItem := tmpThread;
- Board.Insert( 0, ThreadItem );
- if ActiveList is TBoard then begin
- if TBoard(ActiveList) = Board then
- ListView.Items.Count := ListView.Items.Count + 1;
- end;
- InsertBrowserTab( ThreadItem );
- DownloadContent( ThreadItem );
- Exit;
- end else begin
- tmpThread.Free;
- InsertBrowserTab( ThreadItem );
- if not ThreadItem.IsLogFile then begin
+ ThreadItem := Board.FindThreadFromFileName( tmpThread.FileName );
+ if ThreadItem = nil then begin
+ ThreadItem := tmpThread;
+ Board.Insert( 0, ThreadItem );
+ if ActiveList is TBoard then begin
+ if TBoard(ActiveList) = Board then
+ ListView.Items.Count := ListView.Items.Count + 1;
+ end;
+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+ browserRec := InsertBrowserTab( ThreadItem );
+ if (browserRec <> nil) and (stRes > 0) then
+ browserRec.Movement := IntToStr( stRes );
DownloadContent( ThreadItem );
+ Exit;
+ end else begin
+ tmpThread.Free;
+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+ browserRec := InsertBrowserTab( ThreadItem );
+ if ThreadItem.IsLogFile then begin
+ if (browserRec <> nil) and (stRes > 0) then
+ BrowserMovement( IntToStr( stRes ), browserRec );
+ end else begin
+ if (browserRec <> nil) and (stRes > 0) then
+ browserRec.Movement := IntToStr( stRes );
+ DownloadContent( ThreadItem );
+ end;
+ Exit;
end;
- Exit;
end;
-
- //Exit;
end;
atBoard:
begin
- Board := BBSsFindBoardFromURL( URL );
+ tmpBoard := TBoard.Create(BoardPlugIns[ i ], inURL);
+ Board := BBSsFindBoardFromURL( tmpBoard.URL );
+ tmpBoard.Free;
if Board <> nil then begin
if FActiveBBS <> Board.ParentCategory.ParenTBBS then
ShowBBSTree( Board.ParentCategory.ParenTBBS );
if (Length( Trim(BBSKey) ) > 0) and (Length( Trim(BBSID) ) > 0) then begin
- boardURL := GikoSys.Get2chThreadURL2BoardURL( URL );
+ boardURL := GikoSys.Get2chThreadURL2BoardURL( inURL );
Board := BBSsFindBoardFromURL( boardURL );
if Board = nil then
Board := BBSsFindBoardFromBBSID( BBSID );
end;
if Board = nil then begin
// \93ü\82é\82×\82«\94Â\82ª\8c©\82Â\82©\82ç\82È\82©\82Á\82½\82Ì\82Å\81A\95\81\92Ê\82Ì\83u\83\89\83E\83U\82Å\8aJ\82
- GikoSys.OpenBrowser(URL, gbtUserApp);
+ GikoSys.OpenBrowser(inURL, gbtUserApp);
Exit;
end else begin
// \8aO\95\94\82Ì\94Â\82È\82Ì\82É2ch\82ÌURL\82É\82³\82ê\82Ä\82µ\82Ü\82Á\82½\93z\82ð\82±\82±\82Å\8am\94F\82·\82é
- URL2 := Board.URL;
- GikoSys.ParseURI(URL2 , protocol2, host2, path2, document2, port2, bookmark2 );
+ URL := Board.URL;
+ GikoSys.ParseURI(URL , protocol2, host2, path2, document2, port2, bookmark2 );
tmp1 := Copy(host, AnsiPos('.', host) + 1, Length(host));
tmp2 := Copy(host2, AnsiPos('.', host2) + 1, Length(host2));
- if (tmp1 <> tmp2) then begin
- GikoSys.OpenBrowser(URL, gbtUserApp);
+ if ( not GikoSys.Is2chHost(tmp1)) and (tmp1 <> tmp2) then begin
+ GikoSys.OpenBrowser(inURL, gbtUserApp);
Exit;
end;
end;
if not Board.IsThreadDatRead then
GikoSys.ReadSubjectFile(Board);
- URL := GikoSys.Get2chBrowsableThreadURL( URL );
+ URL := GikoSys.Get2chBrowsableThreadURL( inURL );
ThreadItem := Board.FindThreadFromURL( URL );
//\81@\89ß\8b\8e\83\8d\83O\91q\8cÉ\82©\82ç\81A\83_\83E\83\\82µ\82½\83X\83\8c\82ª\94\8c©\82Å\82«\82È\82¢\82Ì\82Å\82±\82±\82Å\92T\82·\82æ\82¤\82É\82·\82é (2004/01/22)
if ThreadItem = nil then begin
{shiftDown := GetAsyncKeyState(VK_SHIFT) = Smallint($8001);
ctrlDown := GetAsyncKeyState(VK_CONTROL) = Smallint($8001);
if shiftDown then
- GikoSys.OpenBrowser(URL, gbtUserApp)
+ GikoSys.OpenBrowser(URL1, gbtUserApp)
else if ctrlDown then
- GikoSys.OpenBrowser(URL, gbtIE)
+ GikoSys.OpenBrowser(URL1, gbtIE)
else begin
}
ThreadItem := TThreadItem.Create( nil, URL );
if TBoard(ActiveList) = Board then
ListView.Items.Count := ListView.Items.Count + 1;
end;
- InsertBrowserTab(ThreadItem);
+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+ browserRec := InsertBrowserTab(ThreadItem);
+ if (browserRec <> nil) and (stRes > 0) then
+ browserRec.Movement := IntToStr( stRes );
DownloadContent(ThreadItem);
{end;}
end else begin
- if ThreadItem.IsLogFile then
- InsertBrowserTab(ThreadItem)
- else begin
+ if ThreadItem.IsLogFile then begin
+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+ browserRec := InsertBrowserTab(ThreadItem);
+ if (browserRec <> nil) and (stRes > 0) then
+ browserRec.Movement := IntToStr( stRes );
+ end else begin
if AnsiPos(Host, Board.URL) = 0 then
ThreadItem.DownloadHost := Host
else
ThreadItem.DownloadHost := '';
- InsertBrowserTab(ThreadItem);
+ GikoSys.GetPopupResNumber( inURL, stRes, edRes );
+ browserRec := InsertBrowserTab(ThreadItem);
+ if (browserRec <> nil) and (stRes > 0) then
+ browserRec.Movement := IntToStr( stRes );
DownloadContent(ThreadItem);
end;
end;
end else begin
- Board := BBSsFindBoardFromURL( URL );
+ Board := BBSsFindBoardFromURL( inURL );
if Board = nil then begin
- GikoSys.OpenBrowser(URL, gbtAuto);
+ GikoSys.OpenBrowser(inURL, gbtAuto);
end else begin
if FActiveBBS <> Board.ParentCategory.ParenTBBS then
ShowBBSTree( Board.ParentCategory.ParenTBBS );
end;
procedure TGikoForm.WndProc(var Message: TMessage);
+var
+ senderBrowser : TWebBrowser;
+ url : OleVariant;
begin
try
case Message.Msg of
OnMinimized;
USER_SETLINKBAR:
SetLinkBar;
+ USER_DOCUMENTCOMPLETE:
+ if (Message.WParam <> 0) and
+ (TObject(Message.WParam) is TWebBrowser) then begin
+ senderBrowser := TWebBrowser( Message.WParam );
+ BrowserDocumentComplete( senderBrowser, senderBrowser.Parent, url );
+ end;
end;
inherited;
j: Integer;
ToolButton: TLinkToolButton;
MenuItem: TMenuItem;
- oldIgnoreResize : Boolean;
+ oldIgnoreResize : TResizeType;
begin
oldIgnoreResize := FIsIgnoreResize;
- FIsIgnoreResize := True;
+ FIsIgnoreResize := rtResizing;
MainCoolBar.Bands.BeginUpdate;
try
LinkBarPopupMenu.Items.Clear;
if FDropSpaceNode <> nil then
FDropSpaceNode.Free;
- FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObject(Node.Parent, '', nil );
+ FDropSpaceNode := FavoriteDM.TreeView.Items.AddChildObjectFirst(Node.Parent, '', nil );
FDropSpaceNode.MoveTo( Node, naInsert );
FDropSpaceNode.ImageIndex := -1;
FDropSpaceNode.SelectedIndex := -1;
end;
end;
// \90Ý\92è
- lResult := SendMessage( bar.Handle, RB_SETBANDINFO, i, Integer( pBandInfo ) );
+ lResult := SendMessage( bar.Handle, RB_SETBANDINFO, idx, Integer( pBandInfo ) );
end;
var
Wnd: THandle;
delta: Integer;
-// msg: TMessage;
+// browserPos : TPoint;
const
ICON_SIZE = 16;
begin
- Handled := False;
- Wnd := WindowFromPoint(MousePos);
+ Wnd := WindowFromPoint(Mouse.CursorPos);
Handled := True;
if WheelDelta > 0 then
Delta := -1
if (Wnd = BrowserTab.Handle) or
(Wnd = BrowserTab.Parent.Handle) then begin
BrowserTab.ScrollTabs(Delta);
- end else if Wnd = ListView.Handle then begin
- if ListView.ViewStyle = vsList then
- ListView.Scroll( Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE, 0 )
- else
- ListView.Scroll( 0, Delta * Mouse.WheelScrollLines * Abs( ListView.Font.Height ) + Delta * ICON_SIZE );
end else begin
- Handled := False;
+ if FIsHandledWheel then begin
+ FIsHandledWheel := False;
+ Handled := False;
+ end else begin
+ FIsHandledWheel := True;
+ if (Wnd = TreeView.Handle) or (Wnd = FavoriteTreeView.Handle)
+ or (Wnd = ListView.Handle) or (Wnd = MessageListView.Handle)
+ then
+ SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
+ else
+ Handled := False;
+
+{
+// if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
+ // TWebBrowser \82Ì Handle \82Æ\94ä\8ar\82µ\82Ä\82à\88ê\92v\82µ\82È\82¢\82Ì\82Å\8dÀ\95W\82Å TWebBrowser \82©\82Ç\82¤\82©\94»\92è
+ browserPos.X := 0;
+ browserPos.Y := 0;
+ Windows.ClientToScreen( Browser.Handle, browserPos );
+ if (Longword(Mouse.CursorPos.X - browserPos.X) >= Browser.Width)
+ or (Longword(Mouse.CursorPos.Y - browserPos.Y) >= Browser.Height)
+ or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0)
+ or (Longword(Mouse.CursorPos.Y - browserPos.Y) < 0) then begin
+// or not FActiveContent.Browser.Focused then
+ // TWebBrowser \82Í\96³\8cÀ\83\8b\81[\83v\82·\82é\82Ì\82Å\82»\82ê\88È\8aO\82È\82ç\83R\83\93\83g\83\8d\81[\83\8b\82É\91\97\90M
+ if (Wnd <> BrowserToolBar.Handle) and (Wnd <> BrowserNameToolBar.Handle) then
+ SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (Mouse.CursorPos.X shl 16) or Mouse.CursorPos.Y )
+ else
+ Handled := False;
+ end else begin
+ Handled := False;
+ end;
+// end else begin
+// SendMessage( Wnd, WM_MOUSEWHEEL, WheelDelta shl 16, (MousePos.X shl 16) or MousePos.Y );
+// end;
+} end;
end;
end;
ModifySelectList;
end else if Length( SelectComboBox.Text ) = 0 then
begin
- AllItemAction.Checked := True;
- LogItemAction.Checked := False;
- NewItemAction.Checked := False;
+ {* SelectComboBox.Text\82ª\8bó\82Å\82à\81A\93ü\97Í\93r\92\86\82ÅEsc\82µ\82½\82Æ\82©
+ * \8bó\82Ì\82Æ\82«\82ÉDel\83L\81[\82ð\89\9f\82µ\82½\82Æ\82©\82È\82Ì\82Å\81A\83X\83\8c\82Ì\8di\8d\9e\82Ý\82ð\88Û\8e\9d\82·\82é\81B
+ * \81i\82±\82±\82Å\82Í\89½\82à\82µ\82È\82¢\81j
+ *}
end else begin
// \83`\83\89\82Â\82\82Æ\8c\99\82¾\82©\82ç\81A\88ê\89\9e\89\9f\82µ\82Ä\82 \82é\82Æ\82«\82¾\82¯\8f\88\97\9d\82·\82é
if AllItemAction.Checked then
SelectResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
end;
-procedure TGikoForm.FormKeyUp(Sender: TObject; var Key: Word;
- Shift: TShiftState);
-begin
-end;
-
// \91S\82Ä\82Ì\83\8c\83X\82ð\95\\8e¦
procedure TGikoForm.AllResActionExecute(Sender: TObject);
var
procedure TGikoForm.FavoriteTreeViewKeyDown(Sender: TObject; var Key: Word;
Shift: TShiftState);
begin
-
- Case Key of
- VK_F2:
- begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewRenameActionExecute( Sender );
- end;
- VK_DELETE:
- begin
- FClickNode := FavoriteTreeView.Selected;
- FavoriteTreeViewDeleteActionExecute( Sender );
- end;
- VK_RETURN:
- begin
- FavoriteClick( FavoriteTreeView.Selected );
- FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
+ if not TTreeView(Sender).IsEditing then begin
+ Case Key of
+ VK_F2:
+ begin
+ FClickNode := FavoriteTreeView.Selected;
+ FavoriteTreeViewRenameActionExecute( Sender );
+ end;
+ VK_DELETE:
+ begin
+ FClickNode := FavoriteTreeView.Selected;
+ FavoriteTreeViewDeleteActionExecute( Sender );
+ end;
+ VK_RETURN:
+ begin
+ FavoriteClick( FavoriteTreeView.Selected );
+ FavoriteTreeView.Selected.Expanded := not FavoriteTreeView.Selected.Expanded;
+ end;
+ VK_SPACE:
+ FavoriteTreeViewDblClick( Sender );
end;
- VK_SPACE:
- FavoriteTreeViewDblClick( Sender );
end;
end;
procedure TGikoForm.FavoriteTreeViewLogDeleteActionExecute(
Sender: TObject);
const
- DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
+ DEL_MSG = '\81g^0\81h\82Ì\83\8d\83O\82ð\8dí\8f\9c\82µ\82Ü\82·\81B\82æ\82ë\82µ\82¢\82Å\82·\82©\81H';
DEL_TITLE = '\8dí\8f\9c\8am\94F';
var
ThreadItem: TThreadItem;
ThreadItem := FavThread.Item;
try
- s := ThreadItem.URL + #13#10 + ThreadItem.Title + #13#10;
+ s := ThreadItem.Title + #13#10 + ThreadItem.URL + #13#10;
if s <> '' then
Clipboard.AsText := s;
finally
GikoSys.ReadSubjectFile(Board);
try
- s := Board.URL + #13#10 + Board.Title + #13#10;
+ s := Board.Title + #13#10 + Board.URL + #13#10;
if s <> '' then
Clipboard.AsText := s;
finally
begin
if FDragWFirst <> true then begin
FDragWFirst := false;
- end else if (X = FMouseDownPos.X) and (Y = FMouseDownPos.Y) then begin
+{
+ end else if (abs( X - FMouseDownPos.X ) < Mouse.DragThreshold)
+ and (abs( Y - FMouseDownPos.Y ) < Mouse.DragThreshold) then begin
+(*}
+ end else begin
+//*)
if GikoSys.Setting.ListOrientation = gloHorizontal then begin
if GikoSys.Setting.ListWidthState = glsMin then begin
BrowserMaxAndFocusAction.Execute;
procedure TGikoForm.SetListViewBackGroundColor(value: TColor);
begin
if FListViewBackGroundColor <> value then begin
- FListViewBackGroundColor := value;
- ListView.Color := FListViewBackGroundColor;
- end;
+ FListViewBackGroundColor := value;
+ ListView.Color := FListViewBackGroundColor;
+ end;
end;
procedure TGikoForm.ExportFavoriteFileBeforeExecute(Sender: TObject);
begin
end;
procedure TGikoForm.TabFileURLReplace(oldURLs: TStringList; newURLs: TStringList);
-begin
- //RoundList.URLReplace(oldURLs, newURLs);
+var
+ i: Integer;
+ j: Integer;
+ tempString: string;
+ tmpURL: string;
+ oldHost: string;
+ oldBoardName: string;
+ newHost: string;
+ newBoardName: string;
+ TabList: TStringList;
+begin
+ TabList := TStringList.Create;
+ if oldURLs.Count <> newURLs.Count then
+ Exit;
+ //\82±\82±\82©\82ç\81ABoard\82ÌURL\82Ì\95Ï\8dX
+ for j :=0 to oldURLs.Count - 1 do begin
+ for i :=0 to TabList.Count - 1 do begin
+ if TabList.Text = oldURLs[j] then
+ TabList.Text := newURLs[j];
+ end;
+ end;
+ //\82±\82±\82Ü\82Å\81ABoard\82ÌURL\82Ì\95Ï\8dX
+
+ //\82±\82±\82©\82ç\81AThread\82ÌURL\82Ì\95Ï\8dX
+ //\96Ê\93|\82¾\82¯\82Çthread\82Í\82»\82ê\82¼\82êURL\82ð\83`\83\83\83b\83N\82µ\82È\82ª\82ç\82â\82Á\82Ä\82©\82È\82«\82á\82¢\82¯\82È\82¢\81B
+ for i := 0 to oldURLs.Count - 1 do begin
+ tmpURL := Copy(oldURLs[i], 1, Length(oldURLs[i]) -1);
+ oldHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+ oldBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+ tmpURL := Copy(newURLs[i], 1, Length(newURLs[i]) -1);
+ newHost := Copy(tmpURL, 1, LastDelimiter('/', tmpURL) );
+ newBoardName := Copy(tmpURL, LastDelimiter('/', tmpURL), Length(tmpURL) ) + '/';
+
+ for j := 0 to TabList.Count - 1 do begin
+ tempString := TabList.Text;
+ if ( AnsiPos(oldBoardName, tempString) <> 0 ) and ( AnsiPos(oldHost, tempString ) <> 0 ) then begin
+ tempString := StringReplace(tempString, oldHost, newHost,[]);
+ TabList.Text := tempString;
+ end;
+ end;
end;
+ //\82±\82±\82Ü\82Å\81AThread\82ÌURL\82Ì\95Ï\8dX
-// \8dÅ\8f¬\89»\82³\82ê\82é
+end;
+
+/// \8dÅ\8f¬\89»\82³\82ê\82é
procedure TGikoForm.OnMinimize;
begin
- FIsMinimize := mtMinimizing;
- if FActiveContent <> nil then
+ if FActiveContent <> nil then begin
+ FIsMinimize := mtMinimizing;
FActiveContent.Thread.ScrollTop := OleVariant(IHTMLDocument2(FActiveContent.Browser.Document)).Body.ScrollTop;
- PostMessage( Handle, USER_MINIMIZED, 0, 0 );
+ end;
end;
-// \8dÅ\8f¬\89»\82³\82ê\82½
+/// \8dÅ\8f¬\89»\82³\82ê\82½ (OnResized \82©\82ç\8cÄ\82Î\82ê\82é)
procedure TGikoForm.OnMinimized;
begin
FIsMinimize := mtMinimized;
- FIsIgnoreResize := False;
end;
procedure TGikoForm.CoolBarResized(Sender: TObject; CoolBar: TCoolBar);
affectedBand : TCoolBand;
i : Integer;
begin
- if (FOldFormWidth = Width) and not IsIconic( Handle ) and not FIsIgnoreResize then begin
- FIsIgnoreResize := True;
+ if (FOldFormWidth = Width) and not IsIconic( Handle ) and (FIsIgnoreResize = rtNone) then begin
+ FIsIgnoreResize := rtResizing;
PostMessage( Handle, USER_RESIZED, 0, 0 );
if not (Sender is TToolBar) or (CoolBar = nil) then
Exit;
end;
// TreeView \82ª\83N\83\8a\83b\83N\82³\82ê\82½
procedure TGikoForm.TreeClick( Node : TTreeNode );
-var
- i: Integer;
begin
if Node = nil then
Exit;
end;
- if GetActiveList is TBBS then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BBSColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TCategory then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.CategoryColumnWidth[i] := ListView.Column[i].Width;
- end else if GetActiveList is TBoard then begin
- for i := 0 to ListView.Columns.Count - 1 do
- GikoSys.Setting.BoardColumnWidth[i] := ListView.Column[i].Width;
- end;
+ ActiveListColumnSave;
if TObject(Node.Data) is TBBS then begin
SetActiveList(Node.data);
// \83M\83R\83i\83r\82Ì\83\81\83b\83Z\81[\83W\83\8b\81[\83v\82ð\89¡\8eæ\82è\82µ\82Ü\82·
procedure TGikoForm.HandleAppMessage(var Msg: TMsg; var Handled: Boolean);
-
//var
// key : Word;
begin
procedure TGikoForm.MessagePanelResize(Sender: TObject);
begin
- if FIsIgnoreResize then
+ if FIsIgnoreResize <> rtNone then
Exit;
if GikoSys.Setting.ListOrientation = gloVertical then begin
end;
procedure TGikoForm.OnResized;
+var
+ doc : Variant;
begin
FOldFormWidth := Width;
- FIsIgnoreResize := False;
+ FIsIgnoreResize := rtNone;
+
+ case FIsMinimize of
+ mtMinimizing:
+ begin
+ // \8dÅ\8f¬\89»\92\86\82Å\82 \82é
+ PostMessage( Handle, USER_MINIMIZED, 0, 0 );
+ end;
+
+ mtMinimized:
+ begin
+ // \8dÅ\8f¬\89»\82Í\8aù\82É\8a®\97¹\82µ\82Ä\82¢\82é (\82Â\82Ü\82è\83^\83X\83N\83o\81[\82©\82ç\83E\83B\83\93\83h\83E\82ð\95\9c\8c³\92\86)
+ if FActiveContent <> nil then begin
+ doc := Idispatch( olevariant(FActiveContent.Browser.ControlInterface).Document) as IHTMLDocument2;
+ doc.Body.ScrollTop := FActiveContent.Thread.ScrollTop;
+ end;
+ FIsMinimize := mtNone;
+ end;
+ end;
end;
Self.FEvent.Free;
if Self.FBrowser <> nil then begin
if Self.Thread <> nil then begin
- doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
- Self.Thread.ScrollTop := doc.Body.ScrollTop;
+ //\83^\83u\82Ì\95\9c\8c³\82Å\95\9c\8c³\82³\82ê\82½\83X\83\8c\82Í\81A\95`\89æ\82³\82ê\82Ä\82¢\82È\82¢\82Æ\82«\82ª\82 \82é\82Ì\82Å
+ //\82»\82Ì\82Æ\82«\82Ì\83X\83N\83\8d\81[\83\8b\97Ê\82ð\95Û\91¶\82µ\82Ä\82µ\82Ü\82¤\82Æ\83g\83b\83v\82É\96ß\82Á\82Ä\82µ\82Ü\82¤\81B
+ if Self.FBrowser.OleObject.Document.documentElement.innerText <> '' then begin
+ doc := Idispatch( olevariant(Self.FBrowser.ControlInterface).Document) as IHTMLDocument2;
+ Self.Thread.ScrollTop := doc.Body.ScrollTop;
+ end;
end;
//TOleControl(Self.FBrowser).Visible := false;
ShowWindow(Self.FBrowser.Handle, SW_HIDE);
SelectListItem(List);
for i := 0 to List.Count - 1 do begin
if TObject(List[i]) is TThreadItem then begin
- TThreadItem(List[i]).UnRead := false;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
+ if (TThreadItem(List[i]).UnRead) then begin
+ TThreadItem(List[i]).UnRead := false;
+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead - 1;
+ end;
end;
end;
if TreeView.Visible then
TreeView.Refresh;
+ if ListView.Visible then
+ ListView.Refresh;
finally
List.Free;
end;
SelectListItem(List);
for i := 0 to List.Count - 1 do begin
if TObject(List[i]) is TThreadItem then begin
- TThreadItem(List[i]).UnRead := true;
- TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
+ if (TThreadItem(List[i]).IsLogFile) and (not TThreadItem(List[i]).UnRead) then begin
+ TThreadItem(List[i]).UnRead := true;
+ TThreadItem(List[i]).ParentBoard.UnRead := TThreadItem(List[i]).ParentBoard.UnRead + 1;
+ end;
end;
end;
if TreeView.Visible then
TreeView.Refresh;
+ if ListView.Visible then
+ ListView.Refresh;
finally
List.Free;
end;
var
i: Integer;
begin
- for i := 0 to BROWSER_COUNT - 1 do
+ for i := BROWSER_COUNT - 1 downto 0 do begin
SetWindowPos(TWebBrowser(FBrowsers[i]).Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
-
- if (FActiveContent <> nil) and (FActiveContent.Browser <> nil) then begin
- SetWindowPos(FActiveContent.Browser.Handle, HWND_NOTOPMOST, 0, 0, NewWidth, NewHeight, SWP_NOMOVE + SWP_NOZORDER);
end;
end;
begin
fileName := ExtractFilePath(Application.ExeName) + 'tab.sav';
URLs := TStringList.Create();
+ GikoTab := GikoSys.Setting.BrowserTabAppend;
try
try
if FileExists(fileName) then
Exit;
end;
- GikoTab := GikoSys.Setting.BrowserTabAppend;
+
GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
for i := 0 to URLs.Count - 1 do begin
item := BBSsFindThreadFromURL( URLs[ i ] );
procedure TGikoForm.TabsSaveToFileActionExecute(Sender: TObject);
var
SaveTabList: TStringList;
- Result: Boolean;
+ Result: Boolean;
begin
SaveTabList := TStringList.Create;
try
procedure TGikoForm.TabsOpenFromFileActionExecute(Sender: TObject);
var
- i, Tab : Integer;
+ i : Integer;
item : TThreadItem;
URLs : TStringList;
GikoTab: TGikoTabAppend;
begin
URLs := TStringList.Create();
+ GikoTab := GikoSys.Setting.BrowserTabAppend;
try
try
// if TabOpenDialog.Execute then begin
except
on EFOpenError do ShowMessage('\83^\83u\83t\83@\83C\83\8b\82ª\8aJ\82¯\82Ü\82¹\82ñ');
end;
- GikoTab := GikoSys.Setting.BrowserTabAppend;
+
GikoSys.Setting.BrowserTabAppend := gtpLast;//TGikoTabAppend(1);
for i := 0 to URLs.Count - 1 do begin
item := BBSsFindThreadFromURL( URLs[ i ] );
LoadTabURLs;
end;
+/// ListView \82Ì\83J\83\89\83\80\95\9d\82¨\82æ\82Ñ\88Ê\92u\82Ì\95Û\91¶
+procedure TGikoForm.ActiveListColumnSave;
+var
+ ActivListObj : TObject;
+ i, id, idx : Integer;
+ BBSOrder : TGikoBBSColumnList;
+ CategoryOrder : TGikoCategoryColumnList;
+ BoardOrder : TGikoBoardColumnList;
+begin
+
+ ActivListObj := ActiveList;
+ if ActivListObj is TBBS then begin
+ //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
+ BBSOrder := TGikoBBSColumnList.Create;
+ try
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ // \8f\87\8f\98\82Ì\8eæ\93¾
+ idx := ListView.Column[ i ].Tag;
+ id := Ord( GikoSys.Setting.BBSColumnOrder[ idx ] );
+ BBSOrder.Add( TGikoBBSColumnID( id ) );
+ // \95\9d\82Ì\95Û\91¶
+ GikoSys.Setting.BBSColumnWidth[ id ] := ListView.Column[ i ].Width;
+ end;
+ for i := 0 to ListView.Columns.Count - 1 do
+ // \8f\87\8f\98\82Ì\95Û\91¶
+ GikoSys.Setting.BBSColumnOrder[ i ] := BBSOrder[ i ];
+ finally
+ BBSOrder.Free;
+ end;
+ end else if ActivListObj is TCategory then begin
+ //===== \94Â\83\8a\83X\83g =====
+ CategoryOrder := TGikoCategoryColumnList.Create;
+ try
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ // \8f\87\8f\98\82Ì\8eæ\93¾
+ idx := ListView.Column[ i ].Tag;
+ id := Ord( GikoSys.Setting.CategoryColumnOrder[ idx ] );
+ CategoryOrder.Add( TGikoCategoryColumnID( id ) );
+ // \95\9d\82Ì\95Û\91¶
+ GikoSys.Setting.CategoryColumnWidth[ id ] := ListView.Column[ i ].Width;
+ end;
+ for i := 0 to ListView.Columns.Count - 1 do
+ // \8f\87\8f\98\82Ì\95Û\91¶
+ GikoSys.Setting.CategoryColumnOrder[ i ] := CategoryOrder[ i ];
+ finally
+ CategoryOrder.Free;
+ end;
+ end else if ActivListObj is TBoard then begin
+ //===== \83X\83\8c\83\8a\83X\83g =====
+ BoardOrder := TGikoBoardColumnList.Create;
+ try
+ for i := 0 to ListView.Columns.Count - 1 do begin
+ // \8f\87\8f\98\82Ì\8eæ\93¾
+ idx := ListView.Column[ i ].Tag;
+ id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] );
+ BoardOrder.Add( TGikoBoardColumnID( id ) );
+ // \95\9d\82Ì\95Û\91¶
+ GikoSys.Setting.BoardColumnWidth[ id ] := ListView.Column[ i ].Width;
+ end;
+ for i := 0 to ListView.Columns.Count - 1 do
+ // \8f\87\8f\98\82Ì\95Û\91¶
+ GikoSys.Setting.BoardColumnOrder[ i ] := BoardOrder[ i ];
+ finally
+ BoardOrder.Free;
+ end;
+ end;
+
+end;
+
+procedure TGikoForm.ListViewColumnRightClick(Sender: TObject;
+ Column: TListColumn; Point: TPoint);
+var
+ i, j : Integer;
+ item : TMenuItem;
+begin
+
+ // \83|\83b\83v\83A\83b\83v\83\81\83j\83\85\81[\82ð\83N\83\8a\83A
+ for i := ListColumnPopupMenu.Items.Count - 1 downto 0 do
+ ListColumnPopupMenu.Items.Items[ i ].Free;
+
+ // \83\81\83j\83\85\81[\82Ì\8dì\90¬ (\83\81\83C\83\93\83J\83\89\83\80\82Í\95K\90{\82È\82Ì\82Å\83\81\83j\83\85\81[\82É\8aÜ\82ß\82È\82¢)
+ if TObject( FActiveList ) is TBBS then begin
+
+ //===== \83J\83e\83S\83\8a\83\8a\83X\83g =====
+ for i := 1 to Length( GikoBBSColumnCaption ) - 1 do begin
+ item := TMenuItem.Create( ListColumnPopupMenu );
+ item.Caption := GikoBBSColumnCaption[ i ];
+ item.Tag := i;
+ item.OnClick := ListColumnPopupMenuOnClick;
+ for j := GikoSys.Setting.BBSColumnOrder.Count - 1 downto 0 do begin
+ if GikoSys.Setting.BBSColumnOrder[ j ] = TGikoBBSColumnID( i ) then begin
+ item.Checked := True;
+ Break;
+ end;
+ end;
+ ListColumnPopupMenu.Items.Add( item );
+ end;
+
+ end else if TObject( FActiveList ) is TCategory then begin
+
+ //===== \94Â\83\8a\83X\83g =====
+ for i := 1 to Length( GikoCategoryColumnCaption ) - 1 do begin
+ item := TMenuItem.Create( ListColumnPopupMenu );
+ item.Caption := GikoCategoryColumnCaption[ i ];
+ item.Tag := i;
+ item.OnClick := ListColumnPopupMenuOnClick;
+ for j := GikoSys.Setting.CategoryColumnOrder.Count - 1 downto 0 do begin
+ if GikoSys.Setting.CategoryColumnOrder[ j ] = TGikoCategoryColumnID( i ) then begin
+ item.Checked := True;
+ Break;
+ end;
+ end;
+ ListColumnPopupMenu.Items.Add( item );
+ end;
+
+ end else if TObject( FActiveList ) is TBoard then begin
+
+ //===== \83X\83\8c\83\8a\83X\83g =====
+ for i := 1 to Length( GikoBoardColumnCaption ) - 1 do begin
+ item := TMenuItem.Create( ListColumnPopupMenu );
+ item.Caption := GikoBoardColumnCaption[ i ];
+ item.Tag := i;
+ item.OnClick := ListColumnPopupMenuOnClick;
+ for j := GikoSys.Setting.BoardColumnOrder.Count - 1 downto 0 do begin
+ if GikoSys.Setting.BoardColumnOrder[ j ] = TGikoBoardColumnID( i ) then begin
+ item.Checked := True;
+ Break;
+ end;
+ end;
+ ListColumnPopupMenu.Items.Add( item );
+ end;
+
+ end;
+
+ // \83\81\83j\83\85\81[\82Ì\95\\8e¦
+ Point := ListView.ClientToScreen( Point );
+ if ListColumnPopupMenu.Items.Count > 0 then
+ ListColumnPopupMenu.Popup( Point.X, Point.Y );
+
+end;
+
+/// ListColumnPopupMenu \83A\83C\83e\83\80\82Ì\83N\83\8a\83b\83N\83C\83x\83\93\83g
+procedure TGikoForm.ListColumnPopupMenuOnClick( Sender : TObject );
+var
+ i : Integer;
+ orderList : TList;
+ item : TMenuItem;
+begin
+
+ if not (Sender is TMenuItem) then
+ Exit;
+
+ ActiveListColumnSave;
+ item := TMenuItem( Sender );
+
+ if TObject( FActiveList ) is TBBS then
+ orderList := GikoSys.Setting.BBSColumnOrder
+ else if TObject( FActiveList ) is TCategory then
+ orderList := GikoSys.Setting.CategoryColumnOrder
+ else if TObject( FActiveList ) is TBoard then
+ orderList := GikoSys.Setting.BoardColumnOrder
+ else
+ Exit;
+
+ if item.Checked then begin
+ // \83J\83\89\83\80\82Ì\8dí\8f\9c
+ for i := orderList.Count - 1 downto 0 do begin
+ if Integer( orderList[ i ] ) = item.Tag then begin
+ orderList.Delete( i );
+ Break;
+ end;
+ end;
+ end else begin
+ // \83J\83\89\83\80\82Ì\92Ç\89Á
+ orderList.Add( Pointer( item.Tag ) );
+ end;
+
+ SetActiveList( FActiveList );
+
+end;
+//\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82Éjump\82·\82éAction
+procedure TGikoForm.JumpToNumOfResActionExecute(Sender: TObject);
+var
+ str: string;
+ res: integer;
+begin
+ str := '1';
+ if( InputQuery('\8ew\92è\82µ\82½\94Ô\8d\86\82Ì\83\8c\83X\82É\94ò\82Ô', '\94Ô\8d\86\82ð\93ü\97Í\82µ\82Ä\82\82¾\82³\82¢', str) ) then begin
+ str := ZenToHan(str);
+ res := StrToIntDef(str, -1);
+ if (res > 0) and (res <= GetActiveContent.Count) then begin
+ BrowserMovement(IntToStr(res), FActiveContent);
+ SetFocusForBrowserAction.Execute;
+ end else if res > GetActiveContent.Count then begin
+ BrowserMovement(IntToStr(GetActiveContent.Count), FActiveContent);
+ SetFocusForBrowserAction.Execute;
+ end;
+ end;
+end;
+
+procedure TGikoForm.JumpToNumOfResActionUpdate(Sender: TObject);
+begin
+ JumpToNumOfResAction.Enabled := (GetActiveContent <> nil) and (GetActiveContent.IsLogFile);
+end;
+
+procedure TGikoForm.FavoriteTreeViewCollapseActionExecute(Sender: TObject);
+var
+ node : TTreeNode;
+begin
+
+ node := FavoriteTreeView.Items.GetFirstNode;
+ while node <> nil do begin
+ if node.HasChildren then
+ node.Expanded := False;
+ node := node.GetNext;
+ end;
+
+end;
+
initialization
OleInitialize(nil);
finalization