diff --git a/pgadmin/agent/pgaJob.cpp b/pgadmin/agent/pgaJob.cpp
index 20b77b7..75a8f29 100644
--- a/pgadmin/agent/pgaJob.cpp
+++ b/pgadmin/agent/pgaJob.cpp
@@ -114,7 +114,7 @@ void pgaJob::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetRecId());
-		properties->AppendItem(_("Enabled"), GetEnabled());
+		properties->AppendYesNoItem(_("Enabled"), GetEnabled());
 		properties->AppendItem(_("Host agent"), GetHostAgent());
 		properties->AppendItem(_("Job class"), GetJobclass());
 		properties->AppendItem(_("Created"), GetCreated());
@@ -349,7 +349,9 @@ runNowFactory::runNowFactory(menuFactoryList *list, wxMenu *mnu, ctlMenuToolbar
 wxWindow *runNowFactory::StartDialog(frmMain *form, pgObject *obj)
 {
 	if (!((pgaJob *)(obj))->RunNow())
+	{
 		wxLogError(_("Failed to reschedule the job."));
+	}
 
 	form->Refresh(obj);
 
diff --git a/pgadmin/agent/pgaSchedule.cpp b/pgadmin/agent/pgaSchedule.cpp
index f18f2a0..a2d9fa6 100644
--- a/pgadmin/agent/pgaSchedule.cpp
+++ b/pgadmin/agent/pgaSchedule.cpp
@@ -87,7 +87,7 @@ void pgaSchedule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *p
 
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetRecId());
-		properties->AppendItem(_("Enabled"), GetEnabled());
+		properties->AppendYesNoItem(_("Enabled"), GetEnabled());
 
 		properties->AppendItem(_("Start date"), GetStart());
 		properties->AppendItem(_("End date"), GetEnd());
diff --git a/pgadmin/agent/pgaStep.cpp b/pgadmin/agent/pgaStep.cpp
index 8c81d42..099c79f 100644
--- a/pgadmin/agent/pgaStep.cpp
+++ b/pgadmin/agent/pgaStep.cpp
@@ -92,7 +92,7 @@ void pgaStep::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prope
 
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetRecId());
-		properties->AppendItem(_("Enabled"), GetEnabled());
+		properties->AppendYesNoItem(_("Enabled"), GetEnabled());
 		properties->AppendItem(_("Kind"), GetKind());
 		if (GetConnStr().IsEmpty())
 			properties->AppendItem(_("Database"), GetDbname());
diff --git a/pgadmin/ctl/calbox.cpp b/pgadmin/ctl/calbox.cpp
index cca5b11..0443e08 100644
--- a/pgadmin/ctl/calbox.cpp
+++ b/pgadmin/ctl/calbox.cpp
@@ -114,7 +114,7 @@ bool wxCalendarBox::Create(wxWindow *parent,
 	m_dlg->SetFont(GetFont());
 
 	wxPanel *panel = new wxPanel(m_dlg, CTRLID_PAN, wxPoint(0, 0), wxDefaultSize, wxSUNKEN_BORDER | wxCLIP_CHILDREN);
-	m_cal = new wxCalendarCtrl(panel, CTRLID_CAL, wxDefaultDateTime, wxPoint(0, 0), wxDefaultSize, wxSUNKEN_BORDER);
+	m_cal = new pgCompatCalendarCtrl(panel, CTRLID_CAL, wxDefaultDateTime, wxPoint(0, 0), wxDefaultSize, wxSUNKEN_BORDER);
 	m_cal->Connect(CTRLID_CAL, CTRLID_CAL, wxEVT_CALENDAR_SEL_CHANGED, wxCalendarEventHandler(wxCalendarBox::OnSelChange), 0, this);
 	m_cal->Connect(wxID_ANY, wxID_ANY, wxEVT_KEY_DOWN, wxKeyEventHandler(wxCalendarBox::OnCalKey), 0, this);
 	m_cal->Connect(CTRLID_CAL, CTRLID_CAL, wxEVT_CALENDAR_DOUBLECLICKED, wxCalendarEventHandler(wxCalendarBox::OnSelChange), 0, this);
@@ -271,7 +271,7 @@ bool wxCalendarBox::SetFormat(const wxChar *fmt)
 	wxDateTime dt;
 	dt.ParseFormat(wxT("2003-10-13"), wxT("%Y-%m-%d"));
 	wxString str = dt.Format(fmt);
-	wxChar *p = (wxChar *)str.c_str();
+	const wxChar *p = (const wxChar*) str;
 
 	m_format = wxEmptyString;
 
@@ -303,7 +303,7 @@ bool wxCalendarBox::SetFormat(const wxChar *fmt)
 		wxChar c;
 		for (c = '0'; c <= '9'; c++)
 			valArray.Add(wxString(c, 1));
-		wxChar *p = (wxChar *)m_format.c_str();
+		const wxChar *p = (const wxChar*) m_format;
 		while (*p)
 		{
 			if (*p == '%')
@@ -448,7 +448,13 @@ void wxCalendarBox::OnSelChange(wxCalendarEvent &ev)
 	}
 	ev.SetEventObject(this);
 	ev.SetId(GetId());
+
+#if wxCHECK_VERSION(2, 9, 0)
+	GetParent()->GetEventHandler()->ProcessEvent(ev);
+#else
 	GetParent()->ProcessEvent(ev);
+#endif
+
 }
 
 
@@ -456,21 +462,35 @@ void wxCalendarBox::OnText(wxCommandEvent &ev)
 {
 	ev.SetEventObject(this);
 	ev.SetId(GetId());
+
+#if wxCHECK_VERSION(2, 9, 0)
+	GetParent()->GetEventHandler()->ProcessEvent(ev);
+#else
 	GetParent()->ProcessEvent(ev);
+#endif
 
 	// We'll create an additional event if the date is valid.
-	// If the date isn't valid, the user's probable in the middle of typing
+	// If the date isn't valid, the user's probably in the middle of typing
 	wxString txt = m_txt->GetValue();
 	wxDateTime dt;
 	if (!txt.IsEmpty())
 		dt.ParseFormat(txt, m_format);
 
+#if wxCHECK_VERSION(2, 9, 0)
+	wxCalendarEvent cev(m_cal, dt, wxEVT_CALENDAR_SEL_CHANGED);
+#else
 	wxCalendarEvent cev(m_cal, wxEVT_CALENDAR_SEL_CHANGED);
+	cev.SetDate(dt);
+#endif
 	cev.SetEventObject(this);
 	cev.SetId(GetId());
-	cev.SetDate(dt);
 
+#if wxCHECK_VERSION(2, 9, 0)
+	GetParent()->GetEventHandler()->ProcessEvent(cev);
+#else
 	GetParent()->ProcessEvent(cev);
+#endif
+
 }
 
 
diff --git a/pgadmin/ctl/ctlListView.cpp b/pgadmin/ctl/ctlListView.cpp
index 236d024..aff2223 100644
--- a/pgadmin/ctl/ctlListView.cpp
+++ b/pgadmin/ctl/ctlListView.cpp
@@ -43,7 +43,7 @@ wxString ctlListView::GetText(long row, long col)
 };
 
 
-void ctlListView::AddColumn(const wxChar *text, int size, int format)
+void ctlListView::AddColumn(const wxString &text, int size, int format)
 {
 	if (size == wxLIST_AUTOSIZE || size == wxLIST_AUTOSIZE_USEHEADER)
 	{
@@ -56,14 +56,14 @@ void ctlListView::AddColumn(const wxChar *text, int size, int format)
 }
 
 
-long ctlListView::AppendItem(int icon, const wxChar *val, const wxChar *val2, const wxChar *val3, const wxChar *val4)
+long ctlListView::AppendItem(int icon, const wxString &val, const wxString &val2, const wxString &val3, const wxString &val4)
 {
 	long pos = InsertItem(GetItemCount(), val, icon);
-	if (val2 && *val2)
+	if (!val2.IsEmpty())
 		SetItem(pos, 1, val2);
-	if (val3 && *val3)
+	if (!val3.IsEmpty())
 		SetItem(pos, 2, val3);
-	if (val4 && *val4)
+	if (!val4.IsEmpty())
 		SetItem(pos, 3, val4);
 
 	return pos;
diff --git a/pgadmin/ctl/ctlSQLBox.cpp b/pgadmin/ctl/ctlSQLBox.cpp
index b161331..b5d15c5 100644
--- a/pgadmin/ctl/ctlSQLBox.cpp
+++ b/pgadmin/ctl/ctlSQLBox.cpp
@@ -703,14 +703,13 @@ char *pg_query_to_single_ordered_string(char *query, void *dbptr)
 }
 
 
-
 // Find some text in the document.
 CharacterRange ctlSQLBox::RegexFindText(int minPos, int maxPos, const wxString &text)
 {
 	TextToFind  ft;
 	ft.chrg.cpMin = minPos;
 	ft.chrg.cpMax = maxPos;
-	wxWX2MBbuf buf = (wxWX2MBbuf)wx2stc(text);
+	wxWX2MBbuf buf = text.mb_str(wxConvUTF8);
 	ft.lpstrText = (char *)(const char *)buf;
 
 	if (SendMsg(2150, wxSTC_FIND_REGEXP, (long)&ft) == -1)
@@ -721,3 +720,4 @@ CharacterRange ctlSQLBox::RegexFindText(int minPos, int maxPos, const wxString &
 
 	return ft.chrgText;
 }
+
diff --git a/pgadmin/ctl/explainShape.cpp b/pgadmin/ctl/explainShape.cpp
index 3da1fb7..411d0c3 100644
--- a/pgadmin/ctl/explainShape.cpp
+++ b/pgadmin/ctl/explainShape.cpp
@@ -382,7 +382,7 @@ ExplainShape *ExplainShape::Create(long level, ExplainShape *last, const wxStrin
 
 	if (costPos > 0)
 	{
-		wxChar *cl = (wxChar *)str.c_str() + costPos + 6;
+		wxChar *cl = const_cast<wxChar*>((const wxChar*)str + costPos + 6);
 		wxChar *ch = wxStrstr(cl, wxT(".."));
 		if (ch)
 		{
diff --git a/pgadmin/ctl/timespin.cpp b/pgadmin/ctl/timespin.cpp
index 56cd403..c9cf571 100644
--- a/pgadmin/ctl/timespin.cpp
+++ b/pgadmin/ctl/timespin.cpp
@@ -198,7 +198,7 @@ int wxTimeSpinCtrl::GetTimePart()
 {
 	wxString strAfter = m_txt->GetRange(m_txt->GetInsertionPoint(), 9999);
 	int cnt = 0;
-	wxChar *p = (wxChar *)strAfter.c_str();
+	const wxChar *p = (const wxChar*)strAfter;
 	while (*p)
 	{
 		if (*p++ == ':')
@@ -304,7 +304,12 @@ void wxTimeSpinCtrl::DoSpin(int diff)
 		wxSpinEvent ev;
 		ev.SetEventObject(this);
 		ev.SetId(GetId());
+
+#if wxCHECK_VERSION(2, 9, 0)
+		GetParent()->GetEventHandler()->ProcessEvent(ev);
+#else
 		GetParent()->ProcessEvent(ev);
+#endif
 	}
 }
 
@@ -317,7 +322,11 @@ void wxTimeSpinCtrl::OnText(wxCommandEvent &ev)
 		spinValue = time;
 		ev.SetEventObject(this);
 		ev.SetId(GetId());
+#if wxCHECK_VERSION(2, 9, 0)
+		GetParent()->GetEventHandler()->ProcessEvent(ev);
+#else
 		GetParent()->ProcessEvent(ev);
+#endif
 	}
 }
 
diff --git a/pgadmin/db/pgConn.cpp b/pgadmin/db/pgConn.cpp
index 14f35a3..47e129b 100644
--- a/pgadmin/db/pgConn.cpp
+++ b/pgadmin/db/pgConn.cpp
@@ -271,7 +271,9 @@ bool pgConn::DoConnect()
 
 			wxLogInfo(wxT("Setting client_encoding to '%s'"), encoding.c_str());
 			if (PQsetClientEncoding(conn, encoding.ToAscii()))
+			{
 				wxLogError(wxT("%s"), GetLastError().c_str());
+			}
 
 			delete set;
 
diff --git a/pgadmin/db/pgQueryThread.cpp b/pgadmin/db/pgQueryThread.cpp
index 56c6303..1a52468 100644
--- a/pgadmin/db/pgQueryThread.cpp
+++ b/pgadmin/db/pgQueryThread.cpp
@@ -197,8 +197,13 @@ int pgQueryThread::raiseEvent(int retval)
 #if !defined(PGSCLI)
 		wxCommandEvent resultEvent(wxEVT_COMMAND_MENU_SELECTED, eventId);
 		resultEvent.SetClientData(data);
+#if wxCHECK_VERSION(2, 9, 0)
+		caller->GetEventHandler()->AddPendingEvent(resultEvent);
+#else
 		caller->AddPendingEvent(resultEvent);
 #endif
+
+#endif
 	}
 	return retval;
 }
diff --git a/pgadmin/db/pgSet.cpp b/pgadmin/db/pgSet.cpp
index 78b8716..f99973c 100644
--- a/pgadmin/db/pgSet.cpp
+++ b/pgadmin/db/pgSet.cpp
@@ -209,7 +209,9 @@ int pgSet::ColNumber(const wxString &colname) const
 		col = PQfnumber(res, colname.mb_str(conv));
 
 	if (col < 0)
+	{
 		wxLogError(__("Column not found in pgSet: %s"), colname.c_str());
+	}
 	return col;
 }
 
diff --git a/pgadmin/debugger/dbgPgConn.cpp b/pgadmin/debugger/dbgPgConn.cpp
index d2ad372..cabda8a 100644
--- a/pgadmin/debugger/dbgPgConn.cpp
+++ b/pgadmin/debugger/dbgPgConn.cpp
@@ -145,7 +145,7 @@ void dbgPgConn::Init( const wxString &server, const wxString &database, const wx
 		connectParams.Append(hostip);
 	}
 
-	if( port.Length())
+	if(port.Length())
 	{
 		connectParams += wxT(" port=");
 		connectParams += port;
@@ -155,7 +155,7 @@ void dbgPgConn::Init( const wxString &server, const wxString &database, const wx
 	}
 
 
-	if( database.Length())
+	if(database.Length())
 	{
 		connectParams.Append(wxT(" dbname="));
 		connectParams.Append(qtConnString(database));
diff --git a/pgadmin/dlg/dlgClasses.cpp b/pgadmin/dlg/dlgClasses.cpp
index 669c795..7ed68a9 100644
--- a/pgadmin/dlg/dlgClasses.cpp
+++ b/pgadmin/dlg/dlgClasses.cpp
@@ -538,10 +538,14 @@ void ExecutionDialog::OnOK(wxCommandEvent &ev)
 			bool isOk = (thread->ReturnCode() == PGRES_COMMAND_OK || thread->ReturnCode() == PGRES_TUPLES_OK);
 
 			if (txtMessages)
+			{
 				txtMessages->AppendText(thread->GetMessagesAndClear());
+			}
 
 			if (thread->DataSet() != NULL)
+			{
 				wxLogInfo(wxString::Format(wxT("%d rows."), thread->DataSet()->NumRows()));
+			}
 
 			if (isOk)
 			{
diff --git a/pgadmin/dlg/dlgDatabase.cpp b/pgadmin/dlg/dlgDatabase.cpp
index 85f8c06..29b4f01 100644
--- a/pgadmin/dlg/dlgDatabase.cpp
+++ b/pgadmin/dlg/dlgDatabase.cpp
@@ -323,7 +323,9 @@ int dlgDatabase::Go(bool modal)
 	{
 		// Disable the checkbox
 		if (!DisablePrivilege(wxT("CONNECT")))
+		{
 			wxLogError(_("Failed to disable the CONNECT privilege checkbox!"));
+		}
 	}
 
 	return dlgDefaultSecurityProperty::Go(modal, createDefPriv, strDefPrivsOnTables, strDefPrivsOnSeqs, strDefPrivsOnFuncs);
diff --git a/pgadmin/dlg/dlgExtTable.cpp b/pgadmin/dlg/dlgExtTable.cpp
index 5e7ee44..c193ab3 100644
--- a/pgadmin/dlg/dlgExtTable.cpp
+++ b/pgadmin/dlg/dlgExtTable.cpp
@@ -101,7 +101,7 @@ pgObject *dlgExtTable::CreateObject(pgCollection *collection)
 void dlgExtTable::CheckChange()
 {
 	wxString name = GetName();
-	if (name)
+	if(!name.IsEmpty())
 	{
 		if (extTable)
 			EnableOK(txtComment->GetValue() != extTable->GetComment()
diff --git a/pgadmin/dlg/dlgSelectConnection.cpp b/pgadmin/dlg/dlgSelectConnection.cpp
index 6d2f76e..5ebb861 100644
--- a/pgadmin/dlg/dlgSelectConnection.cpp
+++ b/pgadmin/dlg/dlgSelectConnection.cpp
@@ -57,9 +57,9 @@ dlgSelectConnection::dlgSelectConnection(wxWindow *parent, frmMain *form) :
 		style |= wxCB_READONLY;
 
 	cbServer = new ctlComboBoxFix(this, CTRLID_CBSERVER, ConvertDialogToPixels(wxPoint(65, 5)), ConvertDialogToPixels(wxSize(135, 12)), style);
-	cbDatabase = new wxComboBox(this, CTRLID_CBDATABASE, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 20)), ConvertDialogToPixels(wxSize(135, 12)), NULL, style);
-	cbUsername = new wxComboBox(this, CTRLID_CBUSERNAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 35)), ConvertDialogToPixels(wxSize(135, 12)), NULL, style);
-	cbRolename = new wxComboBox(this, CTRLID_CBROLENAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 50)), ConvertDialogToPixels(wxSize(135, 12)), NULL, style);
+	cbDatabase = new wxComboBox(this, CTRLID_CBDATABASE, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 20)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
+	cbUsername = new wxComboBox(this, CTRLID_CBUSERNAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 35)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
+	cbRolename = new wxComboBox(this, CTRLID_CBROLENAME, wxEmptyString, ConvertDialogToPixels(wxPoint(65, 50)), ConvertDialogToPixels(wxSize(135, 12)), wxArrayString(), style);
 
 	if (form == NULL)
 	{
diff --git a/pgadmin/dlg/dlgSequence.cpp b/pgadmin/dlg/dlgSequence.cpp
index 97ad60a..8a02e69 100644
--- a/pgadmin/dlg/dlgSequence.cpp
+++ b/pgadmin/dlg/dlgSequence.cpp
@@ -107,20 +107,32 @@ int dlgSequence::Go(bool modal)
 	{
 		// Disable the checkbox
 		if (!DisablePrivilege(wxT("USAGE")))
+		{
 			wxLogError(_("Failed to disable the USAGE privilege checkbox!"));
+		}
 	}
 	else
 	{
 		if (!DisablePrivilege(wxT("INSERT")))
+		{
 			wxLogError(_("Failed to disable the INSERT privilege checkbox!"));
+		}
 		if (!DisablePrivilege(wxT("DELETE")))
+		{
 			wxLogError(_("Failed to disable the DELETE privilege checkbox!"));
+		}
 		if (!DisablePrivilege(wxT("RULE")))
+		{
 			wxLogError(_("Failed to disable the RULE privilege checkbox!"));
+		}
 		if (!DisablePrivilege(wxT("REFERENCES")))
+		{
 			wxLogError(_("Failed to disable the REFERENCES privilege checkbox!"));
+		}
 		if (!DisablePrivilege(wxT("TRIGGER")))
+		{
 			wxLogError(_("Failed to disable the TRIGGER privilege checkbox!"));
+		}
 	}
 
 	return dlgSecurityProperty::Go(modal);
diff --git a/pgadmin/dlg/dlgTable.cpp b/pgadmin/dlg/dlgTable.cpp
index d57b819..d865fb2 100644
--- a/pgadmin/dlg/dlgTable.cpp
+++ b/pgadmin/dlg/dlgTable.cpp
@@ -738,7 +738,9 @@ int dlgTable::Go(bool modal)
 	{
 		// Disable the checkbox
 		if (!DisablePrivilege(wxT("RULE")))
+		{
 			wxLogError(_("Failed to disable the RULE privilege checkbox!"));
+		}
 
 		if (table)
 		{
diff --git a/pgadmin/dlg/dlgView.cpp b/pgadmin/dlg/dlgView.cpp
index 8ed3104..7e3d946 100644
--- a/pgadmin/dlg/dlgView.cpp
+++ b/pgadmin/dlg/dlgView.cpp
@@ -77,7 +77,9 @@ int dlgView::Go(bool modal)
 	{
 		// Disable the checkbox
 		if (!DisablePrivilege(wxT("RULE")))
+		{
 			wxLogError(_("Failed to disable the RULE privilege checkbox!"));
+		}
 	}
 
 	return dlgSecurityProperty::Go(modal);
@@ -96,7 +98,7 @@ pgObject *dlgView::CreateObject(pgCollection *collection)
 void dlgView::CheckChange()
 {
 	wxString name = GetName();
-	if (name)
+	if(!name.IsEmpty())
 	{
 		bool enable = true;
 		if (view)
diff --git a/pgadmin/frm/events.cpp b/pgadmin/frm/events.cpp
index c7d4c37..f84709a 100644
--- a/pgadmin/frm/events.cpp
+++ b/pgadmin/frm/events.cpp
@@ -434,8 +434,14 @@ void frmMain::setDisplay(pgObject *data, ctlListView *props, ctlSQLBox *sqlbox)
 			for (i = 0 ; i < indivMenu->GetMenuItemCount() ; i++)
 			{
 				menuItem = indivMenu->GetMenuItems().Item(i)->GetData();
-				newMenu->Append(menuItem->GetId(), menuItem->GetLabel(), menuItem->GetHelp());
-				newContextMenu->Append(menuItem->GetId(), menuItem->GetLabel(), menuItem->GetHelp());
+#if wxCHECK_VERSION(2, 9, 0)
+				wxString lab = menuItem->GetItemLabelText();
+#else
+				wxString lab = menuItem->GetLabel(); // deprecated
+#endif
+			
+				newMenu->Append(menuItem->GetId(), lab, menuItem->GetHelp());
+				newContextMenu->Append(menuItem->GetId(), lab, menuItem->GetHelp());
 			}
 		}
 		delete indivMenu;
@@ -518,17 +524,29 @@ void frmMain::doPopup(wxWindow *win, wxPoint point, pgObject *object)
 			wxMenu *indivMenu = object->GetNewMenu();
 			if (indivMenu)
 			{
+
 				if (indivMenu->GetMenuItemCount() > 1)
 				{
 					wxMenuItem *menuItem = menuBar->FindItem(newMenuFactory->GetId());
-					treeContextMenu->Insert(newItemPos, newMenuFactory->GetId(), menuItem->GetLabel(), indivMenu, menuItem->GetHelp());
+#if wxCHECK_VERSION(2, 9, 0)
+					wxString lab = menuItem->GetItemLabelText();
+#else
+					wxString lab = menuItem->GetLabel(); // deprecated
+#endif
+
+					treeContextMenu->Insert(newItemPos, newMenuFactory->GetId(), lab, indivMenu, menuItem->GetHelp());
 				}
 				else
 				{
 					if (indivMenu->GetMenuItemCount() == 1)
 					{
 						wxMenuItem *menuItem = indivMenu->GetMenuItems().Item(0)->GetData();
-						treeContextMenu->Insert(newItemPos, menuItem->GetId(), menuItem->GetLabel(), menuItem->GetHelp());
+#if wxCHECK_VERSION(2, 9, 0)
+						wxString lab = menuItem->GetItemLabelText();
+#else
+						wxString lab = menuItem->GetLabel(); // deprecated
+#endif
+						treeContextMenu->Insert(newItemPos, menuItem->GetId(), lab, menuItem->GetHelp());
 					}
 					delete indivMenu;
 				}
@@ -896,7 +914,9 @@ void frmMain::OnSaveDefinition(wxCommandEvent &event)
 	{
 		// Write the file
 		if (!FileWrite(filename.GetPath(), sqlPane->GetText()))
+		{
 			wxLogError(__("Could not write the file %s: Errcode=%d."), filename.GetPath().c_str(), wxSysErrorCode());
+		}
 	}
 	else
 	{
diff --git a/pgadmin/frm/frmEditGrid.cpp b/pgadmin/frm/frmEditGrid.cpp
index efe35ac..c1fca00 100644
--- a/pgadmin/frm/frmEditGrid.cpp
+++ b/pgadmin/frm/frmEditGrid.cpp
@@ -143,9 +143,9 @@ frmEditGrid::frmEditGrid(frmMain *form, const wxString &_title, pgConn *_conn, p
 
 	// Setup the limit bar
 #ifndef __WXMAC__
-	cbLimit = new wxComboBox(this, CTRLID_LIMITCOMBO, wxEmptyString, wxPoint(0, 0), wxSize(GetCharWidth() * 12, -1), NULL, wxCB_DROPDOWN);
+	cbLimit = new wxComboBox(this, CTRLID_LIMITCOMBO, wxEmptyString, wxPoint(0, 0), wxSize(GetCharWidth() * 12, -1), wxArrayString(), wxCB_DROPDOWN);
 #else
-	cbLimit = new wxComboBox(this, CTRLID_LIMITCOMBO, wxEmptyString, wxPoint(0, 0), wxSize(GetCharWidth() * 24, -1), NULL, wxCB_DROPDOWN);
+	cbLimit = new wxComboBox(this, CTRLID_LIMITCOMBO, wxEmptyString, wxPoint(0, 0), wxSize(GetCharWidth() * 24, -1), wxArrayString(), wxCB_DROPDOWN);
 #endif
 	cbLimit->Append(_("No limit"));
 	cbLimit->Append(_("1000 rows"));
@@ -1913,7 +1913,13 @@ public:
 
 	virtual bool IsAcceptedKey(wxKeyEvent &event);
 	virtual void BeginEdit(int row, int col, wxGrid *grid);
+
+#if wxCHECK_VERSION(2, 9, 0)
+	virtual void ApplyEdit(int row, int col, wxGrid* grid); // pure virtual in wx 2.9+, doesn't exist in prior versions
+	virtual bool EndEdit(int row, int col, const wxGrid *grid, const wxString&, wxString*);
+#else
 	virtual bool EndEdit(int row, int col, wxGrid *grid);
+#endif
 
 	virtual void Reset();
 	virtual void StartingClick();
@@ -2042,7 +2048,33 @@ void sqlGridBoolEditor::BeginEdit(int row, int col, wxGrid *grid)
 	CBox()->SetFocus();
 }
 
+#define BOOL_EDIT_SWITCH switch (value) \
+{ \
+			case wxCHK_UNCHECKED:\
+				grid->GetTable()->SetValue(row, col, wxT("FALSE"));\
+				break;\
+			case wxCHK_CHECKED:\
+				grid->GetTable()->SetValue(row, col, wxT("TRUE"));\
+				break;\
+			case wxCHK_UNDETERMINED:\
+				grid->GetTable()->SetValue(row, col, wxEmptyString);\
+				break;\
+}\
+
+#if wxCHECK_VERSION(2, 9, 0)
+// pure virtual in 2.9+, doesn't exist in prior versions
+void sqlGridBoolEditor::ApplyEdit(int row, int col, wxGrid* grid)
+{
+	wxCheckBoxState value = CBox()->Get3StateValue();
+	BOOL_EDIT_SWITCH
+}
+#endif
+
+#if wxCHECK_VERSION(2, 9, 0)
+bool sqlGridBoolEditor::EndEdit(int row, int col, const wxGrid *grid, const wxString&, wxString*)
+#else
 bool sqlGridBoolEditor::EndEdit(int row, int col, wxGrid *grid)
+#endif
 {
 	wxASSERT_MSG(m_control, wxT("The sqlGridBoolEditor must be Created first!"));
 
@@ -2051,21 +2083,12 @@ bool sqlGridBoolEditor::EndEdit(int row, int col, wxGrid *grid)
 	if ( value != m_startValue )
 		changed = true;
 
+#if !wxCHECK_VERSION(2, 9, 0)	
 	if ( changed )
 	{
-		switch (value)
-		{
-			case wxCHK_UNCHECKED:
-				grid->GetTable()->SetValue(row, col, wxT("FALSE"));
-				break;
-			case wxCHK_CHECKED:
-				grid->GetTable()->SetValue(row, col, wxT("TRUE"));
-				break;
-			case wxCHK_UNDETERMINED:
-				grid->GetTable()->SetValue(row, col, wxEmptyString);
-				break;
-		}
+		BOOL_EDIT_SWITCH
 	}
+#endif
 
 	return changed;
 }
diff --git a/pgadmin/frm/frmHbaConfig.cpp b/pgadmin/frm/frmHbaConfig.cpp
index 8bdc3b4..c4615e5 100644
--- a/pgadmin/frm/frmHbaConfig.cpp
+++ b/pgadmin/frm/frmHbaConfig.cpp
@@ -189,7 +189,7 @@ void frmHbaConfig::DisplayFile(const wxString &str)
 	{
 		pgHbaConfigLine *line = new pgHbaConfigLine();
 		lines.Add(line);
-		line->item = listEdit->AppendItem(0, wxEmptyString);
+		line->item = listEdit->AppendItem(0, wxString(wxEmptyString));
 	}
 }
 
@@ -328,7 +328,7 @@ void frmHbaConfig::OnEditSetting(wxListEvent &event)
 
 				if (isLastLine)
 				{
-					long pos = listEdit->AppendItem(0, wxEmptyString);
+					long pos = listEdit->AppendItem(0, wxString(wxEmptyString));
 					pgHbaConfigLine *line = new pgHbaConfigLine();
 					line->item = pos;
 					lines.Add(line);
diff --git a/pgadmin/frm/frmHint.cpp b/pgadmin/frm/frmHint.cpp
index 872712b..a953814 100644
--- a/pgadmin/frm/frmHint.cpp
+++ b/pgadmin/frm/frmHint.cpp
@@ -275,7 +275,7 @@ void frmHint::SetHint(const wxString &info)
 			if (a < 0)
 				a = 0;
 			if (o < 0)
-				o = wxStringBase::npos;
+				o = wxString::npos;
 
 
 			int ha = page.Find(wxT("<H3>"));
diff --git a/pgadmin/frm/frmMain.cpp b/pgadmin/frm/frmMain.cpp
index 7cfdd0e..b79e0df 100644
--- a/pgadmin/frm/frmMain.cpp
+++ b/pgadmin/frm/frmMain.cpp
@@ -1081,12 +1081,17 @@ void frmMain::ReportConnError(pgServer *server)
 
 	wantHint = reportError(error, __("Translator attention: must match libpq translation!Is the server running on host"), HINT_CONNECTSERVER);
 	if (!wantHint)
+	{
 		wantHint = reportError(error, __("Translator attention: must match backend translation!no pg_hba.conf entry for"), HINT_MISSINGHBA);
+	}
 	if (!wantHint)
+	{	
 		wantHint = reportError(error, __("Translator attention: must match backend translation!Ident authentication failed"), HINT_MISSINGIDENT);
-
+	}
 	if (!wantHint)
+	{
 		wxLogError(__("Error connecting to the server: %s"), error.c_str());
+	}
 }
 
 
diff --git a/pgadmin/frm/frmMainConfig.cpp b/pgadmin/frm/frmMainConfig.cpp
index e3ce2aa..ab8752c 100644
--- a/pgadmin/frm/frmMainConfig.cpp
+++ b/pgadmin/frm/frmMainConfig.cpp
@@ -240,7 +240,6 @@ void frmMainConfig::OnUndo(wxCommandEvent &ev)
 	if (!name.IsEmpty())
 	{
 		pgSettingItem *item = options[name];
-		wxASSERT(name);
 		if (item->newLine)
 		{
 			delete item->newLine;
@@ -258,7 +257,6 @@ void frmMainConfig::UpdateLine(int pos)
 	if (!name.IsEmpty())
 	{
 		pgSettingItem *item = options[name];
-		wxASSERT(name);
 
 		pgConfigLine *line = item->newLine;
 		if (!line)
diff --git a/pgadmin/frm/frmPgpassConfig.cpp b/pgadmin/frm/frmPgpassConfig.cpp
index 00f96c7..7f51a82 100644
--- a/pgadmin/frm/frmPgpassConfig.cpp
+++ b/pgadmin/frm/frmPgpassConfig.cpp
@@ -162,7 +162,7 @@ void frmPgpassConfig::DisplayFile(const wxString &str)
 	{
 		pgPassConfigLine *line = new pgPassConfigLine();
 		lines.Add(line);
-		line->item = listEdit->AppendItem(0, wxEmptyString);
+		line->item = listEdit->AppendItem(0, wxString(wxEmptyString));
 	}
 }
 
@@ -300,7 +300,7 @@ void frmPgpassConfig::OnEditSetting(wxListEvent &event)
 
 				if (isLastLine)
 				{
-					long pos = listEdit->AppendItem(0, wxEmptyString);
+					long pos = listEdit->AppendItem(0, wxString(wxEmptyString));
 					pgPassConfigLine *line = new pgPassConfigLine();
 					line->item = pos;
 					lines.Add(line);
diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp
index a9ea2b2..bee5ea8 100644
--- a/pgadmin/frm/frmQuery.cpp
+++ b/pgadmin/frm/frmQuery.cpp
@@ -415,7 +415,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
 	toolBar->Realize();
 
 	// Add the database selection bar
-	cbConnection = new wxBitmapComboBox(this, CTRLID_CONNECTION, wxEmptyString, wxDefaultPosition, wxSize(-1, -1), NULL, wxCB_READONLY | wxCB_DROPDOWN);
+	cbConnection = new wxBitmapComboBox(this, CTRLID_CONNECTION, wxEmptyString, wxDefaultPosition, wxSize(-1, -1), wxArrayString(), wxCB_READONLY | wxCB_DROPDOWN);
 	cbConnection->Append(conn->GetName(), CreateBitmap(GetServerColour(conn)), (void *)conn);
 	cbConnection->Append(_("<new connection>"), wxNullBitmap, (void *)0);
 
@@ -437,7 +437,7 @@ frmQuery::frmQuery(frmMain *form, const wxString &_title, pgConn *_conn, const w
 	boxHistory->Add(label, 0, wxALL | wxALIGN_CENTER_VERTICAL, 1);
 
 	// Query combobox
-	sqlQueries = new wxComboBox(pnlQuery, CTL_SQLQUERYCBOX, wxT(""), wxDefaultPosition, wxDefaultSize, NULL, wxCB_DROPDOWN | wxCB_READONLY);
+	sqlQueries = new wxComboBox(pnlQuery, CTL_SQLQUERYCBOX, wxT(""), wxDefaultPosition, wxDefaultSize, wxArrayString(), wxCB_DROPDOWN | wxCB_READONLY);
 	sqlQueries->SetToolTip(_("Previous queries"));
 	LoadQueries();
 	boxHistory->Add(sqlQueries, 1, wxEXPAND | wxALL | wxALIGN_CENTER_VERTICAL, 1);
diff --git a/pgadmin/frm/frmReport.cpp b/pgadmin/frm/frmReport.cpp
index a939046..f76df5e 100644
--- a/pgadmin/frm/frmReport.cpp
+++ b/pgadmin/frm/frmReport.cpp
@@ -1289,7 +1289,7 @@ void reportObjectDataDictionaryFactory::GenerateReport(frmReport *report, pgObje
 	// Columns
 	int section = report->XmlCreateSection(_("Columns"));
 
-	report->XmlSetSectionTableHeader(section, 6, _("Name"), _("Data type"), _("Not Null?"), _("Primary key?"), _("Default"), _("Comment"));
+	report->XmlSetSectionTableHeader(section, 6, (const wxChar*) _("Name"), (const wxChar*) _("Data type"), (const wxChar*) _("Not Null?"), (const wxChar*) _("Primary key?"), (const wxChar*) _("Default"), (const wxChar*) _("Comment"));
 
 	ctlTree *browser = GetFrmMain()->GetBrowser();
 	pgCollection *columns = table->GetColumnCollection(browser);
@@ -1312,14 +1312,14 @@ void reportObjectDataDictionaryFactory::GenerateReport(frmReport *report, pgObje
 			}
 
 			report->XmlAddSectionTableRow(section,
-			                              column->GetColNumber(),
-			                              6,
-			                              colName.c_str(),
-			                              column->GetVarTypename().c_str(),
-			                              BoolToYesNo(column->GetNotNull()).c_str(),
-			                              BoolToYesNo(column->GetIsPK()).c_str(),
-			                              column->GetDefault().c_str(),
-			                              column->GetComment().c_str());
+							column->GetColNumber(),
+							6,
+							(const wxChar*) colName,
+							(const wxChar*) column->GetVarTypename(),
+							(const wxChar*) BoolToYesNo(column->GetNotNull()),
+							(const wxChar*) BoolToYesNo(column->GetIsPK()),
+							(const wxChar*) column->GetDefault(),
+							(const wxChar*) column->GetComment());
 		}
 	}
 	if (haveInherit)
@@ -1342,7 +1342,7 @@ void reportObjectDataDictionaryFactory::GenerateReport(frmReport *report, pgObje
 		if (x == 1)
 		{
 			section = report->XmlCreateSection(_("Constraints"));
-			report->XmlSetSectionTableHeader(section, 4, _("Name"), _("Type"), _("Definition"), _("Comment"));
+			report->XmlSetSectionTableHeader(section, 4, (const wxChar*) _("Name"), (const wxChar*) _("Type"), (const wxChar*) _("Definition"), (const wxChar*) _("Comment"));
 		}
 
 		constraint->ShowTreeDetail(browser);
@@ -1372,12 +1372,12 @@ void reportObjectDataDictionaryFactory::GenerateReport(frmReport *report, pgObje
 		}
 
 		report->XmlAddSectionTableRow(section,
-		                              x,
-		                              4,
-		                              constraint->GetName().c_str(),
-		                              type.c_str(),
-		                              definition.c_str(),
-		                              constraint->GetComment().c_str());
+						x,
+						4,
+						(const wxChar*) constraint->GetName(),
+						(const wxChar*) type,
+						(const wxChar*) definition,
+						(const wxChar*) constraint->GetComment());
 		x++;
 	}
 }
diff --git a/pgadmin/frm/frmRestore.cpp b/pgadmin/frm/frmRestore.cpp
index 1f139d7..326af4f 100644
--- a/pgadmin/frm/frmRestore.cpp
+++ b/pgadmin/frm/frmRestore.cpp
@@ -430,7 +430,9 @@ wxString frmRestore::getCmdPart2(int step)
 				if (restoreStrings[i] != wxEmptyString)
 				{
 					if (!tocFile.Write(restoreStrings[i] + wxT("\n")))
+					{
 						wxLogError(_("Error writing to the temporary file ") + restoreTOCFilename);
+					}
 				}
 			}
 
@@ -667,7 +669,9 @@ void frmRestore::OnEndProcess(wxProcessEvent &ev)
 					// if we are treating a comment, we use the schema of its
 					// object (ie, the previous line)
 					else if (type != wxT("COMMENT"))
+					{	
 						wxLogError(_("Schema node not found for object ") + type + wxT(" ") + name + wxT(" [") + _("owner") + wxT(": ") + owner + wxT("]"));
+					}
 				}
 				lastItem = ctvObjects->AppendItem(currentSchemaNode, type + wxT(" ") + name + wxT(" [") + _("owner") + wxT(": ") + owner + wxT("]"), 1);
 			}
diff --git a/pgadmin/frm/frmStatus.cpp b/pgadmin/frm/frmStatus.cpp
index 37e1b34..eda9c30 100644
--- a/pgadmin/frm/frmStatus.cpp
+++ b/pgadmin/frm/frmStatus.cpp
@@ -267,7 +267,7 @@ frmStatus::frmStatus(frmMain *form, const wxString &_title, pgConn *conn) : pgFr
 	btnRotateLog = new wxButton(toolBar, CTL_ROTATEBTN, _("Rotate"));
 	toolBar->AddControl(btnRotateLog);
 	toolBar->AddSeparator();
-	cbRate = new wxComboBox(toolBar, CTL_RATECBO, wxEmptyString, wxDefaultPosition, wxSize(-1, -1), NULL, wxCB_READONLY | wxCB_DROPDOWN);
+	cbRate = new wxComboBox(toolBar, CTL_RATECBO, wxEmptyString, wxDefaultPosition, wxSize(-1, -1), wxArrayString(), wxCB_READONLY | wxCB_DROPDOWN);
 	toolBar->AddControl(cbRate);
 	toolBar->AddSeparator();
 	cbDatabase = new ctlComboBoxFix(toolBar, CTRLID_DATABASE, wxDefaultPosition, wxSize(-1, -1), wxCB_READONLY | wxCB_DROPDOWN);
@@ -963,7 +963,9 @@ void frmStatus::OnCopyQuery(wxCommandEvent &ev)
 	}
 
 	if (text.Length() == maxlength)
+	{
 		wxLogError(_("The query you copied is at the maximum length.\nIt may have been truncated."));
+	}
 
 	// If we have some real query, launch the query tool
 	if (text.Length() > 0 && dbname.Length() > 0
@@ -1632,9 +1634,9 @@ void frmStatus::OnRefreshLogTimer(wxTimerEvent &event)
 		{
 			logDirectory = wxT("-");
 			if (connection->BackendMinimumVersion(8, 3))
-				logList->AppendItem(-1, _("logging_collector not enabled or log_filename misconfigured"));
+				logList->AppendItem(-1, wxString(_("logging_collector not enabled or log_filename misconfigured")));
 			else
-				logList->AppendItem(-1, _("redirect_stderr not enabled or log_filename misconfigured"));
+				logList->AppendItem(-1, wxString(_("redirect_stderr not enabled or log_filename misconfigured")));
 			cbLogfiles->Disable();
 			btnRotateLog->Disable();
 		}
@@ -1812,8 +1814,8 @@ void frmStatus::addLogFile(const wxString &filename, const wxDateTime timestamp,
 		read += strlen(raw);
 
 		wxString str;
-		if (wxString(wxString(raw, wxConvLibc), wxConvUTF8).Len() > 0)
-			str = line + wxString(wxString(raw, wxConvLibc), wxConvUTF8);
+		if (wxString(wxString(raw, wxConvLibc).wx_str(), wxConvUTF8).Len() > 0)
+			str = line + wxString(wxString(raw, wxConvLibc).wx_str(), wxConvUTF8);
 		else
 			str = line + wxTextBuffer::Translate(wxString(raw, set->GetConversion()), wxTextFileType_Unix);
 
@@ -1874,7 +1876,7 @@ void frmStatus::addLogFile(const wxString &filename, const wxDateTime timestamp,
 					if (str.length() > 5 && str.Left(4) != wxT("2009") && str.Left(3) != wxT("201") && str.Left(3) != wxT("202"))
 					{
 						// BUG:  We are out of sync on the log
-						wxLogNotice(wxT("Log line does not start with timestamp: %s\n"), str.c_str());;
+						wxLogNotice(wxT("Log line does not start with timestamp: %s\n"), str.c_str());
 					}
 					else if (str.length() < 20)
 					{
diff --git a/pgadmin/frm/plugins.cpp b/pgadmin/frm/plugins.cpp
index 246ad62..d35df47 100644
--- a/pgadmin/frm/plugins.cpp
+++ b/pgadmin/frm/plugins.cpp
@@ -342,7 +342,9 @@ wxWindow *pluginUtilityFactory::StartDialog(frmMain *form, pgObject *obj)
 
 	// Let's go!!
 	if (wxExecute(execCmd) == 0)
+	{
 		wxLogError(_("Failed to execute plugin %s (%s)"), title.c_str(), command.c_str());
+	}	
 
 	return 0;
 }
diff --git a/pgadmin/gqb/gqbGraphSimple.cpp b/pgadmin/gqb/gqbGraphSimple.cpp
index 24189c6..05d7af2 100644
--- a/pgadmin/gqb/gqbGraphSimple.cpp
+++ b/pgadmin/gqb/gqbGraphSimple.cpp
@@ -51,7 +51,12 @@ gqbGraphSimple::gqbGraphSimple()
 // (2)Need to set a font for the device context before get font metrics with GetTextExtent
 void gqbGraphSimple::drawTable(wxMemoryDC &bdc, wxPoint *origin, gqbQueryObject *queryTable)
 {
+
+#if wxCHECK_VERSION(2, 9, 0)
+	wxCoord  w = 0, h = 0, height = 0, width = 0, margin = 5;
+#else
 	long  w = 0, h = 0, height = 0, width = 0, margin = 5;
+#endif
 
 	// Get Value for row Height
 	if(!rowHeight)
diff --git a/pgadmin/gqb/gqbGridProjTable.cpp b/pgadmin/gqb/gqbGridProjTable.cpp
index cef71f6..1db2ee0 100644
--- a/pgadmin/gqb/gqbGridProjTable.cpp
+++ b/pgadmin/gqb/gqbGridProjTable.cpp
@@ -274,7 +274,7 @@ void gqbGridProjTable::changesPositions(int sPos, int dPos)
 // Change a single row or a range to one pos up or down (but no more than one position)
 void gqbGridProjTable::changesRangeOnePos(int topPos, int bottomPos, int newTop)
 {
-	// Eliminate side effect of zero base array on calculations, but carefull newTop still it's zero based
+	// Eliminate side effect of zero base array on calculations, but careful newTop still it's zero based
 	topPos++;
 	bottomPos++;
 	int sizeRange = bottomPos - (topPos - 1), size = GetNumberRows();
@@ -324,3 +324,4 @@ void gqbGridProjTable::emptyTableData()
 		GetView()->ProcessTableMessage( msg );
 	}
 }
+
diff --git a/pgadmin/gqb/gqbView.cpp b/pgadmin/gqb/gqbView.cpp
index 7874745..51a46be 100644
--- a/pgadmin/gqb/gqbView.cpp
+++ b/pgadmin/gqb/gqbView.cpp
@@ -106,7 +106,11 @@ gqbView::gqbView(wxWindow *gqbParent, wxAuiNotebook *gridParent, wxSize size, gq
 	this->orderByRGridTable = new gqbGridOrderTable(2, model->getOrdByColumns(), model->getOrdByParents(), model->getOrdByKind());
 	this->orderPanel = new gqbOrderPanel(controller->getTabs(), orderByLGridTable, orderByRGridTable);
 
-	SetVirtualSizeHints(size);
+#if !wxCHECK_VERSION(2, 9, 0)
+	// does nothing in 2.9+
+	SetVirtualSizeHints(size);			
+#endif
+
 }
 
 
diff --git a/pgadmin/gqb/gqbViewPanels.cpp b/pgadmin/gqb/gqbViewPanels.cpp
index 3937753..d3087f8 100644
--- a/pgadmin/gqb/gqbViewPanels.cpp
+++ b/pgadmin/gqb/gqbViewPanels.cpp
@@ -208,7 +208,8 @@ void gqbGridPanel::OnButtonUp(wxCommandEvent &)
 	allowSelCells = false;
 	if((selTop >= 0 && selBottom == -1) || (selTop == selBottom))
 	{
-		gModel->changesPositions(selTop, selTop--);
+		--selTop;
+		gModel->changesPositions(selTop, selTop + 1);
 		if(selTop < 0)
 		{
 			selTop = 0;
@@ -289,7 +290,8 @@ void gqbGridPanel::OnButtonDown(wxCommandEvent &)
 	// A single row is selected
 	if((selTop >= 0 && selBottom == -1) || (selTop == selBottom))
 	{
-		gModel->changesPositions(selTop, selTop++);
+		++selTop;
+		gModel->changesPositions(selTop, selTop - 1);
 
 		// Adjust selection when selected item it's last item.
 		if(selTop == gModel->GetNumberRows())
@@ -1130,7 +1132,8 @@ void gqbOrderPanel::OnButtonUp(wxCommandEvent &)
 	allowSelCells = false;
 	if((selRightTop >= 0 && selRightBottom == -1) || (selRightTop == selRightBottom))
 	{
-		tableRight->changesPositions(selRightTop, selRightTop--);
+		--selRightTop;
+		tableRight->changesPositions(selRightTop, selRightTop + 1);
 		if(selRightTop < 0)
 		{
 			selRightTop = 0;
@@ -1211,7 +1214,8 @@ void gqbOrderPanel::OnButtonDown(wxCommandEvent &)
 	// A single row is selected
 	if((selRightTop >= 0 && selRightBottom == -1) || (selRightTop == selRightBottom))
 	{
-		tableRight->changesPositions(selRightTop, selRightTop++);
+		++selRightTop;
+		tableRight->changesPositions(selRightTop, selRightTop - 1);
 
 		// Adjust selection when selected item it's last item.
 		if(selRightTop == tableRight->GetNumberRows())
diff --git a/pgadmin/include/ctl/calbox.h b/pgadmin/include/ctl/calbox.h
index d3f33f9..b769637 100644
--- a/pgadmin/include/ctl/calbox.h
+++ b/pgadmin/include/ctl/calbox.h
@@ -13,6 +13,13 @@
 #define _WX_CALBOX_H_
 
 #include "wx/calctrl.h"
+// pgCompatCalendarCtrl is a typedef for either wxGenericCalendarCtrl or wxCalendarCtrl
+#if wxCHECK_VERSION(2, 9, 0)
+#include "wx/generic/calctrlg.h"
+typedef wxGenericCalendarCtrl pgCompatCalendarCtrl;
+#else
+typedef wxCalendarCtrl pgCompatCalendarCtrl;
+#endif
 
 class wxCalendarBox : public wxControl
 {
@@ -88,7 +95,7 @@ public:
 private:
 	wxDialog *m_dlg;
 	wxTextCtrl *m_txt;
-	wxCalendarCtrl *m_cal;
+	pgCompatCalendarCtrl *m_cal;
 	wxButton *m_btn;
 	wxString m_format;
 
diff --git a/pgadmin/include/ctl/ctlListView.h b/pgadmin/include/ctl/ctlListView.h
index 27a48a0..df08a42 100644
--- a/pgadmin/include/ctl/ctlListView.h
+++ b/pgadmin/include/ctl/ctlListView.h
@@ -29,41 +29,41 @@ public:
 	void CreateColumns(wxImageList *images, const wxString &left, const wxString &right, int leftSize = 60);
 	void CreateColumns(wxImageList *images, const wxString &str1, const wxString &str2, const wxString &str3, int leftSize = 60);
 
-	void AddColumn(const wxChar *text, int size = wxLIST_AUTOSIZE_USEHEADER, int format = wxLIST_FORMAT_LEFT);
+	void AddColumn(const wxString &text, int size = wxLIST_AUTOSIZE_USEHEADER, int format = wxLIST_FORMAT_LEFT);
 
-	long AppendItem(int icon, const wxChar *val, const wxChar *val2 = 0, const wxChar *val3 = 0, const wxChar *val4 = 0);
-	long AppendItem(const wxChar *val, const wxChar *val2 = 0, const wxChar *val3 = 0)
+	long AppendItem(int icon, const wxString &val, const wxString &val2 = wxString(), const wxString &val3 = wxString(), const wxString &val4 = wxString());
+	long AppendItem(const wxString &val, const wxString &val2 = wxString(), const wxString &val3 = wxString())
 	{
 		return AppendItem(PGICON_PROPERTY, val, val2, val3);
 	}
-	void AppendItem(const wxChar *str, const long l)
+	void AppendItem(const wxString &str, long l)
 	{
 		AppendItem(str, NumToStr(l));
 	}
-	void AppendItem(const wxChar *str, const bool b)
-	{
-		AppendItem(str, BoolToYesNo(b));
-	}
-	void AppendItem(const wxChar *str, const double d)
+	void AppendItem(const wxString &str, double d)
 	{
 		AppendItem(str, NumToStr(d));
 	}
-	void AppendItem(const wxChar *str, const OID o)
+	void AppendItem(const wxString &str, OID o)
 	{
 		AppendItem(str, NumToStr(o));
 	}
-	void AppendItem(const wxChar *str, const wxDateTime &d)
+	void AppendItem(const wxString &str, const wxDateTime &d)
 	{
 		AppendItem(str, DateToStr(d));
 	}
-	void AppendItem(const wxChar *str, const wxLongLong &l)
+	void AppendItem(const wxString &str, const wxLongLong &l)
 	{
 		AppendItem(str, l.ToString());
 	}
-	void AppendItem(const wxChar *str, const wxULongLong &l)
+	void AppendItem(const wxString &str, const wxULongLong &l)
 	{
 		AppendItem(str, l.ToString());
 	}
+	void AppendYesNoItem(const wxString &str, bool b)
+	{
+		AppendItem(str, BoolToYesNo(b));
+	}
 
 	void DeleteCurrentItem()
 	{
diff --git a/pgadmin/include/utils/sysLogger.h b/pgadmin/include/utils/sysLogger.h
index eeeaef2..cf2925b 100644
--- a/pgadmin/include/utils/sysLogger.h
+++ b/pgadmin/include/utils/sysLogger.h
@@ -45,6 +45,16 @@ private:
 #define wxLOG_Script (wxLOG_User+4)
 #define wxLOG_ScriptVerbose (wxLOG_User+5)
 
+#if wxCHECK_VERSION(2, 9, 0)
+
+#define wxLogNotice wxDO_LOG(Notice)
+#define wxLogSql wxDO_LOG(Sql)
+#define wxLogQuietError wxDO_LOG(QuietError)
+#define wxLogScript wxDO_LOG(Script)
+#define wxLogScriptVerbose wxDO_LOG(ScriptVerbose)
+
+#else
+
 #define DECLARE_INT_LOG_FUNCTION(level)                                  \
 extern void wxVLog##level(const wxChar *szFormat, va_list argptr);       \
 extern void wxLog##level(const wxChar *szFormat, ...) ATTRIBUTE_PRINTF_1
@@ -56,3 +66,7 @@ DECLARE_INT_LOG_FUNCTION(Script);
 DECLARE_INT_LOG_FUNCTION(ScriptVerbose);
 
 #endif
+
+
+#endif // SYSLOGGER_H
+
diff --git a/pgadmin/include/utils/sysSettings.h b/pgadmin/include/utils/sysSettings.h
index ee4f2c3..7cc7641 100644
--- a/pgadmin/include/utils/sysSettings.h
+++ b/pgadmin/include/utils/sysSettings.h
@@ -670,7 +670,7 @@ public:
 	}
 
 	// Functions for storing settings
-	bool Write(const wxString &key, const wxChar *value)
+	bool Write(const wxString &key, const wxString &value)
 	{
 		return wxConfig::Write(key, value);
 	}
@@ -682,7 +682,6 @@ public:
 	{
 		return wxConfig::Write(key, value);
 	}
-	bool Write(const wxString &key, bool value);
 	bool Write(const wxString &key, const wxPoint &value);
 	bool Write(const wxString &key, const wxSize &value);
 	bool Write(const wxString &key, const wxSize &size, const wxPoint &point)
@@ -709,7 +708,6 @@ public:
 	static wxString GetConfigFile(configFileName cfgname);
 
 private:
-
 	static const wxString &getDefaultElementColor(int index)
 	{
 		static const wxString colors[] =
diff --git a/pgadmin/pgAdmin3.cpp b/pgadmin/pgAdmin3.cpp
index 603c0fd..4e7c2ca 100644
--- a/pgadmin/pgAdmin3.cpp
+++ b/pgadmin/pgAdmin3.cpp
@@ -262,6 +262,21 @@ bool pgAdmin3::OnInit()
 
 	static const wxCmdLineEntryDesc cmdLineDesc[] =
 	{
+#if wxCHECK_VERSION(2, 9, 0)	
+		// wxCmdLineEntryDesc is one of the few places in 2.9 where wxT()s have any effect...they break the build
+		{wxCMD_LINE_SWITCH, "h", "help", _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
+		{wxCMD_LINE_OPTION, "s", "server", _("auto-connect to specified server"), wxCMD_LINE_VAL_STRING},
+		{wxCMD_LINE_SWITCH, "S", "serverstatus", _("open server status window"), wxCMD_LINE_VAL_NONE},
+		{wxCMD_LINE_OPTION, "Sc", "serverstatusconnect", _("connect server status window to database"), wxCMD_LINE_VAL_STRING},
+		{wxCMD_LINE_SWITCH, "q", "query", _("open query tool"), wxCMD_LINE_VAL_NONE},
+		{wxCMD_LINE_OPTION, "qc", "queryconnect", _("connect query tool to database"), wxCMD_LINE_VAL_STRING},
+		{wxCMD_LINE_OPTION, "f", "file", _("file to load into the query tool in -q or -qc mode"), wxCMD_LINE_VAL_STRING},
+		{wxCMD_LINE_OPTION, "cm", NULL, _("edit main configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
+		{wxCMD_LINE_OPTION, "ch", NULL, _("edit HBA configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
+		{wxCMD_LINE_OPTION, "cp", NULL, _("edit pgpass configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
+		{wxCMD_LINE_OPTION, "c", NULL, _("edit configuration files in cluster directory"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
+		{wxCMD_LINE_SWITCH, "t", NULL, _("dialog translation test mode"), wxCMD_LINE_VAL_NONE},
+#else
 		{wxCMD_LINE_SWITCH, wxT("h"), wxT("help"), _("show this help message"), wxCMD_LINE_VAL_NONE, wxCMD_LINE_OPTION_HELP },
 		{wxCMD_LINE_OPTION, wxT("s"), wxT("server"), _("auto-connect to specified server"), wxCMD_LINE_VAL_STRING},
 		{wxCMD_LINE_SWITCH, wxT("S"), wxT("serverstatus"), _("open server status window"), wxCMD_LINE_VAL_NONE},
@@ -274,7 +289,9 @@ bool pgAdmin3::OnInit()
 		{wxCMD_LINE_OPTION, wxT("cp"), NULL, _("edit pgpass configuration file"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
 		{wxCMD_LINE_OPTION, wxT("c"), NULL, _("edit configuration files in cluster directory"), wxCMD_LINE_VAL_STRING, wxCMD_LINE_PARAM_MULTIPLE},
 		{wxCMD_LINE_SWITCH, wxT("t"), NULL, _("dialog translation test mode"), wxCMD_LINE_VAL_NONE},
+#endif
 		{wxCMD_LINE_NONE}
+
 	};
 
 	frmConfig::tryMode configMode = frmConfig::NONE;
@@ -633,7 +650,9 @@ bool pgAdmin3::OnInit()
 			cmdParser.Found(wxT("f"), &fn);
 #endif
 			if (!fn.IsEmpty())
+			{
 				wxLogInfo(wxT("Auto-loading file: %s"), fn.c_str());
+			}
 			frmQuery *fq = new frmQuery(NULL, wxEmptyString, conn, wxEmptyString, fn);
 			fq->Go();
 		}
@@ -662,7 +681,9 @@ bool pgAdmin3::OnInit()
 						wxString fn;
 						cmdParser.Found(wxT("f"), &fn);
 						if (!fn.IsEmpty())
+						{
 							wxLogInfo(wxT("Auto-loading file: %s"), fn.c_str());
+						}
 						frmQuery *fq = new frmQuery(winMain, wxEmptyString, conn, wxEmptyString, fn);
 						fq->Go();
 						winMain->AddFrame(fq);
diff --git a/pgadmin/pgscript/generators/pgsDictionaryGen.cpp b/pgadmin/pgscript/generators/pgsDictionaryGen.cpp
index 36f91e2..eddb89b 100644
--- a/pgadmin/pgscript/generators/pgsDictionaryGen.cpp
+++ b/pgadmin/pgscript/generators/pgsDictionaryGen.cpp
@@ -60,10 +60,10 @@ long pgsDictionaryGen::count_lines()
 			wxTextInputStream text(input, wxT(" \t"));
 #endif
 			wxString line;
-			while ((line = text.ReadLine()) && !input.Eof())
-			{
-				++result;
-			}
+			while (!(line = text.ReadLine()).IsEmpty() && !input.Eof())
+ 			{
+ 				++result;
+ 			}
 		}
 	}
 
diff --git a/pgadmin/pgscript/parser.sh b/pgadmin/pgscript/parser.sh
old mode 100644
new mode 100755
diff --git a/pgadmin/pgscript/pgsApplication.cpp b/pgadmin/pgscript/pgsApplication.cpp
index d010d74..0622102 100644
--- a/pgadmin/pgscript/pgsApplication.cpp
+++ b/pgadmin/pgscript/pgsApplication.cpp
@@ -150,7 +150,12 @@ void pgsApplication::Complete()
 	if (m_caller != 0)
 	{
 		wxCommandEvent resultEvent(wxEVT_COMMAND_MENU_SELECTED, m_event_id);
+
+#if wxCHECK_VERSION(2, 9, 0)
+		m_caller->GetEventHandler()->AddPendingEvent(resultEvent);
+#else
 		m_caller->AddPendingEvent(resultEvent);
+#endif
 	}
 #endif // PGSCLI
 
diff --git a/pgadmin/schema/edbPackage.cpp b/pgadmin/schema/edbPackage.cpp
index 140a088..4146102 100644
--- a/pgadmin/schema/edbPackage.cpp
+++ b/pgadmin/schema/edbPackage.cpp
@@ -194,7 +194,7 @@ void edbPackage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		properties->AppendItem(_("Header"), firstLineOnly(GetHeader()));
 		properties->AppendItem(_("Body"), firstLineOnly(GetBody()));
 		properties->AppendItem(_("ACL"), GetAcl());
-		properties->AppendItem(_("System package?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System package?"), GetSystemObject());
 		if (GetConnection()->EdbMinimumVersion(8, 2))
 			properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/edbPrivateSynonym.cpp b/pgadmin/schema/edbPrivateSynonym.cpp
index 6935d01..c9cf82c 100644
--- a/pgadmin/schema/edbPrivateSynonym.cpp
+++ b/pgadmin/schema/edbPrivateSynonym.cpp
@@ -75,7 +75,7 @@ void edbPrivateSynonym::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListV
 		properties->AppendItem(_("Target type"), GetTargetType());
 		properties->AppendItem(_("Target schema"), GetTargetSchema());
 		properties->AppendItem(_("Target object"), GetTargetObject());
-		properties->AppendItem(_("System synonym?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System synonym?"), GetSystemObject());
 	}
 }
 
diff --git a/pgadmin/schema/edbSynonym.cpp b/pgadmin/schema/edbSynonym.cpp
index 6ee38f7..e29f056 100644
--- a/pgadmin/schema/edbSynonym.cpp
+++ b/pgadmin/schema/edbSynonym.cpp
@@ -119,7 +119,7 @@ void edbSynonym::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		properties->AppendItem(_("Target type"), GetTargetType());
 		properties->AppendItem(_("Target schema"), GetTargetSchema());
 		properties->AppendItem(_("Target object"), GetTargetObject());
-		properties->AppendItem(_("System synonym?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System synonym?"), GetSystemObject());
 	}
 }
 
diff --git a/pgadmin/schema/gpExtTable.cpp b/pgadmin/schema/gpExtTable.cpp
index c8889af..4c3077d 100644
--- a/pgadmin/schema/gpExtTable.cpp
+++ b/pgadmin/schema/gpExtTable.cpp
@@ -452,7 +452,7 @@ void gpExtTable::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		properties->AppendItem(_("OID"), GetOid());
 		properties->AppendItem(_("Owner"), GetOwner());
 		properties->AppendItem(_("ACL"), GetAcl());
-		properties->AppendItem(_("System Table?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System Table?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgAggregate.cpp b/pgadmin/schema/pgAggregate.cpp
index e8488a9..7a34441 100644
--- a/pgadmin/schema/pgAggregate.cpp
+++ b/pgadmin/schema/pgAggregate.cpp
@@ -194,7 +194,7 @@ void pgAggregate::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *p
 		else
 			properties->AppendItem(_("Initial condition"), GetInitialCondition());
 
-		properties->AppendItem(_("System aggregate?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System aggregate?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgCast.cpp b/pgadmin/schema/pgCast.cpp
index 8538c16..4fd5619 100644
--- a/pgadmin/schema/pgCast.cpp
+++ b/pgadmin/schema/pgCast.cpp
@@ -133,7 +133,7 @@ void pgCast::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 		else
 			properties->AppendItem(_("Function"), GetCastFunction() + wxT("(") + GetSourceType() + wxT(")"));
 		properties->AppendItem(_("Context"), GetCastContext());
-		properties->AppendItem(_("System cast?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System cast?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(7, 5))
 			properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/pgColumn.cpp b/pgadmin/schema/pgColumn.cpp
index 882cefe..d51ee53 100644
--- a/pgadmin/schema/pgColumn.cpp
+++ b/pgadmin/schema/pgColumn.cpp
@@ -402,9 +402,9 @@ void pgColumn::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 			{
 				properties->AppendItem(_("Sequence"), database->GetSchemaPrefix(GetSerialSchema()) + GetSerialSequence());
 
-				properties->AppendItem(_("Not NULL?"), GetNotNull());
-				properties->AppendItem(_("Primary key?"), GetIsPK());
-				properties->AppendItem(_("Foreign key?"), GetIsFK());
+				properties->AppendYesNoItem(_("Not NULL?"), GetNotNull());
+				properties->AppendYesNoItem(_("Primary key?"), GetIsPK());
+				properties->AppendYesNoItem(_("Foreign key?"), GetIsFK());
 				properties->AppendItem(_("Storage"), GetStorage());
 				if (GetInheritedCount() != 0)
 				{
@@ -413,7 +413,7 @@ void pgColumn::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 				}
 				else
 				{
-					properties->AppendItem(_("Inherited"), false);
+					properties->AppendYesNoItem(_("Inherited"), false);
 				}
 				properties->AppendItem(_("Statistics"), GetAttstattarget());
 				size_t i;
@@ -422,7 +422,7 @@ void pgColumn::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 					wxString item = variables.Item(i);
 					properties->AppendItem(item.BeforeFirst('='), item.AfterFirst('='));
 				}
-				properties->AppendItem(_("System column?"), GetSystemObject());
+				properties->AppendYesNoItem(_("System column?"), GetSystemObject());
 			}
 		}
 		if (GetDatabase()->BackendMinimumVersion(8, 4))
diff --git a/pgadmin/schema/pgConversion.cpp b/pgadmin/schema/pgConversion.cpp
index 9c4c095..2ddce1d 100644
--- a/pgadmin/schema/pgConversion.cpp
+++ b/pgadmin/schema/pgConversion.cpp
@@ -129,8 +129,8 @@ void pgConversion::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *
 		properties->AppendItem(_("From"), GetForEncoding());
 		properties->AppendItem(_("To"), GetToEncoding());
 		properties->AppendItem(_("Function"), GetSchemaPrefix(GetProcNamespace()) + GetProc());
-		properties->AppendItem(_("Default?"), GetDefaultConversion());
-		properties->AppendItem(_("System conversion?"), GetSystemObject());
+		properties->AppendYesNoItem(_("Default?"), GetDefaultConversion());
+		properties->AppendYesNoItem(_("System conversion?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(7, 5))
 			properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/pgDatabase.cpp b/pgadmin/schema/pgDatabase.cpp
index ffa4767..3528aa9 100644
--- a/pgadmin/schema/pgDatabase.cpp
+++ b/pgadmin/schema/pgDatabase.cpp
@@ -644,15 +644,15 @@ void pgDatabase::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 				// but if we want this, how will we display that?
 			}
 		}
-		properties->AppendItem(_("Allow connections?"), GetAllowConnections());
-		properties->AppendItem(_("Connected?"), GetConnected());
+		properties->AppendYesNoItem(_("Allow connections?"), GetAllowConnections());
+		properties->AppendYesNoItem(_("Connected?"), GetConnected());
 		if (GetConnection() && GetConnection()->BackendMinimumVersion(8, 1))
 		{
 			wxString strConnLimit;
 			strConnLimit.Printf(wxT("%ld"), GetConnectionLimit());
 			properties->AppendItem(_("Connection limit"), strConnLimit);
 		}
-		properties->AppendItem(_("System database?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System database?"), GetSystemObject());
 		if (GetMissingFKs())
 			properties->AppendItem(_("Old style FKs"), GetMissingFKs());
 		if (!GetSchemaRestriction().IsEmpty())
diff --git a/pgadmin/schema/pgDomain.cpp b/pgadmin/schema/pgDomain.cpp
index 05eca1f..6f4efec 100644
--- a/pgadmin/schema/pgDomain.cpp
+++ b/pgadmin/schema/pgDomain.cpp
@@ -162,8 +162,8 @@ void pgDomain::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 			properties->AppendItem(_("Dimensions"), GetDimensions());
 		properties->AppendItem(_("Default"), GetDefault());
 		properties->AppendItem(_("Check"), GetCheck());
-		properties->AppendItem(_("Not NULL?"), GetNotNull());
-		properties->AppendItem(_("System domain?"), GetSystemObject());
+		properties->AppendYesNoItem(_("Not NULL?"), GetNotNull());
+		properties->AppendYesNoItem(_("System domain?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgFunction.cpp b/pgadmin/schema/pgFunction.cpp
index d646d5f..fa7443f 100644
--- a/pgadmin/schema/pgFunction.cpp
+++ b/pgadmin/schema/pgFunction.cpp
@@ -388,7 +388,7 @@ void pgFunction::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		if (!GetIsProcedure())
 			properties->AppendItem(_("Return type"), GetReturnType());
 		properties->AppendItem(_("Language"), GetLanguage());
-		properties->AppendItem(_("Returns a set?"), GetReturnAsSet());
+		properties->AppendYesNoItem(_("Returns a set?"), GetReturnAsSet());
 		if (GetLanguage().IsSameAs(wxT("C"), false))
 		{
 			properties->AppendItem(_("Object file"), GetBin());
@@ -405,10 +405,10 @@ void pgFunction::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		}
 
 		properties->AppendItem(_("Volatility"), GetVolatility());
-		properties->AppendItem(_("Security of definer?"), GetSecureDefiner());
-		properties->AppendItem(_("Strict?"), GetIsStrict());
+		properties->AppendYesNoItem(_("Security of definer?"), GetSecureDefiner());
+		properties->AppendYesNoItem(_("Strict?"), GetIsStrict());
 		if (GetConnection()->BackendMinimumVersion(8, 4))
-			properties->AppendItem(_("Window?"), GetIsWindow());
+			properties->AppendYesNoItem(_("Window?"), GetIsWindow());
 
 		size_t i;
 		for (i = 0 ; i < configList.GetCount() ; i++)
@@ -418,7 +418,7 @@ void pgFunction::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		}
 
 		properties->AppendItem(_("ACL"), GetAcl());
-		properties->AppendItem(_("System function?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System function?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgIndex.cpp b/pgadmin/schema/pgIndex.cpp
index 6a7e408..c950de6 100644
--- a/pgadmin/schema/pgIndex.cpp
+++ b/pgadmin/schema/pgIndex.cpp
@@ -351,12 +351,12 @@ void pgIndexBase::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *p
 			properties->AppendItem(_("Columns"), GetColumns());
 
 		properties->AppendItem(_("Operator classes"), GetOperatorClasses());
-		properties->AppendItem(_("Unique?"), GetIsUnique());
-		properties->AppendItem(_("Primary?"), GetIsPrimary());
-		properties->AppendItem(_("Clustered?"), GetIsClustered());
+		properties->AppendYesNoItem(_("Unique?"), GetIsUnique());
+		properties->AppendYesNoItem(_("Primary?"), GetIsPrimary());
+		properties->AppendYesNoItem(_("Clustered?"), GetIsClustered());
 		properties->AppendItem(_("Access method"), GetIndexType());
 		properties->AppendItem(_("Constraint"), GetConstraint());
-		properties->AppendItem(_("System index?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System index?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(8, 2))
 			properties->AppendItem(_("Fill factor"), GetFillFactor());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
@@ -518,7 +518,7 @@ pgObject *pgIndexBaseFactory::CreateObjects(pgCollection *coll, ctlTree *browser
 	{
 		while (!indexes->Eof())
 		{
-			switch (indexes->GetVal(wxT("contype"))[0U])
+			switch ( (wxChar)indexes->GetVal(wxT("contype"))[0U])
 			{
 				case 0:
 					index = new pgIndex(collection->GetTable(), indexes->GetVal(wxT("idxname")));
diff --git a/pgadmin/schema/pgIndexConstraint.cpp b/pgadmin/schema/pgIndexConstraint.cpp
index b6012ed..f61f79a 100644
--- a/pgadmin/schema/pgIndexConstraint.cpp
+++ b/pgadmin/schema/pgIndexConstraint.cpp
@@ -186,12 +186,12 @@ void pgIndexConstraint::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListV
 			properties->AppendItem(_("Procedure "), GetSchemaPrefix(GetProcNamespace()) + GetProcName() + wxT("(") + GetTypedColumns() + wxT(")"));
 			properties->AppendItem(_("Operator classes"), GetOperatorClasses());
 		}
-		properties->AppendItem(_("Unique?"), GetIsUnique());
-		properties->AppendItem(_("Primary?"), GetIsPrimary());
-		properties->AppendItem(_("Clustered?"), GetIsClustered());
+		properties->AppendYesNoItem(_("Unique?"), GetIsUnique());
+		properties->AppendYesNoItem(_("Primary?"), GetIsPrimary());
+		properties->AppendYesNoItem(_("Clustered?"), GetIsClustered());
 		properties->AppendItem(_("Access method"), GetIndexType());
 		properties->AppendItem(_("Constraint"), GetConstraint());
-		properties->AppendItem(_("System index?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System index?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(8, 2))
 			properties->AppendItem(_("Fill factor"), GetFillFactor());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
diff --git a/pgadmin/schema/pgLanguage.cpp b/pgadmin/schema/pgLanguage.cpp
index 655f92f..5897a97 100644
--- a/pgadmin/schema/pgLanguage.cpp
+++ b/pgadmin/schema/pgLanguage.cpp
@@ -127,10 +127,10 @@ void pgLanguage::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		if (GetConnection()->BackendMinimumVersion(8, 3))
 			properties->AppendItem(_("Owner"), GetOwner());
 		properties->AppendItem(_("ACL"), GetAcl());
-		properties->AppendItem(_("Trusted?"), GetTrusted());
+		properties->AppendYesNoItem(_("Trusted?"), GetTrusted());
 		properties->AppendItem(_("Handler"), GetHandlerProc());
 		properties->AppendItem(_("Validator"), GetValidatorProc());
-		properties->AppendItem(_("System language?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System language?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(7, 5))
 			properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/pgObject.cpp b/pgadmin/schema/pgObject.cpp
index d18dc2b..0beeed1 100644
--- a/pgadmin/schema/pgObject.cpp
+++ b/pgadmin/schema/pgObject.cpp
@@ -443,7 +443,7 @@ void pgObject::ShowDependency(pgDatabase *db, ctlListView *list, const wxString
 
 				wxString typestr = set->GetVal(wxT("type"));
 				pgaFactory *depFactory = 0;
-				switch (typestr.c_str()[0])
+				switch ((wxChar)typestr.c_str()[0])
 				{
 					case 'c':
 					case 's':   // we don't know these; internally handled
@@ -495,7 +495,7 @@ void pgObject::ShowDependency(pgDatabase *db, ctlListView *list, const wxString
 					}
 					case 'C':
 					{
-						switch (typestr.c_str()[1])
+						switch ((wxChar)typestr.c_str()[1])
 						{
 							case 'c':
 								depFactory = &checkFactory;
@@ -554,7 +554,7 @@ void pgObject::ShowDependency(pgDatabase *db, ctlListView *list, const wxString
 
 				wxString deptype;
 
-				switch (set->GetVal(wxT("deptype")).c_str()[0])
+				switch ( (wxChar) set->GetVal(wxT("deptype")).c_str()[0])
 				{
 					case 'n':
 						deptype = wxT("normal");
@@ -1236,7 +1236,7 @@ void pgServerObject::FillOwned(ctlTree *browser, ctlListView *referencedBy, cons
 					relname += qtIdent(set->GetVal(wxT("relname")));
 					pgaFactory *ownerFactory = 0;
 
-					switch (set->GetVal(wxT("relkind")).c_str()[0])
+					switch ( (wxChar)set->GetVal(wxT("relkind")).c_str()[0])
 					{
 						case 'r':
 							ownerFactory = &tableFactory;
diff --git a/pgadmin/schema/pgOperator.cpp b/pgadmin/schema/pgOperator.cpp
index f436d5d..7ca7480 100644
--- a/pgadmin/schema/pgOperator.cpp
+++ b/pgadmin/schema/pgOperator.cpp
@@ -200,9 +200,9 @@ void pgOperator::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 			properties->AppendItem(_("Greater than operator"), GetGreaterOperator());
 		}
 
-		properties->AppendItem(_("Supports hash?"), GetHashJoins());
-		properties->AppendItem(_("Supports merge?"), GetMergeJoins());
-		properties->AppendItem(_("System operator?"), GetSystemObject());
+		properties->AppendYesNoItem(_("Supports hash?"), GetHashJoins());
+		properties->AppendYesNoItem(_("Supports merge?"), GetMergeJoins());
+		properties->AppendYesNoItem(_("System operator?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgOperatorClass.cpp b/pgadmin/schema/pgOperatorClass.cpp
index 2163ba2..7eeaa98 100644
--- a/pgadmin/schema/pgOperatorClass.cpp
+++ b/pgadmin/schema/pgOperatorClass.cpp
@@ -274,7 +274,7 @@ void pgOperatorClass::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListVie
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("OID"), GetOid());
 		properties->AppendItem(_("Owner"), GetOwner());
-		properties->AppendItem(_("Default?"), GetOpcDefault());
+		properties->AppendYesNoItem(_("Default?"), GetOpcDefault());
 		properties->AppendItem(_("For type"), GetInType());
 		properties->AppendItem(_("Access method"), GetAccessMethod());
 		if (GetConnection()->BackendMinimumVersion(8, 3))
@@ -287,7 +287,7 @@ void pgOperatorClass::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListVie
 			properties->AppendItem(wxT("OPERATOR"), operators.Item(i));
 		for (i = 0 ; i < functions.Count() ; i++)
 			properties->AppendItem(wxT("FUNCTION"), functions.Item(i));
-		properties->AppendItem(_("System operator class?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System operator class?"), GetSystemObject());
 		if (GetConnection()->BackendMinimumVersion(7, 5))
 			properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/pgOperatorFamily.cpp b/pgadmin/schema/pgOperatorFamily.cpp
index d6cd9aa..8d1c337 100644
--- a/pgadmin/schema/pgOperatorFamily.cpp
+++ b/pgadmin/schema/pgOperatorFamily.cpp
@@ -122,7 +122,7 @@ void pgOperatorFamily::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListVi
 		properties->AppendItem(_("OID"), GetOid());
 		properties->AppendItem(_("Owner"), GetOwner());
 		properties->AppendItem(_("Access method"), GetAccessMethod());
-		properties->AppendItem(_("System operator family?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System operator family?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgRole.cpp b/pgadmin/schema/pgRole.cpp
index 5571b90..e0012c5 100644
--- a/pgadmin/schema/pgRole.cpp
+++ b/pgadmin/schema/pgRole.cpp
@@ -301,7 +301,7 @@ void pgRole::ShowDependents(frmMain *form, ctlListView *referencedBy, const wxSt
 			{
 				if (set->GetBool(wxT("datallowconn")))
 					dblist.Add(name);
-				if (GetOidStr() == set->GetLong(wxT("datdba")))
+				if (GetOidStr() == set->GetVal(wxT("datdba")))
 					referencedBy->AppendItem(databaseFactory.GetIconId(), _("Database"), name);
 			}
 			else
diff --git a/pgadmin/schema/pgRule.cpp b/pgadmin/schema/pgRule.cpp
index b9a16dc..15934d3 100644
--- a/pgadmin/schema/pgRule.cpp
+++ b/pgadmin/schema/pgRule.cpp
@@ -159,11 +159,11 @@ void pgRule::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 		properties->AppendItem(_("OID"), GetOid());
 		properties->AppendItem(_("Event"), GetEvent());
 		properties->AppendItem(_("Condition"), GetCondition());
-		properties->AppendItem(_("Do instead?"), GetDoInstead());
+		properties->AppendYesNoItem(_("Do instead?"), GetDoInstead());
 		properties->AppendItem(_("Definition"), firstLineOnly(def));
 		if (this->GetDatabase()->connection()->BackendMinimumVersion(8, 3))
-			properties->AppendItem(_("Enabled?"), GetEnabled());
-		properties->AppendItem(_("System rule?"), GetSystemObject());
+			properties->AppendYesNoItem(_("Enabled?"), GetEnabled());
+		properties->AppendYesNoItem(_("System rule?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgSchema.cpp b/pgadmin/schema/pgSchema.cpp
index 1b85906..e46a59b 100644
--- a/pgadmin/schema/pgSchema.cpp
+++ b/pgadmin/schema/pgSchema.cpp
@@ -392,7 +392,7 @@ void pgSchemaBase::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *
 		properties->AppendItem(_("Default function ACL"), m_defPrivsOnFuncs);
 
 		if (GetMetaType() != PGM_CATALOG)
-			properties->AppendItem(_("System schema?"), GetSystemObject());
+			properties->AppendYesNoItem(_("System schema?"), GetSystemObject());
 
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
diff --git a/pgadmin/schema/pgSequence.cpp b/pgadmin/schema/pgSequence.cpp
index 4a12412..b605182 100644
--- a/pgadmin/schema/pgSequence.cpp
+++ b/pgadmin/schema/pgSequence.cpp
@@ -179,9 +179,9 @@ void pgSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 		properties->AppendItem(_("Maximum"), GetMaxValue());
 		properties->AppendItem(_("Increment"), GetIncrement());
 		properties->AppendItem(_("Cache"), GetCacheValue());
-		properties->AppendItem(_("Cycled?"), GetCycled());
-		properties->AppendItem(_("Called?"), GetCalled());
-		properties->AppendItem(_("System sequence?"), GetSystemObject());
+		properties->AppendYesNoItem(_("Cycled?"), GetCycled());
+		properties->AppendYesNoItem(_("Called?"), GetCalled());
+		properties->AppendYesNoItem(_("System sequence?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgServer.cpp b/pgadmin/schema/pgServer.cpp
index 2c248c6..0f2ecd0 100644
--- a/pgadmin/schema/pgServer.cpp
+++ b/pgadmin/schema/pgServer.cpp
@@ -694,11 +694,13 @@ int pgServer::Connect(frmMain *form, bool askPassword, const wxString &pwd, bool
 		// Check the server version
 		if (!(conn->BackendMinimumVersion(SERVER_MIN_VERSION_N >> 8, SERVER_MIN_VERSION_N & 0x00FF)) ||
 		        (conn->BackendMinimumVersion(SERVER_MAX_VERSION_N >> 8, (SERVER_MAX_VERSION_N & 0x00FF) + 1)))
+		{
 			wxLogWarning(_("The server you are connecting to is not a version that is supported by this release of %s.\n\n%s may not function as expected.\n\nSupported server versions are %s to %s."),
 			             appearanceFactory->GetLongAppName().c_str(),
 			             appearanceFactory->GetLongAppName().c_str(),
 			             wxString(SERVER_MIN_VERSION_T).c_str(),
 			             wxString(SERVER_MAX_VERSION_T).c_str());
+		}
 
 		connected = true;
 		bool hasUptime = false;
@@ -1030,15 +1032,15 @@ void pgServer::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 		properties->AppendItem(_("Username"), GetUsername());
 		if (!GetRolename().IsEmpty())
 			properties->AppendItem(_("Default role"), GetRolename());
-		properties->AppendItem(_("Store password?"), GetStorePwd());
-		properties->AppendItem(_("Restore environment?"), GetRestore());
+		properties->AppendYesNoItem(_("Store password?"), GetStorePwd());
+		properties->AppendYesNoItem(_("Restore environment?"), GetRestore());
 		if (GetConnected())
 		{
 			properties->AppendItem(_("Version string"), GetVersionString());
 			properties->AppendItem(_("Version number"), GetVersionNumber());
 			properties->AppendItem(_("Last system OID"), GetLastSystemOID());
 		}
-		properties->AppendItem(_("Connected?"), GetConnected());
+		properties->AppendYesNoItem(_("Connected?"), GetConnected());
 		if (GetConnected())
 		{
 			if (GetUpSince().IsValid())
@@ -1059,7 +1061,7 @@ void pgServer::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prop
 			}
 		}
 		if (GetServerControllable())
-			properties->AppendItem(_("Running?"), GetServerRunning());
+			properties->AppendYesNoItem(_("Running?"), GetServerRunning());
 
 		if (!GetDbRestriction().IsEmpty())
 			properties->AppendItem(_("DB restriction"), GetDbRestriction());
diff --git a/pgadmin/schema/pgTable.cpp b/pgadmin/schema/pgTable.cpp
index a226107..5f2ed73 100644
--- a/pgadmin/schema/pgTable.cpp
+++ b/pgadmin/schema/pgTable.cpp
@@ -998,14 +998,14 @@ void pgTable::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prope
 		if (!repString.IsEmpty())
 			properties->AppendItem(repString, clusterInfo);
 
-		properties->AppendItem(_("Inherits tables"), GetHasSubclass());
+		properties->AppendYesNoItem(_("Inherits tables"), GetHasSubclass());
 		properties->AppendItem(_("Inherited tables count"), GetInheritedTableCount());
 		if (GetInheritedTableCount())
 			properties->AppendItem(_("Inherited tables"), GetInheritedTables());
 		if (GetConnection()->BackendMinimumVersion(9, 1))
-			properties->AppendItem(_("Unlogged?"), GetUnlogged());
-		properties->AppendItem(_("Has OIDs?"), GetHasOids());
-		properties->AppendItem(_("System table?"), GetSystemObject());
+			properties->AppendYesNoItem(_("Unlogged?"), GetUnlogged());
+		properties->AppendYesNoItem(_("Has OIDs?"), GetHasOids());
+		properties->AppendYesNoItem(_("System table?"), GetSystemObject());
 
 		/* Custom AutoVacuum Settings */
 		if (GetConnection()->BackendMinimumVersion(8, 4) && GetCustomAutoVacuumEnabled())
diff --git a/pgadmin/schema/pgTrigger.cpp b/pgadmin/schema/pgTrigger.cpp
index b9eb48c..cc27dbd 100644
--- a/pgadmin/schema/pgTrigger.cpp
+++ b/pgadmin/schema/pgTrigger.cpp
@@ -329,8 +329,8 @@ void pgTrigger::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pro
 			properties->AppendItem(_("Function"), GetFunction() + wxT("(") + GetArguments() + wxT(")"));
 		if (GetConnection()->BackendMinimumVersion(8, 5))
 			properties->AppendItem(_("When?"), GetWhen());
-		properties->AppendItem(_("Enabled?"), GetEnabled());
-		properties->AppendItem(_("System trigger?"), GetSystemObject());
+		properties->AppendYesNoItem(_("Enabled?"), GetEnabled());
+		properties->AppendYesNoItem(_("System trigger?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgType.cpp b/pgadmin/schema/pgType.cpp
index 18412e2..00f4403 100644
--- a/pgadmin/schema/pgType.cpp
+++ b/pgadmin/schema/pgType.cpp
@@ -271,7 +271,7 @@ void pgType::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 			}
 			properties->AppendItem(_("Storage"), GetStorage());
 		}
-		properties->AppendItem(_("System type?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System type?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/schema/pgView.cpp b/pgadmin/schema/pgView.cpp
index c101ccb..7d939ce 100644
--- a/pgadmin/schema/pgView.cpp
+++ b/pgadmin/schema/pgView.cpp
@@ -298,7 +298,7 @@ void pgView::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 		properties->AppendItem(_("Owner"), GetOwner());
 		properties->AppendItem(_("ACL"), GetAcl());
 		properties->AppendItem(_("Definition"), def);
-		properties->AppendItem(_("System view?"), GetSystemObject());
+		properties->AppendYesNoItem(_("System view?"), GetSystemObject());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 	}
 }
diff --git a/pgadmin/slony/dlgRepCluster.cpp b/pgadmin/slony/dlgRepCluster.cpp
index 1c7276a..bec9ca4 100644
--- a/pgadmin/slony/dlgRepCluster.cpp
+++ b/pgadmin/slony/dlgRepCluster.cpp
@@ -865,14 +865,14 @@ wxString ReplaceString(const wxString &str, const wxString &oldStr, const wxStri
 	wxChar *buf = new wxChar[buflen + 1];
 
 	const wxChar *ptrIn = str.c_str();
-	const wxChar *ptrFound = wxStrstr(ptrIn, oldStr.c_str());
+	const wxChar *ptrFound = wxStrstr(ptrIn, oldStr);
 
 	while (ptrFound)
 	{
 		AppendBuf(buf, buflen, len, ptrIn, ptrFound - ptrIn);
 		AppendBuf(buf, buflen, len, newStr.c_str());
 		ptrIn = ptrFound + oldStr.Length();
-		ptrFound = wxStrstr(ptrIn, oldStr.c_str());
+		ptrFound = wxStrstr(ptrIn, oldStr);
 	}
 
 	AppendBuf(buf, buflen, len, ptrIn);
diff --git a/pgadmin/slony/slNode.cpp b/pgadmin/slony/slNode.cpp
index d1c96fe..ee9f757 100644
--- a/pgadmin/slony/slNode.cpp
+++ b/pgadmin/slony/slNode.cpp
@@ -227,11 +227,11 @@ void slNode::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *proper
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetSlId());
 		if (GetCluster()->GetLocalNodeID() == GetSlId())
-			properties->AppendItem(_("Local node"), true);
-		properties->AppendItem(_("Active"), GetActive());
+			properties->AppendYesNoItem(_("Local node"), true);
+		properties->AppendYesNoItem(_("Active"), GetActive());
 		if (GetCluster()->ClusterMinimumVersion(1, 1))
-			properties->AppendItem(_("Log spooler"), GetSpool());
-		properties->AppendItem(_("Connected"), conn != NULL);
+			properties->AppendYesNoItem(_("Log spooler"), GetSpool());
+		properties->AppendYesNoItem(_("Connected"), conn != NULL);
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 
 		if (conn && pid < 0)
diff --git a/pgadmin/slony/slSequence.cpp b/pgadmin/slony/slSequence.cpp
index e655a42..2065dbc 100644
--- a/pgadmin/slony/slSequence.cpp
+++ b/pgadmin/slony/slSequence.cpp
@@ -66,7 +66,7 @@ void slSequence::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pr
 
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetSlId());
-		properties->AppendItem(_("Active"), GetActive());
+		properties->AppendYesNoItem(_("Active"), GetActive());
 	}
 }
 
diff --git a/pgadmin/slony/slSet.cpp b/pgadmin/slony/slSet.cpp
index 3b0f891..546c002 100644
--- a/pgadmin/slony/slSet.cpp
+++ b/pgadmin/slony/slSet.cpp
@@ -112,7 +112,7 @@ void slSet::ShowDependencies(frmMain *form, ctlListView *list, const wxString &w
 			wxString comment = set->GetVal(wxT("comment"));
 			wxString typname;
 			int icon = -1;
-			switch (typestr.c_str()[0])
+			switch ( (wxChar)typestr.c_str()[0])
 			{
 				case 'S':
 					typname = _("Sequence");
diff --git a/pgadmin/slony/slSubscription.cpp b/pgadmin/slony/slSubscription.cpp
index 612d0e0..843009a 100644
--- a/pgadmin/slony/slSubscription.cpp
+++ b/pgadmin/slony/slSubscription.cpp
@@ -119,10 +119,10 @@ void slSubscription::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView
 		properties->AppendItem(_("Receiver ID"), GetReceiverId());
 		properties->AppendItem(_("Receiver Name"), GetReceiverNode());
 
-		properties->AppendItem(_("Active"), GetActive());
-		properties->AppendItem(_("May forward"), GetForward());
+		properties->AppendYesNoItem(_("Active"), GetActive());
+		properties->AppendYesNoItem(_("May forward"), GetForward());
 		if (GetForward())
-			properties->AppendItem(_("Is forwarded"), GetIsSubscribed());
+			properties->AppendYesNoItem(_("Is forwarded"), GetIsSubscribed());
 	}
 }
 
diff --git a/pgadmin/slony/slTable.cpp b/pgadmin/slony/slTable.cpp
index 1c47467..84cb39d 100644
--- a/pgadmin/slony/slTable.cpp
+++ b/pgadmin/slony/slTable.cpp
@@ -84,7 +84,7 @@ void slTable::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *prope
 		properties->AppendItem(_("Name"), GetName());
 		properties->AppendItem(_("ID"), GetSlId());
 		properties->AppendItem(_("Index Name"), GetIndexName());
-		properties->AppendItem(_("Altered"), GetAltered());
+		properties->AppendYesNoItem(_("Altered"), GetAltered());
 		properties->AppendItem(_("Comment"), firstLineOnly(GetComment()));
 		if (triggers.GetCount() > 0)
 		{
diff --git a/pgadmin/utils/csvfiles.cpp b/pgadmin/utils/csvfiles.cpp
index 807311b..51a47aa 100644
--- a/pgadmin/utils/csvfiles.cpp
+++ b/pgadmin/utils/csvfiles.cpp
@@ -80,7 +80,9 @@ wxString CSVTokenizer::GetNextToken()
 		token.assign(m_string, m_pos, pos - m_pos);
 
 	if (quoted_string && inquote)
+	{
 		wxLogNotice(wxT("unterminated double quoted string: %s\n"), token.c_str());
+	}
 
 	m_pos = pos + 1;    // Skip token and delimiter
 
diff --git a/pgadmin/utils/factory.cpp b/pgadmin/utils/factory.cpp
index dcf3275..742e82e 100644
--- a/pgadmin/utils/factory.cpp
+++ b/pgadmin/utils/factory.cpp
@@ -317,7 +317,12 @@ void menuFactoryList::AppendEnabledMenus(wxMenuBar *menuBar, wxMenu *treeContext
 				{
 					if (!menuItem->IsSubMenu())
 					{
-						lastItem = treeContextMenu->Append(id, menuItem->GetLabel(), menuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
+#if wxCHECK_VERSION(2, 9, 0)
+						wxString lab = menuItem->GetItemLabelText();
+#else
+						wxString lab = menuItem->GetLabel(); // deprecated
+#endif				
+						lastItem = treeContextMenu->Append(id, lab, menuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
 						if (menuItem->IsCheckable() && menuItem->IsChecked())
 							treeContextMenu->FindItem(id)->Check();
 					}
@@ -335,7 +340,12 @@ void menuFactoryList::AppendEnabledMenus(wxMenuBar *menuBar, wxMenu *treeContext
 							wxMenuItem *oldMenuItem = oldSubMenu->FindItemByPosition(i);
 							if (oldMenuItem->IsEnabled())
 							{
-								newSubMenu->Append(oldMenuItem->GetId(), oldMenuItem->GetLabel(), oldMenuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
+#if wxCHECK_VERSION(2, 9, 0)
+								wxString oldLab = oldMenuItem->GetItemLabelText();
+#else
+								wxString oldLab = oldMenuItem->GetLabel(); // deprecated
+#endif
+								newSubMenu->Append(oldMenuItem->GetId(), oldLab, oldMenuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
 								if (oldMenuItem->IsCheckable() && oldMenuItem->IsChecked())
 									newSubMenu->FindItem(oldMenuItem->GetId())->Check();
 
@@ -344,13 +354,25 @@ void menuFactoryList::AppendEnabledMenus(wxMenuBar *menuBar, wxMenu *treeContext
 							}
 						}
 						if (itemCount > 1)
-							lastItem = treeContextMenu->Append(id, menuItem->GetLabel(), newSubMenu);
+						{
+#if wxCHECK_VERSION(2, 9, 0)
+							wxString lab = menuItem->GetItemLabelText();
+#else
+							wxString lab = menuItem->GetLabel(); // deprecated
+#endif
+							lastItem = treeContextMenu->Append(id, lab, newSubMenu);
+						}
 						else
 						{
 							delete newSubMenu;
 							if (itemCount)
 							{
-								lastItem = treeContextMenu->Append(singleMenuItem->GetId(), singleMenuItem->GetLabel(), singleMenuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
+#if wxCHECK_VERSION(2, 9, 0)
+								wxString lab = singleMenuItem->GetItemLabelText();
+#else
+								wxString lab = singleMenuItem->GetLabel(); // deprecated
+#endif
+								lastItem = treeContextMenu->Append(singleMenuItem->GetId(), lab, singleMenuItem->GetHelp(), menuItem->IsCheckable() ? wxITEM_CHECK : wxITEM_NORMAL);
 								if (singleMenuItem->IsCheckable() && singleMenuItem->IsChecked())
 									treeContextMenu->FindItem(singleMenuItem->GetId())->Check();
 							}
diff --git a/pgadmin/utils/pgconfig.cpp b/pgadmin/utils/pgconfig.cpp
index 87d97ca..b27ac50 100644
--- a/pgadmin/utils/pgconfig.cpp
+++ b/pgadmin/utils/pgconfig.cpp
@@ -207,7 +207,7 @@ pgSettingFileReader::pgSettingFileReader(bool localized)
 		buffer = wxTextBuffer::Translate(buffer, wxTextFileType_Unix);
 
 		columnNames = buffer.BeforeFirst('\n');
-		bp = (wxChar *)buffer.c_str() + columnNames.Length() + 1;
+		bp = const_cast<wxChar*>((const wxChar*)buffer + columnNames.Length() + 1);
 	}
 }
 
diff --git a/pgadmin/utils/sysSettings.cpp b/pgadmin/utils/sysSettings.cpp
index e545784..debb654 100644
--- a/pgadmin/utils/sysSettings.cpp
+++ b/pgadmin/utils/sysSettings.cpp
@@ -370,12 +370,6 @@ wxSize sysSettings::Read(const wxString &key, const wxSize &defaultVal) const
 	              wxConfig::Read(key + wxT("/Height"), actualDefault.y));
 }
 
-// Write a boolean value
-bool sysSettings::Write(const wxString &key, bool value)
-{
-	return Write(key, BoolToStr(value));
-}
-
 // Write a point value
 bool sysSettings::Write(const wxString &key, const wxPoint &value)
 {
diff --git a/pgadmin/utils/utffile.cpp b/pgadmin/utils/utffile.cpp
index abc6644..8013245 100644
--- a/pgadmin/utils/utffile.cpp
+++ b/pgadmin/utils/utffile.cpp
@@ -80,7 +80,9 @@ off_t wxUtfFile::Read(wxString &str, off_t nCount)
 			if (nLen == (size_t) - 1)
 			{
 				if (!m_strFileName.IsEmpty())
+				{
 					wxLogWarning(_("The file \"%s\" could not be opened because it contains characters that could not be interpreted."), m_strFileName.c_str());
+				}
 				Seek(decr - nLen, wxFromCurrent);
 				return (size_t) - 1;
 			}
