Changeset 12


Ignore:
Timestamp:
Apr 28, 2016, 5:35:05 PM (8 years ago)
Author:
chronos
Message:
  • Added: Configurable main form stay on top feature.
Location:
trunk
Files:
10 edited

Legend:

Unmodified
Added
Removed
  • trunk/Languages/AcronymDecoder.cs.po

    r10 r12  
    4040#: tformimport.buttonimport.caption
    4141msgid "Process"
    42 msgstr ""
     42msgstr "Zpracovat"
    4343
    4444#: tformimport.buttonloadfromfile.caption
    4545msgid "Load from file"
    46 msgstr ""
     46msgstr "Načíst ze souboru"
    4747
    4848#: tformimport.caption
     
    5050msgctxt "tformimport.caption"
    5151msgid "Import"
    52 msgstr "Improtovat"
     52msgstr "Importovat"
    5353
    5454#: tformimport.comboboxdataformat.text
    5555msgid "CSV"
    56 msgstr ""
     56msgstr "CSV"
    5757
    5858#: tformimport.label1.caption
    5959msgid "Data format:"
    60 msgstr ""
     60msgstr "Formát dat:"
    6161
    6262#: tformmain.aacronymadd.caption
     
    161161msgstr "Nastavení"
    162162
     163#: tformsettings.checkboxalwaysontop.caption
     164msgid "Always on top"
     165msgstr "Okno vždy navrchu"
     166
    163167#: tformsettings.label1.caption
    164168msgid "Language:"
     
    167171#: uformimport.simportednewacronyms
    168172msgid "Imported %d new acronyms."
    169 msgstr ""
     173msgstr "Importováno %d nových zkratek."
    170174
    171175#: uformmain.sappexit
  • trunk/Languages/AcronymDecoder.po

    r10 r12  
    150150msgstr ""
    151151
     152#: tformsettings.checkboxalwaysontop.caption
     153msgid "Always on top"
     154msgstr ""
     155
    152156#: tformsettings.label1.caption
    153157msgid "Language:"
  • trunk/Packages/CoolTranslator

    • Property svn:ignore set to
      lib
  • trunk/UFormAcronym.lfm

    r10 r12  
    11object FormAcronym: TFormAcronym
    2   Left = 554
     2  Left = 555
    33  Height = 296
    4   Top = 409
     4  Top = 411
    55  Width = 420
    66  Caption = 'Acronym'
     
    1313  object Label1: TLabel
    1414    Left = 8
    15     Height = 24
     15    Height = 20
    1616    Top = 16
    17     Width = 60
     17    Width = 43
    1818    Caption = 'Name:'
    1919    ParentColor = False
     
    2121  object EditAcronym: TEdit
    2222    Left = 136
    23     Height = 34
     23    Height = 28
    2424    Top = 15
    2525    Width = 272
     
    3030  object Label2: TLabel
    3131    Left = 8
    32     Height = 24
     32    Height = 20
    3333    Top = 49
    34     Width = 83
     34    Width = 61
    3535    Caption = 'Meaning:'
    3636    ParentColor = False
     
    3838  object EditMeaning: TEdit
    3939    Left = 136
    40     Height = 34
     40    Height = 28
    4141    Top = 49
    4242    Width = 272
     
    6969  object Label3: TLabel
    7070    Left = 8
    71     Height = 24
     71    Height = 20
    7272    Top = 88
    73     Width = 109
     73    Width = 79
    7474    Caption = 'Description:'
    7575    ParentColor = False
  • trunk/UFormImport.lfm

    r10 r12  
    11object FormImport: TFormImport
    2   Left = 573
     2  Left = 575
    33  Height = 507
    4   Top = 411
     4  Top = 256
    55  Width = 652
    66  Caption = 'Import'
     
    2828  end
    2929  object ComboBoxDataFormat: TComboBox
    30     Left = 256
    31     Height = 34
     30    Left = 264
     31    Height = 28
    3232    Top = 5
    3333    Width = 140
    34     ItemHeight = 0
     34    ItemHeight = 20
    3535    ItemIndex = 0
    3636    Items.Strings = (
     
    4444  object Label1: TLabel
    4545    Left = 153
    46     Height = 24
     46    Height = 20
    4747    Top = 9
    48     Width = 116
     48    Width = 84
    4949    Caption = 'Data format:'
    5050    ParentColor = False
  • trunk/UFormMain.lfm

    r10 r12  
    11object FormMain: TFormMain
    2   Left = 767
     2  Left = 769
    33  Height = 446
    4   Top = 445
     4  Top = 342
    55  Width = 631
    66  Caption = 'Acronym Decoder'
    7   ClientHeight = 414
     7  ClientHeight = 421
    88  ClientWidth = 631
    99  Menu = MainMenu1
     
    1616  object ListViewAcronyms: TListView
    1717    Left = 8
    18     Height = 365
     18    Height = 372
    1919    Top = 40
    2020    Width = 613
     
    4646  object EditSearch: TEdit
    4747    Left = 8
    48     Height = 34
     48    Height = 28
    4949    Top = 8
    5050    Width = 611
  • trunk/UFormMain.pas

    r10 r12  
    8787    procedure TrayIcon1Click(Sender: TObject);
    8888  private
     89    FAlwaysOnTop: Boolean;
     90    procedure SetAlwaysOnTop(AValue: Boolean);
     91  private
    8992    FoundAcronyms: TAcronymMeanings;
    9093    RegistryContext: TRegistryContext;
     
    9699  public
    97100    AcronymDb: TAcronymDb;
     101    property AlwaysOnTop: Boolean read FAlwaysOnTop write SetAlwaysOnTop;
    98102  end;
    99103
     
    300304procedure TFormMain.ASettingsExecute(Sender: TObject);
    301305begin
    302   FormSettings.ShowModal;
     306  FormSettings.Load;
     307  if FormSettings.ShowModal = mrOk then
     308    FormSettings.Save;
    303309end;
    304310
     
    368374end;
    369375
     376procedure TFormMain.SetAlwaysOnTop(AValue: Boolean);
     377begin
     378  if FAlwaysOnTop = AValue then Exit;
     379  FAlwaysOnTop := AValue;
     380  if FAlwaysOnTop then FormStyle := fsSystemStayOnTop
     381    else FormStyle := fsNormal;
     382end;
     383
    370384procedure TFormMain.OpenRecentClick(Sender: TObject);
    371385begin
     
    422436      CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode(ReadStringWithDefault('LanguageCode', ''))
    423437      else CoolTranslator1.Language := CoolTranslator1.Languages.SearchByCode('');
     438    AlwaysOnTop := ReadBoolWithDefault('AlwaysOnTop', False);
    424439  finally
    425440    Free;
     
    438453      WriteString('LanguageCode', CoolTranslator1.Language.Code)
    439454      else DeleteValue('LanguageCode');
     455    WriteBool('AlwaysOnTop', AlwaysOnTop);
    440456  finally
    441457    Free;
  • trunk/UFormSettings.lfm

    r10 r12  
    1111  object ComboBoxLanguage: TComboBox
    1212    Left = 184
    13     Height = 38
     13    Height = 28
    1414    Top = 24
    1515    Width = 236
    16     ItemHeight = 0
     16    ItemHeight = 20
    1717    Style = csDropDownList
    1818    TabOrder = 0
     
    2020  object Label1: TLabel
    2121    Left = 16
    22     Height = 24
     22    Height = 20
    2323    Top = 24
    24     Width = 92
     24    Width = 68
    2525    Caption = 'Language:'
    2626    ParentColor = False
     
    4747    TabOrder = 2
    4848  end
     49  object CheckBoxAlwaysOnTop: TCheckBox
     50    Left = 16
     51    Height = 24
     52    Top = 64
     53    Width = 118
     54    Caption = 'Always on top'
     55    TabOrder = 3
     56  end
    4957end
  • trunk/UFormSettings.lrt

    r10 r12  
    33TFORMSETTINGS.BUTTONOK.CAPTION=Ok
    44TFORMSETTINGS.BUTTONCANCEL.CAPTION=Cancel
     5TFORMSETTINGS.CHECKBOXALWAYSONTOP.CAPTION=Always on top
  • trunk/UFormSettings.pas

    r10 r12  
    1616    ButtonOk: TButton;
    1717    ButtonCancel: TButton;
     18    CheckBoxAlwaysOnTop: TCheckBox;
    1819    ComboBoxLanguage: TComboBox;
    1920    Label1: TLabel;
     
    5455procedure TFormSettings.Load;
    5556begin
     57  CheckBoxAlwaysOnTop.Checked := FormMain.AlwaysOnTop;
    5658end;
    5759
    5860procedure TFormSettings.Save;
    5961begin
    60 
     62  FormMain.AlwaysOnTop := CheckBoxAlwaysOnTop.Checked;
    6163end;
    6264
Note: See TracChangeset for help on using the changeset viewer.