diff --git a/frm/frmMain.cpp b/frm/frmMain.cpp index fd52c91..1c70c01 100644 --- a/frm/frmMain.cpp +++ b/frm/frmMain.cpp @@ -1340,6 +1340,7 @@ void frmMain::StoreServers() settings->Write(key + wxT("Server"), server->GetName()); settings->Write(key + wxT("HostAddr"), server->GetHostAddr()); settings->Write(key + wxT("Description"), server->GetDescription()); + settings->Write(key + wxT("Keywords"), server->GetKeywords()); settings->Write(key + wxT("Service"), server->GetService()); settings->Write(key + wxT("ServiceID"), server->GetServiceID()); settings->Write(key + wxT("DiscoveryID"), server->GetDiscoveryID()); diff --git a/include/schema/pgServer.h b/include/schema/pgServer.h index 1a8cad6..0be391d 100644 --- a/include/schema/pgServer.h +++ b/include/schema/pgServer.h @@ -444,6 +444,14 @@ public: { sslcrl = s; } + wxString GetKeywords() const + { + return keywords; + } + void iSetKeywords(const wxString &s) + { + keywords = s; + } bool GetSSLCompression() const { @@ -558,7 +566,7 @@ private: wxString versionNum; wxString dbRestriction; wxString colour; - wxString group; + wxString group,keywords; wxString sslcert, sslkey, sslrootcert, sslcrl; bool sslcompression; bool sshTunnel; diff --git a/pgAdmin3.cpp b/pgAdmin3.cpp index d852d75..f8c364f 100644 --- a/pgAdmin3.cpp +++ b/pgAdmin3.cpp @@ -965,7 +965,9 @@ bool pgAdmin3::OnInit() parent = browser->GetItemParent(parent); } path=wxString::Format("%4d%s",-1,path); - + wxString kw=server->GetKeywords(); + if (!kw.IsEmpty()) + path=path+'['+kw+']'; winMain->servers_find_list.Add(path); } diff --git a/schema/pgServer.cpp b/schema/pgServer.cpp index 02e86d8..413c5a9 100644 --- a/schema/pgServer.cpp +++ b/schema/pgServer.cpp @@ -1553,6 +1553,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co wxString key, servername, hostaddr, description, service, database, username, lastDatabase, lastSchema; wxString storePwd, rolename, connstr, restore, serviceID, discoveryID, dbRestriction, colour; wxString group, sslcert, sslkey, sslrootcert, sslcrl, sslcompression; + wxString keywords; #if defined(HAVE_OPENSSL_CRYPTO) || defined(HAVE_GCRYPT) wxString sshTunnel, authModePwd, tunnelHost, tunnelUserName, tunnelPassword, publicKeyFile, identityFile; @@ -1574,6 +1575,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co { key.Printf(wxT("Servers/%d/"), (int)loop); + settings->Read(key + wxT("Keywords"), &keywords, wxEmptyString); settings->Read(key + wxT("Server"), &servername, wxEmptyString); settings->Read(key + wxT("HostAddr"), &hostaddr, wxEmptyString); settings->Read(key + wxT("Service"), &service, wxEmptyString); @@ -1658,6 +1660,7 @@ pgObject *pgServerFactory::CreateObjects(pgCollection *obj, ctlTree *browser, co server->SetSSLRootCert(sslrootcert); server->SetSSLCrl(sslcrl); server->iSetSSLCompression(StrToBool(sslcompression)); + server->iSetKeywords(keywords); found = false; if (browser->ItemHasChildren(obj->GetId()))