Change for connection name - Mailing list pgadmin-hackers

From Guillaume Lelarge
Subject Change for connection name
Date
Msg-id 46B1F185.80300@lelarge.info
Whole thread Raw
Responses Re: Change for connection name
List pgadmin-hackers
Hi all,

I received an interesting request from Kevin Macdonald a few, hum,
months ago. Yes, I'm not really that quick :) But I didn't forget.

He wished to have the username on the query's window title. This is
interesting when you use multiple accounts. Currently, we have :
  Query - " + database_name + " on " + host + ":" + port

We wish to have instead :
  Query - " + database_name + " on " + user + "@" + host + ":" + port

The patch attached does exactly this. Comments ?

Regards.


--
Guillaume.
<!-- http://abs.traduc.org/
     http://lfs.traduc.org/
     http://docs.postgresqlfr.org/ -->
Index: pgadmin/db/pgConn.cpp
===================================================================
--- pgadmin/db/pgConn.cpp    (révision 6530)
+++ pgadmin/db/pgConn.cpp    (copie de travail)
@@ -434,7 +434,7 @@
     if (dbHost.IsEmpty())
         str.Printf(_("%s on local socket"), dbname.c_str());
     else
-        str.Printf(_("%s on %s:%d"), dbname.c_str(), dbHost.c_str(), GetPort());
+        str.Printf(_("%s on %s@%s:%d"), dbname.c_str(), GetUser().c_str(), dbHost.c_str(), GetPort());
     return str;
 }


pgadmin-hackers by date:

Previous
From: svn@pgadmin.org
Date:
Subject: SVN Commit by guillaume: r6530 - trunk/pgadmin3/i18n/fr_FR
Next
From: Dave Page
Date:
Subject: Re: Change for connection name