[pgadmin-hackers] SVN Commit by dpage: r4958 - branches/REL-1_4_0_PATCHES/pgadmin3/src/frm

2006-01-25 Thread svn
Author: dpage
Date: 2006-01-25 08:37:27 + (Wed, 25 Jan 2006)
New Revision: 4958

Modified:
   branches/REL-1_4_0_PATCHES/pgadmin3/src/frm/frmConfig.cpp
Log:
Andreas' multibyte patch from trunk: read/write config files with wxUtfFile and 
wxFONTENCODING_SYSTEM

Modified: branches/REL-1_4_0_PATCHES/pgadmin3/src/frm/frmConfig.cpp
===
--- branches/REL-1_4_0_PATCHES/pgadmin3/src/frm/frmConfig.cpp   2006-01-24 
19:00:17 UTC (rev 4957)
+++ branches/REL-1_4_0_PATCHES/pgadmin3/src/frm/frmConfig.cpp   2006-01-25 
08:37:27 UTC (rev 4958)
@@ -301,20 +301,18 @@
 
 void frmConfig::OpenLastFile()
 {
-wxFile file(lastPath, wxFile::read);
+wxUtfFile file(lastPath, wxFile::read, wxFONTENCODING_SYSTEM);
 if (file.IsOpened())
 {
 #ifdef __WXMSW__
 _setmode(file.fd(), _O_BINARY);
 #endif
-char *buffer=new char[file.Length()+1];
-int cnt=file.Read(buffer,file.Length());
-buffer[cnt] = 0;
+wxString buffer;
+file.Read(buffer);
 file.Close();
 
-DisplayFile(wxString(buffer, wxConvLibc));
+DisplayFile(buffer);
 
-delete buffer;
 statusBar-SetStatusText(wxString::Format(_( Configuration read from 
%s), lastPath.c_str()));
 
 fileMenu-Enable(MNU_SAVE, false);
@@ -373,9 +371,12 @@
 }
 else
 {
-wxFile file(lastPath, wxFile::write);
+wxUtfFile file(lastPath, wxFile::write, wxFONTENCODING_SYSTEM);
 if (file.IsOpened())
 {
+#ifdef __WXMSW__
+_setmode(file.fd(), _O_BINARY);
+#endif
 file.Write(str);
 file.Close();
 done=true;


---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [pgadmin-hackers] Patch: Config editors

2006-01-25 Thread Magnus Hagander
 ly :-) maintain the file.
 
 
 
 Users are alreayd confused because pgadmin doesn't tell them 
 that the 
 save your password checkbox affects all non-pgadmin 
 applications as 
 well :-P (Yes, I've been bitten myself. And had to explain it to 
 several others that hav ebeen..)
   
 
 
 You're right. How can we fix this? (not the mechanism, but the user
 confusion)

Dunno. Perhaps a popup the first time the user choses save password that
says realise that checking this box means it's enabled for all libpq
apps, including ODBC. Popping it up every time would be horribly
annoying, but doing it once for each user seems reasonable to me.

//Magnus

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [pgadmin-hackers] Patch: Config editors

2006-01-25 Thread Dave Page
Thanks, patch applied. I made some additional changes to the editors to
prevent undo on the wrong line, and to prevent deletion of the blank
'new' item.

Regards, Dave.

 -Original Message-
 From: Magnus Hagander [mailto:[EMAIL PROTECTED] 
 Sent: 23 January 2006 15:41
 To: Dave Page; pgadmin-hackers@postgresql.org
 Subject: RE: [pgadmin-hackers] Patch: Config editors
 
 Updated version attached:
 
 * Include xrc file that was missing last time ;-) Haven't included the
 appropriate .cpp update because it was huge ;-)
 * Fix help button in all editors (didn't work in hba editor either..)
 * Add delete button
 * Disable the hint button in the hba and pgpass editors, because we
 don't hint anyway
 * Fix the undo by disabling the undo button when you delete 
 something,
 so you don't think it works (see below)
 
 
 Now, as for the undo functionality. The undo as it is now in these
 dialogs don't work like a standard undo which is undo the 
 latest edit.
 It is undo the latest edit on the current line. So this 
 patch actually
 follows that (since there is no way to select a deleted 
 line). Changing
 this to a normal undo is a different patch alltogether ;-)
 
 For example:
 1) Edit line #1
 2) Edit line #2
 3) Select line #1
 4) Click undo
 5) Watch how the change from (1) gets reverted, not the one from (2)
 
 
 //Magnus
 
 
  -Original Message-
  From: Dave Page [mailto:[EMAIL PROTECTED] 
  Sent: Monday, January 23, 2006 4:00 PM
  To: Magnus Hagander; pgadmin-hackers@postgresql.org
  Subject: RE: [pgadmin-hackers] Patch: Config editors
  
  Patch discussed with Magnus on IM. To be reposted with fixes for the
  following:
  
  - Undo button doesn't undo a delete.
  - There is no delete button on the dialogue
  - Help button on the main editor window doesn't work. 
  
  Regards, Dave.
  
   -Original Message-
   From: [EMAIL PROTECTED]
   [mailto:[EMAIL PROTECTED] On Behalf Of Magnus 
   Hagander
   Sent: 23 January 2006 13:18
   To: pgadmin-hackers@postgresql.org
   Subject: [pgadmin-hackers] Patch: Config editors
   
   Attached patch implements an editor for pgpass.conf/.pgpass 
  modeled on 
   the HBA editor. In doing so it also:
   
   * Adds the ability to delete a row to the pg_hba editor
   * Moves the get the name of the password file to 
 pgSettings so it 
   can be shared. Sets up a tiny bit of infrastructure for 
  when there may 
   be more config files.
   
   Trying a .zip this time so it doesn't get eaten by the 
 list filter.
   
   //Ma Config_editors.zip gnus
   
   

   
  
 

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - trunk/pgadmin3

2006-01-25 Thread Andreas Pflug

[EMAIL PROTECTED] wrote:

Author: dpage

Date: 2006-01-25 10:31:01 + (Wed, 25 Jan 2006)

New Revision: 4965

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4965view=rev

Log:
Testing post-commit email script...


Adding frmPgpassConfig.* would be a great idea too...

Regards,
Andreas

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[pgadmin-hackers] SVN Commit by andreas: r4966 - trunk/pgadmin3/src

2006-01-25 Thread svn
Author: andreas

Date: 2006-01-25 10:56:13 + (Wed, 25 Jan 2006)

New Revision: 4966

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4966view=rev

Log:
remove *.txt extensions


Modified:
   trunk/pgadmin3/src/pgAdmin3.dsp

---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - trunk/pgadmin3

2006-01-25 Thread Dave Page
 

 -Original Message-
 From: Andreas Pflug [mailto:[EMAIL PROTECTED] 
 Sent: 25 January 2006 10:55
 To: Dave Page
 Cc: pgadmin-hackers@postgresql.org
 Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - 
 trunk/pgadmin3
 
 [EMAIL PROTECTED] wrote:
  Author: dpage
  
  Date: 2006-01-25 10:31:01 + (Wed, 25 Jan 2006)
  
  New Revision: 4965
  
  Revision summary: 
 http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4965view=rev
  
  Log:
  Testing post-commit email script...
 
 Adding frmPgpassConfig.* would be a great idea too...

Yeah, yeah, picky, picky !

:-)

/D

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - trunk/pgadmin3

2006-01-25 Thread Andreas Pflug

Dave Page wrote:


Adding frmPgpassConfig.* would be a great idea too...



Yeah, yeah, picky, picky !


As usual :-)

To continue: The pgpass dialog captions could need some review...

Regards,
Andreas

---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match


[pgadmin-hackers] Patch: View top for editgrid

2006-01-25 Thread Magnus Hagander
Hi!

This patch adds a view top 100 to the view menu. It's easy to add more
if we want to, I figured that was a good start (or should it be higher?)
I also put it at the top, because doing view all can certainly kill
your server ;-) I left the toolbar button, but maybe that should be
changed as well?

