Re: pgadmin3 wx28'ize patch. - Mailing list pgadmin-support

From Dave Page
Subject Re: pgadmin3 wx28'ize patch.
Date
Msg-id 45C0F45B.90206@postgresql.org
Whole thread Raw
In response to pgadmin3 wx28'ize patch.  (Alex Gorbachenko <agent_007@immo.ru>)
List pgadmin-support
Thanks, patch applied.

Regards, Dave.

Alex Gorbachenko wrote:
> today i try to build pgadmin3 svn revision 5892 with
> "--disable-compat26" wxGTK 2.8.
> 
> i found a some build troubles, made a patch and attached it. 
> 
> 
> 
> ------------------------------------------------------------------------
> 
> --- ../pgadmin3/pgadmin/frm/frmBackup.cpp.orig     2007-01-17 13:19:34 +0300
> +++ ../pgadmin3/pgadmin/frm/frmBackup.cpp  2007-01-17 14:03:49 +0300
> @@ -128,7 +128,7 @@ void frmBackup::OnSelectFilename(wxComma
>      }
>  
>      
> -    wxFileDialog file(this, title, ::wxPathOnly(txtFilename->GetValue()), txtFilename->GetValue(), prompt, wxSAVE);
> +    wxFileDialog file(this, title, ::wxPathOnly(txtFilename->GetValue()), txtFilename->GetValue(), prompt,
wxFD_SAVE);
>  
>      if (file.ShowModal() == wxID_OK)
>      {
> --- ../pgadmin3/pgadmin/frm/frmQuery.cpp    2006-12-14 16:59:55 +0300
> +++ ../pgadmin3.patched/pgadmin/frm/frmQuery.cpp    2006-12-19 13:31:49 +0300
> @@ -754,7 +754,7 @@ void frmQuery::OnHelp(wxCommandEvent& ev
>  void frmQuery::OnSaveHistory(wxCommandEvent& event)
>  {
>      wxFileDialog *dlg=new wxFileDialog(this, _("Save history"), lastDir, wxEmptyString, 
> -        _("Log files (*.log)|*.log|All files (*.*)|*.*"), wxSAVE|wxOVERWRITE_PROMPT);
> +        _("Log files (*.log)|*.log|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
>      if (dlg->ShowModal() == wxID_OK)
>      {
>          if (!FileWrite(dlg->GetPath(), msgHistory->GetValue(), false))
> @@ -1178,7 +1178,7 @@ void frmQuery::OnOpen(wxCommandEvent& ev
>          return;
>  
>      wxFileDialog dlg(this, _("Open query file"), lastDir, wxT(""), 
> -        _("Query files (*.sql)|*.sql|All files (*.*)|*.*"), wxOPEN);
> +        _("Query files (*.sql)|*.sql|All files (*.*)|*.*"), wxFD_OPEN);
>      if (dlg.ShowModal() == wxID_OK)
>      {
>          lastFilename=dlg.GetFilename();
> @@ -1212,7 +1212,7 @@ void frmQuery::OnSave(wxCommandEvent& ev
>  void frmQuery::OnSaveAs(wxCommandEvent& event)
>  {
>      wxFileDialog *dlg=new wxFileDialog(this, _("Save query file as"), lastDir, lastFilename, 
> -        _("Query files (*.sql)|*.sql|UTF-8 query files (*.sql)|*.sql|All files (*.*)|*.*"),
wxSAVE|wxOVERWRITE_PROMPT);
> +        _("Query files (*.sql)|*.sql|UTF-8 query files (*.sql)|*.sql|All files (*.*)|*.*"),
wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
>      if (dlg->ShowModal() == wxID_OK)
>      {
>          lastFilename=dlg->GetFilename();
> --- ../pgadmin3/pgadmin/frm/frmReport.cpp    2006-12-14 16:59:55 +0300
> +++ ../pgadmin3.patched/pgadmin/frm/frmReport.cpp    2006-12-19 13:32:47 +0300
> @@ -425,7 +425,7 @@ void frmReport::OnBrowseStylesheet(wxCom
>          if (!wxFile::Exists(def))
>              def.Empty();
>     
> -        wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("HTML Stylesheet files
(*.css)|*.css|Allfiles (*.*)|*.*"), wxOPEN);
 
> +        wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("HTML Stylesheet files
(*.css)|*.css|Allfiles (*.*)|*.*"), wxFD_OPEN);
 
>  
>          if (file.ShowModal() == wxID_OK)
>          {
> @@ -440,7 +440,7 @@ void frmReport::OnBrowseStylesheet(wxCom
>          if (!wxFile::Exists(def))
>              def.Empty();
>     
> -        wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("XML Stylesheet files
(*.xsl)|*.xsl|Allfiles (*.*)|*.*"), wxOPEN);
 
> +        wxFileDialog file(this, _("Select stylesheet filename"), wxGetHomeDir(), def, _("XML Stylesheet files
(*.xsl)|*.xsl|Allfiles (*.*)|*.*"), wxFD_OPEN);
 
>  
>          if (file.ShowModal() == wxID_OK)
>          {
> @@ -455,7 +455,7 @@ void frmReport::OnBrowseFile(wxCommandEv
>      if (rbHtml->GetValue())
>      {
>          wxFileDialog file(this, _("Select output filename"), wxGetHomeDir(), txtHtmlFile->GetValue(),
> -            _("HTML files (*.html)|*.html|All files (*.*)|*.*"), wxSAVE && wxOVERWRITE_PROMPT);
> +            _("HTML files (*.html)|*.html|All files (*.*)|*.*"), wxFD_SAVE && wxFD_OVERWRITE_PROMPT);
>  
>          if (file.ShowModal() == wxID_OK)
>          {
> @@ -466,7 +466,7 @@ void frmReport::OnBrowseFile(wxCommandEv
>      else
>      {
>          wxFileDialog file(this, _("Select output filename"), wxGetHomeDir(), txtXmlFile->GetValue(),
> -            _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxSAVE && wxOVERWRITE_PROMPT);
> +            _("XML files (*.xml)|*.xml|All files (*.*)|*.*"), wxFD_SAVE && wxFD_OVERWRITE_PROMPT);
>  
>          if (file.ShowModal() == wxID_OK)
>          {
> --- ../pgadmin3/pgadmin/frm/events.cpp.orig        2007-01-17 13:19:34 +0300
> +++ ../pgadmin3/pgadmin/frm/events.cpp     2007-01-17 13:59:17 +0300
> @@ -722,7 +722,7 @@ void frmMain::OnSaveDefinition(wxCommand
>      wxString file;
>      settings->Read(wxT("frmMain/LastFile"), &file, wxEmptyString);
>  
> -    wxFileDialog filename(this, _("Select output file"), ::wxPathOnly(file), file, _("SQL Scripts (*.sql)|*.sql|All
files(*.*)|*.*"), wxSAVE | wxOVERWRITE_PROMPT);
 
> +    wxFileDialog filename(this, _("Select output file"), ::wxPathOnly(file), file, _("SQL Scripts (*.sql)|*.sql|All
files(*.*)|*.*"), wxFD_SAVE | wxFD_OVERWRITE_PROMPT);
 
>  
>      // Show the dialogue
>      if (filename.ShowModal() == wxID_OK)
> --- ../pgadmin3/pgadmin/frm/frmConfig.cpp    2006-12-14 16:59:55 +0300
> +++ ../pgadmin3.patched/pgadmin/frm/frmConfig.cpp    2006-12-19 13:27:43 +0300
> @@ -260,7 +260,7 @@ void frmConfig::OnOpen(wxCommandEvent& e
>          return;
>  
>      wxFileDialog dlg(this, _("Open configuration file"), lastDir, wxT(""), 
> -        _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxOPEN);
> +        _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxFD_OPEN);
>      if (dlg.ShowModal() == wxID_OK)
>      {
>          lastFilename=dlg.GetFilename();
> @@ -293,7 +293,7 @@ void frmConfig::OnSave(wxCommandEvent& e
>  void frmConfig::OnSaveAs(wxCommandEvent& event)
>  {
>      wxFileDialog *dlg=new wxFileDialog(this, _("Save configuration file as"), lastDir, lastFilename, 
> -        _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxSAVE|wxOVERWRITE_PROMPT);
> +        _("Configuration files (*.conf)|*.conf|All files (*.*)|*.*"), wxFD_SAVE|wxFD_OVERWRITE_PROMPT);
>      if (dlg->ShowModal() == wxID_OK)
>      {
>          lastFilename=dlg->GetFilename();
> --- ../pgadmin3/pgadmin/frm/frmHint.cpp    2006-12-14 16:59:55 +0300
> +++ ../pgadmin3.patched/pgadmin/frm/frmHint.cpp    2006-12-19 13:30:33 +0300
> @@ -254,7 +254,7 @@ void frmHint::SetHint(const wxString &in
>              if (a<0)
>                  a=0;
>              if (o < 0)
> -                o=wxSTRING_MAXLEN;
> +                o=wxStringBase::npos;
>  
>  
>              int ha=page.Find(wxT("<H3>"));
> --- ../pgadmin3/pgadmin/frm/frmAbout.cpp    2006-12-14 16:59:55 +0300
> +++ ../pgadmin3.patched/pgadmin/frm/frmAbout.cpp    2006-12-19 13:25:21 +0300
> @@ -30,7 +30,7 @@ EVT_PAINT(frmAbout::OnPaint)
>  END_EVENT_TABLE()
>  
>  frmAbout::frmAbout(wxFrame *parent)
> -: wxDialog(parent, -1, APPNAME_L, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION |
wxDIALOG_MODAL| wxSYSTEM_MENU | wxSTAY_ON_TOP)
 
> +: wxDialog(parent, -1, APPNAME_L, wxDefaultPosition, wxDefaultSize, wxDEFAULT_DIALOG_STYLE | wxCAPTION | 0 |
wxSYSTEM_MENU| wxSTAY_ON_TOP)
 
>  {
>  
>      wxLogInfo(wxT("Creating an about box"));
> --- ../pgadmin3/pgadmin/dlg/dlgProperty.cpp    2006-12-14 16:59:56 +0300
> +++ ../pgadmin3.patched/pgadmin/dlg/dlgProperty.cpp    2006-12-19 13:14:01 +0300
> @@ -130,7 +130,7 @@ dlgProperty::~dlgProperty()
>      wxString prop=wxT("Properties/") + wxString(factory->GetTypeName());
>      settings->Write(prop, GetPosition());
>  
> -    if (GetWindowStyle() & wxTHICK_FRAME)
> +    if (GetWindowStyle() & wxRESIZE_BORDER)
>          settings->Write(prop, GetSize());
>  }
>  
> @@ -202,7 +202,7 @@ int dlgProperty::Go(bool modal)
>  
>      wxSize origSize = GetSize();
>  
> -    if (GetWindowStyle() & wxTHICK_FRAME)
> +    if (GetWindowStyle() & wxRESIZE_BORDER)
>          SetSize(settings->Read(prop, GetSize()));
>  
>      wxPoint pos=settings->Read(prop, GetPosition());
> --- ../pgadmin3/pgadmin/dlg/dlgClasses.cpp    2006-12-14 16:59:56 +0300
> +++ ../pgadmin3.patched/pgadmin/dlg/dlgClasses.cpp    2006-12-19 13:11:58 +0300
> @@ -43,7 +43,7 @@ void pgDialog::AddStatusBar()
>      if (!statusBar)
>      {
>          long flags=0;
> -        if (GetWindowStyle() & wxTHICK_FRAME)
> +        if (GetWindowStyle() & wxRESIZE_BORDER)
>              flags = wxST_SIZEGRIP;
>          statusBar = new wxStatusBar(this, -1, flags);
>  
> @@ -72,7 +72,7 @@ void pgDialog::PostCreation()
>      if (!statusBar && FindWindow(STATUSBAR_CONTAINER))
>          AddStatusBar();
>  
> -    if (GetWindowStyle() & wxTHICK_FRAME)   // is designed with sizers; don't change
> +    if (GetWindowStyle() & wxRESIZE_BORDER)   // is designed with sizers; don't change
>          return;
>  
>      if (!btnCancel)



pgadmin-support by date:

Previous
From: "Ezequias Rodrigues da Rocha"
Date:
Subject: Log, Logs and more Logs
Next
From: Luca Ferrari
Date:
Subject: undefined reference - problem compiling pgadmin3