diff --git a/.github/workflows/linux.yml b/.github/workflows/linux.yml index 66f116a7f6189..b37d9b0f1001c 100644 --- a/.github/workflows/linux.yml +++ b/.github/workflows/linux.yml @@ -152,6 +152,14 @@ jobs: os: ubuntu-20.04 optional_feature: uses_wchar=1 optional_macros: inline=0 + - feature: wxwidgets + CC: gcc-10 + CXX: g++-10 + PackageDeps: g++-10 libwxgtk3.0-gtk3-0v5 libwxgtk3.0-gtk3-dev + platform_file: include $(ACE_ROOT)/include/makeinclude/platform_linux.GNU + os: ubuntu-20.04 + optional_feature: wxWindows=1 + optional_macros: wxWindows=1 - feature: CodeQL CC: gcc-10 CXX: g++-10 diff --git a/TAO/utils/wxNamingViewer/wxAddNameServerDlg.cpp b/TAO/utils/wxNamingViewer/wxAddNameServerDlg.cpp index 6b58dff752039..da0a19de9093a 100644 --- a/TAO/utils/wxNamingViewer/wxAddNameServerDlg.cpp +++ b/TAO/utils/wxNamingViewer/wxAddNameServerDlg.cpp @@ -98,7 +98,13 @@ WxAddNameServerDlg::WxAddNameServerDlg( wxWindow* parent) "Add Name Server", wxDefaultPosition, wxSize(186,69), - wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU, + wxRAISED_BORDER | wxCAPTION | +#if wxABI_VERSION < 20800 + wxTHICK_FRAME | +#else + wxRESIZE_BORDER | +#endif + wxSYSTEM_MENU, "addNameServer") #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1) , ior("") diff --git a/TAO/utils/wxNamingViewer/wxBindDialog.cpp b/TAO/utils/wxNamingViewer/wxBindDialog.cpp index 6baafd53a19c8..f572405d6180b 100644 --- a/TAO/utils/wxNamingViewer/wxBindDialog.cpp +++ b/TAO/utils/wxNamingViewer/wxBindDialog.cpp @@ -82,7 +82,13 @@ WxBindDialog::WxBindDialog( "Bind Object/Context", wxDefaultPosition, wxSize( 300, 75), - wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU, + wxRAISED_BORDER | wxCAPTION | +#if wxABI_VERSION < 20800 + wxTHICK_FRAME | +#else + wxRESIZE_BORDER | +#endif + wxSYSTEM_MENU, "bindObject") #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1) , ior() diff --git a/TAO/utils/wxNamingViewer/wxBindNewContext.cpp b/TAO/utils/wxNamingViewer/wxBindNewContext.cpp index 3bbe855380e41..815468801e764 100644 --- a/TAO/utils/wxNamingViewer/wxBindNewContext.cpp +++ b/TAO/utils/wxNamingViewer/wxBindNewContext.cpp @@ -95,7 +95,13 @@ WxBindNewContext::WxBindNewContext( wxWindow* parent) "Bind New Context", wxDefaultPosition, wxSize( 300, 75), - wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU, + wxRAISED_BORDER | wxCAPTION | +#if wxABI_VERSION < 20800 + wxTHICK_FRAME | +#else + wxRESIZE_BORDER | +#endif + wxSYSTEM_MENU, "bindNewContext") #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1) { diff --git a/TAO/utils/wxNamingViewer/wxNamingTree.cpp b/TAO/utils/wxNamingViewer/wxNamingTree.cpp index 4037b8a84fa91..236baba14a066 100644 --- a/TAO/utils/wxNamingViewer/wxNamingTree.cpp +++ b/TAO/utils/wxNamingViewer/wxNamingTree.cpp @@ -90,7 +90,7 @@ void WxNamingTree::clearChildren() void WxNamingTree::clearChildren( wxTreeItemId& item) { - long cookie; + wxTreeItemIdValue cookie; wxTreeItemId child = GetFirstChild( item, cookie); while( child) { clearChildren( child); @@ -311,7 +311,7 @@ void WxNamingTree::onContextPopupDestroy( wxCommandEvent&) return; } wxTreeItemId item = GetSelection(); - wxTreeItemId parentItem = GetParent( item); + wxTreeItemId parentItem = GetItemParent( item); if (parentItem == 0) { return; } @@ -350,7 +350,7 @@ void WxNamingTree::onContextPopupUnbind( wxCommandEvent&) return; } wxTreeItemId item = GetSelection(); - wxTreeItemId parentItem = GetParent( item); + wxTreeItemId parentItem = GetItemParent( item); if (parentItem == 0) { return; } @@ -404,7 +404,7 @@ void WxNamingTree::onObjectPopupUnbind( wxCommandEvent& ) wxTreeItemId item = GetSelection(); // Make sure we don't unbind "Root" - wxTreeItemId parentItem = GetParent( item); + wxTreeItemId parentItem = GetItemParent( item); if (parentItem == 0) { return; } diff --git a/TAO/utils/wxNamingViewer/wxNamingViewer.cpp b/TAO/utils/wxNamingViewer/wxNamingViewer.cpp index c53dc78a6716b..107a11c74b9d1 100644 --- a/TAO/utils/wxNamingViewer/wxNamingViewer.cpp +++ b/TAO/utils/wxNamingViewer/wxNamingViewer.cpp @@ -5,7 +5,6 @@ // @author: Charlie Frasch (cfrasch@atdesk.com) #include "ace/Init_ACE.h" #include "pch.h" -#include "wx/resource.h" #include "wxNamingViewerFrame.h" #include "wxNamingViewer.wxr" diff --git a/TAO/utils/wxNamingViewer/wxNamingViewer.wxr b/TAO/utils/wxNamingViewer/wxNamingViewer.wxr index 48a9e15cc2d4b..c95f15ff33bbe 100644 --- a/TAO/utils/wxNamingViewer/wxNamingViewer.wxr +++ b/TAO/utils/wxNamingViewer/wxNamingViewer.wxr @@ -1,5 +1,5 @@ -static char *bindObject = "dialog(name = 'bindObject',\ - style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ +static const char *bindObject = "dialog(name = 'bindObject',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\ title = 'Bind Object/Context',\ id = 133,\ x = -1, y = -1, width = 274, height = 66,\ @@ -26,8 +26,8 @@ static char *bindObject = "dialog(name = 'bindObject',\ control = [1018, wxButton, 'View IOR', '0', 'viewIORButton', 222, 26, 50, 12, '',\ [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']])."; -static char *addNameServer = "dialog(name = 'addNameServer',\ - style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ +static const char *addNameServer = "dialog(name = 'addNameServer',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\ title = 'Add Name Server',\ id = 136,\ x = -1, y = -1, width = 186, height = 69,\ @@ -48,8 +48,8 @@ static char *addNameServer = "dialog(name = 'addNameServer',\ control = [5105, wxStaticText, 'IOR:', '0', 'statictext7', 7, 30, 24, 6, '',\ [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']])."; -static char *bindNewContext = "dialog(name = 'bindNewContext',\ - style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ +static const char *bindNewContext = "dialog(name = 'bindNewContext',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\ title = 'Bind New Context',\ id = 134,\ x = -1, y = -1, width = 154, height = 76,\ @@ -70,8 +70,8 @@ static char *bindNewContext = "dialog(name = 'bindNewContext',\ control = [5105, wxStaticText, 'Kind:', '0', 'statictext7', 7, 34, 15, 6, '',\ [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']])."; -static char *viewIOR = "dialog(name = 'viewIOR',\ - style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ +static const char *viewIOR = "dialog(name = 'viewIOR',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\ title = 'View IOR',\ id = 102,\ x = -1, y = -1, width = 394, height = 127,\ @@ -92,8 +92,8 @@ static char *viewIOR = "dialog(name = 'viewIOR',\ control = [1007, wxTextCtrl, '', 'wxTE_READONLY', 'typeIDText', 57, 27, 274, 12, '',\ [8, 'wxSWISS', 'wxNORMAL', 'wxNORMAL', 0, 'MS Sans Serif']])."; -static char *selectNS = "dialog(name = 'selectNS',\ - style = 'wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU',\ +static const char *selectNS = "dialog(name = 'selectNS',\ + style = 'wxRAISED_BORDER | wxCAPTION | wxRESIZE_BORDER | wxSYSTEM_MENU',\ title = 'Select Naming Service',\ id = 135,\ x = -1, y = -1, width = 181, height = 94,\ diff --git a/TAO/utils/wxNamingViewer/wxSelectNSDialog.cpp b/TAO/utils/wxNamingViewer/wxSelectNSDialog.cpp index ca363fcfd1ce9..03a13e1220c9b 100644 --- a/TAO/utils/wxNamingViewer/wxSelectNSDialog.cpp +++ b/TAO/utils/wxNamingViewer/wxSelectNSDialog.cpp @@ -93,7 +93,13 @@ WxSelectNSDialog::WxSelectNSDialog( wxWindow* parent) "Select Naming Service", wxDefaultPosition, wxSize(181,94), - wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU, + wxRAISED_BORDER | wxCAPTION | +#if wxABI_VERSION < 20800 + wxTHICK_FRAME | +#else + wxRESIZE_BORDER | +#endif + wxSYSTEM_MENU, "selectNS") #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1) , config( 0) @@ -137,7 +143,11 @@ WxSelectNSDialog::WxSelectNSDialog( wxWindow* parent) WxSelectNSDialog::~WxSelectNSDialog() { +#if 0 int count = servers->Number(); +#else + int count = servers->GetCount(); +#endif for (int i = 0; i < count; i++) { delete static_cast( servers->GetClientData( i)); } @@ -152,10 +162,10 @@ void WxSelectNSDialog::onAdd( wxCommandEvent& WXUNUSED(event)) dialog->getServerName(), new wxString( dialog->getIor())); ACE_Configuration_Section_Key section = config->root_section(); - ACE_TString value = dialog->getIor().c_str(); + ACE_TString value = dialog->getIor().c_str().AsChar(); config->set_string_value( section, - dialog->getServerName().c_str(), + dialog->getServerName().c_str().AsChar(), value); } } @@ -180,7 +190,7 @@ void WxSelectNSDialog::onInitDialog( wxInitDialogEvent& event) } -void WxSelectNSDialog::onLeftDClick( wxMouseEvent& event) +void WxSelectNSDialog::onLeftDClick( wxCommandEvent& event) { ACE_UNUSED_ARG( event); diff --git a/TAO/utils/wxNamingViewer/wxSelectNSDialog.h b/TAO/utils/wxNamingViewer/wxSelectNSDialog.h index 8052483bc7376..2a3d2b123803c 100644 --- a/TAO/utils/wxNamingViewer/wxSelectNSDialog.h +++ b/TAO/utils/wxNamingViewer/wxSelectNSDialog.h @@ -19,7 +19,7 @@ class WxSelectNSDialog : public void onInitDialog( wxInitDialogEvent& event); void onOK( wxCommandEvent& event); void onRemove( wxCommandEvent& event); - void onLeftDClick( wxMouseEvent& event); + void onLeftDClick( wxCommandEvent& event); class ACE_Configuration* config; diff --git a/TAO/utils/wxNamingViewer/wxViewIORDialog.cpp b/TAO/utils/wxNamingViewer/wxViewIORDialog.cpp index f6ea0460cf57d..209a57eb1f919 100644 --- a/TAO/utils/wxNamingViewer/wxViewIORDialog.cpp +++ b/TAO/utils/wxNamingViewer/wxViewIORDialog.cpp @@ -134,7 +134,13 @@ WxViewIORDialog::WxViewIORDialog( "View IOR", wxDefaultPosition, wxSize(394,127), - wxRAISED_BORDER | wxCAPTION | wxTHICK_FRAME | wxSYSTEM_MENU, + wxRAISED_BORDER | wxCAPTION | +#if wxABI_VERSION < 20800 + wxTHICK_FRAME | +#else + wxRESIZE_BORDER | +#endif + wxSYSTEM_MENU, "viewIOR") #endif // defined(wxUSE_RESOURCES) && (wxUSE_RESOURCES == 1) , orb( orb) @@ -208,15 +214,24 @@ void WxViewIORDialog::decodeIOR() } catch (const CORBA::Exception& ex) { wxMessageBox( ex._info().c_str(), "CORBA::Exception"); } - } profiles->Expand( rootItem); } -void WxViewIORDialog::OnApply( wxCommandEvent& event) +#if defined(ANCIENT_WX_WINDOWS) +#define ONLY_ANCIENT_WX_USES(x) (x) +#else +#define ONLY_ANCIENT_WX_USES(x) WXUNUSED(x) +#endif + +void WxViewIORDialog::OnApply( wxCommandEvent& ONLY_ANCIENT_WX_USES(event)) { +#if defined(ANCIENT_WX_WINDOWS) wxDialog::OnApply( event); +#else + wxDialog::EndModal( wxID_APPLY); +#endif try { object = orb->string_to_object( ior); decodeIOR();