[pgadmin-hackers] OSX Status
Hi This newest wxMac Version (2.5.5) fixes both the Icon-Distortion Problem in the treeview, and the Help-Window-Is-Attached-To-The-Top-Of-The-Screen Problem. This only remaining showstopper for pgAdminIII on Mac, as far as I can tell, is now the wrong size of all the dialogs. Since most xrc files use absolute positioning, and widgets on OSX tend to be larger than the GTK or Windows ones, I don't know a clean way to fix this. greetings, Florian Pflug smime.p7s Description: S/MIME Cryptographic Signature
Re: [pgadmin-hackers] OSX Status
Florian G. Pflug wrote: Hi This newest wxMac Version (2.5.5) fixes both the Icon-Distortion Problem in the treeview, and the Help-Window-Is-Attached-To-The-Top-Of-The-Screen Problem. Good to hear! This only remaining showstopper for pgAdminIII on Mac, as far as I can tell, is now the wrong size of all the dialogs. Since most xrc files use absolute positioning, and widgets on OSX tend to be larger than the GTK or Windows ones, I don't know a clean way to fix this. This probably means that the dialog unit calculation, on which all sizing is based, has a problem. Please enable debug logging, when starting pgadmin will log some lines about font calculation: Using fontmetrics . Native Description Draw size of 'M' Draw size of 'g' Draw size of 'Mg' Please provide this information, hopefully we get this fixed before wx2.6. Regards, Andreas ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[pgadmin-hackers] pgAdmin III and wxWidgets 2.5.5
FYI: pgAdmin III does *not* work correctly with vanilla wxWidgets 2.5.5 under MSW, because a problem with tree context menus has crept in, we need to stay with 2.5.4 . The problem has already been fixed in wx CVS, so 2.6 will hopefully be ok for us. Regards, Andreas ---(end of broadcast)--- TIP 9: the planner will ignore your desire to choose an index scan if your joining column's datatypes do not match
[pgadmin-hackers] gAdmin III and wxWidgets 2.5.5
FYI: pgAdmin III does *not* work correctly with vanilla wxWidgets 2.5.5 under MSW, because a problem with tree context menus has crept in, we need to stay with 2.5.4 . The problem has already been fixed in wx CVS, so 2.6 will hopefully be ok for us. Regards, Andreas ---(end of broadcast)--- TIP 4: Don't 'kill -9' the postmaster
Re: [pgadmin-hackers] OSX Status
Please stay on the list! Here is the relevant Part of the log: 2005-04-07 12:09:25 INFO : Using fontmetrics 7/13, 11 Point 2005-04-07 12:09:25 INFO : Native Description '0;11;70;90;90;0;Lucida Grande;0' 2005-04-07 12:09:25 INFO : Draw size of 'M': w=10, h=13, descent 2, external lead 0. 2005-04-07 12:09:25 INFO : Draw size of 'g': w=7, h=13, descent 2, external lead 0. 2005-04-07 12:09:25 INFO : Draw size of 'Mg': w=17, h=13, descent 2, external lead 0. looks ok. Attached is the complete log, and a screenshot of how the "Add Server" Dialog looks on osx. Apparently there's something wrong with the wxNotebook sizing. It is designed to be 145d high, and the button's position are at 150d, which is just twice as much as the difference between the username and the address textbox vertical position (80d-5d). OTOH, on my screen the button position 150d equals 66mm, where the textbox difference 75d are 40.5mm, that is not consistent. The calculation of the dialog size is done in dlgclasses.cpp pgDialog::PostCreation, but I doubt that the problem is there, because the button positions look good. Please use the attached xrc file, and post the resulting image. Regards, Andreas Properties Address 5,7d 70,5d 15,-1d Description 5,22d 70,20d 15,-1d Service 5,37d 70,35d 15,-1d Port 5,52d 70,50d 26,-1d SSL 10,52d 10,50d 15,12d wxCB_READONLY|wxCB_DROPDOWN Initial DB 5,67d 70,65d 15,12d wxCB_DROPDOWN Username 5,82d 70,80d 15,-1d need password 5,97d 1 70,95d 12,12d Password 5,112d 70,110d wxTE_PASSWORD 135,-1d 100,5d 100,75d txt 5,5d 90,-1d 1 2,2d 214,145d Help 2,150d OK 1 113,150d Cancel 166,150d 218,168d ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
[pgadmin-hackers] CVS Commit by andreas: VACUUM hint
Log Message: --- VACUUM hint Modified Files: -- pgadmin3: CHANGELOG.txt (r1.201 -> r1.202) pgadmin3/src/include: frmHint.h (r1.3 -> r1.4) pgServer.h (r1.44 -> r1.45) pgadmin3/src/schema: pgServer.cpp (r1.60 -> r1.61) pgTable.cpp (r1.63 -> r1.64) pgadmin3/src/ui: frmHint.cpp (r1.3 -> r1.4) Index: CHANGELOG.txt === RCS file: /projects/pgadmin3/CHANGELOG.txt,v retrieving revision 1.201 retrieving revision 1.202 diff -LCHANGELOG.txt -LCHANGELOG.txt -u -w -r1.201 -r1.202 --- CHANGELOG.txt +++ CHANGELOG.txt @@ -17,6 +17,7 @@ +2005-04-07 APVACUUM hint 2005-04-04 APControl dependent win32 services 2005-04-01 APSpeed up of column property retrieval 2005-04-01 DP 1.2.2 Fix changing of view ownership Index: pgServer.h === RCS file: /projects/pgadmin3/src/include/pgServer.h,v retrieving revision 1.44 retrieving revision 1.45 diff -Lsrc/include/pgServer.h -Lsrc/include/pgServer.h -u -w -r1.44 -r1.45 --- src/include/pgServer.h +++ src/include/pgServer.h @@ -117,6 +117,7 @@ #ifdef WIN32 SC_HANDLE scmHandle; SC_HANDLE serviceHandle; +wxArrayString GetDependentServices(SC_HANDLE handle); #endif }; Index: frmHint.h === RCS file: /projects/pgadmin3/src/include/frmHint.h,v retrieving revision 1.3 retrieving revision 1.4 diff -Lsrc/include/frmHint.h -Lsrc/include/frmHint.h -u -w -r1.3 -r1.4 --- src/include/frmHint.h +++ src/include/frmHint.h @@ -18,6 +18,7 @@ #define HINT_MISSINGIDENT wxT("conn-ident") #define HINT_PRIMARYKEY wxT("pk") #define HINT_FKINDEXwxT("fki") +#define HINT_VACUUM wxT("vacuum") class frmMain; class frmHint : public DialogWithHelp Index: pgTable.cpp === RCS file: /projects/pgadmin3/src/schema/pgTable.cpp,v retrieving revision 1.63 retrieving revision 1.64 diff -Lsrc/schema/pgTable.cpp -Lsrc/schema/pgTable.cpp -u -w -r1.63 -r1.64 --- src/schema/pgTable.cpp +++ src/schema/pgTable.cpp @@ -15,6 +15,7 @@ // App headers #include "pgAdmin3.h" #include "misc.h" +#include "frmHint.h" #include "pgObject.h" #include "pgTable.h" #include "pgCollection.h" @@ -405,6 +406,24 @@ properties->AppendItem(_("Has OIDs?"), GetHasOids()); properties->AppendItem(_("System table?"), GetSystemObject()); properties->AppendItem(_("Comment"), GetComment()); + +bool showHint=false; +if (rowsCounted) +{ +if (!estimatedRows || (estimatedRows == 1000 && rows != 1000)) +showHint = (rows >= 20); +else +{ +wxULongLong quot = rows*10 / estimatedRows; +showHint = ((quot > 12 || quot < 8) && (rows+20 < estimatedRows || rows > estimatedRows+20)); +} +} +else if (estimatedRows == 1000) +{ +showHint = true; +} +if (form && showHint) +frmHint::ShowHint((wxWindow*)form, HINT_VACUUM, GetFullIdentifier()); } } Index: pgServer.cpp === RCS file: /projects/pgadmin3/src/schema/pgServer.cpp,v retrieving revision 1.60 retrieving revision 1.61 diff -Lsrc/schema/pgServer.cpp -Lsrc/schema/pgServer.cpp -u -w -r1.60 -r1.61 --- src/schema/pgServer.cpp +++ src/schema/pgServer.cpp @@ -135,6 +135,40 @@ #define SERVICEBUFSIZE 1 +#define QUERYBUFSIZE256 + +#ifdef WIN32 +wxArrayString pgServer::GetDependentServices(SC_HANDLE handle) +{ +wxArrayString services; +LPENUM_SERVICE_STATUS sbuf = (LPENUM_SERVICE_STATUS) new char[SERVICEBUFSIZE]; + +DWORD servicesReturned=0, bytesNeeded; +::EnumDependentServices(handle, SERVICE_STATE_ALL, sbuf, SERVICEBUFSIZE, &bytesNeeded, &servicesReturned); + + +DWORD i; +for (i=0 ; i < servicesReturned ; i++) +{ +SC_HANDLE h=::OpenService(scmHandle, sbuf[i].lpServiceName, SERVICE_QUERY_CONFIG); +if (h) +{ +char buffer[QUERYBUFSIZE]; +LPQUERY_SERVICE_CONFIG qsc=(LPQUERY_SERVICE_CONFIG)buffer; +if(::QueryServiceConfig(h, qsc, QUERYBUFSIZE, &bytesNeeded)) +{ +if (qsc->dwStartType != SERVICE_DISABLED) +services.Add(sbuf[i].lpServiceName); +} + +::CloseServiceHandle(h); +} +} +delete[] sbuf; + +return services; +} +#endif bool pgServer::StartService() @@ -160,25 +194,24 @@ { GetServerRunning(); // ignore result, just to wait for startup -LPENUM_SERVICE_STATUS sbuf = (LPENUM_SERVICE_STATUS) new char[SERVICEBUFSIZE]; -DWORD bytesNeeded, servicesReturned=0; -::En
Re: [pgadmin-hackers] OSX Status
Florian G. Pflug wrote: Here it comes... Looks quite strange, I must say.. ;-) Well this wasn't supposed to win any prizes... :-) The inner notebook should be half the height of the outer notebook, but this isn't so. Please use the attached dlgServer.xrc and dlgServer.cpp and post the resulting image as well as the info debug output it creates (three lines "Mac debug"). I believe there's some attribute inheritance problem, which wouldn't be surprising because it took quite a while until msw and gtk did this correctly. Regards, Andreas ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [pgadmin-hackers] OSX Status
Andreas Pflug wrote: The inner notebook should be half the height of the outer notebook, but this isn't so. Please use the attached dlgServer.xrc and dlgServer.cpp and post the resulting image as well as the info debug output it creates (three lines "Mac debug"). Hm... seems you forgot to actually attach those files... - or they went to the bitbucket somewhere along the way.. ;-) I believe there's some attribute inheritance problem, which wouldn't be surprising because it took quite a while until msw and gtk did this correctly. greetings, Florian Pflug smime.p7s Description: S/MIME Cryptographic Signature
Re: [pgadmin-hackers] OSX Status
Florian G. Pflug wrote: Andreas Pflug wrote: The inner notebook should be half the height of the outer notebook, but this isn't so. Please use the attached dlgServer.xrc and dlgServer.cpp and post the resulting image as well as the info debug output it creates (three lines "Mac debug"). Hm... seems you forgot to actually attach those files... - or they went to the bitbucket somewhere along the way.. ;-) Oops, try these... Regards, Andreas Properties Address 1005,7d 1005,5d 100,-1d some decent text 5,5d 100,-1d some decent text 5,20d 100,-1d Description 1005,22d 1070,20d 135,-1d Service 1005,37d 1070,35d 135,-1d Port 1005,52d 1070,50d 26,-1d SSL 1000,52d 1120,50d 85,12d wxCB_READONLY|wxCB_DROPDOWN Initial DB 1005,67d 1070,65d 135,12d wxCB_DROPDOWN Username 1005,82d 1070,80d 135,-1d need password 1005,97d 1 1070,95d 12,12d Password 1005,112d 1070,110d wxTE_PASSWORD 135,-1d testpanel some decent text 5,5d 80,-1d 5,35d 100,75d 1 5,5d 200,150d Help 2,190d some decent text 5,160d 80,-1d OK 1 113,190d Cancel 166,190d 218,200d // // // pgAdmin III - PostgreSQL Tools // RCS-ID: $Id: dlgServer.cpp,v 1.16 2005/01/10 15:26:30 dpage Exp $ // Copyright (C) 2002 - 2005, The pgAdmin Development Team // This software is released under the Artistic Licence // // dlgServer.cpp - PostgreSQL Database Property // // // wxWindows headers #include // App headers #include "pgAdmin3.h" #include "misc.h" #include "frmMain.h" #include "dlgServer.h" #include "pgDatabase.h" // Images #include "images/server.xpm" // pointer to controls #define txtDescription CTRL_TEXT("txtDescription") #define txtService CTRL_TEXT("txtService") #define cbDatabase CTRL_COMBOBOX("cbDatabase") #define txtPort CTRL_TEXT("txtPort") #define cbSSL CTRL_COMBOBOX("cbSSL") #define txtUsername CTRL_TEXT("txtUsername") #define chkNeedPwd CTRL_CHECKBOX("chkNeedPwd") #define stPassword CTRL_STATIC("stPassword") #define txtPassword CTRL_TEXT("txtPassword") extern double libpqVersion; BEGIN_EVENT_TABLE(dlgServer, dlgProperty) EVT_NOTEBOOK_PAGE_CHANGED(XRCID("nbNotebook"), dlgServer::OnPageSelect) EVT_TEXT(XRCID("txtDescription"), dlgProperty::OnChange) EVT_TEXT(XRCID("txtService"), dlgProperty::OnChange) EVT_TEXT(XRCID("cbDatabase"), dlgProperty::OnChange) EVT_COMBOBOX(XRCID("cbDatabase"), dlgProperty::OnChange) EVT_TEXT(XRCID("txtPort") ,dlgProperty::OnChange) EVT_TEXT(XRCID("txtUsername"), dlgProperty::OnChange) EVT_COMBOBOX(XRCID("cbSSL"),dlgProperty::OnChange) EVT_CHECKBOX(XRCID("chkNeedPwd"), dlgServer::OnChangeNeedPwd) EVT_BUTTON(wxID_OK, dlgServer::OnOK) END_EVENT_TABLE(); dlgServer::dlgServer(frmMain *frame, pgServer *node) : dlgProperty(frame, wxT("dlgServer")) { SetIcon(wxIcon(server_xpm)); server=node; objectType = PG_SERVER; cbDatabase->Append(settings->GetLastDatabase()); cbDatabase->SetSelection(0); txtPort->SetValue(NumToStr((long)settings->GetLastPort())); cbSSL->SetSelection(settings->GetLastSSL()); txtUsername->SetValue(settings->GetLastUsername()); chkNeedPwd->SetValue(true); wxLogInfo(wxT("MAC debug: Dialog: %s %d %d"), GetFont().GetNativeFontInfoDesc().c_str(), GetCharWidth(), GetCharHeight())
[pgadmin-hackers] OSX wxMac-2.5.4 error
I wondered if anyone else experienced this compile error with wxMac-2.5.4 and how they fixed it: Patrick-Hatchers-Computer:~/downloads/wxMac-2.5.4 fd02ph0$ make (test -d utils/wxrc && cd utils/wxrc && make all) || true g++ -o wxrc wxrc_wxrc.o -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System-L../../lib -lwx_base_carbon_xml-2.5 -lwx_base_carbon-2.5 -lwxtiff-2.5 -lwxjpeg-2.5 -lwxpng-2.5-lwxexpat-2.5 -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System -lz -lpthread -liconv ld: Undefined symbols: wxEvtHandler::GetClassInfo() const wxObject::GetClassInfo() const make[1]: *** [wxrc] Error 1 TIA Patrick Hatcher ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
Re: [pgadmin-hackers] OSX wxMac-2.5.4 error
ignore this message. I just installed 2.5.5 and it worked correctly Patrick Hatcher Macys.Com Legacy Integration Developer 415-422-1610 office HatcherPT - AIM Patrick Hatcher <[EMAIL PROTECTED] om>To Sent by: pgadmin-hackers@postgresql.org pgadmin-hackers-o cc [EMAIL PROTECTED] rgSubject [pgadmin-hackers] OSX wxMac-2.5.4 error 04/07/05 10:51 AM I wondered if anyone else experienced this compile error with wxMac-2.5.4 and how they fixed it: Patrick-Hatchers-Computer:~/downloads/wxMac-2.5.4 fd02ph0$ make (test -d utils/wxrc && cd utils/wxrc && make all) || true g++ -o wxrc wxrc_wxrc.o -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System-L../../lib -lwx_base_carbon_xml-2.5 -lwx_base_carbon-2.5 -lwxtiff-2.5 -lwxjpeg-2.5 -lwxpng-2.5-lwxexpat-2.5 -framework QuickTime -framework IOKit -framework Carbon -framework Cocoa -framework System -lz -lpthread -liconv ld: Undefined symbols: wxEvtHandler::GetClassInfo() const wxObject::GetClassInfo() const make[1]: *** [wxrc] Error 1 TIA Patrick Hatcher ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED]) ---(end of broadcast)--- TIP 8: explain analyze is your friend