Ignore:
Timestamp:
Sep 22, 2018, 9:37:16 PM (6 years ago)
Author:
chronos
Message:
  • Fixed: Use different interface language if installed as deb Linux package.
  • Fixed: Propagate status bar, toolbar visibilit, and toolbar icons size to client form.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Forms/UFormMain.pas

    r243 r249  
    1818
    1919  TFormMain = class(TForm)
     20    AStatusBarVisible: TAction;
    2021    AToolBarVisible: TAction;
    2122    AToolBarBigIcons: TAction;
     
    6768    ToolButton5: TToolButton;
    6869    ToolButton9: TToolButton;
     70    procedure AStatusBarVisibleExecute(Sender: TObject);
    6971    procedure AToolBarBigIconsExecute(Sender: TObject);
    7072    procedure AToolBarVisibleExecute(Sender: TObject);
     
    8082    FormActivated: Boolean;
    8183    procedure ApplicationStart(Ptr: IntPtr);
     84    procedure UpdateClientForms;
    8285  public
    8386    procedure LoadConfig(Config: TXmlConfig; Path: string);
     
    121124    AToolBarBigIcons.Checked := GetValue(DOMString(Path + '/LargeIcons'), False);
    122125    AToolBarVisible.Checked := GetValue(DOMString(Path + '/ToolBarVisible'), True);
     126    AStatusBarVisible.Checked := GetValue(DOMString(Path + '/StatusBarVisible'), False);
    123127  end;
    124128end;
     
    129133    SetValue(DOMString(Path + '/LargeIcons'), AToolBarBigIcons.Checked);
    130134    SetValue(DOMString(Path + '/ToolBarVisible'), AToolBarVisible.Checked);
     135    SetValue(DOMString(Path + '/StatusBarVisible'), AStatusBarVisible.Checked);
    131136  end;
    132137end;
     
    164169end;
    165170
     171procedure TFormMain.AStatusBarVisibleExecute(Sender: TObject);
     172begin
     173  AStatusBarVisible.Checked := not AStatusBarVisible.Checked;
     174  UpdateClientForms;
     175end;
     176
    166177procedure TFormMain.AToolBarBigIconsExecute(Sender: TObject);
    167178begin
    168179  AToolBarBigIcons.Checked := not AToolBarBigIcons.Checked;
    169180  ReloadView;
     181  UpdateClientForms;
    170182end;
    171183
     
    174186  AToolBarVisible.Checked := not AToolBarVisible.Checked;
    175187  ReloadView;
     188  UpdateClientForms;
    176189end;
    177190
     
    206219begin
    207220  Core.ReopenGameOnInit;
     221end;
     222
     223procedure TFormMain.UpdateClientForms;
     224var
     225  I: Integer;
     226begin
     227  FormClient.AToolBarBigIcons.Checked := AToolBarBigIcons.Checked;
     228  FormClient.AToolBarBigIcons.Update;
     229  FormClient.AToolBarVisible.Checked := AToolBarVisible.Checked;
     230  FormClient.AToolBarVisible.Update;
     231  FormClient.AStatusBarVisible.Checked := AStatusBarVisible.Checked;
     232  FormClient.AStatusBarVisible.Update;
     233  for I := 0 to Core.FormClients.Count - 1 do begin
     234    Core.FormClients[I].AToolBarBigIcons.Checked := AToolBarBigIcons.Checked;
     235    Core.FormClients[I].AToolBarBigIcons.Update;
     236    Core.FormClients[I].AToolBarVisible.Checked := AToolBarVisible.Checked;
     237    Core.FormClients[I].AToolBarVisible.Update;
     238    Core.FormClients[I].AStatusBarVisible.Checked := AStatusBarVisible.Checked;
     239    Core.FormClients[I].AStatusBarVisible.Update;
     240  end;
    208241end;
    209242
     
    218251  ReloadView;
    219252  FormClient.Show;
     253  UpdateClientForms;
    220254  Application.QueueAsyncCall(ApplicationStart, 0);
    221255end;
Note: See TracChangeset for help on using the changeset viewer.