Develop and Download Open Source Software

Browse CVS Repository

Diff of /gikonavigoeson/gikonavi/GikoSystem.pas

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

revision 1.107 by h677, Sat Dec 13 09:52:48 2003 UTC revision 1.108 by h677, Wed Jan 7 12:07:27 2004 UTC
# Line 175  type Line 175  type
175                  function GzipDecompress(ResStream: TStream; ContentEncoding: string): string;                  function GzipDecompress(ResStream: TStream; ContentEncoding: string): string;
176                  procedure LoadKeySetting(ActionList: TActionList);                  procedure LoadKeySetting(ActionList: TActionList);
177                  procedure SaveKeySetting(ActionList: TActionList);                  procedure SaveKeySetting(ActionList: TActionList);
178                    procedure LoadEditorKeySetting(ActionList: TActionList);
179                    procedure SaveEditorKeySetting(ActionList: TActionList);
180    
181                  procedure CreateProcess(const AppPath: string; const Param: string);                  procedure CreateProcess(const AppPath: string; const Param: string);
182                  procedure OpenBrowser(URL: string; BrowserType: TGikoBrowserType);                  procedure OpenBrowser(URL: string; BrowserType: TGikoBrowserType);
183                  function HTMLDecode(const AStr: String): String;                  function HTMLDecode(const AStr: String): String;
# Line 2396  begin Line 2399  begin
2399          try          try
2400                  for i := 0 to ActionList.ActionCount - 1 do begin                  for i := 0 to ActionList.ActionCount - 1 do begin
2401                          if ActionList.Actions[i].Tag = -1 then                          if ActionList.Actions[i].Tag = -1 then
2402                                    Continue;
2403                            ini.WriteInteger(STD_SEC, ActionList.Actions[i].Name, TAction(ActionList.Actions[i]).ShortCut);
2404                    end;
2405                    ini.UpdateFile;
2406            finally
2407                    ini.Free;
2408            end;
2409    end;
2410    
2411    procedure TGikoSys.LoadEditorKeySetting(ActionList: TActionList);
2412    const
2413            STD_SEC = 'KeySetting';
2414    var
2415            i: Integer;
2416            ini: TMemIniFile;
2417            ActionName: string;
2418            ActionKey: Integer;
2419            SecList: TStringList;
2420            Component: TComponent;
2421    begin
2422            if not FileExists(GetConfigDir + EKEY_SETTING_FILE_NAME) then
2423                    Exit;
2424            SecList := TStringList.Create;
2425            ini := TMemIniFile.Create(GetConfigDir + EKEY_SETTING_FILE_NAME);
2426            try
2427                    ini.ReadSection(STD_SEC, SecList);
2428                    for i := 0 to SecList.Count - 1 do begin
2429                            ActionName := SecList[i];
2430                            ActionKey := ini.ReadInteger(STD_SEC, ActionName, -1);
2431                            if ActionKey <> -1 then begin
2432                                    Component := ActionList.Owner.FindComponent(ActionName);
2433                                    if TObject(Component) is TAction then begin
2434                                            TAction(Component).ShortCut := ActionKey;
2435                                    end;
2436                            end;
2437                    end;
2438            finally
2439                    ini.Free;
2440                    SecList.Free;
2441            end;
2442    end;
2443    
2444    procedure TGikoSys.SaveEditorKeySetting(ActionList: TActionList);
2445    const
2446            STD_SEC = 'KeySetting';
2447    var
2448            i: Integer;
2449            ini: TMemIniFile;
2450    begin
2451            ini := TMemIniFile.Create(GetConfigDir + EKEY_SETTING_FILE_NAME);
2452            try
2453                    for i := 0 to ActionList.ActionCount - 1 do begin
2454                            if ActionList.Actions[i].Tag = -1 then
2455                                  Continue;                                  Continue;
2456                          ini.WriteInteger(STD_SEC, ActionList.Actions[i].Name, TAction(ActionList.Actions[i]).ShortCut);                          ini.WriteInteger(STD_SEC, ActionList.Actions[i].Name, TAction(ActionList.Actions[i]).ShortCut);
2457                  end;                  end;

Legend:
Removed from v.1.107  
changed lines
  Added in v.1.108

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