Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/KeySetting.pas

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.8 by h677, Sat Jun 25 11:27:21 2005 UTC revision 1.8.2.1 by h677, Sun Aug 7 16:04:03 2005 UTC
# Line 119  begin Line 119  begin
119                                  ListItem.SubItems.Add(ShortCutToText(TAction(EditorForm.ActionList.Actions[i]).ShortCut));                                  ListItem.SubItems.Add(ShortCutToText(TAction(EditorForm.ActionList.Actions[i]).ShortCut));
120                                  ListItem.ImageIndex := TAction(EditorForm.ActionList.Actions[i]).ImageIndex;                                  ListItem.ImageIndex := TAction(EditorForm.ActionList.Actions[i]).ImageIndex;
121                                  ListItem.SubItems.Add( GikoSys.Setting.Gestures.GetActionGesture(                                  ListItem.SubItems.Add( GikoSys.Setting.Gestures.GetActionGesture(
122                                          TAction( GikoForm.ActionList.Actions[i] ) ) );                                          TAction( EditorForm.ActionList.Actions[i] ) ) );
123                                  KeyItem := TKeySettingItem.Create;                                  KeyItem := TKeySettingItem.Create;
124                                  KeyItem.Action := TAction(EditorForm.ActionList.Actions[i]);                                  KeyItem.Action := TAction(EditorForm.ActionList.Actions[i]);
125                                  KeyItem.ShortCut := TAction(EditorForm.ActionList.Actions[i]).ShortCut;                                  KeyItem.ShortCut := TAction(EditorForm.ActionList.Actions[i]).ShortCut;
126                                  KeyItem.Gesture := GikoSys.Setting.Gestures.GetActionGesture(                                  KeyItem.Gesture := GikoSys.Setting.Gestures.GetActionGesture(
127                                          TAction( GikoForm.ActionList.Actions[i] ) );                                          TAction( EditorForm.ActionList.Actions[i] ) );
128                                  ListItem.Data := KeyItem;                                  ListItem.Data := KeyItem;
129                          end;                          end;
130                  end;                  end;
# Line 285  const Line 285  const
285          ERR_MSG = '入力したジェスチャーは既に使用されています';          ERR_MSG = '入力したジェスチャーは既に使用されています';
286          ERR_TITLE = 'エラー';          ERR_TITLE = 'エラー';
287  var  var
288          i: Integer;          i, j: Integer;
289          Item: TListItem;          Item: TListItem;
290          KeyItem: TKeySettingItem;          KeyItem: TKeySettingItem;
291          ActiveListView: TListView;          ActiveListView: TListView;
292            chechList : TListView;
293  begin  begin
294          if PageControl1.ActivePage.TabIndex <> 0 then          if PageControl1.ActivePage.TabIndex <> 0 then
295                  ActiveListView := ListView1                  ActiveListView := ListView1
# Line 308  begin Line 309  begin
309          end;          end;
310    
311          // 現在選択されているAction以外で同じジェスチャーがあればエラーとする          // 現在選択されているAction以外で同じジェスチャーがあればエラーとする
312          for i := 0 to ActiveListView.Items.Count - 1 do begin          chechList := ListView;
313                  if ActiveListView.Selected = ActiveListView.Items[i] then          for j := 0 to 1 do begin
314                          Continue;                  if j <> 0 then begin
315                  Item := ActiveListView.Items[i];                          chechList := ListView1;
316                  if TObject(Item.Data) is TKeySettingItem then begin                  end;
317                          KeyItem := TKeySettingItem(Item.Data);  
318                          if (GestureEdit.Text <> GUESTURE_NOTHING)                  for i := 0 to chechList.Items.Count - 1 do begin
319                          and (KeyItem.Gesture = GestureEdit.Text) then begin                          if ActiveListView.Selected = chechList.Items[i] then
320                                  MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP);                                  Continue;
321                                  HotKey.SetFocus;                          Item := chechList.Items[i];
322                                  Exit;                          if TObject(Item.Data) is TKeySettingItem then begin
323                                    KeyItem := TKeySettingItem(Item.Data);
324                                    if (GestureEdit.Text <> GUESTURE_NOTHING)
325                                    and (KeyItem.Gesture = GestureEdit.Text) then begin
326                                            MsgBox(Handle, ERR_MSG, ERR_TITLE, MB_OK or MB_ICONSTOP);
327                                            HotKey.SetFocus;
328                                            Exit;
329                                    end;
330                          end;                          end;
331                  end;                  end;
332          end;          end;
333    
334          // ジェスチャー設定          // ジェスチャー設定
335          if TObject(ActiveListView.Selected.Data) is TKeySettingItem then begin          if TObject(ActiveListView.Selected.Data) is TKeySettingItem then begin
336                  KeyItem := TKeySettingItem(ActiveListView.Selected.Data);                  KeyItem := TKeySettingItem(ActiveListView.Selected.Data);

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.8.2.1

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26