Mike.Blackwell@rrd.com a écrit :
>
> Is there a way to change the order of the servers in the Servers list?
> It'd be nice if they were alphabetically sorted.
The patch attached sorts them alphabetically. As it changes the
behavior, perhaps an option is needed to enable it. Dave, what do you
think about it ?
Regards.
--
Guillaume.
<!-- http://abs.traduc.org/
http://lfs.traduc.org/
http://docs.postgresqlfr.org/ -->
Index: pgadmin/schema/pgServer.cpp
===================================================================
--- pgadmin/schema/pgServer.cpp (révision 6319)
+++ pgadmin/schema/pgServer.cpp (copie de travail)
@@ -1063,6 +1063,7 @@
server->iSetDbRestriction(dbRestriction);
server->iSetServerIndex(loop);
browser->AppendItem(obj->GetId(), server->GetFullName(), server->GetIconId(), -1, server);
+ browser->SortChildren(obj->GetId());
#ifdef WIN32
@@ -1112,6 +1113,7 @@
server->iSetDiscovered(true);
server->iSetServiceID(svcName);
browser->AppendItem(obj->GetId(), server->GetFullName(), server->GetIconId(), -1, server);
+ browser->SortChildren(obj->GetId());
}
// Get the next one...
flag = pgKey->GetNextKey(svcName, cookie);
@@ -1197,6 +1199,7 @@
wxLogInfo(wxT("pgServer object initialised as required."));
browser->AppendItem(form->GetServerCollection()->GetId(), server->GetFullName(),
icon, -1, server);
+ browser->SortChildren(form->GetServerCollection()->GetId());
browser->Expand(form->GetServerCollection()->GetId());
wxString label;