Also, I moved the view data (now) submenu higher up ni the context menu
and tools menu. It's something you'd do a lot more often than for
example new object, IMHO.

The xrc edit may need to be fixed. It looked like crap for a while (the
validate button being half outside the dialog), but suddently it started
to look better without me changing anything in that file that I could
notice ;-) Suffice to say, I'm not really on good terms with those flex
grids etc. So if someone can look at that, please :)

//Magnus


view_top.patch
Description: view_top.patch

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


[pgadmin-hackers] SVN Commit by dpage: r4968 - trunk/www/locale

2006-01-25 Thread svn
Author: dpage

Date: 2006-01-25 16:17:47 + (Wed, 25 Jan 2006)

New Revision: 4968

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4968view=rev

Log:
Update website translation template



Modified:
   trunk/www/locale/pgadmin3_website.pot

---(end of broadcast)---
TIP 4: Have you searched our list archives?

   http://archives.postgresql.org


Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - trunk/pgadmin3

2006-01-25 Thread Dave Page
 

 -Original Message-
 From: Andreas Pflug [mailto:[EMAIL PROTECTED] 
 Sent: 25 January 2006 11:57
 To: Dave Page
 Cc: pgadmin-hackers@postgresql.org; Magnus Hagander
 Subject: Re: [pgadmin-hackers] SVN Commit by dpage: r4965 - 
 trunk/pgadmin3
 
 Dave Page wrote:
 
 Adding frmPgpassConfig.* would be a great idea too...
  
  
  Yeah, yeah, picky, picky !
 
 As usual :-)
 
 To continue: The pgpass dialog captions could need some review...

