From 17dd0e0532a2984951f05c9261b0f897025c58c6 Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sun, 7 Mar 2010 10:46:17 +0000 Subject: [PATCH] Show pages icons in window list menu in wxAuiNotebook. Reuse the tab icons in the wxAuiNotebook window list menu. Closes #11785. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@63647 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- docs/changes.txt | 1 + src/aui/auibook.cpp | 12 +++++------- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/docs/changes.txt b/docs/changes.txt index 9909d54328..73b5f43c11 100644 --- a/docs/changes.txt +++ b/docs/changes.txt @@ -494,6 +494,7 @@ All (GUI): - Fix building with using system libpng 1.4 (Volker Grabsch). - Add wxComboBox::Popup() and Dismiss() methods (Igor Korot). - Added wxTreeCtrl::SelectChildren() (Nikolay Tjushkov). +- Show pages icons in window list menu in wxAuiNotebook (Ronny Krüger). GTK: diff --git a/src/aui/auibook.cpp b/src/aui/auibook.cpp index c58da91092..379f0d61ba 100644 --- a/src/aui/auibook.cpp +++ b/src/aui/auibook.cpp @@ -728,7 +728,7 @@ void wxAuiDefaultTabArt::DrawButton(wxDC& dc, int wxAuiDefaultTabArt::ShowDropDown(wxWindow* wnd, const wxAuiNotebookPageArray& pages, - int active_idx) + int /*active_idx*/) { wxMenu menuPopup; @@ -743,12 +743,10 @@ int wxAuiDefaultTabArt::ShowDropDown(wxWindow* wnd, if (caption.IsEmpty()) caption = wxT(" "); - menuPopup.AppendCheckItem(1000+i, caption); - } - - if (active_idx != -1) - { - menuPopup.Check(1000+active_idx, true); + wxMenuItem* item = new wxMenuItem(NULL, 1000+i, caption); + if (page.bitmap.IsOk()) + item->SetBitmap(page.bitmap); + menuPopup.Append(item); } // find out where to put the popup menu of window items -- 2.47.2