]> git.saurik.com Git - wxWidgets.git/blobdiff - src/gtk/textctrl.cpp
using new method for implementing Maximize
[wxWidgets.git] / src / gtk / textctrl.cpp
index 40329ca9fa743641503650b2e40df6a92bb2d3fd..4417e2c99c84b3fbe66b941ea9a8d5414e3c6214 100644 (file)
     #include "wx/log.h"
     #include "wx/utils.h"
     #include "wx/panel.h"
+    #include "wx/settings.h"
 #endif
 
 #include "wx/math.h"
-#include "wx/settings.h"
 #include "wx/strconv.h"
 #include "wx/fontutil.h"        // for wxNativeFontInfo (GetNativeFontInfo())
 
@@ -470,7 +470,7 @@ gtk_text_changed_callback( GtkWidget *widget, wxTextCtrl *win )
 // common part of the event handlers below
 static void
 handle_text_clipboard_callback( GtkWidget *widget, wxTextCtrl *win,
-                                                               wxEventType eventType, const gchar * signal_name)
+                                wxEventType eventType, const gchar * signal_name)
 {
     wxClipboardTextEvent event( eventType, win->GetId() );
     event.SetEventObject( win );
@@ -478,7 +478,7 @@ handle_text_clipboard_callback( GtkWidget *widget, wxTextCtrl *win,
     {
         // don't let the default processing to take place if we did something
         // ourselves in the event handler
-       g_signal_stop_emission_by_name (widget, signal_name);
+        g_signal_stop_emission_by_name (widget, signal_name);
     }
 }
 
@@ -486,22 +486,22 @@ extern "C" {
 static void
 gtk_copy_clipboard_callback( GtkWidget *widget, wxTextCtrl *win )
 {
-       handle_text_clipboard_callback(
-               widget, win, wxEVT_COMMAND_TEXT_COPY, "copy-clipboard" );
+    handle_text_clipboard_callback(
+        widget, win, wxEVT_COMMAND_TEXT_COPY, "copy-clipboard" );
 }
 
 static void
 gtk_cut_clipboard_callback( GtkWidget *widget, wxTextCtrl *win )
 {
-       handle_text_clipboard_callback(
-               widget, win, wxEVT_COMMAND_TEXT_CUT, "cut-clipboard" );
+    handle_text_clipboard_callback(
+        widget, win, wxEVT_COMMAND_TEXT_CUT, "cut-clipboard" );
 }
 
 static void
 gtk_paste_clipboard_callback( GtkWidget *widget, wxTextCtrl *win )
 {
-       handle_text_clipboard_callback(
-               widget, win, wxEVT_COMMAND_TEXT_PASTE, "paste-clipboard" );
+    handle_text_clipboard_callback(
+        widget, win, wxEVT_COMMAND_TEXT_PASTE, "paste-clipboard" );
 }
 }
 
@@ -618,6 +618,8 @@ bool wxTextCtrl::Create( wxWindow *parent,
         m_widget = gtk_scrolled_window_new( NULL, NULL );
         gtk_scrolled_window_set_policy( GTK_SCROLLED_WINDOW( m_widget ),
                                         GTK_POLICY_AUTOMATIC, GTK_POLICY_AUTOMATIC );
+        // for ScrollLines/Pages
+        m_scrollBar[1] = (GtkRange*)((GtkScrolledWindow*)m_widget)->vscrollbar;
 
         // Insert view into scrolled window
         gtk_container_add( GTK_CONTAINER(m_widget), m_text );
@@ -670,7 +672,6 @@ bool wxTextCtrl::Create( wxWindow *parent,
     if (multi_line)
     {
         gtk_widget_show(m_text);
-        SetVScrollAdjustment(gtk_scrolled_window_get_vadjustment((GtkScrolledWindow*)m_widget));
     }
 
     if (!value.empty())