CtrlLib: Fixed minor issue in TabCtrl, PGSQL: Fixed minor encoding problem

git-svn-id: svn://ultimatepp.org/upp/trunk@1569 f0d560ea-af0d-0410-9eb7-867de7ffcac7
This commit is contained in:
cxl 2009-09-10 13:09:05 +00:00
parent d096ce4443
commit 39701cf46c
2 changed files with 5 additions and 4 deletions

View file

@ -133,7 +133,10 @@ void TabCtrl::Layout()
tabs.TopPos(0, th + style->sel.bottom)
.HSizePos(0, style->sel.left + style->sel.right);
SyncTabs();
if(tab.GetCount() && tab.Top().Right() < TabsRight())
x0 = 0;
SyncHot();
ScrollInto(sel);
pane.VSizePos(style->tabheight + style->edge.top, style->edge.bottom)
.HSizePos(style->edge.left, style->edge.right);
left.LeftPos(0, 16).TopPos(th - 16, 16);

View file

@ -155,8 +155,6 @@ bool PostgreSQLPerformScript(const String& txt, StatementExecutor& se, Gate2<int
String PostgreSQLConnection::ErrorMessage()
{
if(PQclientEncoding(conn) >= 0)
return PQerrorMessage(conn);
return FromCharset(PQerrorMessage(conn));
}
@ -327,8 +325,8 @@ bool PostgreSQLSession::Open(const char *connect)
Close();
conn = PQconnectdb(connect);
if(PQstatus(conn) != CONNECTION_OK)
{
SetError(ErrorMessage(), "Opening database");
{
SetError(FromSystemCharset(PQerrorMessage(conn)), "Opening database");
Close();
return false;
}