This is a discussion on Re: OSX Status within the pgsql Interfaces Pgadmin Hackers forums, part of the PostgreSQL category; --> Florian G. Pflug wrote: > Hi > > This newest wxMac Version (2.5.5) fixes both the Icon-Distortion Problem > ...
| |||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| 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 majordomo@postgresql.org |
| |||
| 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 ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) |
| |||
| 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 majordomo@postgresql.org) |
| |||
| 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 ////////////////////////////////////////////////////////////////////////// // // 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 <wx/wx.h> // 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()); wxWindow *w; w=CTRL_NOTEBOOK("nbNotebook"); wxLogInfo(wxT("MAC debug: outer notebook: %s %d %d"), w->GetFont().GetNativeFontInfoDesc().c_str(), w->GetCharWidth(), w->GetCharHeight()); w=CTRL_NOTEBOOK("testNotebook"); wxLogInfo(wxT("MAC debug: inner notebook: %s %d %d"), w->GetFont().GetNativeFontInfoDesc().c_str(), w->GetCharWidth(), w->GetCharHeight()); } dlgServer::~dlgServer() { if (!server) { settings->SetLastDatabase(cbDatabase->GetValue()); settings->SetLastPort(StrToLong(txtPort->GetValue())); settings->SetLastSSL(cbSSL->GetSelection()); settings->SetLastUsername(txtUsername->GetValue()); } } pgObject *dlgServer::GetObject() { return server; } void dlgServer::OnOK(wxCommandEvent &ev) { // notice: changes active after reconnect EnableOK(false); if (server) { server->iSetName(GetName()); server->iSetDescription(txtDescription->GetValue()); if (txtService->GetValue() != server->GetServiceID()) { mainForm->StartMsg(_("Checking server status")); server->iSetServiceID(txtService->GetValue()); mainForm->EndMsg(); } server->iSetPort(StrToLong(txtPort->GetValue())); server->iSetSSL(cbSSL->GetSelection()); server->iSetLastDatabase(cbDatabase->GetValue()); server->iSetUsername(txtUsername->GetValue()); server->iSetNeedPwd(chkNeedPwd->GetValue()); mainForm->execSelChange(server->GetId(), true); mainForm->GetBrowser()->SetItemText(item, server->GetFullName()); } if (IsModal()) { EndModal(wxID_OK); return; } else Destroy(); } void dlgServer::OnPageSelect(wxNotebookEvent &event) { // to prevent dlgProperty from catching it } wxString dlgServer::GetHelpPage() const { return wxT("pgadmin/connect"); } int dlgServer::GoNew() { if (cbSSL->IsEmpty()) return Go(true); else { CheckChange(); return ShowModal(); } } int dlgServer::Go(bool modal) { cbSSL->Append(wxT(" ")); #ifdef SSL cbSSL->Append(_("require")); cbSSL->Append(_("prefer")); if (libpqVersion > 7.3) { cbSSL->Append(_("allow")); cbSSL->Append(_("disable")); } #endif if (server) { cbDatabase->Append(server->GetDatabaseName()); txtDescription->SetValue(server->GetDescription()); txtService->SetValue(server->GetServiceID()); txtPort->SetValue(NumToStr((long)server->GetPort())); cbSSL->SetSelection(server->GetSSL()); cbDatabase->SetValue(server->GetDatabaseName()); txtUsername->SetValue(server->GetUsername()); chkNeedPwd->SetValue(server->GetNeedPwd()); stPassword->Disable(); txtPassword->Disable(); if (connection) { txtName->Disable(); cbDatabase->Disable(); txtPort->Disable(); cbSSL->Disable(); txtUsername->Disable(); chkNeedPwd->Disable(); } } else { SetTitle(_("Add server")); } int rc=dlgProperty::Go(modal); CheckChange(); return rc; } wxString dlgServer::GetPassword() { if (chkNeedPwd->GetValue()) return txtPassword->GetValue(); return wxEmptyString; } pgObject *dlgServer::CreateObject(pgCollection *collection) { wxString name=GetName(); pgObject *obj=new pgServer(GetName(), txtDescription->GetValue(), cbDatabase->GetValue(), txtUsername->GetValue(), StrToLong(txtPort->GetValue()), !chkNeedPwd->GetValue(), cbSSL->GetSelection()); return obj; } void dlgServer::OnChangeNeedPwd(wxCommandEvent &ev) { if (!server) txtPassword->Enable(chkNeedPwd->GetValue()); OnChange(ev); } void dlgServer::CheckChange() { wxString name=GetName(); bool enable=true; if (server) { enable = name != server->GetName() || txtDescription->GetValue() != server->GetDescription() || txtService->GetValue() != server->GetServiceID() || StrToLong(txtPort->GetValue()) != server->GetPort() || cbDatabase->GetValue() != server->GetDatabaseName() || txtUsername->GetValue() != server->GetUsername() || cbSSL->GetSelection() != server->GetSSL() || chkNeedPwd->GetValue() != server->GetNeedPwd(); } CheckValid(enable, !name.IsEmpty(), _("Please specify address.")); CheckValid(enable, !txtDescription->GetValue().IsEmpty(), _("Please specify description.")); CheckValid(enable, StrToLong(txtPort->GetValue()) > 0, _("Please specify port.")); CheckValid(enable, !txtUsername->GetValue().IsEmpty(), _("Please specify user name")); EnableOK(enable); } wxString dlgServer::GetSql() { return wxEmptyString; } ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/docs/faq |
| |||
| 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 majordomo@postgresql.org) |
| |||
| 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 <PHatcher@macys.c om> To Sent by: pgadmin-hackers@postgresql.org pgadmin-hackers-o cc wner@postgresql.o rg Subject [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 majordomo@postgresql.org) ---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend |
| ||||
| Florian G. Pflug wrote: > ... > 2005-04-08 12:25:22 INFO : MAC debug: Dialog: 0;11;70;90;90;0;Lucida > Grande;0 7 13 > 2005-04-08 12:25:22 INFO : MAC debug: outer notebook: > 0;13;70;90;90;0;Lucida Grande;0 9 16 > 2005-04-08 12:25:22 INFO : MAC debug: inner notebook: > 0;13;70;90;90;0;Lucida Grande;0 9 16 These values should be equal for Dialog and other controls, but they aren't. A sample is posted to wx-dev (and CCed to you), please check the sample too (can you supply the values/a snapshot?) Regards, Andreas ---------------------------(end of broadcast)--------------------------- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to majordomo@postgresql.org) |