]> git.saurik.com Git - wxWidgets.git/blobdiff - src/html/htmlwin.cpp
fixed handling of the accelerators of menu items added to already attached submenus
[wxWidgets.git] / src / html / htmlwin.cpp
index 00be22276af981b72e631c71a2288f4369ccc0cc..83307773bcc063f82e2a901054da40f9b2f04ae8 100644 (file)
@@ -181,6 +181,7 @@ void wxHtmlWindow::Init()
 #endif // wxUSE_CLIPBOARD
     m_backBuffer = NULL;
     m_eraseBgInOnPaint = false;
 #endif // wxUSE_CLIPBOARD
     m_backBuffer = NULL;
     m_eraseBgInOnPaint = false;
+    m_tmpSelFromCell = NULL;
 }
 
 bool wxHtmlWindow::Create(wxWindow *parent, wxWindowID id,
 }
 
 bool wxHtmlWindow::Create(wxWindow *parent, wxWindowID id,
@@ -271,6 +272,9 @@ bool wxHtmlWindow::SetPage(const wxString& source)
 
     wxDELETE(m_selection);
 
 
     wxDELETE(m_selection);
 
+    // we will soon delete all the cells, so clear pointers to them:
+    m_tmpSelFromCell = NULL;
+
     // pass HTML through registered processors:
     if (m_Processors || m_GlobalProcessors)
     {
     // pass HTML through registered processors:
     if (m_Processors || m_GlobalProcessors)
     {
@@ -800,7 +804,7 @@ bool wxHtmlWindow::CopySelection(ClipboardType t)
 #if wxUSE_CLIPBOARD
     if ( m_selection )
     {
 #if wxUSE_CLIPBOARD
     if ( m_selection )
     {
-#ifdef __UNIX__
+#if defined(__UNIX__) && !defined(__WXMAC__)
         wxTheClipboard->UsePrimarySelection(t == Primary);
 #else // !__UNIX__
         // Primary selection exists only under X11, so don't do anything under
         wxTheClipboard->UsePrimarySelection(t == Primary);
 #else // !__UNIX__
         // Primary selection exists only under X11, so don't do anything under
@@ -822,6 +826,8 @@ bool wxHtmlWindow::CopySelection(ClipboardType t)
             return true;
         }
     }
             return true;
         }
     }
+#else
+    wxUnusedVar(t);
 #endif // wxUSE_CLIPBOARD
 
     return false;
 #endif // wxUSE_CLIPBOARD
 
     return false;
@@ -1023,6 +1029,8 @@ void wxHtmlWindow::OnMouseDown(wxMouseEvent& event)
             CaptureMouse();
         }
     }
             CaptureMouse();
         }
     }
+#else
+    wxUnusedVar(event);
 #endif // wxUSE_CLIPBOARD
 }
 
 #endif // wxUSE_CLIPBOARD
 }