]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/popupwin.cpp
use UTF8-encoded char* strings in UTF8 build instead of wchar_t* if the current local...
[wxWidgets.git] / src / gtk / popupwin.cpp
index 9bd674d57d5018a8e5ae5dbb744f37cf33b30e01..bad479785abf250205996060d70b309e6fea87f0 100644 (file)
@@ -113,7 +113,7 @@ gtk_dialog_realized_callback( GtkWidget * WXUNUSED(widget), wxPopupWindow *win )
 static void wxInsertChildInDialog( wxPopupWindow* parent, wxWindow* child )
 {
     gtk_pizza_put( GTK_PIZZA(parent->m_wxwindow),
-                   GTK_WIDGET(child->m_widget),
+                   child->m_widget,
                    child->m_x,
                    child->m_y,
                    child->m_width,
@@ -143,8 +143,6 @@ wxPopupWindow::~wxPopupWindow()
 
 bool wxPopupWindow::Create( wxWindow *parent, int style )
 {
-    m_needParent = false;
-
     if (!PreCreation( parent, wxDefaultPosition, wxDefaultSize ) ||
         !CreateBase( parent, -1, wxDefaultPosition, wxDefaultSize, style, wxDefaultValidator, wxT("popup") ))
     {
@@ -239,15 +237,7 @@ void wxPopupWindow::DoSetSize( int x, int y, int width, int height, int sizeFlag
     }
 */
 
-    int minWidth = GetMinWidth(),
-        minHeight = GetMinHeight(),
-        maxWidth = GetMaxWidth(),
-        maxHeight = GetMaxHeight();
-
-    if ((minWidth != -1) && (m_width < minWidth)) m_width = minWidth;
-    if ((minHeight != -1) && (m_height < minHeight)) m_height = minHeight;
-    if ((maxWidth != -1) && (m_width > maxWidth)) m_width = maxWidth;
-    if ((maxHeight != -1) && (m_height > maxHeight)) m_height = maxHeight;
+    ConstrainSize();
 
     if ((m_x != -1) || (m_y != -1))
     {