[pgadmin-hackers] SVN Commit by dpage: r7908 - trunk/pgadmin3/pgadmin/frm

2009-06-10 Thread svn
Author: dpage

Date: 2009-06-10 10:01:00 +0100 (Wed, 10 Jun 2009)

New Revision: 7908

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

Log:
Handle cases where some panes in the server status monitor do not apply to the 
current server in a more sane fashion [Ashesh Vashi]


Modified:
   trunk/pgadmin3/pgadmin/frm/frmStatus.cpp

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] pgAgent new step fails for batch jobs in pgAdmin3 1.10.0 Beta 2

2009-06-10 Thread Dave Page
On Tue, Jun 9, 2009 at 9:06 PM, Guillaume Lelargeguilla...@lelarge.info wrote:
 I think it's still useful to display the SQL, if only to allow the
 user to see what pgAdmin is going to do. Disabling (better yet,
 removing) the checkbox on those dialogues seems like the right answer.

 Can you do that in the next day or so?


 I'll work on a patch for this tonight.


 Here it is.

Hmm, not sure I like that - it assumes that we'll never be able to
edit pgAgent SQL, and does so far away from the pgAgent code which
could easily lead to future confusion.

Can we disable/hide the control on each individual dialogue please?

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] Patch for plural forms

2009-06-10 Thread Marek Černocký
I write patch for plural forms of translated texts. It solves second
problem from report by Heikki:

http://archives.postgresql.org/pgadmin-hackers/2009-05/msg00017.php

It use wxPLURAL instead _. I also change stringextract script to
know this. Following steps required when patche is aplied:
- regenerate POT template
- merge it with PO files
PO files must have set Plural-Forms correctly, e.g. for czech it si:
Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n=2  n=4) ? 1 : 2;
\n
You can find it in gettext documentation (section 10.2.5) or create new
PO file from POT by msginit with appropriate param -l.

Marek
diff -r -c pgadmin3.svn/pgadmin/ctl/ctlSQLBox.cpp pgadmin3.new/pgadmin/ctl/ctlSQLBox.cpp
*** pgadmin3.svn/pgadmin/ctl/ctlSQLBox.cpp	2009-06-10 11:04:52.0 +0200
--- pgadmin3.new/pgadmin/ctl/ctlSQLBox.cpp	2009-06-10 11:32:17.0 +0200
***
*** 192,198 
  GotoPos(initialPos);
  
  wxString msg;
! msg.Printf(_(%d replacements made.), count);
  wxMessageBox(msg, _(Replace all));
  
  if (count)
--- 192,198 
  GotoPos(initialPos);
  
  wxString msg;
! msg.Printf(wxPLURAL(%d replacement made., %d replacements made., count), count);
  wxMessageBox(msg, _(Replace all));
  
  if (count)
diff -r -c pgadmin3.svn/pgadmin/db/pgQueryThread.cpp pgadmin3.new/pgadmin/db/pgQueryThread.cpp
*** pgadmin3.svn/pgadmin/db/pgQueryThread.cpp	2009-06-10 11:05:04.0 +0200
--- pgadmin3.new/pgadmin/db/pgQueryThread.cpp	2009-06-10 12:24:14.0 +0200
***
*** 145,158 
  insertedOid=PQoidValue(res);
  if (insertedOid  insertedOid != (OID)-1)
  appendMessage(wxString::Format(_(Query inserted one row with OID %d.\n), insertedOid));
! 			else
! appendMessage(wxString::Format(_(Query result with %d rows will be returned.\n), PQntuples(result)));
  continue;
  }
  if (lastResult)
  {
  if (PQntuples(lastResult))
! appendMessage(wxString::Format(_(Query result with %d rows discarded.\n), PQntuples(lastResult)));
  PQclear(lastResult);
  }
  lastResult=res;
--- 145,160 
  insertedOid=PQoidValue(res);
  if (insertedOid  insertedOid != (OID)-1)
  appendMessage(wxString::Format(_(Query inserted one row with OID %d.\n), insertedOid));
! else
! appendMessage(wxString::Format(wxPLURAL(Query result with %d row will be returned.\n, Query result with %d rows will be returned.\n, 
! PQntuples(result)), PQntuples(result)));
  continue;
  }
  if (lastResult)
  {
  if (PQntuples(lastResult))
! appendMessage(wxString::Format(wxPLURAL(Query result with %d row discarded.\n, Query result with %d rows discarded.\n, 
! PQntuples(lastResult)), PQntuples(lastResult)));
  PQclear(lastResult);
  }
  lastResult=res;
diff -r -c pgadmin3.svn/pgadmin/frm/frmEditGrid.cpp pgadmin3.new/pgadmin/frm/frmEditGrid.cpp
*** pgadmin3.svn/pgadmin/frm/frmEditGrid.cpp	2009-06-10 11:05:04.0 +0200
--- pgadmin3.new/pgadmin/frm/frmEditGrid.cpp	2009-06-10 12:31:40.0 +0200
***
*** 387,393 
  if (limit = 0)
  cbLimit-SetValue(_(No limit));
  else
! cbLimit-SetValue(wxString::Format(_(%i rows), limit));
  }
  }
  
--- 387,393 
  if (limit = 0)
  cbLimit-SetValue(_(No limit));
  else
! cbLimit-SetValue(wxString::Format(wxPLURAL(%i row, %i rows, limit), limit));
  }
  }
  
***
*** 668,674 
  {
  int copied;
  copied = sqlGrid-Copy();
! SetStatusText(wxString::Format(_(Data from %d rows copied to clipboard.), copied));
  }
  }
  }
--- 668,676 
  {
  int copied;
  copied = sqlGrid-Copy();
! SetStatusText(wxString::Format(
! wxPLURAL(Data from %d row copied to clipboard., Data from %d rows copied to clipboard., copied), 
! copied));
  }
  }
  }
***
*** 1062,1071 
  return;
  
  wxString prompt;
! if (i == 1)
! prompt.Printf(_(Are you sure you wish to delete the selected row?));
! else
! prompt.Printf(_(Are you sure you wish to delete the %d selected rows?), i);
  
  wxMessageDialog msg(this, prompt, _(Delete rows?), wxYES_NO | wxICON_QUESTION);
  if (msg.ShowModal() != wxID_YES)
--- 1064,1070 
  return;
  
  wxString prompt;
! prompt.Printf(wxPLURAL(Are you sure you wish to delete the selected row?, Are you sure you wish to delete the %d selected rows?, i));
  
  wxMessageDialog msg(this, prompt, _(Delete rows?), wxYES_NO | wxICON_QUESTION);
  if (msg.ShowModal() != wxID_YES)

Re: [pgadmin-hackers] Patch for plural forms

2009-06-10 Thread Dave Page
2009/6/10 Marek Černocký ma...@manet.cz:
 I write patch for plural forms of translated texts. It solves second
 problem from report by Heikki:

 http://archives.postgresql.org/pgadmin-hackers/2009-05/msg00017.php

 It use wxPLURAL instead _. I also change stringextract script to
 know this. Following steps required when patche is aplied:
 - regenerate POT template
 - merge it with PO files
 PO files must have set Plural-Forms correctly, e.g. for czech it si:
 Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n=2  n=4) ? 1 : 2;
 \n
 You can find it in gettext documentation (section 10.2.5) or create new
 PO file from POT by msginit with appropriate param -l.

Thanks - I've added your patch to the ticket at
http://code.pgadmin.org/trac/ticket/4

Unfortunately it's too late for 1.10.

-- 
Dave Page
EnterpriseDB UK:   http://www.enterprisedb.com

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] [pgAdmin III] #4: i18n enhancements

2009-06-10 Thread pgAdmin Trac
#4: i18n enhancements
-+--
 Reporter:  gleu |   Owner:  gleu
 Type:  feature  |  Status:  assigned
 Priority:  minor|   Milestone:  1.12
Component:  pgadmin  | Version:  trunk   
 Keywords:   |Platform:  
-+--

Comment(by dpage):

 Attached patch from Marek Černocký:

 I write patch for plural forms of translated texts. It solves second
 problem from report by Heikki:

 http://archives.postgresql.org/pgadmin-hackers/2009-05/msg00017.php

 It use wxPLURAL instead _. I also change stringextract script to
 know this. Following steps required when patche is aplied:
 - regenerate POT template
 - merge it with PO files
 PO files must have set Plural-Forms correctly, e.g. for czech it si:
 Plural-Forms: nplurals=3; plural=(n==1) ? 0 : (n=2  n=4) ? 1 : 2;
 \n
 You can find it in gettext documentation (section 10.2.5) or create new
 PO file from POT by msginit with appropriate param -l.

 Marek

 http://archives.postgresql.org/message-id/1244646913.20153.60.ca...@zabiny

-- 
Ticket URL: http://code.pgadmin.org/trac/ticket/4#comment:2
pgAdmin III http://code.pgadmin.org/trac/
pgAdmin III

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] SVN Commit by guillaume: r7911 - trunk/pgadmin3/i18n/zh_CN

2009-06-10 Thread svn
Author: guillaume

Date: 2009-06-10 18:46:50 +0100 (Wed, 10 Jun 2009)

New Revision: 7911

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

Log:
Update zh_CN translation, per Quan Zongliang.



Modified:
   trunk/pgadmin3/i18n/zh_CN/pgadmin3.mo
   trunk/pgadmin3/i18n/zh_CN/pgadmin3.po

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] SVN Commit by guillaume: r7910 - trunk/www/locale/zh_CN/LC_MESSAGES

2009-06-10 Thread svn
Author: guillaume

Date: 2009-06-10 18:46:20 +0100 (Wed, 10 Jun 2009)

New Revision: 7910

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

Log:
Update website's zh_CN translation, per Quan Zongliang.



Modified:
   trunk/www/locale/zh_CN/LC_MESSAGES/pgadmin3_website.mo
   trunk/www/locale/zh_CN/LC_MESSAGES/pgadmin3_website.po

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


Re: [pgadmin-hackers] pgAgent new step fails for batch jobs in pgAdmin3 1.10.0 Beta 2

2009-06-10 Thread Guillaume Lelarge
Dave Page a écrit :
 On Tue, Jun 9, 2009 at 9:06 PM, Guillaume Lelargeguilla...@lelarge.info 
 wrote:
 I think it's still useful to display the SQL, if only to allow the
 user to see what pgAdmin is going to do. Disabling (better yet,
 removing) the checkbox on those dialogues seems like the right answer.

 Can you do that in the next day or so?

 I'll work on a patch for this tonight.

 Here it is.
 
 Hmm, not sure I like that - it assumes that we'll never be able to
 edit pgAgent SQL, and does so far away from the pgAgent code which
 could easily lead to future confusion.
 
 Can we disable/hide the control on each individual dialogue please?
 

Yes, we can. I was lazy yesterday, and didn't want to go much deeper in
the code :)

New patch is attached.


-- 
Guillaume.
 http://www.postgresqlfr.org
 http://dalibo.com
Index: pgadmin/include/dlg/dlgProperty.h
===
--- pgadmin/include/dlg/dlgProperty.h	(révision 7911)
+++ pgadmin/include/dlg/dlgProperty.h	(copie de travail)
@@ -59,6 +59,7 @@
 ~dlgProperty();
 
 void EnableOK(bool enable);
+	void EnableReadOnly(bool enable);
 	virtual bool IsUpToDate() { return true; };
 void ShowObject();
 	
Index: pgadmin/agent/dlgJob.cpp
===
--- pgadmin/agent/dlgJob.cpp	(révision 7911)
+++ pgadmin/agent/dlgJob.cpp	(copie de travail)
@@ -217,6 +217,8 @@
 }
 
 returncode = dlgProperty::Go(modal);
+	
+	EnableReadOnly(false);
 
 // This fixes a UI glitch on MacOS X
 // Because of the new layout code, the Columns pane doesn't size itself properly
Index: pgadmin/agent/dlgStep.cpp
===
--- pgadmin/agent/dlgStep.cpp	(révision 7911)
+++ pgadmin/agent/dlgStep.cpp	(copie de travail)
@@ -84,6 +84,8 @@
 
 int dlgStep::Go(bool modal)
 {
+	int returncode;
+	
 hasConnStrSupport = connection-TableHasColumn(wxT(pgagent), wxT(pga_jobstep), wxT(jstconnstr));
 cbDatabase-Append(wxT( ));
 cbDatabase-SetSelection(0);
@@ -139,7 +141,11 @@
 rbLocalConn-Enable(false);
 }
 
-return dlgProperty::Go(modal);
+returncode = dlgProperty::Go(modal);
+	
+	EnableReadOnly(false);
+
+	return returncode;
 }
 
 
Index: pgadmin/agent/dlgSchedule.cpp
===
--- pgadmin/agent/dlgSchedule.cpp	(révision 7911)
+++ pgadmin/agent/dlgSchedule.cpp	(copie de travail)
@@ -114,6 +114,7 @@
 
 int dlgSchedule::Go(bool modal)
 {
+	int returncode;
 
 if (schedule)
 {
@@ -197,7 +198,11 @@
 // create mode
 }
 
-return dlgProperty::Go(modal);
+returncode = dlgProperty::Go(modal);
+	
+	EnableReadOnly(false);
+
+	return returncode;
 }
 
 
Index: pgadmin/dlg/dlgProperty.cpp
===
--- pgadmin/dlg/dlgProperty.cpp	(révision 7911)
+++ pgadmin/dlg/dlgProperty.cpp	(copie de travail)
@@ -208,6 +208,12 @@
 }
 
 
+void dlgProperty::EnableReadOnly(bool enable)
+{
+chkReadOnly-Enable(enable);
+}
+
+
 void dlgSecurityProperty::SetPrivilegesLayout()
 {
 securityPage-lbPrivileges-GetParent()-Layout();

-- 
Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgadmin-hackers


[pgadmin-hackers] SVN Commit by guillaume: r7912 - in trunk/pgadmin3: docs docs/cs_CZ docs/cs_CZ/hints docs/cs_CZ/images pkg/win32/src

2009-06-10 Thread svn
Author: guillaume

Date: 2009-06-10 21:38:34 +0100 (Wed, 10 Jun 2009)

New Revision: 7912

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

Log:
Add czech translation of the manual.



Added:
   trunk/pgadmin3/docs/cs_CZ/
   trunk/pgadmin3/docs/cs_CZ/appendices.html
   trunk/pgadmin3/docs/cs_CZ/backup.html
   trunk/pgadmin3/docs/cs_CZ/bugreport.html
   trunk/pgadmin3/docs/cs_CZ/commandline.html
   trunk/pgadmin3/docs/cs_CZ/connect-error.html
   trunk/pgadmin3/docs/cs_CZ/connect.html
   trunk/pgadmin3/docs/cs_CZ/control-server.html
   trunk/pgadmin3/docs/cs_CZ/debugger.html
   trunk/pgadmin3/docs/cs_CZ/default-xsl.html
   trunk/pgadmin3/docs/cs_CZ/editgrid.html
   trunk/pgadmin3/docs/cs_CZ/export.html
   trunk/pgadmin3/docs/cs_CZ/extend.html
   trunk/pgadmin3/docs/cs_CZ/gqb.html
   trunk/pgadmin3/docs/cs_CZ/grantwiz.html
   trunk/pgadmin3/docs/cs_CZ/gridopts.html
   trunk/pgadmin3/docs/cs_CZ/guruhints.html
   trunk/pgadmin3/docs/cs_CZ/hints/
   trunk/pgadmin3/docs/cs_CZ/hints/autovacuum.html
   trunk/pgadmin3/docs/cs_CZ/hints/conn-hba.html
   trunk/pgadmin3/docs/cs_CZ/hints/conn-ident.html
   trunk/pgadmin3/docs/cs_CZ/hints/conn-listen.html
   trunk/pgadmin3/docs/cs_CZ/hints/encoding-ascii.html
   trunk/pgadmin3/docs/cs_CZ/hints/encoding-unicode.html
   trunk/pgadmin3/docs/cs_CZ/hints/fki.html
   trunk/pgadmin3/docs/cs_CZ/hints/instrumentation.html
   trunk/pgadmin3/docs/cs_CZ/hints/multiple.html
   trunk/pgadmin3/docs/cs_CZ/hints/object-editing.html
   trunk/pgadmin3/docs/cs_CZ/hints/pk.html
   trunk/pgadmin3/docs/cs_CZ/hints/saving-passwords.html
   trunk/pgadmin3/docs/cs_CZ/hints/vacuum.html
   trunk/pgadmin3/docs/cs_CZ/hints/view-without-pk.html
   trunk/pgadmin3/docs/cs_CZ/images/
   trunk/pgadmin3/docs/cs_CZ/images/backup.png
   trunk/pgadmin3/docs/cs_CZ/images/debugger.png
   trunk/pgadmin3/docs/cs_CZ/images/editgrid.png
   trunk/pgadmin3/docs/cs_CZ/images/export.png
   trunk/pgadmin3/docs/cs_CZ/images/gqb.png
   trunk/pgadmin3/docs/cs_CZ/images/grantwiz.png
   trunk/pgadmin3/docs/cs_CZ/images/gridopt-filter.png
   trunk/pgadmin3/docs/cs_CZ/images/gridopt-sort.png
   trunk/pgadmin3/docs/cs_CZ/images/guru-connect.png
   trunk/pgadmin3/docs/cs_CZ/images/main.png
   trunk/pgadmin3/docs/cs_CZ/images/maintenance.png
   trunk/pgadmin3/docs/cs_CZ/images/manage-macros.png
   trunk/pgadmin3/docs/cs_CZ/images/no-hba.png
   trunk/pgadmin3/docs/cs_CZ/images/not-running.png
   trunk/pgadmin3/docs/cs_CZ/images/options-display.png
   trunk/pgadmin3/docs/cs_CZ/images/options-general.png
   trunk/pgadmin3/docs/cs_CZ/images/options-logging.png
   trunk/pgadmin3/docs/cs_CZ/images/options-pref.png
   trunk/pgadmin3/docs/cs_CZ/images/options-query.png
   trunk/pgadmin3/docs/cs_CZ/images/password.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-jobdetails.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-jobproperties.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-jobstats.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-scheduledetails1.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-scheduledetails2.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-scheduledetails3.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-scheduleproperties.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-stepdetails.png
   trunk/pgadmin3/docs/cs_CZ/images/pgagent-stepstats.png
   trunk/pgadmin3/docs/cs_CZ/images/query-analyze.png
   trunk/pgadmin3/docs/cs_CZ/images/query-connect.png
   trunk/pgadmin3/docs/cs_CZ/images/query.png
   trunk/pgadmin3/docs/cs_CZ/images/reporttool-html.png
   trunk/pgadmin3/docs/cs_CZ/images/reporttool-xml.png
   trunk/pgadmin3/docs/cs_CZ/images/restore.png
   trunk/pgadmin3/docs/cs_CZ/images/server.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-create.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-execute.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-join.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-listen.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-overview.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-path.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-sequence.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-set.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-subscription.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-table.png
   trunk/pgadmin3/docs/cs_CZ/images/slony-upgrade.png
   trunk/pgadmin3/docs/cs_CZ/images/status.png
   trunk/pgadmin3/docs/cs_CZ/index.html
   trunk/pgadmin3/docs/cs_CZ/kerberos.html
   trunk/pgadmin3/docs/cs_CZ/licence.html
   trunk/pgadmin3/docs/cs_CZ/macros.html
   trunk/pgadmin3/docs/cs_CZ/main.html
   trunk/pgadmin3/docs/cs_CZ/maintenance.html
   trunk/pgadmin3/docs/cs_CZ/openssl.html
   trunk/pgadmin3/docs/cs_CZ/options-tab1.html
   trunk/pgadmin3/docs/cs_CZ/options-tab2.html
   trunk/pgadmin3/docs/cs_CZ/options-tab3.html
   trunk/pgadmin3/docs/cs_CZ/options-tab4.html
   trunk/pgadmin3/docs/cs_CZ/options-tab5.html
   trunk/pgadmin3/docs/cs_CZ/options.html
   trunk/pgadmin3/docs/cs_CZ/password.html
   trunk/pgadmin3/docs/cs_CZ/pgadmin3.css