Skip to content

Commit

Permalink
* Move some menu items for configuring data grids into a new submenu …
Browse files Browse the repository at this point in the history
…labelled "Grid view options"

* Create a duplicated menu item there, for "View binary data as text" button from the main toolbar
* Create a new menu item there, for jumping to the "Data" tab in the preferences window
* Add related translation strings
  • Loading branch information
ansgarbecker committed Aug 5, 2016
1 parent d81a166 commit ceeefe1
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 11 deletions.
14 changes: 13 additions & 1 deletion out/locale/en/LC_MESSAGES/default.po
Expand Up @@ -7,7 +7,7 @@ msgid ""
msgstr ""
"Project-Id-Version: HeidiSQL\n"
"POT-Creation-Date: 2012-11-05 21:40\n"
"PO-Revision-Date: 2016-06-15 21:13+0200\n"
"PO-Revision-Date: 2016-08-05 12:54+0200\n"
"Last-Translator: Ansgar Becker <anse@heidisql.com>\n"
"Language-Team: English (http://www.transifex.com/projects/p/heidisql/"
"language/en/)\n"
Expand Down Expand Up @@ -6232,3 +6232,15 @@ msgstr "Change expired password"

msgid "Password strength:"
msgstr "Password strength:"

#. Menu item for jumping to "Logging" tab in preferences window
msgid "Logging preferences"
msgstr "Logging preferences"

#. Menu item for jumping to "Data" tab in preferences window
msgid "Data grid preferences"
msgstr "Data grid preferences"

#. Menu item with some sub items for configuring data grids
msgid "Grid view options"
msgstr "Grid view options"
30 changes: 22 additions & 8 deletions source/main.dfm
Expand Up @@ -2345,6 +2345,10 @@ object MainForm: TMainForm
Category = 'Tools'
Caption = 'Logging preferences'
end
object actPreferencesData: TAction
Category = 'Tools'
Caption = 'Data grid preferences'
end
object actFlushHosts: TAction
Category = 'Tools'
Caption = 'Hosts'
Expand Down Expand Up @@ -9430,18 +9434,28 @@ object MainForm: TMainForm
OnClick = InsertValue
end
end
object actTimestampColumn1: TMenuItem
Action = actUnixTimestampColumn
AutoCheck = True
end
object ViewasHTML1: TMenuItem
Action = actDataPreview
object InsertfilesintoBLOBfields3: TMenuItem
Action = actInsertFiles
end
object SaveBLOBtofile1: TMenuItem
Action = actDataSaveBlobToFile
end
object InsertfilesintoBLOBfields3: TMenuItem
Action = actInsertFiles
object Gridviewoptions1: TMenuItem
Caption = 'Grid view options'
object hisisaUNIXtimestampcolumn1: TMenuItem
Action = actUnixTimestampColumn
AutoCheck = True
end
object ViewasHTML1: TMenuItem
Action = actDataPreview
end
object ViewbinarydataastextinsteadofHEX2: TMenuItem
Action = actBlobAsText
AutoCheck = True
end
object Datapreferences1: TMenuItem
Action = actPreferencesData
end
end
object N4a: TMenuItem
Caption = '-'
Expand Down
12 changes: 10 additions & 2 deletions source/main.pas
Expand Up @@ -580,7 +580,6 @@ TMainForm = class(TForm)
menuTreeOptions: TMenuItem;
menuClearDataTabFilter: TMenuItem;
actUnixTimestampColumn: TAction;
actTimestampColumn1: TMenuItem;
LoadSQLfile2: TMenuItem;
N2: TMenuItem;
Save1: TMenuItem;
Expand Down Expand Up @@ -619,6 +618,11 @@ TMainForm = class(TForm)
RunSQLfiles1: TMenuItem;
actPreferencesLogging: TAction;
Loggingpreferences1: TMenuItem;
Gridviewoptions1: TMenuItem;
hisisaUNIXtimestampcolumn1: TMenuItem;
ViewbinarydataastextinsteadofHEX2: TMenuItem;
actPreferencesData: TAction;
Datapreferences1: TMenuItem;
procedure actCreateDBObjectExecute(Sender: TObject);
procedure menuConnectionsPopup(Sender: TObject);
procedure actExitApplicationExecute(Sender: TObject);
Expand Down Expand Up @@ -1692,6 +1696,8 @@ procedure TMainForm.FormCreate(Sender: TObject);
actBatchInOneGo.Checked := not AppSettings.ReadBool(asSingleQueries);
actPreferencesLogging.ImageIndex := actPreferences.ImageIndex;
actPreferencesLogging.OnExecute := actPreferences.OnExecute;
actPreferencesData.ImageIndex := actPreferences.ImageIndex;
actPreferencesData.OnExecute := actPreferences.OnExecute;

pnlQueryMemo.Height := AppSettings.ReadInt(asQuerymemoheight);
treeQueryHelpers.Width := AppSettings.ReadInt(asQueryhelperswidth);
Expand Down Expand Up @@ -2086,7 +2092,9 @@ procedure TMainForm.actPreferencesExecute(Sender: TObject);
// Preferences
FPreferencesDialog := Toptionsform.Create(Self);
if Sender = actPreferencesLogging then
FPreferencesDialog.pagecontrolMain.ActivePage := FPreferencesDialog.tabLogging;
FPreferencesDialog.pagecontrolMain.ActivePage := FPreferencesDialog.tabLogging
else if Sender = actPreferencesData then
FPreferencesDialog.pagecontrolMain.ActivePage := FPreferencesDialog.tabTextFormatting;
FPreferencesDialog.ShowModal;
FreeAndNil(FPreferencesDialog);
end;
Expand Down

0 comments on commit ceeefe1

Please sign in to comment.