Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wxNamingViewer: build with wxWidgets 3.2 #2169

Open
wants to merge 10 commits into
base: master
Choose a base branch
from
8 changes: 8 additions & 0 deletions .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
8 changes: 7 additions & 1 deletion TAO/utils/wxNamingViewer/wxAddNameServerDlg.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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("")
Expand Down
8 changes: 7 additions & 1 deletion TAO/utils/wxNamingViewer/wxBindDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
8 changes: 7 additions & 1 deletion TAO/utils/wxNamingViewer/wxBindNewContext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
{
Expand Down
8 changes: 4 additions & 4 deletions TAO/utils/wxNamingViewer/wxNamingTree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -311,7 +311,7 @@ void WxNamingTree::onContextPopupDestroy( wxCommandEvent&)
return;
}
wxTreeItemId item = GetSelection();
wxTreeItemId parentItem = GetParent( item);
wxTreeItemId parentItem = GetItemParent( item);
if (parentItem == 0) {
return;
}
Expand Down Expand Up @@ -350,7 +350,7 @@ void WxNamingTree::onContextPopupUnbind( wxCommandEvent&)
return;
}
wxTreeItemId item = GetSelection();
wxTreeItemId parentItem = GetParent( item);
wxTreeItemId parentItem = GetItemParent( item);
if (parentItem == 0) {
return;
}
Expand Down Expand Up @@ -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;
}
Expand Down
1 change: 0 additions & 1 deletion TAO/utils/wxNamingViewer/wxNamingViewer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
// @author: Charlie Frasch ([email protected])
#include "ace/Init_ACE.h"
#include "pch.h"
#include "wx/resource.h"
#include "wxNamingViewerFrame.h"
#include "wxNamingViewer.wxr"

Expand Down
20 changes: 10 additions & 10 deletions TAO/utils/wxNamingViewer/wxNamingViewer.wxr
Original file line number Diff line number Diff line change
@@ -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,\
Expand All @@ -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,\
Expand All @@ -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,\
Expand All @@ -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,\
Expand All @@ -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,\
Expand Down
18 changes: 14 additions & 4 deletions TAO/utils/wxNamingViewer/wxSelectNSDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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<wxString*>( servers->GetClientData( i));
}
Expand All @@ -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);
}
}
Expand All @@ -180,7 +190,7 @@ void WxSelectNSDialog::onInitDialog( wxInitDialogEvent& event)
}


void WxSelectNSDialog::onLeftDClick( wxMouseEvent& event)
void WxSelectNSDialog::onLeftDClick( wxCommandEvent& event)
{
ACE_UNUSED_ARG( event);

Expand Down
2 changes: 1 addition & 1 deletion TAO/utils/wxNamingViewer/wxSelectNSDialog.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
21 changes: 18 additions & 3 deletions TAO/utils/wxNamingViewer/wxViewIORDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down Expand Up @@ -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();
Expand Down
Loading