[pgadmin-hackers] pgAdmin III commit: Fix the text edit grid control to work with wxWidge

2011-02-28 Thread Dave Page
Fix the text edit grid control to work with wxWidgets 2.9

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=bd3d546a7740f07809207d1fd25ae8a06c38a568
Author: Peter Geoghegan 

Modified Files
--
pgadmin/frm/frmEditGrid.cpp |   47 --
1 files changed, 44 insertions(+), 3 deletions(-)


-- 
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] wxWidgets 2.9 compatibility: Fix for sefault on table editor under GTK

2011-02-28 Thread Dave Page
Thanks - applied.

On Fri, Feb 25, 2011 at 8:31 PM, Peter Geoghegan
 wrote:
> I should have spotted this one sooner, but I was thrown off by the
> fact that my sqlGridTextEditor code (inherits wxGridCellTextEditor)
> compiled without having appropriate EndEdit()/ApplyEdit() signature
> changes. sqlGridBoolEditor (inherits from wxGridCellEditor), on the
> other hand, made ApplyEdit and EndEdit() with the new signature pure
> to avoid this problem. I've reported the inconsistency to wx-users.
>
> Attached patch fixes segfault, and makes us consistent with this
> design principle of 2.9 for grid cells, from wx docs:
>
> virtual bool wxGridCellEditor::EndEdit  (       int     row,
> int     col,
> const wxGrid *  grid,
> const wxString &        oldval,
> wxString *      newval
> )                        [pure virtual]
> End editing the cell.
> This function must check if the current value of the editing control
> is valid and different from the original value (available as oldval in
> its string form and possibly saved internally using its real type by
> BeginEdit()). If it isn't, it just returns false, otherwise it must do
> the following: # Save the new value internally so that ApplyEdit()
> could apply it. # Fill newval (which is never NULL) with the string
> representation of the new value. # Return true
>
> Notice that it must not modify the grid as the change could still
> be vetoed.
>
> I've made sqlGridNumericEditor do the same, even though it was
> ostensibly well behaved before, because changes could still be vetoed
> before we get to ApplyEdit(). Naturally, 2.8 compatibility is
> preserved.
>
> I've also updated the build shell script to remove contrib/OGL stuff,
> which we no longer need regardless of wx version.
>
> BTW, the comment "// pure virtual in wx 2.9+, doesn't exist in prior
> versions" isn't currently true for wxGridCellTextEditor inheriting
> classes, but I left it there in anticipation of it becoming true and
> for consistency with sqlGridBoolEditor.
>
> --
> Regards,
> Peter Geoghegan
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
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] pgAdmin III commit: Correctly identify the sys and dbo catalogs on PPAS

2011-02-28 Thread Dave Page
Correctly identify the sys and dbo catalogs on PPAS

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=679c5608debcc088e8d5c49b374c778334cf2ceb
Author: Nikhil S 

Modified Files
--
CHANGELOG   |2 ++
pgadmin/schema/pgSchema.cpp |   13 ++---
2 files changed, 12 insertions(+), 3 deletions(-)


-- 
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] pgAdmin III commit: Correctly identify the sys and dbo catalogs on PPAS

2011-02-28 Thread Dave Page
Correctly identify the sys and dbo catalogs on PPAS

Branch
--
REL-1_12_0_PATCHES

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=64972cea7f415eb33a6231a102af6f1eab09b11f
Author: Nikhil S 

Modified Files
--
CHANGELOG   |2 ++
pgadmin/schema/pgSchema.cpp |   13 ++---
2 files changed, 12 insertions(+), 3 deletions(-)


-- 
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: system schemas under incorrect hiearchy in EDBAS PostgreSQL mode

2011-02-28 Thread Dave Page
Thanks - applied (with a minor tweak to make it work) :-p

On Fri, Feb 25, 2011 at 3:05 PM, Nikhil S  wrote:
> Hi,
>
> If we use pgadmin III to browse a PPAS database that was installed in
> Postgresql mode, the "sys" and "dbo" system schemas appear incorrectly under
> the normal user "Schemas" hierarchy. The issue is occurring because the
> current sql in pgSchemaBaseFactory::CreateObjects() which tries to avoid
> showing non-system schemas is incorrect.
>
> Since these schemas are added at initdb time, IMO just checking for these
> schemas by name should be enough. This patch does just the same.
>
> Regards,
> Nikhils
>
>
> --
> Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> To make changes to your subscription:
> http://www.postgresql.org/mailpref/pgadmin-hackers
>
>



-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

-- 
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: system schemas under incorrect hiearchy in EDBAS PostgreSQL mode

2011-02-28 Thread Nikhil S
> Thanks - applied (with a minor tweak to make it work) :-p
>
>
Heh, thanks Dave :)

Regards,
Nikhils


