From: | "Dave Page" <dpage(at)vale-housing(dot)co(dot)uk> |
---|---|
To: | "Andreas Pflug" <pgadmin(at)pse-consulting(dot)de> |
Cc: | <tony(dot)caduto(at)amsoftwaredesign(dot)com>, <pgadmin-support(at)postgresql(dot)org> |
Subject: | Re: Function editor |
Date: | 2004-10-11 10:24:02 |
Message-ID: | E7F85A1B5FF8D44C8A1AF6885BC9A0E4306A7D@ratbert.vale-housing.co.uk |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgadmin-support |
> -----Original Message-----
> From: Andreas Pflug [mailto:pgadmin(at)pse-consulting(dot)de]
> Sent: 11 October 2004 10:25
> To: Dave Page
> Cc: tony(dot)caduto(at)amsoftwaredesign(dot)com; pgadmin-support(at)postgresql(dot)org
> 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());
}
From | Date | Subject | |
---|---|---|---|
Next Message | Dave Page | 2004-10-11 10:27:02 | Re: Cannot connect to postgresql 7.4.2 |
Previous Message | Virgil Frum | 2004-10-11 10:22:55 | Cannot connect to postgresql 7.4.2 |