Why, what's wrong with them? Look fine to me...

/D

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


[pgadmin-hackers] pgAdmin website translations

2006-01-25 Thread Dave Page
As you may be aware, the pgAdmin website, http://www.pgadmin.org/ has
recently been overhauled. The new site has been live in English for a
week or two now, and hopefully most of the typos have been found so it
should now be safe to start work on the translations of the content.

I've sent this message to as many of the previous website translators as
I could find email addresses for, as well as the pgAdmin mailing lists,
in the hope that we can get the website translated into as many
languages as possible, much as we have done with pgAdmin in the past.

If you are able to work on a translation, before you start, please let
me know so I can ensure that no effort is being duplicated. Then,
download the .pot file and translate away! If you are new to translation
work, you can find details of how to go about the task on
http://www.pgadmin.org/translation/

When you have finished, please do not forget to set your name and email
address in the translation header, then forward me the .po and .mo files
to be added to the site.

Translation template:
http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/www/locale/p
gadmin3_website.pot

Thanks in advance to all of you that contribute to this effort.

Regards, Dave.

---(end of broadcast)---
TIP 6: explain analyze is your friend


[pgadmin-hackers] SVN Commit by dpage: r4969 - trunk/www/locale

2006-01-25 Thread svn
Author: dpage

Date: 2006-01-25 16:44:38 + (Wed, 25 Jan 2006)

New Revision: 4969

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4969view=rev

Log:
Add translators list.


Added:
   trunk/www/locale/translators.txt

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [pgadmin-hackers] pgAdmin website translations

2006-01-25 Thread Andreas Pflug

Dave Page wrote:




When you have finished, please do not forget to set your name and email
address in the translation header, then forward me the .po and .mo files
to be added to the site.

Translation template:
http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/www/locale/p
gadmin3_website.pot


How 2 switch the site language?

Regards,
Andreas

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


Re: [pgadmin-hackers] pgAdmin website translations

