]> git.saurik.com Git - wxWidgets.git/commitdiff
New attempt at getting constraints work
authorRobert Roebling <robert@roebling.de>
Tue, 13 Jul 1999 13:46:31 +0000 (13:46 +0000)
committerRobert Roebling <robert@roebling.de>
Tue, 13 Jul 1999 13:46:31 +0000 (13:46 +0000)
  Removed horiz scrollbars from text ctrl
  Corrected client data deletion in combobox

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@2992 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/gtk/combobox.cpp
src/gtk/textctrl.cpp
src/gtk/win_gtk.c
src/gtk1/combobox.cpp
src/gtk1/textctrl.cpp
src/gtk1/win_gtk.c

index efbe51763d8fd2b18fde0518b7dda40c974aebb9..b51c7c04abafca10dad4eb3f603edd040da07ee9 100644 (file)
@@ -166,13 +166,15 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
 
 wxComboBox::~wxComboBox()
 {
-    wxNode *node = m_clientDataList.First();
+    wxNode *node = m_clientObjectList.First();
     while (node)
     {
         wxClientData *cd = (wxClientData*)node->Data();
         if (cd) delete cd;
         node = node->Next();
     }
+    m_clientObjectList.Clear();
+
     m_clientDataList.Clear();
 }
 
index 3d426e1668e685c6904ed1326ec6438fc084e598..76dae328f500f3260865e15a0d64ee55ec427e08 100644 (file)
@@ -146,9 +146,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
     bool multi_line = (style & wxTE_MULTILINE) != 0;
     if (multi_line)
     {
+#if (GTK_MINOR_VERSION > 2)
         /* a multi-line edit control: create a vertical scrollbar by default and
            horizontal if requested */
         bool bHasHScrollbar = (style & wxHSCROLL) != 0;
+#else
+        bool bHasHScrollbar = FALSE;
+#endif
 
         /* create our control ... */
         m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
@@ -164,6 +168,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
         /* always wrap words */
         gtk_text_set_word_wrap( GTK_TEXT(m_text), TRUE );
 
+#if (GTK_MINOR_VERSION > 2)
         /* put the horizontal scrollbar in the lower left hand corner */
         if (bHasHScrollbar)
         {
@@ -175,11 +180,10 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                        0, 0);
             gtk_widget_show(hscrollbar);
 
-#if (GTK_MINOR_VERSION > 0)
             /* don't wrap lines, otherwise we wouldn't need the scrollbar */
             gtk_text_set_line_wrap( GTK_TEXT(m_text), FALSE );
-#endif
         }
+#endif
 
         /* finally, put the vertical scrollbar in the upper right corner */
         m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
index dcd694df3fd1261b2dc65a40234456485e595fac..529c295cd3165e3d3839c1913abcf4314285febe 100644 (file)
@@ -10,7 +10,6 @@
 #include "wx/gtk/win_gtk.h"
 #include "gtk/gtksignal.h"
 #include "gtk/gtknotebook.h"
-#include "gtk/gtktable.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -328,9 +327,9 @@ gtk_myfixed_set_size (GtkMyFixed    *myfixed,
 
             if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed))
            {
-                if ( ((child->width > 1) && (child->height > 1) && (GTK_WIDGET_REALIZED(widget))) ||
-                    /* I don't know why GtkTable is different */
-                    GTK_IS_TABLE(widget))
+                if ( (child->width > 1) && 
+                    (child->height > 1) && 
+                   !(GTK_WIDGET_REALIZED(widget) && GTK_IS_NOTEBOOK(widget)) )
                {
                     child_allocation.x = child->x;
                     child_allocation.y = child->y;
index efbe51763d8fd2b18fde0518b7dda40c974aebb9..b51c7c04abafca10dad4eb3f603edd040da07ee9 100644 (file)
@@ -166,13 +166,15 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
 
 wxComboBox::~wxComboBox()
 {
-    wxNode *node = m_clientDataList.First();
+    wxNode *node = m_clientObjectList.First();
     while (node)
     {
         wxClientData *cd = (wxClientData*)node->Data();
         if (cd) delete cd;
         node = node->Next();
     }
+    m_clientObjectList.Clear();
+
     m_clientDataList.Clear();
 }
 
index 3d426e1668e685c6904ed1326ec6438fc084e598..76dae328f500f3260865e15a0d64ee55ec427e08 100644 (file)
@@ -146,9 +146,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
     bool multi_line = (style & wxTE_MULTILINE) != 0;
     if (multi_line)
     {
+#if (GTK_MINOR_VERSION > 2)
         /* a multi-line edit control: create a vertical scrollbar by default and
            horizontal if requested */
         bool bHasHScrollbar = (style & wxHSCROLL) != 0;
+#else
+        bool bHasHScrollbar = FALSE;
+#endif
 
         /* create our control ... */
         m_text = gtk_text_new( (GtkAdjustment *) NULL, (GtkAdjustment *) NULL );
@@ -164,6 +168,7 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
         /* always wrap words */
         gtk_text_set_word_wrap( GTK_TEXT(m_text), TRUE );
 
+#if (GTK_MINOR_VERSION > 2)
         /* put the horizontal scrollbar in the lower left hand corner */
         if (bHasHScrollbar)
         {
@@ -175,11 +180,10 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                        0, 0);
             gtk_widget_show(hscrollbar);
 
-#if (GTK_MINOR_VERSION > 0)
             /* don't wrap lines, otherwise we wouldn't need the scrollbar */
             gtk_text_set_line_wrap( GTK_TEXT(m_text), FALSE );
-#endif
         }
+#endif
 
         /* finally, put the vertical scrollbar in the upper right corner */
         m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
index dcd694df3fd1261b2dc65a40234456485e595fac..529c295cd3165e3d3839c1913abcf4314285febe 100644 (file)
@@ -10,7 +10,6 @@
 #include "wx/gtk/win_gtk.h"
 #include "gtk/gtksignal.h"
 #include "gtk/gtknotebook.h"
-#include "gtk/gtktable.h"
 
 #ifdef __cplusplus
 extern "C" {
@@ -328,9 +327,9 @@ gtk_myfixed_set_size (GtkMyFixed    *myfixed,
 
             if (GTK_WIDGET_VISIBLE (widget) && GTK_WIDGET_VISIBLE (myfixed))
            {
-                if ( ((child->width > 1) && (child->height > 1) && (GTK_WIDGET_REALIZED(widget))) ||
-                    /* I don't know why GtkTable is different */
-                    GTK_IS_TABLE(widget))
+                if ( (child->width > 1) && 
+                    (child->height > 1) && 
+                   !(GTK_WIDGET_REALIZED(widget) && GTK_IS_NOTEBOOK(widget)) )
                {
                     child_allocation.x = child->x;
                     child_allocation.y = child->y;