> On Fri, Feb 25, 2011 at 3:05 PM, Nikhil S  wrote:
> > Hi,
> >
> > If we use pgadmin III to browse a PPAS database that was installed in
> > Postgresql mode, the "sys" and "dbo" system schemas appear incorrectly
> under
> > the normal user "Schemas" hierarchy. The issue is occurring because the
> > current sql in pgSchemaBaseFactory::CreateObjects() which tries to avoid
> > showing non-system schemas is incorrect.
> >
> > Since these schemas are added at initdb time, IMO just checking for these
> > schemas by name should be enough. This patch does just the same.
> >
> > Regards,
> > Nikhils
> >
> >
> > --
> > Sent via pgadmin-hackers mailing list (pgadmin-hackers@postgresql.org)
> > To make changes to your subscription:
> > http://www.postgresql.org/mailpref/pgadmin-hackers
> >
> >
>
>
>
> --
> Dave Page
> Blog: http://pgsnake.blogspot.com
> Twitter: @pgsnake
>
> EnterpriseDB UK: http://www.enterprisedb.com
> The Enterprise PostgreSQL Company
>


[pgadmin-hackers] Updated OGL licence

2011-02-28 Thread Peter Geoghegan
Attached patch corrects the licence notice on all OGL source files.
They are now distributed under the PostgreSQL licence. I've worked to
make things consistent with other pgAdmin source files.

I've also removed "// pure virtual in wx 2.9+, doesn't exist in prior
versions" where inappropriate.

-- 
Regards,
Peter Geoghegan
diff --git a/pgadmin/frm/frmEditGrid.cpp b/pgadmin/frm/frmEditGrid.cpp
index 0cc9bd0..181eb9c 100644
--- a/pgadmin/frm/frmEditGrid.cpp
+++ b/pgadmin/frm/frmEditGrid.cpp
@@ -1671,7 +1671,6 @@ void sqlGridTextEditor::DoBeginEdit(const wxString &startValue)
 }
 
 #if wxCHECK_VERSION(2, 9, 0)
-// pure virtual in 2.9+, doesn't exist in prior versions
 void sqlGridTextEditor::ApplyEdit(int row, int col, wxGrid *grid)
 {
 	wxString value = Text()->GetText();
@@ -1745,8 +1744,8 @@ public:
 
 	virtual bool IsAcceptedKey(wxKeyEvent &event);
 	virtual void BeginEdit(int row, int col, wxGrid *grid);
-#if wxCHECK_VERSION(2, 9, 0)	
-	void ApplyEdit(int row, int col, wxGrid *grid); // pure virtual in wx 2.9+, doesn't exist in prior versions
+#if wxCHECK_VERSION(2, 9, 0)
+	void ApplyEdit(int row, int col, wxGrid *grid);
 	bool EndEdit(int row, int col, const wxGrid *grid, const wxString&, wxString*);
 #else
 	bool EndEdit(int row, int col, wxGrid *grid);
@@ -1864,7 +1863,6 @@ void sqlGridNumericEditor::BeginEdit(int row, int col, wxGrid *grid)
 }
 
 #if wxCHECK_VERSION(2, 9, 0)
