-
- gtk_signal_connect( GTK_OBJECT(scrolledWindow->vscrollbar), "button_press_event",
- (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(scrolledWindow->hscrollbar), "button_press_event",
- (GtkSignalFunc)gtk_scrollbar_button_press_callback, (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(scrolledWindow->vscrollbar), "button_release_event",
- (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
-
- gtk_signal_connect( GTK_OBJECT(scrolledWindow->hscrollbar), "button_release_event",
- (GtkSignalFunc)gtk_scrollbar_button_release_callback, (gpointer) this );
-
- // these handlers get notified when screen updates are required either when
- // scrolling or when the window size (and therefore scrollbar configuration)
- // has changed
-
- gtk_signal_connect( GTK_OBJECT(m_hAdjust), "value_changed",
- (GtkSignalFunc) gtk_window_hscroll_callback, (gpointer) this );
- gtk_signal_connect( GTK_OBJECT(m_vAdjust), "value_changed",
- (GtkSignalFunc) gtk_window_vscroll_callback, (gpointer) this );
+ g_signal_connect(m_scrollBar[0], "button_press_event",
+ G_CALLBACK(gtk_scrollbar_button_press_event), this);
+ g_signal_connect(m_scrollBar[1], "button_press_event",
+ G_CALLBACK(gtk_scrollbar_button_press_event), this);
+ g_signal_connect(m_scrollBar[0], "button_release_event",
+ G_CALLBACK(gtk_scrollbar_button_release_event), this);
+ g_signal_connect(m_scrollBar[1], "button_release_event",
+ G_CALLBACK(gtk_scrollbar_button_release_event), this);
+ gulong handler_id;
+ handler_id = g_signal_connect(
+ m_scrollBar[0], "event_after", G_CALLBACK(gtk_scrollbar_event_after), this);
+ g_signal_handler_block(m_scrollBar[0], handler_id);
+ handler_id = g_signal_connect(
+ m_scrollBar[1], "event_after", G_CALLBACK(gtk_scrollbar_event_after), this);
+ g_signal_handler_block(m_scrollBar[1], handler_id);
+
+ // these handlers get notified when scrollbar slider moves
+
+ g_signal_connect(m_scrollBar[0], "value_changed",
+ G_CALLBACK(gtk_scrollbar_value_changed), this);
+ g_signal_connect(m_scrollBar[1], "value_changed",
+ G_CALLBACK(gtk_scrollbar_value_changed), this);