IdAntiFreezeBase, IdAntiFreeze, IdBaseComponent, IdComponent,
IdTCPConnection, IdTCPClient, IdHTTP, ActnList, StdActns, IdIntercept,
IdLogBase, IdLogDebug, IdException, DateUtils, MojuUtils, bmRegExp,
- GestureModel;
+ Gesture;
type
// TSetLayeredWindowAttributes = function(wnd: HWND; crKey: DWORD; bAlpha: BYTE; dwFlag: DWORD): Boolean; stdcall;
FSambaTime: TDateTime;
FHost: string;
FNow: TDateTime;
- FGestures : TGestureModel;
+ FGestures : TMouseGesture;
procedure Preview;
function RepHtml(s: string): string;
function Check: Boolean;
implementation
uses
- Giko, ItemDownload, Gesture, IdGlobal;
+ Giko, ItemDownload, IdGlobal;
const
CAPTION_NAME_NEW: string = '\83M\83R\83i\83r \83X\83\8c\97§\82Ä\83G\83f\83B\83^';
CAPTION_NAME_RES: string = '\83M\83R\83i\83r \83\8c\83X\83G\83f\83B\83^';
// \83}\83E\83X\83W\83F\83X\83`\83\83\81[\82Ì\83C\83\93\83X\83g\81[\83\8b
if GikoSys.Setting.GestureEnabled then begin
MouseGesture.UnHook;
- FGestures := TGestureModel.Create;
- FGestures.LoadGesture(
+ FGestures := TMouseGesture.Create;
+ GikoSys.Setting.Gestures.ClearGesture;
+
+ GikoSys.Setting.Gestures.LoadGesture(
GikoSys.Setting.GetGestureFileName, ActionList );
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
if ( Timer1.Enabled ) and ( FThreadItem <> nil )then
ReadSambaTime(FHost);
if GikoSys.Setting.GestureEnabled then begin
+ GikoSys.Setting.Gestures.ClearGesture;
+ GikoSys.Setting.Gestures.LoadGesture(
+ GikoSys.Setting.GetGestureFileName, ActionList );
MouseGesture.UnHook;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
begin
s := MouseGesture.GetGestureStr;
ActStr := '';
- Action := FGestures.GetGestureAction(s);
+ Action := GikoSys.Setting.Gestures.GetGestureAction(s);
if Action <> nil then
ActStr := '\81i' + Action.Caption + '\81j';
s := '\83W\83F\83X\83`\83\83\81[: ' + s + ActStr;
Action: TAction;
begin
s := MouseGesture.GetGestureStr;
- Action := FGestures.GetGestureAction(s);
+ Action := GikoSys.Setting.Gestures.GetGestureAction(s);
if Action <> nil then
Action.Execute;
StatusBar.Panels[0].Text := '';
begin
// if FActiveList <> Obj then begin
FActiveList := Obj;
- try
+ try
if ListView.Selected <> nil then
idx := ListView.Selected.Index
else
idx := -1;
- except
- idx := -1;
- end;
+ except
+ idx := -1;
+ end;
ListView.Items.Count := 0;
ListView.Items.Clear;
ListView.Selected := nil;
gvtNew: Board.NewThreadCount := Board.GetNewThreadCount;
gvtUser: Board.UserThreadCount:= Board.GetUserThreadCount;
end;
-
+
SetActiveList(Board);
//
//SetThreadListItem(Board); //SetActiveList\93à\82Å\8cÄ\82Î\82ê\82é\82©\82ç2\8fd\82É\8cÄ\82Ñ\8fo\82·\95K\97v\82È\82µ
Item.Board := Board;
Item.DownType := gdtBoard;
Item.ForceDownload := ForceDownload;
-// AbortToolButton.Enabled := True;
-// Animate.Active := True;
-// FDownload.Add(Item);
FControlThread.AddItem(Item);
-// Animate.Active := False;
-// AbortToolButton.Enabled := False;
if FWorkCount = 0 then begin
try
Animate.Active := True;
Item.ThreadItem := ThreadItem;
Item.DownType := gdtThread;
Item.ForceDownload := ForceDownload;
-// AbortToolButton.Enabled := True;
-// Animate.Active := True;
-// FDownload.Add(Item);
FControlThread.AddItem(Item);
-// Animate.Active := False;
-// AbortToolButton.Enabled := False;
if FWorkCount = 0 then begin
try
Animate.Active := True;
var
ThreadItem: TThreadItem;
shiftDown: Boolean;
- cNode : TTreeNode;
- bNode : TTreeNode;
begin
shiftDown := (ssShift in Shift);
procedure TGikoForm.UpFolderActionExecute(Sender: TObject);
begin
if GetActiveList is TBoard then begin
-//// if FTreeType = gtt2ch then
-// SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
-// //SetActiveList(TBoard(GetActiveList).ParentCategory);
- //if TreeView.Selected <> nil then begin
- // if TObject(TreeView.Selected.Parent.Data) is TCategory then
- // SelectTreeNode(TCategory(TreeView.Selected.Parent.Data), True);
- //end;
if TBoard(GetActiveList).ParentCategory <> nil then
SelectTreeNode(TBoard(GetActiveList).ParentCategory, True);
end else if GetActiveList is TCategory then begin
-// if FTreeType = gtt2ch then
- SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
- //SetActiveList(TCategory(GetActiveList).ParenTBBS);
+ SelectTreeNode(TCategory(GetActiveList).ParenTBBS, True);
end;
-// if TreeView.Selected = nil then Exit;
-// if TreeView.Selected.Level = 0 then Exit;
-// TreeView.Selected.Parent.Selected := True;
end;
procedure TGikoForm.RoundActionExecute(Sender: TObject);
idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
if idx <> -1 then
DeleteTab(TBrowserRecord(BrowserTab.Tabs.Objects[idx]));
- //end else if Button = mbRight then begin
- //PopupMenu\82ÅBrowserTabPoupMenu\82ð\8ew\92è\82µ\82Ä\82¢\82é\82Ì\82Å\82±\82±\82Å\82í\82´\82í\82´\8cÄ\82Ñ\8fo\82·\82Æ\82Q\8fd\82É\82È\82é
- //OnContextPopup\82Å\82à\82µ\82àActive\82ÈTab\88È\8aO\82Å\8cÄ\82Ñ\8fo\82³\82ê\82½\82çTab\82ð\90Ø\82è\91Ö\82¦\82é\82æ\82¤\82É\82µ\82½\81B
-{ // \83}\83E\83X\89E\83{\83^\83\93
- GetCursorPos(p);
- p2 := p;
-// GetCursorPos(p2);
- p := BrowserTab.ScreenToClient(p);
-// idx := BrowserTab.ItemAtPos(p);
- idx := BrowserTab.IndexOfTabAt(p.X, p.Y);
- if idx <> -1 then begin
- OldIndex := BrowserTab.TabIndex;
- BrowserTab.TabIndex := idx;
- if OldIndex <> idx then
- BrowserTab.OnChange(nil);
- BrowserTabPopupMenu.Tag := idx;
- BrowserTabPopupMenu.Popup(p2.X, p2.Y);
- end;
-}
- end else if BUtton = mbLeft then begin
+ end else if Button = mbLeft then begin
FDragWFirst := true;
FMouseDownPos.X := X;
FMouseDownPos.Y := Y;
try
if Dlg.ShowModal = mrOk then begin
GikoSys.SaveKeySetting(ActionList);
+ GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
GikoSys.Setting.Gestures.SaveGesture( GikoSys.Setting.GetGestureFileName );
end;
- GikoSys.SaveEditorKeySetting(Dlg.EditorForm.ActionList);
+
finally
Dlg.Release;
MouseGesture.UnHook;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
MouseGesture.OnGestureEnd := OnGestureEnd;
- if GikoSys.Setting.GestureEnabled then
+ if GikoSys.Setting.GestureEnabled then begin
+ GikoSys.Setting.Gestures.ClearGesture;
+ GikoSys.Setting.Gestures.LoadGesture(
+ GikoSys.Setting.GetGestureFileName, ActionList );
MouseGesture.SetHook( Handle );
+ end;
end;
end;
LinkToolButton := TLinkToolButton( Sender );
SenderNode := TreeNodeDataFind( FavoriteTreeView.Items.GetFirstNode, LinkToolButton.Data );
-
+ SenderNode.Selected := False;
FavoriteDragDrop( SenderNode, Source );
+ SetLinkBar;
+
end;
procedure TGikoForm.LinkToolButtonOnMouseDown(Sender: TObject; Button: TMouseButton; Shift: TShiftState; X, Y: Integer);
end;
- SetLinkBar;
+
end;
SenderNode: TTreeNode;
begin
+ SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
+ if SenderNode <> nil then begin
+ FavoriteDragDrop( SenderNode, Source );
+ end;
+
+ //\8bó\94\92\8d\80\96Ú\82ª\82¢\82½\82ç\8dí\8f\9c\82·\82é
if FDropSpaceNode <> nil then begin
try
FDropSpaceNode.Delete;
end;
end;
- SenderNode := FavoriteTreeView.GetNodeAt(X, Y);
- if SenderNode <> nil then begin
- FavoriteDragDrop( SenderNode, Source );
- end;
+ SetLinkBar;
end;
Break;
end;
end;
-
+ SenderNode.Selected := False;
+
FavoriteDragDrop( SenderNode, Source );
+ SetLinkBar;
end;
procedure TGikoForm.BrowserTabMouseUp(Sender: TObject;
if TreeView.Visible then
TreeView.Refresh;
if ListView.Visible then
- ListView.Refresh;
+ ListView.Refresh;
finally
List.Free;
end;
if TreeView.Visible then
TreeView.Refresh;
if ListView.Visible then
- ListView.Refresh;
+ ListView.Refresh;
finally
List.Free;
end;
BoardOrder := TGikoBoardColumnList.Create;
try
for i := 0 to ListView.Columns.Count - 1 do begin
- // \8f\87\8f\98\82Ì\8eæ\93¾
+ // \8f\87\8f\98\82Ì\8eæ\93¾
idx := ListView.Column[ i ].Tag;
id := Ord( GikoSys.Setting.BoardColumnOrder[ idx ] );
BoardOrder.Add( TGikoBoardColumnID( id ) );
BoardOrder.Free;
end;
end;
-
+
end;
procedure TGikoForm.ListViewColumnRightClick(Sender: TObject;
ActStr: string;
P : TPoint;
begin
- //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
+ //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
GetCursorPos(P);
- //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
+ //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
s := MouseGesture.GetGestureStr;
ActStr := '';
Action := GikoSys.Setting.Gestures.GetGestureAction(s);
var
s: string;
Action: TAction;
- Comp : TComponent;
- P : TPoint;
begin
- //\83}\83E\83X\88Ê\92u\82Ì\8eæ\93¾
- GetCursorPos(P);
- //\83R\83\93\83|\81[\83l\83\93\83g\96¼\8eæ\93¾
- //\83M\83R\83i\83r\82Ì\83t\83H\81[\83\80\8aO\81A\82à\82µ\82\82Í\81A\83R\83\93\83e\83L\83X\83g\83\81\83j\83\85\81[\8fã\82¾\82Ænil\82ª\95Ô\82é
- Comp := FindDragTarget(P, True);
- if (Comp <> nil) then begin
- s := MouseGesture.GetGestureStr;
- Action := GikoSys.Setting.Gestures.GetGestureAction(s);
- if Action <> nil then
- Action.Execute;
- StatusBar.Panels[1].Text := '';
- end;
+ s := MouseGesture.GetGestureStr;
+ Action := GikoSys.Setting.Gestures.GetGestureAction(s);
+ if Action <> nil then
+ Action.Execute;
+ StatusBar.Panels[1].Text := '';
end;
procedure TGikoForm.ListViewCustomDrawItem(Sender: TCustomListView;
procedure TGikoForm.FormActivate(Sender: TObject);
begin
if GikoSys.Setting.GestureEnabled then begin
+ GikoSys.Setting.Gestures.ClearGesture;
+ GikoSys.Setting.Gestures.LoadGesture(
+ GikoSys.Setting.GetGestureFileName, ActionList );
MouseGesture.UnHook;
MouseGesture.OnGestureStart := OnGestureStart;
MouseGesture.OnGestureMove := OnGestureMove;
if Pos( '?', Copy( AText, wkInt, MaxInt ) ) = 0 then
// Text \82à PATH_INFO \93n\82µ
Result := Result + Copy( AText, LastDelimiter( '/', AText ) + 1, MaxInt )
- else
- // Text \82Í QUERY_STRING \93n\82µ
- Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
- end else begin
- // Thread.URL \82Í QUERY_STRING \93n\82µ
- Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
- wkInt := LastDelimiter( '/', AText );
- 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( AText, 1, wkInt - 1 ) );
- wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
- Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt );
- end else begin
- // Text \82à QUERY_STRING \93n\82µ
- Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt )
- end;
- end;
- end else if Pos('about:blank/bbs/', AText) = 1 then begin
- //\82µ\82½\82ç\82ÎJBBS\82Ì\8ed\95Ï\82Ì\8bz\8eû
- AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
- Result := GetRespopupURL(AText, AThreadURL);
- end else begin
- Result := AText;
- end;
+ else
+ // Text \82Í QUERY_STRING \93n\82µ
+ Result := Result + Copy( AText, LastDelimiter( '?', AText ) + 1, MaxInt );
+ end else begin
+ // Thread.URL \82Í QUERY_STRING \93n\82µ
+ Result := Copy( AThreadURL, 1, LastDelimiter( '?', AThreadURL ) );
+ wkInt := LastDelimiter( '/', AText );
+ 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( AText, 1, wkInt - 1 ) );
+ wkInt := LastDelimiter( '/', Copy( AText, 1, wkInt - 1 ) );
+ Result := Copy( Result, 1, Length( Result ) - 1 ) + Copy( AText, wkInt, MaxInt );
+ end else begin
+ // Text \82à QUERY_STRING \93n\82µ
+ Result := Result + Copy( Text, LastDelimiter( '?', AText ) + 1, MaxInt )
+ end;
+ end;
+ end else if Pos('about:blank/bbs/', AText) = 1 then begin
+ //\82µ\82½\82ç\82ÎJBBS\82Ì\8ed\95Ï\82Ì\8bz\8eû
+ AText := CustomStringReplace(AText, 'about:blank/bbs/', 'about:blank../../bbs/');
+ Result := GetRespopupURL(AText, AThreadURL);
+ end else begin
+ Result := AText;
+ end;
end;
//ListView\82Ì\91I\91ð\8fó\91Ô\82ð\89ð\8f\9c\82·\82é
procedure TGikoForm.FavoriteTreeViewEditing(Sender: TObject;
Node: TTreeNode; var AllowEdit: Boolean);
begin
- //\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ\82ð\88ê\8e\9e\95Û\91¶\82·\82é
+ //\95Ò\8fW\91O\82Ì\95¶\8e\9a\97ñ\82ð\88ê\8e\9e\95Û\91¶\82·\82é
FOrigenCaption := Node.Text;
end;
//\97á\8aO\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO\82ð\8f\88\97\9d\82·\82é
MsgBox(Handle, s, '\8f\88\97\9d\82³\82ê\82È\82©\82Á\82½\97á\8aO', MB_OK or MB_ICONSTOP);
end;
+
initialization
OleInitialize(nil);
finalization
ListItem.SubItems.Add(ShortCutToText(TAction(EditorForm.ActionList.Actions[i]).ShortCut));
ListItem.ImageIndex := TAction(EditorForm.ActionList.Actions[i]).ImageIndex;
ListItem.SubItems.Add( GikoSys.Setting.Gestures.GetActionGesture(
- TAction( GikoForm.ActionList.Actions[i] ) ) );
+ TAction( EditorForm.ActionList.Actions[i] ) ) );
KeyItem := TKeySettingItem.Create;
KeyItem.Action := TAction(EditorForm.ActionList.Actions[i]);
KeyItem.ShortCut := TAction(EditorForm.ActionList.Actions[i]).ShortCut;
KeyItem.Gesture := GikoSys.Setting.Gestures.GetActionGesture(
- TAction( GikoForm.ActionList.Actions[i] ) );
+ TAction( EditorForm.ActionList.Actions[i] ) );
ListItem.Data := KeyItem;
end;
end;
ERR_MSG = '\93ü\97Í\82µ\82½\83W\83F\83X\83`\83\83\81[\82Í\8aù\82É\8eg\97p\82³\82ê\82Ä\82¢\82Ü\82·';
ERR_TITLE = '\83G\83\89\81[';
var
- i: Integer;
+ i, j: Integer;
Item: TListItem;
KeyItem: TKeySettingItem;
ActiveListView: TListView;
+ chechList : TListView;
begin
if PageControl1.ActivePage.TabIndex <> 0 then
ActiveListView := ListView1
end;
// \8c»\8dÝ\91I\91ð\82³\82ê\82Ä\82¢\82éAction\88È\8aO\82Å\93¯\82¶\83W\83F\83X\83`\83\83\81[\82ª\82 \82ê\82Î\83G\83\89\81[\82Æ\82·\82é
- for i := 0 to ActiveListView.Items.Count - 1 do begin
- if ActiveListView.Selected = ActiveListView.Items[i] then
- Continue;
- Item := ActiveListView.Items[i];
- if TObject(Item.Data) is TKeySettingItem then begin
- KeyItem := TKeySettingItem(Item.Data);
- if (GestureEdit.Text <> GUESTURE_NOTHING)
- and (KeyItem.Gesture = GestureEdit.Text) then begin
- MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP);
- HotKey.SetFocus;
- Exit;
+ chechList := ListView;
+ for j := 0 to 1 do begin
+ if j <> 0 then begin
+ chechList := ListView1;
+ end;
+
+ for i := 0 to chechList.Items.Count - 1 do begin
+ if ActiveListView.Selected = chechList.Items[i] then
+ Continue;
+ Item := chechList.Items[i];
+ if TObject(Item.Data) is TKeySettingItem then begin
+ KeyItem := TKeySettingItem(Item.Data);
+ if (GestureEdit.Text <> GUESTURE_NOTHING)
+ and (KeyItem.Gesture = GestureEdit.Text) then begin
+ MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP);
+ HotKey.SetFocus;
+ Exit;
+ end;
end;
end;
end;
+
// \83W\83F\83X\83`\83\83\81[\90Ý\92è
if TObject(ActiveListView.Selected.Data) is TKeySettingItem then begin
KeyItem := TKeySettingItem(ActiveListView.Selected.Data);