-// pure virtual in 2.9+, doesn't exist in prior versions
 void sqlGridNumericEditor::ApplyEdit(int row, int col, wxGrid *grid)
 {
 	wxString value = Text()->GetValue();
diff --git a/pgadmin/include/ogl/basic.h b/pgadmin/include/ogl/basic.h
index d3796d7..85ce897 100644
--- a/pgadmin/include/ogl/basic.h
+++ b/pgadmin/include/ogl/basic.h
@@ -1,13 +1,14 @@
-/
-// Name:basic.h
-// Purpose: Basic OGL classes and definitions
-// Author:  Julian Smart
-// Modified by:
-// Created: 12/07/98
-// RCS-ID:  $Id: basic.h,v 1.2 2007/02/02 15:56:37 anthemion Exp $
-// Copyright:   (c) Julian Smart
-// Licence:   	wxWindows licence
-/
+//
+//
+// pgAdmin III - PostgreSQL Tools
+//
+// Portions Copyright (C) 1998 - 2011, Julian Smart
+// Portions Copyright (C) 2011, The pgAdmin Development Team
+// This software is released under the PostgreSQL Licence
+//
+// basic.h - Basic OGL classes and definitions
+//
+//
 
 #ifndef _OGL_BASIC_H_
 #define _OGL_BASIC_H_
diff --git a/pgadmin/include/ogl/basicp.h b/pgadmin/include/ogl/basicp.h
index 61dcaa2..0559855 100644
--- a/pgadmin/include/ogl/basicp.h
+++ b/pgadmin/include/ogl/basicp.h
@@ -1,13 +1,14 @@
-/
-// Name:basicp.h
-// Purpose: Private OGL classes and definitions
-// Author:  Julian Smart
-// Modified by:
-// Created: 12/07/98
-// RCS-ID:  $Id: basicp.h,v 1.3 2007/10/23 18:17:17 anthemion Exp $
-// Copyright:   (c) Julian Smart
-// Licence:   	wxWindows licence
-/
+//
+//
+// pgAdmin III - PostgreSQL Tools
+//
+// Portions Copyright (C) 1998 - 2011, Julian Smart
+// Portions Copyright (C) 2011, The pgAdmin Development Team
+// This software is released under the PostgreSQL Licence
+//
+// basicp.h - Private OGL classes and definitions
+//
+//
 
 #ifndef _OGL_BASICP_H_
 #define _OGL_BASICP_H_
diff --git a/pgadmin/include/ogl/bmpshape.h b/pgadmin/include/ogl/bmpshape.h
index c5e6a89..c23d334 100644
--- a/pgadmin/include/ogl/bmpshape.h
+++ b/pgadmin/include/ogl/bmpshape.h
@@ -1,13 +1,14 @@
-/
-// Name:bmpshape.h
-// Purpose: wxBitmapShape
-// Author:  Julian Smart
-// Modified by:
-// Created: 12/07/98
-// RCS-ID:  $Id: bmpshape.h,v 1.2 2007/02/02 15:56:37 anthemion Exp $
-// Copyright:   (c) Julian Smart
-// Licence:   	wxWindows licence
-/
+//
+//
+// pgAdmin III - PostgreSQL Tools
+//
+// Portions Copyright (C) 1998 - 2011, Julian Smart
+// Portions Copyright (C) 2011, The pgAdmin Development Team
+// This software is released under the PostgreSQL Licence
+//
+// bmpshape.h - wxBitmapShape
+//
+//
 
 #ifndef _OGL_BITMAP_H_
 #define _OGL_BITMAP_H_
diff --git a/pgadmin/include/ogl/canvas.h b/pgadmin/include/ogl/canvas.h
index 35f721b..1871af9 100644
--- 

[pgadmin-hackers] pgAdmin III commit: Comment update bonanza:

2011-02-28 Thread Dave Page
Comment update bonanza:
- Update the OGL comments to be in line with pgAdmin's.
- Remove some incorrect comments about pure virtuals not existing in wx2.9

Branch
--
master

Details
---
http://git.postgresql.org/gitweb?p=pgadmin3.git;a=commitdiff;h=3f53087480d64f9736a492d724e8e94075d979d1
Author: Peter Geoghegan 

Modified Files
--
pgadmin/frm/frmEditGrid.cpp|6 ++
pgadmin/include/ogl/basic.h|   21 +++--
pgadmin/include/ogl/basicp.h   |   21 +++--
pgadmin/include/ogl/bmpshape.h |   21 +++--
pgadmin/include/ogl/canvas.h   |   21 +++--
pgadmin/include/ogl/composit.h |   21 +++--
pgadmin/include/ogl/constrnt.h |   21 +++--
pgadmin/include/ogl/divided.h  |   21 +++--
pgadmin/include/ogl/drawn.h|   21 +++--
pgadmin/include/ogl/drawnp.h   |   21 +++--
pgadmin/include/ogl/lines.h|   21 +++--
pgadmin/include/ogl/linesp.h   |   21 +++--
pgadmin/include/ogl/mfutils.h  |   22 +++---
pgadmin/include/ogl/misc.h |   21 +++--
pgadmin/include/ogl/ogl.h  |   21 +++--
pgadmin/include/ogl/ogldiag.h  |   21 +++--
pgadmin/ogl/basic.cpp  |   21 +++--
pgadmin/ogl/basic2.cpp |   21 +++--
pgadmin/ogl/bmpshape.cpp   |   21 +++--
pgadmin/ogl/canvas.cpp |   21 +++--
pgadmin/ogl/composit.cpp   |   21 +++--
pgadmin/ogl/constrnt.cpp   |   21 +++--
pgadmin/ogl/divided.cpp|   21 +++--
pgadmin/ogl/drawn.cpp  |   21 +++--
pgadmin/ogl/lines.cpp  |   21 +++--
pgadmin/ogl/mfutils.cpp|   21 +++--
pgadmin/ogl/ogldiag.cpp|   21 +++--
pgadmin/ogl/oglmisc.cpp|   21 +++--
28 files changed, 299 insertions(+), 275 deletions(-)


-- 
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] Updated OGL licence

2011-02-28 Thread Dave Page
On Tue, Mar 1, 2011 at 5:11 AM, Peter Geoghegan
 wrote:
> Attached patch corrects the licence notice on all OGL source files.
> They are now distributed under the PostgreSQL licence. I've worked to
> make things consistent with other pgAdmin source files.
>
> I've also removed "// pure virtual in wx 2.9+, doesn't exist in prior
> versions" where inappropriate.

Thanks, applied.

-- 
Dave Page
Blog: http://pgsnake.blogspot.com
Twitter: @pgsnake

EnterpriseDB UK: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

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