mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Add new option "Hide query history"
Добавлена возможность скрыть строку с историей запросов. История зпросов будет сохраняться вне зависимости от это опции.
This commit is contained in:
parent
e320b2ebf2
commit
6f7e04671e
4 changed files with 33 additions and 2 deletions
|
|
@ -131,6 +131,7 @@
|
|||
#define pickerSQLCaretColour CTRL_COLOURPICKER("pickerSQLCaretColour")
|
||||
#define chkKeywordsInUppercase CTRL_CHECKBOX("chkKeywordsInUppercase")
|
||||
#define chkASUTPstyle CTRL_CHECKBOX("chkASUTPstyle")
|
||||
#define chkHideQueryHistory CTRL_CHECKBOX("chkHideQueryHistory")
|
||||
#define menus CTRL_TREE("menus")
|
||||
#define pnlBrowserDisplay CTRL_PANEL("pnlBrowserDisplay")
|
||||
#define pnlBrowserProperties CTRL_PANEL("pnlBrowserProperties")
|
||||
|
|
@ -363,6 +364,7 @@ frmOptions::frmOptions(frmMain *parent)
|
|||
|
||||
chkKeywordsInUppercase->SetValue(settings->GetSQLKeywordsInUppercase());
|
||||
chkASUTPstyle->SetValue(settings->GetASUTPstyle());
|
||||
chkHideQueryHistory->SetValue(settings->GetHideQueryHistory());
|
||||
cbLanguage->Append(_("Default"));
|
||||
int sel = 0;
|
||||
wxLanguage langId = settings->GetCanonicalLanguage();
|
||||
|
|
@ -875,6 +877,11 @@ void frmOptions::OnOK(wxCommandEvent &ev)
|
|||
changed = true;
|
||||
settings->SetASUTPstyle(chkASUTPstyle->GetValue());
|
||||
}
|
||||
if (settings->GetHideQueryHistory() != chkHideQueryHistory->GetValue())
|
||||
{
|
||||
changed = true;
|
||||
settings->SetHideQueryHistory(chkHideQueryHistory->GetValue());
|
||||
}
|
||||
|
||||
// Change the language last, as it will affect our tests for changes
|
||||
// in the display object types.
|
||||
|
|
|
|||
|
|
@ -685,9 +685,8 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
|
|||
btnDeleteAll = new wxButton(pnlQuery, CTL_DELETEALLBTN, _("Delete All"));
|
||||
btnDeleteAll->Enable(sqlQueries->GetCount() > 0);
|
||||
boxHistory->Add(btnDeleteAll, 0, wxALL | wxALIGN_CENTER_VERTICAL, 1);
|
||||
|
||||
boxQuery->Add(boxHistory, 0, wxEXPAND | wxALL, 1);
|
||||
|
||||
boxHistory->ShowItems(!settings->GetHideQueryHistory());
|
||||
// Create the other inner box sizer
|
||||
// This one will contain the SQL box
|
||||
wxBoxSizer *boxSQL = new wxBoxSizer(wxHORIZONTAL);
|
||||
|
|
|
|||
|
|
@ -814,6 +814,16 @@ public:
|
|||
{
|
||||
WriteBool(wxT("ASUTPstyle"), newval);
|
||||
}
|
||||
bool GetHideQueryHistory() const
|
||||
{
|
||||
bool b;
|
||||
Read(wxT("HideQueryHistory"), &b, false);
|
||||
return b;
|
||||
}
|
||||
void SetHideQueryHistory(const bool newval)
|
||||
{
|
||||
WriteBool(wxT("HideQueryHistory"), newval);
|
||||
}
|
||||
bool GetVisibleDbNameTree() const
|
||||
{
|
||||
bool b;
|
||||
|
|
|
|||
|
|
@ -575,6 +575,21 @@
|
|||
<flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
|
||||
<border>4</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxStaticText" name="stHideQueryHistory">
|
||||
<label>Hide query history</label>
|
||||
</object>
|
||||
<flag>wxALIGN_CENTER_VERTICAL|wxTOP|wxLEFT|wxRIGHT</flag>
|
||||
<border>4</border>
|
||||
</object>
|
||||
<object class="sizeritem">
|
||||
<object class="wxCheckBox" name="chkHideQueryHistory">
|
||||
<label></label>
|
||||
<checked>1</checked>
|
||||
</object>
|
||||
<flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
|
||||
<border>4</border>
|
||||
</object>
|
||||
</object>
|
||||
</object>
|
||||
<flag>wxEXPAND|wxTOP|wxLEFT|wxRIGHT</flag>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue