Re: Server order - Mailing list pgadmin-support

From Guillaume Lelarge
Subject Re: Server order
Date
Msg-id 465472B3.1000704@lelarge.info
Whole thread Raw
In response to Server order  (Mike.Blackwell@rrd.com)
Responses Re: Server order
List pgadmin-support
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;

pgadmin-support by date:

Previous
From: Dave Page
Date:
Subject: Re: Bug Report - PGAdmin3 windows pgpass.conf passwords stored in plain text
Next
From: brsaweda@gmail.com
Date:
Subject: Re: List to Father Christmas