> -----Original Message-----
> From: Andreas Pflug [mailto:[EMAIL PROTECTED] 
> Sent: 11 October 2004 10:25
> To: Dave Page
> Cc: [EMAIL PROTECTED]; [EMAIL PROTECTED]
> Subject: Re: [pgadmin-support] Function editor
> 
> You discussed yourself it's not easily done in dlgProperty.

I did? Sorry, don't remember that.

> wxFrame does handle sizes correctly (frmMain etc, still has 
> the maximize button), wxDlg not. I won't spent a second to 
> find out why.

No, I don't think spending time trying to find a workaround or fix in wx
is a good use of time. Any reason why the following might cause any
undesirable side effects though? It certainly appears to solve the
reported problem.

Regards, Dave


Index: src/ui/dlgClasses.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/dlgClasses.cpp,v
retrieving revision 1.14
diff -u -r1.14 dlgClasses.cpp
--- src/ui/dlgClasses.cpp       10 Oct 2004 17:25:44 -0000      1.14
+++ src/ui/dlgClasses.cpp       11 Oct 2004 10:18:37 -0000
@@ -96,7 +96,8 @@
 
 void pgDialog::SavePosition()
 {
-    settings->Write(dlgName, GetSize(), GetPosition());
+       if (!IsMaximized() && !IsIconized())
+               settings->Write(dlgName, GetSize(), GetPosition());
 }
 
 void pgDialog::LoadResource(wxWindow *parent, const wxChar *name)
@@ -255,7 +256,8 @@
 
 void pgFrame::SavePosition()
 {
-    settings->Write(dlgName, GetSize(), GetPosition());
+       if (!IsMaximized() && !IsIconized())
+               settings->Write(dlgName, GetSize(), GetPosition());
 }
 
 
Index: src/ui/dlgProperty.cpp
===================================================================
RCS file: /projects/pgadmin3/src/ui/dlgProperty.cpp,v
retrieving revision 1.98
diff -u -r1.98 dlgProperty.cpp
--- src/ui/dlgProperty.cpp      8 Oct 2004 10:18:51 -0000       1.98
+++ src/ui/dlgProperty.cpp      11 Oct 2004 10:18:37 -0000
@@ -89,10 +89,6 @@
     wxWindowBase::SetFont(settings->GetSystemFont());
     LoadResource(frame, resName);
 
-#ifdef __WXMSW__
-    SetWindowStyleFlag(GetWindowStyleFlag() & ~wxMAXIMIZE_BOX);
-#endif
-
     nbNotebook = CTRL_NOTEBOOK("nbNotebook");
     if (!nbNotebook)
     {
@@ -118,9 +114,11 @@
 dlgProperty::~dlgProperty()
 {
     wxString prop = wxT("Properties/") +
wxString(typesList[objectType].typName);
-    settings->Write(prop, GetPosition());
 
-    if (GetWindowStyle() & wxTHICK_FRAME)
+       if (!IsMaximized() && !IsIconized())
+               settings->Write(prop, GetPosition());
+
+    if ((GetWindowStyle() & wxTHICK_FRAME) && !IsMaximized() &&
!IsIconized())
         settings->Write(prop, GetSize());
 }
 

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

               http://www.postgresql.org/docs/faqs/FAQ.html

Reply via email to