2006-01-25 Thread Dave Page
 

 -Original Message-
 From: Andreas Pflug [mailto:[EMAIL PROTECTED] 
 Sent: 25 January 2006 17:12
 To: Dave Page
 Cc: pgadmin-hackers@postgresql.org
 Subject: Re: pgAdmin website translations
 
 Dave Page wrote:
 
 
  
  When you have finished, please do not forget to set your 
 name and email
  address in the translation header, then forward me the .po 
 and .mo files
  to be added to the site.
  
  Translation template:
  
 http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/ww
w/locale/p
  gadmin3_website.pot
 
 How 2 switch the site language?

Un-comment the language selection form in include/page.php (hunt for td
id=pgaLanguages), and add an appropriate block of code to
include/session.php to select the correct stylesheet etc.

Regards, Dave.

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [pgadmin-hackers] pgAdmin website translations - SPANISH

2006-01-25 Thread diego
 As you may be aware, the pgAdmin website, http://www.pgadmin.org/ has
 recently been overhauled. The new site has been live in English for a
 week or two now, and hopefully most of the typos have been found so it
 should now be safe to start work on the translations of the content.

 I've sent this message to as many of the previous website translators as
 I could find email addresses for, as well as the pgAdmin mailing lists,
 in the hope that we can get the website translated into as many
 languages as possible, much as we have done with pgAdmin in the past.

 If you are able to work on a translation, before you start, please let
 me know so I can ensure that no effort is being duplicated. Then,
 download the .pot file and translate away! If you are new to translation
 work, you can find details of how to go about the task on
 http://www.pgadmin.org/translation/

 When you have finished, please do not forget to set your name and email
 address in the translation header, then forward me the .po and .mo files
 to be added to the site.

 Translation template:
 http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/*checkout*/trunk/www/locale/p
 gadmin3_website.pot

 Thanks in advance to all of you that contribute to this effort.

 Regards, Dave.

 ---(end of broadcast)---
 TIP 6: explain analyze is your friend


Dave:

I will handle spanish translation, if you don't mind.

I am still unable to access SVN server from my home ADSL but I expect to
have this issue solved by the week end, as promised by my ADSL supplier. I
guess they will assign me an ip range other than 190.48.xxx.xxx, which
seems to be the cause of my troubles due some misbehaving router somewhere
in the net.


Regards,
Diego.


---(end of broadcast)---
TIP 1: if posting/reading through Usenet, please send an appropriate
   subscribe-nomail command to [EMAIL PROTECTED] so that your
   message can get through to the mailing list cleanly


Re: [pgadmin-hackers] pgadmin crash issue

2006-01-25 Thread Daniel Whitter

Andreas Pflug wrote:

Daniel Whitter wrote:

Hello,

I've posted this mail to the postgresql general mailing list.
For those of you who don't read it:


I'm new to postgresql and during testing for a script I've found some
curious things.

If I do the following things a bad dump will be created that can't be
restored (using pgadmin3, pg_dump and pg_restore or psql).
There's also a issue that pgadmin crash.

In pgadmin3 do
1)  Create a new db ('test_dump')
2)  Create a new schema ('test_dump')

3)  From schema 'pg_catalog' copy the lines from
   CREATE OPERATOR (... for (abstime,abstime), =(abstime,abstime),
   =(abstime,abstime), (abstime,abstime), =(abstime,abstime)
   and paste it in the query window. Write the schema name 'test_dump.'

   before the operator sign and execute the query.
   I've done this once for each operator.

4)  Then copy the lines for operator class 'abstime_ops(btree)' 
fromschema 'pg_catalog' and paste it in the query window.

   Write the schema name 'test_dump.' before the class and remove the
   'default'. Then execute the query.

If you click on the created operator class in schema 'test_dump' 
you'll get a error message box or on windows pgAdmin will crash.


The error message and the OS you're running on would be required to 
take any action on this, and the complete query would be nice too.


Regards,
Andreas

---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings




Hi,

OS: WinXP (sp2)

On Windows pgadmin crash without a error message if you click on the
created item.
On linux you'll get only a error message without a crash. I do not
remember the message (have no postgresql server on this machine).


Daniel


---(end of broadcast)---
TIP 5: don't forget to increase your free space map settings


Re: [pgadmin-hackers] pgAdmin website translations - SPANISH

2006-01-25 Thread Dave Page



On 25/1/06 17:32, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 
 Dave:
 
 I will handle spanish translation, if you don't mind.

Great, thanks.
 
 I am still unable to access SVN server from my home ADSL but I expect to
 have this issue solved by the week end, as promised by my ADSL supplier. I
 guess they will assign me an ip range other than 190.48.xxx.xxx, which
 seems to be the cause of my troubles due some misbehaving router somewhere
 in the net.

