]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk1/textctrl.cpp
compilation fixes
[wxWidgets.git] / src / gtk1 / textctrl.cpp
index 538735085e25ab60da767c447bb8cf960297bbb3..7c6817aa3ef95ea76b399efa3e18b34d8c2d07c2 100644 (file)
@@ -127,6 +127,8 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
 
         // ... and put into the upper left hand corner of the table
         m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);
 
         // ... and put into the upper left hand corner of the table
         m_widget = gtk_table_new(bHasHScrollbar ? 2 : 1, 2, FALSE);
+        GTK_WIDGET_UNSET_FLAGS( m_widget, GTK_CAN_FOCUS );
+       
         gtk_table_attach( GTK_TABLE(m_widget), m_text, 0, 1, 0, 1,
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
         gtk_table_attach( GTK_TABLE(m_widget), m_text, 0, 1, 0, 1,
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
                       (GtkAttachOptions)(GTK_FILL | GTK_EXPAND | GTK_SHRINK),
@@ -136,6 +138,8 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
         if (bHasHScrollbar)
         {
             GtkWidget *hscrollbar = gtk_hscrollbar_new(GTK_TEXT(m_text)->hadj);
         if (bHasHScrollbar)
         {
             GtkWidget *hscrollbar = gtk_hscrollbar_new(GTK_TEXT(m_text)->hadj);
+            GTK_WIDGET_UNSET_FLAGS( hscrollbar, GTK_CAN_FOCUS );
+           
             gtk_table_attach(GTK_TABLE(m_widget), hscrollbar, 0, 1, 1, 2,
                        (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
                        GTK_FILL,
             gtk_table_attach(GTK_TABLE(m_widget), hscrollbar, 0, 1, 1, 2,
                        (GtkAttachOptions)(GTK_EXPAND | GTK_FILL),
                        GTK_FILL,
@@ -145,6 +149,8 @@ bool wxTextCtrl::Create( wxWindow *parent, wxWindowID id, const wxString &value,
 
         // finally, put the vertical scrollbar in the upper right corner
         m_vScrollbar = gtk_vscrollbar_new( GTK_TEXT(m_text)->vadj );
 
         // 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 );
+       
         gtk_table_attach(GTK_TABLE(m_widget), m_vScrollbar, 1, 2, 0, 1,
                      GTK_FILL,
                      (GtkAttachOptions)(GTK_EXPAND | GTK_FILL | GTK_SHRINK),
         gtk_table_attach(GTK_TABLE(m_widget), m_vScrollbar, 1, 2, 0, 1,
                      GTK_FILL,
                      (GtkAttachOptions)(GTK_EXPAND | GTK_FILL | GTK_SHRINK),
@@ -294,6 +300,7 @@ void wxTextCtrl::WriteText( const wxString &text )
     {
         /* this moves the cursor pos to behind the inserted text */
        gint len = GTK_EDITABLE(m_text)->current_pos;
     {
         /* this moves the cursor pos to behind the inserted text */
        gint len = GTK_EDITABLE(m_text)->current_pos;
+       
         gtk_editable_insert_text( GTK_EDITABLE(m_text), text, text.Length(), &len );
        
        /* bring editable's cursor uptodate. bug in GTK. */
         gtk_editable_insert_text( GTK_EDITABLE(m_text), text, text.Length(), &len );
        
        /* bring editable's cursor uptodate. bug in GTK. */