]> git.saurik.com Git - wxWidgets.git/commitdiff
Improved wxTextCtrl's wrapping behaviour
authorRobert Roebling <robert@roebling.de>
Sun, 2 May 1999 19:23:38 +0000 (19:23 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 2 May 1999 19:23:38 +0000 (19:23 +0000)
  wxGTK package corrections

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

distrib/gtk/Setup
distrib/gtk/copy_src
src/gtk/textctrl.cpp
src/gtk1/textctrl.cpp

index ff88704977ed18e44d110b0b63788b789441b94f..ed7cf93ccd944d11aa5c06b6b235dc9beec063c1 100644 (file)
@@ -34,9 +34,14 @@ MY_LINKCC=$(CCC)
 #TARGETDIR=$(BINLIBDEST)/site-packages/wxPython
 TARGETDIR=$(BINLIBDEST)/wxPython
 
-
 wxc    wx.cpp helpers.cpp windows.cpp events.cpp misc.cpp gdi.cpp \
        mdi.cpp controls.cpp controls2.cpp windows2.cpp cmndlgs.cpp \
-       frames.cpp stattool.cpp utils.cpp windows3.cpp \
-       -I. $(WX_CONFIG_CFLAGS) -DSWIG_GLOBAL
-       
+       frames.cpp stattool.cpp windows3.cpp image.cpp \
+       utils.cpp \
+       ## comment out the next line to disable wxGLCanvas
+       ##_glcanvas.cpp glcanvas.cpp -DWITH_GLCANVAS -lGL -lGLU \
+       -I. $(WX_CONFIG_CFLAGS) -I/usr/local/lib/glib/include \
+       -DSWIG_GLOBAL -DWXP_WITH_THREAD $(SEPARATE) -Xlinker $(WX_CONFIG_LIBS)
+
+
+
index 5c2b2af7fa15b16d145f32eeaecd7cf186a3ec0f..b03bd0453e75788bddb7a1004caf7354619f632d 100755 (executable)
@@ -282,11 +282,11 @@ cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 cp ./tests/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/tests
 
 mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/demo
-cp ./tests/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/demo
-cp ./tests/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/demo
-cp ./tests/*.pyc ~/wxgtk_dist/wxGTK/utils/wxPython/demo
+cp ./demo/README.txt ~/wxgtk_dist/wxGTK/utils/wxPython/demo
+cp ./demo/*.py ~/wxgtk_dist/wxGTK/utils/wxPython/demo
+cp ./demo/*.pyc ~/wxgtk_dist/wxGTK/utils/wxPython/demo
 mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/demo/bitmaps
-cp ./tests/bitmaps/* ~/wxgtk_dist/wxGTK/utils/wxPython/demo/bitmaps
+cp ./demo/bitmaps/* ~/wxgtk_dist/wxGTK/utils/wxPython/demo/bitmaps
 
 mkdir ~/wxgtk_dist/wxGTK/utils/wxPython/tests/bitmaps
 cp ./tests/bitmaps/* ~/wxgtk_dist/wxGTK/utils/wxPython/tests/bitmaps
index cd52a4dc49fc3a7cbc1e6da5465052423dd8671d..714956eaef2675d124796b3f7a5ea408c6089c3f 100644 (file)
@@ -158,6 +158,9 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                        0, 0);
 
+        /* always wrap words */
+        gtk_text_set_word_wrap( GTK_TEXT(m_text), TRUE );
+       
         /* put the horizontal scrollbar in the lower left hand corner */
         if (bHasHScrollbar)
         {
@@ -169,8 +172,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                        GTK_FILL,
                        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
+        }
+       
         /* finally, put the vertical scrollbar in the upper right corner */
         m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
         GTK_WIDGET_UNSET_FLAGS( m_vScrollbar, GTK_CAN_FOCUS );
index cd52a4dc49fc3a7cbc1e6da5465052423dd8671d..714956eaef2675d124796b3f7a5ea408c6089c3f 100644 (file)
@@ -158,6 +158,9 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                        0, 0);
 
+        /* always wrap words */
+        gtk_text_set_word_wrap( GTK_TEXT(m_text), TRUE );
+       
         /* put the horizontal scrollbar in the lower left hand corner */
         if (bHasHScrollbar)
         {
@@ -169,8 +172,13 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
                        GTK_FILL,
                        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
+        }
+       
         /* finally, put the vertical scrollbar in the upper right corner */
         m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
         GTK_WIDGET_UNSET_FLAGS( m_vScrollbar, GTK_CAN_FOCUS );