I can mail you a copy of the the pot file if you like?

Regards, Dave.


---(end of broadcast)---
TIP 6: explain analyze is your friend


Re: [pgadmin-hackers] Patch: View top for editgrid

2006-01-25 Thread Magnus Hagander
.. and once more, with the patch included. Three's a charm?

//mha

 

 -Original Message-
 From: [EMAIL PROTECTED] 
 [mailto:[EMAIL PROTECTED] On Behalf Of 
 Magnus Hagander
 Sent: Wednesday, January 25, 2006 7:53 PM
 To: pgadmin-hackers@postgresql.org
 Subject: Re: [pgadmin-hackers] Patch: View top for editgrid
 
 Per some comments from Dave on IM, updated version:
 
 * First one was broken and didn't apply ;-)
 * The menu still said top 10 rows, from my testing. It's 
 supposed to be 100, it is now.
 * Dave also suggested to store a history somewhere so it 
 re-appears in the dropdown and as default on the menu. Let's 
 consider that for future improvement though, and please 
 consider this patch without it for now.
 
 //Magnus
  
 
  -Original Message-
  From: [EMAIL PROTECTED]
  [mailto:[EMAIL PROTECTED] On Behalf Of Magnus 
  Hagander
  Sent: Wednesday, January 25, 2006 4:52 PM
  To: pgadmin-hackers@postgresql.org
  Subject: [pgadmin-hackers] Patch: View top for editgrid
  
  Hi!
  
  This patch adds a view top 100 to the view menu. It's easy to add 
  more if we want to, I figured that was a good start (or 
 should it be 
  higher?) I also put it at the top, because doing view all can 
  certainly kill your server ;-) I left the toolbar button, but maybe 
  that should be changed as well?
  
  Also, I moved the view data (now) submenu higher up ni the context 
  menu and tools menu. It's something you'd do a lot more 
 often than for 
  example new object, IMHO.
  
  The xrc edit may need to be fixed. It looked like crap for a while 
  (the validate button being half outside the dialog), but 
 suddently it 
  started to look better without me changing anything in that 
 file that 
  I could notice ;-) Suffice to say, I'm not really on good 
 terms with 
  those flex grids etc. So if someone can look at that, please :)
  
  //Magnus
  
 
 ---(end of 
 broadcast)---
 TIP 3: Have you checked our extensive FAQ?
 
http://www.postgresql.org/docs/faq
 


view_top.patch
Description: view_top.patch

---(end of broadcast)---
TIP 2: Don't 'kill -9' the postmaster


[pgadmin-hackers] SVN Commit by andreas: r4970 - in trunk/pgadmin3/src: frm schema utils

2006-01-25 Thread svn
Author: andreas

Date: 2006-01-25 23:53:30 + (Wed, 25 Jan 2006)

New Revision: 4970

Revision summary: http://svn.pgadmin.org/cgi-bin/viewcvs.cgi/?rev=4970view=rev

Log:
Fix bad enum


Modified:
   trunk/pgadmin3/src/frm/frmMainConfig.cpp
   trunk/pgadmin3/src/frm/frmPgpassConfig.cpp
   trunk/pgadmin3/src/schema/pgServer.cpp
   trunk/pgadmin3/src/utils/sysSettings.cpp

---(end of broadcast)---
TIP 3: Have you checked our extensive FAQ?

   http://www.postgresql.org/docs/faq


Re: [pgadmin-hackers] Query tool: Autocompletion

2006-01-25 Thread Andreas Pflug
I've spent several hours now to get the beast compiled, still no go. 
It's a nightmare I don't like to spend more time on.


Dave, if you succeed hacking something workable that doesn't try to call 
more core pgsql includes from somewhere (!), commit it. Note: pgsql 
copied stuff should go to src/db, not utils.
Actually, I doubt that the psql way is desirable at all. Instead of 
constantly accessing the db for completion candidates, using pgAdmin's 
object tree as cache should be the way to go.


Regards,
Andreas


---(end of broadcast)---
TIP 9: In versions below 8.0, the planner will ignore your desire to
  choose an index scan if your joining column's datatypes do not
  match