]> git.saurik.com Git - wxWidgets.git/blobdiff - src/aui/auibook.cpp
Notify user less intrusively about overflow when previewing HTML printouts.
[wxWidgets.git] / src / aui / auibook.cpp
index ca1cff4a3ae9bc10371f925cc1d305a45b291617..b3b443f62a829f3e532f5461dcaa79a52c8274b7 100644 (file)
@@ -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
@@ -2693,6 +2691,9 @@ public:
         if (!m_tabs)
             return;
 
+        if (m_tabs->IsFrozen() || m_tabs->GetParent()->IsFrozen())
+            return;
+
         m_tab_rect = wxRect(m_rect.x, m_rect.y, m_rect.width, m_tab_ctrl_height);
         if (m_tabs->GetFlags() & wxAUI_NB_BOTTOM)
         {
@@ -3261,12 +3262,11 @@ bool wxAuiNotebook::RemovePage(size_t page_idx)
 
     RemoveEmptyTabFrames();
 
-    // set new active pane
+    m_curpage = wxNOT_FOUND;
+
+    // set new active pane unless we're being destroyed anyhow
     if (new_active && !m_isBeingDeleted)
-    {
-        m_curpage = -1;
         SetSelectionToWindow(new_active);
-    }
 
     return true;
 }
@@ -4158,6 +4158,8 @@ void wxAuiNotebook::RemoveEmptyTabFrames()
 
 void wxAuiNotebook::OnChildFocusNotebook(wxChildFocusEvent& evt)
 {
+    evt.Skip();
+
     // if we're dragging a tab, don't change the current selection.
     // This code prevents a bug that used to happen when the hint window
     // was hidden.  In the bug, the focus would return to the notebook
@@ -4482,4 +4484,11 @@ bool wxAuiNotebook::ShowWindowMenu()
         return false;
 }
 
+void wxAuiNotebook::Thaw()
+{
+    DoSizing();
+
+    wxControl::Thaw();
+}
+
 #endif // wxUSE_AUI