From f3ab72ca55f6bf1ebb43200820febaf035724e28 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 14 Sep 2018 21:33:56 +0200 Subject: [PATCH 1/3] Remove trailing spaces in dialogs sample --- samples/dialogs/dialogs.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/samples/dialogs/dialogs.cpp b/samples/dialogs/dialogs.cpp index d035991787..303ff8d9b8 100644 --- a/samples/dialogs/dialogs.cpp +++ b/samples/dialogs/dialogs.cpp @@ -614,15 +614,15 @@ bool MyApp::OnInit() editMenu->Append(wxID_COPY, "&Copy\tCtrl+C"); editMenu->Append(wxID_PASTE, "&Paste\tCtrl+V"); editMenu->Append(wxID_CLEAR, "&Delete"); - + editMenu->AppendSeparator(); editMenu->Append(wxID_SELECTALL, "Select All\tCtrl+A"); wxMenuBar *menubar = new wxMenuBar; menubar->Append(menuDlg, "&Dialogs"); - + menubar->Append(editMenu, "&Edit"); - + #if wxUSE_ABOUTDLG menubar->Append(menuHelp, "&Help"); #endif // wxUSE_ABOUTDLG @@ -2146,7 +2146,7 @@ private: if ( !m_taskbarIcon ) { m_taskbarIcon = new wxTaskBarIcon(); - m_taskbarIcon->SetIcon(reinterpret_cast(GetParent())->GetIcon(), + m_taskbarIcon->SetIcon(reinterpret_cast(GetParent())->GetIcon(), "Dialogs Sample (Persistent)"); } wxNotificationMessage::UseTaskBarIcon(m_taskbarIcon); From d8211f389c9e4eb4332a254f2b97eb9baa6a5f0e Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 14 Sep 2018 21:35:01 +0200 Subject: [PATCH 2/3] Remove OS/2 remnants from bakefile of dialogs sample --- samples/dialogs/dialogs.bkl | 4 ---- 1 file changed, 4 deletions(-) diff --git a/samples/dialogs/dialogs.bkl b/samples/dialogs/dialogs.bkl index 4f9423c82a..806f49c514 100644 --- a/samples/dialogs/dialogs.bkl +++ b/samples/dialogs/dialogs.bkl @@ -21,10 +21,6 @@ $(WXTOPDIR)src/generic/filedlgg.cpp - - $(WXTOPDIR)src/generic/fontdlgg.cpp - $(WXTOPDIR)src/generic/filedlgg.cpp - From 53dbff296243a141274a65e947349c0dd10b0712 Mon Sep 17 00:00:00 2001 From: Maarten Bent Date: Fri, 14 Sep 2018 21:41:49 +0200 Subject: [PATCH 3/3] CMake: Fix building dialogs sample Add the source files of the generic dialogs to the project, similar as is done in the bakefile. See previous commits 573e887a4c00bd3e050d7ca27a3546467969feba and 6415bd553fc16863a7dcf5a6242a4aec270f0dcc, which partially reverted it, for the full story. --- build/cmake/samples/CMakeLists.txt | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/build/cmake/samples/CMakeLists.txt b/build/cmake/samples/CMakeLists.txt index a09ff9c26d..0e19f47d72 100644 --- a/build/cmake/samples/CMakeLists.txt +++ b/build/cmake/samples/CMakeLists.txt @@ -23,7 +23,17 @@ wx_add_sample(dataview IMPORTANT dataview.cpp mymodels.cpp mymodels.h DEPENDS wx if(wxUSE_ON_FATAL_EXCEPTION AND (NOT WIN32 OR MSVC)) wx_add_sample(debugrpt LIBRARIES qa DEPENDS wxUSE_DEBUGREPORT) endif() -wx_add_sample(dialogs dialogs.cpp dialogs.h DATA tips.txt) +set(SAMPLE_DIALOGS_SRC dialogs.cpp dialogs.h) +if(NOT wxBUILD_SHARED AND (WXMSW OR APPLE)) # AND NOT WXUNIV + wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ colrdlgg.cpp dirdlgg.cpp filedlgg.cpp) + if(WXMSW) + wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ fontdlgg.cpp) + endif() +endif() +if(WXGTK2) + wx_list_add_prefix(SAMPLE_DIALOGS_SRC ../../src/generic/ filedlgg.cpp) +endif() +wx_add_sample(dialogs ${SAMPLE_DIALOGS_SRC} DATA tips.txt) wx_add_sample(dialup nettest.cpp LIBRARIES net DEPENDS wxUSE_DIALUP_MANAGER) wx_add_sample(display DEPENDS wxUSE_DISPLAY) wx_add_sample(dnd dnd.cpp RES dnd.rc DATA wxwin.png DEPENDS wxUSE_DRAG_AND_DROP)