mirror of
https://github.com/levinsv/pgadmin3.git
synced 2026-05-15 14:15:49 -06:00
Autocomplite, server status, publications
Добавлен контроль прав доступа на select для таблиц и представления при ипользовании автодополнения. Добавлен контроль доступа при пролучении информации о подписках. Добалена совместимость с более ранними версиями при получении информации о публикациях. При получении логов в окне "Статус сервера" добавлена проверка наличия прав на используемые функции при получении файлы логов. Мелкие правки при работе с автодополнениями в окне запросов.
This commit is contained in:
parent
f43f341ffd
commit
a77fcfcd5a
6 changed files with 207 additions and 111 deletions
|
|
@ -800,56 +800,60 @@ void ctlSQLBox::OnKeyDown(wxKeyEvent &event)
|
|||
}
|
||||
if ((uc >= ' ' && uc < 'A')) hint = "";
|
||||
}
|
||||
if (m_hint_mode) {
|
||||
if (event.GetKeyCode() == WXK_RIGHT && event.GetModifiers() == wxMOD_ALT && !hint.IsEmpty()) {
|
||||
wxString ins = hint.substr(s.length());
|
||||
InsertText(GetCurrentPos(), ins);
|
||||
SetCurrentPos(GetCurrentPos() + ins.Length());
|
||||
SetSelection(GetCurrentPos(), GetCurrentPos());
|
||||
CallTipCancel();
|
||||
m_hint_mode = false;
|
||||
return;
|
||||
}
|
||||
if (hint.IsEmpty() && !(event.GetModifiers() == wxMOD_ALT || event.GetModifiers() == wxMOD_CONTROL)) {
|
||||
m_hint_mode = false;
|
||||
CallTipCancel();
|
||||
if (!AutoCompActive()) {
|
||||
// work only hide autocomplite
|
||||
|
||||
if (m_hint_mode) {
|
||||
if (event.GetKeyCode() == WXK_RIGHT && event.GetModifiers() == wxMOD_ALT && !hint.IsEmpty()) {
|
||||
wxString ins = hint.substr(s.length());
|
||||
InsertText(GetCurrentPos(), ins);
|
||||
SetCurrentPos(GetCurrentPos() + ins.Length());
|
||||
SetSelection(GetCurrentPos(), GetCurrentPos());
|
||||
CallTipCancel();
|
||||
m_hint_mode = false;
|
||||
return;
|
||||
}
|
||||
if (hint.IsEmpty() && !(event.GetModifiers() == wxMOD_ALT || event.GetModifiers() == wxMOD_CONTROL)) {
|
||||
m_hint_mode = false;
|
||||
CallTipCancel();
|
||||
}
|
||||
else {
|
||||
if (uc != WXK_NONE && !hint.IsEmpty()) {
|
||||
if (uc == 8 && CallTipActive()) {
|
||||
//CallTipSetPosAtStart(0);
|
||||
CallTipSetHighlight(s.length(), hint.length());
|
||||
}
|
||||
else {
|
||||
CallTipShow(showpos, hint);
|
||||
CallTipSetPosAtStart(0);
|
||||
CallTipSetHighlight(s.length(), hint.length());
|
||||
m_hint_mode = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (uc != WXK_NONE && !hint.IsEmpty()) {
|
||||
if (uc == 8 && CallTipActive()) {
|
||||
//CallTipSetPosAtStart(0);
|
||||
CallTipSetHighlight(s.length(), hint.length());
|
||||
}
|
||||
else {
|
||||
CallTipShow(showpos, hint);
|
||||
if (!CallTipActive() && !hint.IsEmpty() && !(event.GetModifiers() == wxMOD_ALT || event.GetModifiers() == wxMOD_CONTROL)) {
|
||||
if (uc != WXK_NONE) {
|
||||
if (uc == 8) {
|
||||
//showpos--;
|
||||
showpos = showpos - 1;
|
||||
}
|
||||
else showpos += 1;
|
||||
if (!CallTipActive()) CallTipShow(showpos, hint);
|
||||
CallTipSetPosAtStart(0);
|
||||
CallTipSetHighlight(s.length(), hint.length());
|
||||
m_hint_mode = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
if (!CallTipActive() && !hint.IsEmpty() && !(event.GetModifiers() == wxMOD_ALT || event.GetModifiers() == wxMOD_CONTROL)) {
|
||||
if (uc != WXK_NONE) {
|
||||
if (uc == 8) {
|
||||
//showpos--;
|
||||
showpos = showpos - 1;
|
||||
}
|
||||
else showpos += 1;
|
||||
if (!CallTipActive()) CallTipShow(showpos, hint);
|
||||
CallTipSetPosAtStart(0);
|
||||
CallTipSetHighlight(s.length(), hint.length());
|
||||
m_hint_mode = true;
|
||||
}
|
||||
else {
|
||||
if (CallTipActive()) {
|
||||
CallTipCancel();
|
||||
m_hint_mode = false;
|
||||
else {
|
||||
if (CallTipActive()) {
|
||||
CallTipCancel();
|
||||
m_hint_mode = false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
//
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue