diff --git a/pgadmin/debugger/dlgDirectDbg.cpp b/pgadmin/debugger/dlgDirectDbg.cpp index 8310abf..74b4b6c 100644 --- a/pgadmin/debugger/dlgDirectDbg.cpp +++ b/pgadmin/debugger/dlgDirectDbg.cpp @@ -350,7 +350,7 @@ void dlgDirectDbg::loadSettings() void dlgDirectDbg::saveSettings() { - settings->Write( wxT( "Debugger/Proc/OID" ), m_targetInfo->getOid()); + settings->WriteLong( wxT( "Debugger/Proc/OID" ), m_targetInfo->getOid()); int count = 0; diff --git a/pgadmin/dlg/dlgClasses.cpp b/pgadmin/dlg/dlgClasses.cpp index b6c4064..66442ce 100644 --- a/pgadmin/dlg/dlgClasses.cpp +++ b/pgadmin/dlg/dlgClasses.cpp @@ -163,7 +163,7 @@ void pgDialog::RestorePosition(int defaultX, int defaultY, int defaultW, int def void pgDialog::SavePosition() { if (!IsIconized()) - settings->Write(dlgName, GetSize(), GetPosition()); + settings->WriteSizePoint(dlgName, GetSize(), GetPosition()); } void pgDialog::LoadResource(wxWindow *parent, const wxChar *name) @@ -370,8 +370,8 @@ void pgFrame::SavePosition() if (!IsIconized()) { #endif - settings->Write(dlgName, GetSize(), GetPosition()); - settings->Write(dlgName + wxT("/Maximized"), IsMaximized()); + settings->WriteSizePoint(dlgName, GetSize(), GetPosition()); + settings->WriteBool(dlgName + wxT("/Maximized"), IsMaximized()); #ifndef __WXGTK__ } #endif diff --git a/pgadmin/dlg/dlgFindReplace.cpp b/pgadmin/dlg/dlgFindReplace.cpp index e8861e7..96c2ff6 100644 --- a/pgadmin/dlg/dlgFindReplace.cpp +++ b/pgadmin/dlg/dlgFindReplace.cpp @@ -143,9 +143,9 @@ void dlgFindReplace::OnClose(wxCloseEvent &ev) else settings->Write(wxT("FindReplace/Direction"), wxT("f")); - settings->Write(wxT("FindReplace/WholeWord"), chkOptionsWholeWord->GetValue()); - settings->Write(wxT("FindReplace/MatchCase"), chkOptionsMatchCase->GetValue()); - settings->Write(wxT("FindReplace/UseRegexps"), chkOptionsUseRegexps->GetValue()); + settings->WriteBool(wxT("FindReplace/WholeWord"), chkOptionsWholeWord->GetValue()); + settings->WriteBool(wxT("FindReplace/MatchCase"), chkOptionsMatchCase->GetValue()); + settings->WriteBool(wxT("FindReplace/UseRegexps"), chkOptionsUseRegexps->GetValue()); this->Hide(); if (ev.CanVeto()) diff --git a/pgadmin/dlg/dlgProperty.cpp b/pgadmin/dlg/dlgProperty.cpp index 1556c72..c02abff 100644 --- a/pgadmin/dlg/dlgProperty.cpp +++ b/pgadmin/dlg/dlgProperty.cpp @@ -153,10 +153,10 @@ dlgProperty::dlgProperty(pgaFactory *f, frmMain *frame, const wxString &resName) dlgProperty::~dlgProperty() { wxString prop = wxT("Properties/") + wxString(factory->GetTypeName()); - settings->Write(prop, GetPosition()); + settings->WritePoint(prop, GetPosition()); if (GetWindowStyle() & wxRESIZE_BORDER) - settings->Write(prop, GetSize()); + settings->WriteSize(prop, GetSize()); } diff --git a/pgadmin/frm/frmMain.cpp b/pgadmin/frm/frmMain.cpp index 31901ee..309e8f8 100644 --- a/pgadmin/frm/frmMain.cpp +++ b/pgadmin/frm/frmMain.cpp @@ -1108,17 +1108,17 @@ void frmMain::StoreServers() settings->Write(key + wxT("Description"), server->GetDescription()); settings->Write(key + wxT("ServiceID"), server->GetServiceID()); settings->Write(key + wxT("DiscoveryID"), server->GetDiscoveryID()); - settings->Write(key + wxT("Port"), server->GetPort()); - settings->Write(key + wxT("StorePwd"), server->GetStorePwd()); + settings->WriteInt(key + wxT("Port"), server->GetPort()); + settings->WriteBool(key + wxT("StorePwd"), server->GetStorePwd()); settings->Write(key + wxT("Rolename"), server->GetRolename()); - settings->Write(key + wxT("Restore"), server->GetRestore()); + settings->WriteBool(key + wxT("Restore"), server->GetRestore()); settings->Write(key + wxT("Database"), server->GetDatabaseName()); settings->Write(key + wxT("Username"), server->GetUsername()); settings->Write(key + wxT("LastDatabase"), server->GetLastDatabase()); settings->Write(key + wxT("LastSchema"), server->GetLastSchema()); settings->Write(key + wxT("DbRestriction"), server->GetDbRestriction()); settings->Write(key + wxT("Colour"), server->GetColour()); - settings->Write(key + wxT("SSL"), server->GetSSL()); + settings->WriteInt(key + wxT("SSL"), server->GetSSL()); settings->Write(key + wxT("Group"), server->GetGroup()); settings->Write(key + wxT("SSLCert"), server->GetSSLCert()); settings->Write(key + wxT("SSLKey"), server->GetSSLKey()); @@ -1142,7 +1142,7 @@ void frmMain::StoreServers() } // Write the server count - settings->Write(wxT("Servers/Count"), numServers); + settings->WriteInt(wxT("Servers/Count"), numServers); wxLogInfo(wxT("Stored %d servers."), numServers); } diff --git a/pgadmin/frm/frmQuery.cpp b/pgadmin/frm/frmQuery.cpp index b54462a..35e9b3e 100644 --- a/pgadmin/frm/frmQuery.cpp +++ b/pgadmin/frm/frmQuery.cpp @@ -788,7 +788,7 @@ void frmQuery::OnAutoRollback(wxCommandEvent &event) { queryMenu->Check(MNU_AUTOROLLBACK, event.IsChecked()); - settings->Write(wxT("frmQuery/AutoRollback"), queryMenu->IsChecked(MNU_AUTOROLLBACK)); + settings->WriteBool(wxT("frmQuery/AutoRollback"), queryMenu->IsChecked(MNU_AUTOROLLBACK)); } @@ -796,7 +796,7 @@ void frmQuery::OnAutoIndent(wxCommandEvent &event) { editMenu->Check(MNU_AUTOINDENT, event.IsChecked()); - settings->Write(wxT("frmQuery/AutoIndent"), editMenu->IsChecked(MNU_AUTOINDENT)); + settings->WriteBool(wxT("frmQuery/AutoIndent"), editMenu->IsChecked(MNU_AUTOINDENT)); if (editMenu->IsChecked(MNU_AUTOINDENT)) sqlQuery->SetAutoIndent(true); @@ -809,7 +809,7 @@ void frmQuery::OnWordWrap(wxCommandEvent &event) { viewMenu->Check(MNU_WORDWRAP, event.IsChecked()); - settings->Write(wxT("frmQuery/WordWrap"), viewMenu->IsChecked(MNU_WORDWRAP)); + settings->WriteBool(wxT("frmQuery/WordWrap"), viewMenu->IsChecked(MNU_WORDWRAP)); if (viewMenu->IsChecked(MNU_WORDWRAP)) sqlQuery->SetWrapMode(wxSTC_WRAP_WORD); @@ -822,7 +822,7 @@ void frmQuery::OnShowIndentGuides(wxCommandEvent &event) { viewMenu->Check(MNU_SHOWINDENTGUIDES, event.IsChecked()); - settings->Write(wxT("frmQuery/ShowIndentGuides"), viewMenu->IsChecked(MNU_SHOWINDENTGUIDES)); + settings->WriteBool(wxT("frmQuery/ShowIndentGuides"), viewMenu->IsChecked(MNU_SHOWINDENTGUIDES)); if (viewMenu->IsChecked(MNU_SHOWINDENTGUIDES)) sqlQuery->SetIndentationGuides(true); @@ -835,7 +835,7 @@ void frmQuery::OnShowWhitespace(wxCommandEvent &event) { viewMenu->Check(MNU_SHOWWHITESPACE, event.IsChecked()); - settings->Write(wxT("frmQuery/ShowWhitespace"), viewMenu->IsChecked(MNU_SHOWWHITESPACE)); + settings->WriteBool(wxT("frmQuery/ShowWhitespace"), viewMenu->IsChecked(MNU_SHOWWHITESPACE)); if (viewMenu->IsChecked(MNU_SHOWWHITESPACE)) sqlQuery->SetViewWhiteSpace(wxSTC_WS_VISIBLEALWAYS); @@ -848,7 +848,7 @@ void frmQuery::OnShowLineEnds(wxCommandEvent &event) { viewMenu->Check(MNU_SHOWLINEENDS, event.IsChecked()); - settings->Write(wxT("frmQuery/ShowLineEnds"), viewMenu->IsChecked(MNU_SHOWLINEENDS)); + settings->WriteBool(wxT("frmQuery/ShowLineEnds"), viewMenu->IsChecked(MNU_SHOWLINEENDS)); if (viewMenu->IsChecked(MNU_SHOWLINEENDS)) sqlQuery->SetViewEOL(1); @@ -861,7 +861,7 @@ void frmQuery::OnShowLineNumber(wxCommandEvent &event) { viewMenu->Check(MNU_SHOWLINENUMBER, event.IsChecked()); - settings->Write(wxT("frmQuery/ShowLineNumber"), viewMenu->IsChecked(MNU_SHOWLINENUMBER)); + settings->WriteBool(wxT("frmQuery/ShowLineNumber"), viewMenu->IsChecked(MNU_SHOWLINENUMBER)); sqlQuery->UpdateLineNumber(); } diff --git a/pgadmin/frm/frmReport.cpp b/pgadmin/frm/frmReport.cpp index f3868c0..e63225f 100644 --- a/pgadmin/frm/frmReport.cpp +++ b/pgadmin/frm/frmReport.cpp @@ -412,9 +412,9 @@ void frmReport::OnOK(wxCommandEvent &ev) settings->Write(wxT("Reports/LastHtmlFile"), txtHtmlFile->GetValue()); settings->Write(wxT("Reports/LastXmlFile"), txtXmlFile->GetValue()); - settings->Write(wxT("Reports/IncludeSQL"), chkSql->GetValue()); + settings->WriteBool(wxT("Reports/IncludeSQL"), chkSql->GetValue()); - settings->Write(wxT("Reports/OpenInBrowser"), chkBrowser->GetValue()); + settings->WriteBool(wxT("Reports/OpenInBrowser"), chkBrowser->GetValue()); // Now go away if (IsModal()) diff --git a/pgadmin/frm/frmStatus.cpp b/pgadmin/frm/frmStatus.cpp index 9d14438..8228cb9 100644 --- a/pgadmin/frm/frmStatus.cpp +++ b/pgadmin/frm/frmStatus.cpp @@ -370,16 +370,16 @@ frmStatus::~frmStatus() SavePosition(); // Save the highlight status checkbox - settings->Write(wxT("frmStatus/HighlightStatus"), viewMenu->IsChecked(MNU_HIGHLIGHTSTATUS)); + settings->WriteBool(wxT("frmStatus/HighlightStatus"), viewMenu->IsChecked(MNU_HIGHLIGHTSTATUS)); // For each current page, save the slider's position and delete the timer - settings->Write(wxT("frmStatus/RefreshStatusRate"), statusRate); + settings->WriteInt(wxT("frmStatus/RefreshStatusRate"), statusRate); delete statusTimer; - settings->Write(wxT("frmStatus/RefreshLockRate"), locksRate); + settings->WriteInt(wxT("frmStatus/RefreshLockRate"), locksRate); delete locksTimer; if (viewMenu->IsEnabled(MNU_XACTPAGE)) { - settings->Write(wxT("frmStatus/RefreshXactRate"), xactRate); + settings->WriteInt(wxT("frmStatus/RefreshXactRate"), xactRate); if (xactTimer) { delete xactTimer; @@ -388,7 +388,7 @@ frmStatus::~frmStatus() } if (viewMenu->IsEnabled(MNU_LOGPAGE)) { - settings->Write(wxT("frmStatus/RefreshLogRate"), logRate); + settings->WriteInt(wxT("frmStatus/RefreshLogRate"), logRate); emptyLogfileCombo(); if (logTimer) { @@ -2494,10 +2494,10 @@ void frmStatus::OnStatusMenu(wxCommandEvent &event) wxListItem column; statusList->GetColumn(i, column); if (column.GetWidth() > 0) - settings->Write(wxT("frmStatus/StatusPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/StatusPane_") + column.GetText() + wxT("_Width"), statusColWidth[i]); else - settings->Write(wxT("frmStatus/StatusPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/StatusPane_") + column.GetText() + wxT("_Width"), -statusColWidth[i]); } } @@ -2522,10 +2522,10 @@ void frmStatus::OnLockMenu(wxCommandEvent &event) wxListItem column; lockList->GetColumn(i, column); if (column.GetWidth() > 0) - settings->Write(wxT("frmStatus/LockPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/LockPane_") + column.GetText() + wxT("_Width"), lockColWidth[i]); else - settings->Write(wxT("frmStatus/LockPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/LockPane_") + column.GetText() + wxT("_Width"), -lockColWidth[i]); } } @@ -2550,10 +2550,10 @@ void frmStatus::OnXactMenu(wxCommandEvent &event) wxListItem column; xactList->GetColumn(i, column); if (column.GetWidth() > 0) - settings->Write(wxT("frmStatus/XactPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/XactPane_") + column.GetText() + wxT("_Width"), xactColWidth[i]); else - settings->Write(wxT("frmStatus/XactPane_") + column.GetText() + wxT("_Width"), + settings->WriteInt(wxT("frmStatus/XactPane_") + column.GetText() + wxT("_Width"), -xactColWidth[i]); } } diff --git a/pgadmin/include/utils/sysSettings.h b/pgadmin/include/utils/sysSettings.h index 7d866c2..e21406a 100644 --- a/pgadmin/include/utils/sysSettings.h +++ b/pgadmin/include/utils/sysSettings.h @@ -44,7 +44,7 @@ public: } void SetLogLevel(const int newval) { - Write(wxT("LogLevel"), newval); + WriteInt(wxT("LogLevel"), newval); sysLogger::logLevel = newval; } @@ -97,7 +97,7 @@ public: } void SetLastPort(const int newval) { - Write(wxT("LastPort"), newval); + WriteInt(wxT("LastPort"), newval); } int GetLastSSL() const { @@ -107,7 +107,7 @@ public: } void SetLastSSL(const int newval) { - Write(wxT("LastSSL"), newval); + WriteInt(wxT("LastSSL"), newval); } // Helper paths @@ -231,7 +231,7 @@ public: } void SetExportUnicode(const bool newval) { - Write(wxT("Export/Unicode"), newval); + WriteBool(wxT("Export/Unicode"), newval); } bool GetWriteBOM() const { @@ -241,7 +241,7 @@ public: } void SetWriteBOM(const bool newval) { - Write(wxT("Export/WriteBOM"), newval); + WriteBool(wxT("Export/WriteBOM"), newval); } // Explain options @@ -253,7 +253,7 @@ public: } void SetExplainVerbose(const bool newval) { - Write(wxT("frmQuery/ExplainVerbose"), newval); + WriteBool(wxT("frmQuery/ExplainVerbose"), newval); } bool GetExplainCosts() const { @@ -263,7 +263,7 @@ public: } void SetExplainCosts(const bool newval) { - Write(wxT("frmQuery/ExplainCosts"), newval); + WriteBool(wxT("frmQuery/ExplainCosts"), newval); } bool GetExplainBuffers() const { @@ -273,7 +273,7 @@ public: } void SetExplainBuffers(const bool newval) { - Write(wxT("frmQuery/ExplainBuffers"), newval); + WriteBool(wxT("frmQuery/ExplainBuffers"), newval); } // Display options @@ -295,7 +295,7 @@ public: } void SetShowUsersForPrivileges(const bool newval) { - Write(wxT("ShowUsersForPrivileges"), newval); + WriteBool(wxT("ShowUsersForPrivileges"), newval); } bool GetShowSystemObjects() const { @@ -305,7 +305,7 @@ public: } void SetShowSystemObjects(const bool newval) { - Write(wxT("ShowSystemObjects"), newval); + WriteBool(wxT("ShowSystemObjects"), newval); } // Editor options @@ -317,7 +317,7 @@ public: } void SetSpacesForTabs(const bool newval) { - Write(wxT("SpacesForTabs"), newval); + WriteBool(wxT("SpacesForTabs"), newval); } long GetIndentSpaces() const { @@ -327,7 +327,7 @@ public: } void SetIndentSpaces(const long newval) { - Write(wxT("IndentSpaces"), newval); + WriteLong(wxT("IndentSpaces"), newval); } bool GetIndicateNull() const { @@ -337,7 +337,7 @@ public: } void SetIndicateNull(const bool newval) { - Write(wxT("frmQuery/IndicateNull"), newval); + WriteBool(wxT("frmQuery/IndicateNull"), newval); } bool GetAutoRollback() const { @@ -347,7 +347,7 @@ public: } void SetAutoRollback(const bool newval) { - Write(wxT("frmQuery/AutoRollback"), newval); + WriteBool(wxT("frmQuery/AutoRollback"), newval); } bool GetLineNumber() const { @@ -357,7 +357,7 @@ public: } void SetLineNumber(const bool newval) { - Write(wxT("ShowLineNumber"), newval); + WriteBool(wxT("ShowLineNumber"), newval); } bool GetUnicodeFile() const { @@ -367,7 +367,7 @@ public: } void SetUnicodeFile(const bool newval) { - Write(wxT("WriteUnicodeFile"), newval); + WriteBool(wxT("WriteUnicodeFile"), newval); } wxFont GetSystemFont(); void SetSystemFont(const wxFont &font); @@ -381,7 +381,7 @@ public: } void SetLineEndingType(const int newval) { - Write(wxT("LineEndingType"), newval); + WriteInt(wxT("LineEndingType"), newval); } wxString GetFavouritesFile(); void SetFavouritesFile(const wxString &newval) @@ -406,7 +406,7 @@ public: } void SetHistoryMaxQueries(const long newval) { - Write(wxT("History/MaxQueries"), newval); + WriteLong(wxT("History/MaxQueries"), newval); } long GetHistoryMaxQuerySize() const { @@ -416,7 +416,7 @@ public: } void SetHistoryMaxQuerySize(const long newval) { - Write(wxT("History/MaxQuerySize"), newval); + WriteLong(wxT("History/MaxQuerySize"), newval); } // Custom Colours options @@ -482,7 +482,7 @@ public: } void SetSQLBoxUseSystemBackground(const bool newval) { - Write(wxT("ctlSQLBox/UseSystemBackground"), newval); + WriteBool(wxT("ctlSQLBox/UseSystemBackground"), newval); } bool GetSQLBoxUseSystemForeground() const { @@ -492,7 +492,7 @@ public: } void SetSQLBoxUseSystemForeground(const bool newval) { - Write(wxT("ctlSQLBox/UseSystemForeground"), newval); + WriteBool(wxT("ctlSQLBox/UseSystemForeground"), newval); } wxString GetSQLBoxColourBackground() const @@ -556,7 +556,7 @@ public: } void SetSQLKeywordsInUppercase(const bool newval) { - Write(wxT("KeywordsInUppercase"), newval); + WriteBool(wxT("KeywordsInUppercase"), newval); } // Misc options @@ -568,7 +568,7 @@ public: } void SetAutoRowCountThreshold(const long newval) { - Write(wxT("AutoRowCount"), newval); + WriteLong(wxT("AutoRowCount"), newval); } bool GetStickySql() const { @@ -578,7 +578,7 @@ public: } void SetStickySql(const bool newval) { - Write(wxT("StickySql"), newval); + WriteBool(wxT("StickySql"), newval); } bool GetDoubleClickProperties() const { @@ -588,7 +588,7 @@ public: } void SetDoubleClickProperties(const bool newval) { - Write(wxT("DoubleClickProperties"), newval); + WriteBool(wxT("DoubleClickProperties"), newval); } long GetMaxServerLogSize() const { @@ -598,7 +598,7 @@ public: } void SetMaxServerLogSize(const long newval) { - Write(wxT("MaxServerLogSize"), newval); + WriteLong(wxT("MaxServerLogSize"), newval); } bool GetSuppressGuruHints() const { @@ -608,7 +608,7 @@ public: } void SetSuppressGuruHints(const bool newval) { - Write(wxT("SuppressGuruHints"), newval); + WriteBool(wxT("SuppressGuruHints"), newval); } long GetMaxRows() const { @@ -618,7 +618,7 @@ public: } void SetMaxRows(const long newval) { - Write(wxT("frmQuery/MaxRows"), newval); + WriteLong(wxT("frmQuery/MaxRows"), newval); } long GetMaxColSize() const { @@ -628,7 +628,7 @@ public: } void SetMaxColSize(const long newval) { - Write(wxT("frmQuery/MaxColSize"), newval); + WriteLong(wxT("frmQuery/MaxColSize"), newval); } bool GetAskSaveConfirmation() const { @@ -638,7 +638,7 @@ public: } void SetAskSaveConfirmation(const bool newval) { - Write(wxT("AskSaveConfirmation"), newval); + WriteBool(wxT("AskSaveConfirmation"), newval); } bool GetConfirmDelete() const { @@ -648,7 +648,7 @@ public: } void SetConfirmDelete(const bool newval) { - Write(wxT("ConfirmDelete"), newval); + WriteBool(wxT("ConfirmDelete"), newval); } wxString GetCanonicalLanguageName(); wxLanguage GetCanonicalLanguage() const @@ -666,33 +666,29 @@ public: } void SetIgnoreVersion(const bool newval) { - Write(wxT("IgnoreVersion"), newval); + WriteBool(wxT("IgnoreVersion"), newval); } // Functions for storing settings - bool Write(const wxString &key, const wxChar *value) - { - return wxConfig::Write(key, wxString(value)); - } bool Write(const wxString &key, const wxString &value) { return wxConfig::Write(key, value); } - bool Write(const wxString &key, long value) + bool WriteLong(const wxString &key, long value) { return wxConfig::Write(key, value); } - bool Write(const wxString &key, int value) + bool WriteInt(const wxString &key, int value) { 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) + bool WriteBool(const wxString &key, bool value); + bool WritePoint(const wxString &key, const wxPoint &value); + bool WriteSize(const wxString &key, const wxSize &value); + bool WriteSizePoint(const wxString &key, const wxSize &size, const wxPoint &point) { - Write(key, point); - Write(key, size); + WritePoint(key, point); + WriteSize(key, size); return true; } diff --git a/pgadmin/schema/pgServer.cpp b/pgadmin/schema/pgServer.cpp index 415a5f9..b1f2dc3 100644 --- a/pgadmin/schema/pgServer.cpp +++ b/pgadmin/schema/pgServer.cpp @@ -778,7 +778,7 @@ int pgServer::Connect(frmMain *form, bool askPassword, const wxString &pwd, bool settings->Write(wxT("Updates/pgsql-Versions"), allVersions); } if (conn->IsSSLconnected()) - settings->Write(wxT("Updates/UseSSL"), true); + settings->WriteBool(wxT("Updates/UseSSL"), true); UpdateIcon(form->GetBrowser()); if (storePassword || forceStorePassword) diff --git a/pgadmin/slony/dlgRepCluster.cpp b/pgadmin/slony/dlgRepCluster.cpp index 628cdc5..480c0db 100644 --- a/pgadmin/slony/dlgRepCluster.cpp +++ b/pgadmin/slony/dlgRepCluster.cpp @@ -904,7 +904,7 @@ wxString dlgRepCluster::GetSql() { long id = (long)cbAdminNode->GetClientData(sel); if (id != cluster->GetAdminNodeID()) - settings->Write(wxT("Replication/") + cluster->GetName() + wxT("/AdminNode"), id); + settings->WriteLong(wxT("Replication/") + cluster->GetName() + wxT("/AdminNode"), id); } } else diff --git a/pgadmin/slony/slCluster.cpp b/pgadmin/slony/slCluster.cpp index 8c8e9e6..c655c5b 100644 --- a/pgadmin/slony/slCluster.cpp +++ b/pgadmin/slony/slCluster.cpp @@ -274,7 +274,7 @@ void slCluster::ShowTreeDetail(ctlTree *browser, frmMain *form, ctlListView *pro { adminNodeID = set->GetLong(wxT("no_id")); adminNodeName = set->GetVal(wxT("no_comment")); - settings->Write(wxT("Replication/") + GetName() + wxT("/AdminNode"), adminNodeID); + settings->WriteLong(wxT("Replication/") + GetName() + wxT("/AdminNode"), adminNodeID); } delete set; } diff --git a/pgadmin/utils/sysSettings.cpp b/pgadmin/utils/sysSettings.cpp index 9476ebe..dfc5e87 100644 --- a/pgadmin/utils/sysSettings.cpp +++ b/pgadmin/utils/sysSettings.cpp @@ -197,7 +197,7 @@ void sysSettings::SetDisplayOption(const wxString &objtype, bool display) else if (objtype == _("Views")) engtype = wxT("Views"); else if (objtype == _("External Tables")) engtype = wxT("External Tables"); - Write(wxT("Display/") + engtype, display); + WriteBool(wxT("Display/") + engtype, display); } bool sysSettings::moveStringValue(const wxChar *oldKey, const wxChar *newKey, int index) @@ -246,7 +246,7 @@ bool sysSettings::moveLongValue(const wxChar *oldKey, const wxChar *newKey, int { long value; Read(k1, &value, 0L); - Write(k2, value); + WriteLong(k2, value); return true; } @@ -369,15 +369,15 @@ wxSize sysSettings::Read(const wxString &key, const wxSize &defaultVal) const return wxSize(wxConfig::Read(key + wxT("/Width"), actualDefault.x), 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 boolean value +bool sysSettings::WriteBool(const wxString &key, bool value) +{ + return Write(key, BoolToStr(value)); +} // Write a point value -bool sysSettings::Write(const wxString &key, const wxPoint &value) +bool sysSettings::WritePoint(const wxString &key, const wxPoint &value) { bool rc = wxConfig::Write(key + wxT("/Left"), value.x); if (rc) @@ -386,7 +386,7 @@ bool sysSettings::Write(const wxString &key, const wxPoint &value) } // Write a size value -bool sysSettings::Write(const wxString &key, const wxSize &value) +bool sysSettings::WriteSize(const wxString &key, const wxSize &value) { bool rc = wxConfig::Write(key + wxT("/Width"), value.x); if (rc) @@ -675,7 +675,7 @@ void sysSettings::SetCanonicalLanguage(const wxLanguage &lang) } #endif locale->AddCatalog(wxT("pgadmin3")); - settings->Write(wxT("LanguageId"), (long)lang); + settings->WriteLong(wxT("LanguageId"), (long)lang); } } }