Remove obsolete GTK1 compatibility macros. Patch #1413458 - Paul Cornett
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@37275 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
1794103bab
commit
afa7bd1eef
@ -12,7 +12,6 @@
|
||||
#ifndef _WX_GTK_PRIVATE_H_
|
||||
#define _WX_GTK_PRIVATE_H_
|
||||
|
||||
#include <gdk/gdk.h>
|
||||
#include <gtk/gtk.h>
|
||||
|
||||
#include "wx/event.h"
|
||||
@ -40,31 +39,6 @@
|
||||
(GSignalMatchType)(G_SIGNAL_MATCH_FUNC | \
|
||||
G_SIGNAL_MATCH_DATA), 0)
|
||||
|
||||
// child is not a member of GTK_BUTTON() any more in GTK+ 2.0
|
||||
#define BUTTON_CHILD(w) GTK_BIN((w))->child
|
||||
|
||||
// event_window has disappeared from GtkToggleButton in GTK+ 2.0
|
||||
#define TOGGLE_BUTTON_EVENT_WIN(w) GTK_BUTTON((w))->event_window
|
||||
|
||||
// gtk_editable_{copy|cut|paste}_clipboard() had an extra argument under
|
||||
// previous GTK+ versions but no more
|
||||
#if defined(__WXGTK20__) || (GTK_MINOR_VERSION > 0)
|
||||
#define DUMMY_CLIPBOARD_ARG
|
||||
#else
|
||||
#define DUMMY_CLIPBOARD_ARG ,0
|
||||
#endif
|
||||
|
||||
// _GtkEditable is now private
|
||||
#define GET_EDITABLE_POS(w) gtk_editable_get_position(GTK_EDITABLE(w))
|
||||
#define SET_EDITABLE_POS(w, pos) \
|
||||
gtk_editable_set_position(GTK_EDITABLE(w), (pos))
|
||||
|
||||
// this GtkNotebook struct field has been renamed
|
||||
#define NOTEBOOK_PANEL(nb) GTK_NOTEBOOK(nb)->event_window
|
||||
|
||||
#define SCROLLBAR_CBACK_ARG
|
||||
#define GET_SCROLL_TYPE(w) GTK_SCROLL_JUMP
|
||||
|
||||
// translate a GTK+ scroll type to a wxEventType
|
||||
inline wxEventType GtkScrollTypeToWx(guint scrollType)
|
||||
{
|
||||
|
@ -192,7 +192,7 @@ void wxBitmapButton::SetLabel( const wxString &label )
|
||||
|
||||
void wxBitmapButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
{
|
||||
if ( !BUTTON_CHILD(m_widget) )
|
||||
if (!GTK_BIN(m_widget)->child)
|
||||
return;
|
||||
|
||||
wxButton::DoApplyWidgetStyle(style);
|
||||
@ -220,7 +220,7 @@ void wxBitmapButton::OnSetBitmap()
|
||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||
if (the_one.GetMask()) mask = the_one.GetMask()->GetBitmap();
|
||||
|
||||
GtkWidget *child = BUTTON_CHILD(m_widget);
|
||||
GtkWidget *child = GTK_BIN(m_widget)->child;
|
||||
if (child == NULL)
|
||||
{
|
||||
// initial bitmap
|
||||
|
@ -145,8 +145,8 @@ bool wxButton::Create( wxWindow *parent, wxWindowID id, const wxString &label,
|
||||
else
|
||||
#endif
|
||||
{
|
||||
if (GTK_IS_MISC(BUTTON_CHILD(m_widget)))
|
||||
gtk_misc_set_alignment (GTK_MISC (BUTTON_CHILD (m_widget)),
|
||||
if (GTK_IS_MISC(GTK_BIN(m_widget)->child))
|
||||
gtk_misc_set_alignment(GTK_MISC(GTK_BIN(m_widget)->child),
|
||||
x_alignment, y_alignment);
|
||||
}
|
||||
|
||||
@ -255,7 +255,7 @@ bool wxButton::Enable( bool enable )
|
||||
if ( !wxControl::Enable( enable ) )
|
||||
return FALSE;
|
||||
|
||||
gtk_widget_set_sensitive( BUTTON_CHILD(m_widget), enable );
|
||||
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -268,7 +268,7 @@ bool wxButton::IsOwnGtkWindow( GdkWindow *window )
|
||||
void wxButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
{
|
||||
gtk_widget_modify_style(m_widget, style);
|
||||
gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
|
||||
gtk_widget_modify_style(GTK_BIN(m_widget)->child, style);
|
||||
}
|
||||
|
||||
wxSize wxButton::DoGetBestSize() const
|
||||
|
@ -156,7 +156,7 @@ bool wxCheckBox::Create(wxWindow *parent,
|
||||
else
|
||||
{
|
||||
m_widgetCheckbox = gtk_check_button_new_with_label("");
|
||||
m_widgetLabel = BUTTON_CHILD( m_widgetCheckbox );
|
||||
m_widgetLabel = GTK_BIN(m_widgetCheckbox)->child;
|
||||
m_widget = m_widgetCheckbox;
|
||||
}
|
||||
SetLabel( label );
|
||||
@ -236,7 +236,7 @@ void wxCheckBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
|
||||
bool wxCheckBox::IsOwnGtkWindow( GdkWindow *window )
|
||||
{
|
||||
return window == TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
return window == GTK_BUTTON(m_widget)->event_window;
|
||||
}
|
||||
|
||||
void wxCheckBox::OnInternalIdle()
|
||||
@ -244,7 +244,7 @@ void wxCheckBox::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
GdkWindow *event_window = TOGGLE_BUTTON_EVENT_WIN(m_widgetCheckbox);
|
||||
GdkWindow *event_window = GTK_BUTTON(m_widgetCheckbox)->event_window;
|
||||
if ( event_window && cursor.Ok() )
|
||||
{
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
|
@ -334,7 +334,7 @@ int wxChoice::FindString( const wxString &string, bool bCase ) const
|
||||
if (bin->child)
|
||||
label = GTK_LABEL(bin->child);
|
||||
if (!label)
|
||||
label = GTK_LABEL( BUTTON_CHILD(m_widget) );
|
||||
label = GTK_LABEL(GTK_BIN(m_widget)->child);
|
||||
|
||||
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
|
||||
|
||||
@ -373,7 +373,7 @@ void wxChoice::SetString( int n, const wxString& str )
|
||||
if (bin->child)
|
||||
label = GTK_LABEL(bin->child);
|
||||
if (!label)
|
||||
label = GTK_LABEL( BUTTON_CHILD(m_widget) );
|
||||
label = GTK_LABEL(GTK_BIN(m_widget)->child);
|
||||
|
||||
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
|
||||
|
||||
@ -402,7 +402,7 @@ wxString wxChoice::GetString( int n ) const
|
||||
if (bin->child)
|
||||
label = GTK_LABEL(bin->child);
|
||||
if (!label)
|
||||
label = GTK_LABEL( BUTTON_CHILD(m_widget) );
|
||||
label = GTK_LABEL(GTK_BIN(m_widget)->child);
|
||||
|
||||
wxASSERT_MSG( label != NULL , wxT("wxChoice: invalid label") );
|
||||
|
||||
@ -475,7 +475,7 @@ void wxChoice::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
if (bin->child)
|
||||
label = bin->child;
|
||||
if (!label)
|
||||
label = BUTTON_CHILD(m_widget);
|
||||
label = GTK_BIN(m_widget)->child;
|
||||
|
||||
gtk_widget_modify_style( label, style );
|
||||
|
||||
|
@ -691,7 +691,7 @@ void wxComboBox::Copy()
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
|
||||
|
||||
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
|
||||
gtk_editable_copy_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG );
|
||||
gtk_editable_copy_clipboard(GTK_EDITABLE(entry));
|
||||
}
|
||||
|
||||
void wxComboBox::Cut()
|
||||
@ -699,7 +699,7 @@ void wxComboBox::Cut()
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
|
||||
|
||||
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
|
||||
gtk_editable_cut_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG );
|
||||
gtk_editable_cut_clipboard(GTK_EDITABLE(entry));
|
||||
}
|
||||
|
||||
void wxComboBox::Paste()
|
||||
@ -707,7 +707,7 @@ void wxComboBox::Paste()
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid combobox") );
|
||||
|
||||
GtkWidget *entry = GTK_COMBO(m_widget)->entry;
|
||||
gtk_editable_paste_clipboard( GTK_EDITABLE(entry) DUMMY_CLIPBOARD_ARG);
|
||||
gtk_editable_paste_clipboard(GTK_EDITABLE(entry));
|
||||
}
|
||||
|
||||
void wxComboBox::Undo()
|
||||
@ -780,7 +780,7 @@ void wxComboBox::SetInsertionPoint( long pos )
|
||||
|
||||
long wxComboBox::GetInsertionPoint() const
|
||||
{
|
||||
return (long) GET_EDITABLE_POS( GTK_COMBO(m_widget)->entry );
|
||||
return (long) gtk_editable_get_position(GTK_EDITABLE(GTK_COMBO(m_widget)->entry));
|
||||
}
|
||||
|
||||
wxTextPos wxComboBox::GetLastPosition() const
|
||||
|
@ -830,7 +830,7 @@ void wxNotebook::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
bool wxNotebook::IsOwnGtkWindow( GdkWindow *window )
|
||||
{
|
||||
return ((m_widget->window == window) ||
|
||||
(NOTEBOOK_PANEL(m_widget) == window));
|
||||
GTK_NOTEBOOK(m_widget)->event_window == window);
|
||||
}
|
||||
|
||||
// static
|
||||
|
@ -381,7 +381,7 @@ wxString wxRadioBox::GetString( int n ) const
|
||||
|
||||
wxCHECK_MSG( node, wxEmptyString, wxT("radiobox wrong index") );
|
||||
|
||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(node->GetData()) );
|
||||
GtkLabel *label = GTK_LABEL(GTK_BIN(node->GetData())->child);
|
||||
|
||||
wxString str( wxGTK_CONV_BACK( gtk_label_get_text(label) ) );
|
||||
|
||||
@ -403,7 +403,7 @@ void wxRadioBox::SetString( int item, const wxString& label )
|
||||
|
||||
wxCHECK_RET( node, wxT("radiobox wrong index") );
|
||||
|
||||
GtkLabel *g_label = GTK_LABEL( BUTTON_CHILD(node->GetData()) );
|
||||
GtkLabel *g_label = GTK_LABEL(GTK_BIN(node->GetData())->child);
|
||||
|
||||
gtk_label_set( g_label, wxGTK_CONV( label ) );
|
||||
}
|
||||
@ -417,7 +417,7 @@ bool wxRadioBox::Enable( bool enable )
|
||||
while (node)
|
||||
{
|
||||
GtkButton *button = GTK_BUTTON( node->GetData() );
|
||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(button) );
|
||||
GtkLabel *label = GTK_LABEL(GTK_BIN(button)->child);
|
||||
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(label), enable );
|
||||
@ -436,7 +436,7 @@ bool wxRadioBox::Enable( int item, bool enable )
|
||||
wxCHECK_MSG( node, false, wxT("radiobox wrong index") );
|
||||
|
||||
GtkButton *button = GTK_BUTTON( node->GetData() );
|
||||
GtkLabel *label = GTK_LABEL( BUTTON_CHILD(button) );
|
||||
GtkLabel *label = GTK_LABEL(GTK_BIN(button)->child);
|
||||
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(button), enable );
|
||||
gtk_widget_set_sensitive( GTK_WIDGET(label), enable );
|
||||
@ -531,7 +531,7 @@ void wxRadioBox::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
GtkWidget *widget = GTK_WIDGET( node->GetData() );
|
||||
|
||||
gtk_widget_modify_style( widget, style );
|
||||
gtk_widget_modify_style( BUTTON_CHILD(node->GetData()), style );
|
||||
gtk_widget_modify_style(GTK_BIN(widget)->child, style);
|
||||
|
||||
node = node->GetNext();
|
||||
}
|
||||
|
@ -125,7 +125,7 @@ void wxRadioButton::SetLabel( const wxString& label )
|
||||
{
|
||||
wxCHECK_RET( m_widget != NULL, wxT("invalid radiobutton") );
|
||||
|
||||
GTKSetLabelForLabel(GTK_LABEL(BUTTON_CHILD(m_widget)), label);
|
||||
GTKSetLabelForLabel(GTK_LABEL(GTK_BIN(m_widget)->child), label);
|
||||
}
|
||||
|
||||
void wxRadioButton::SetValue( bool val )
|
||||
@ -163,7 +163,7 @@ bool wxRadioButton::Enable( bool enable )
|
||||
if ( !wxControl::Enable( enable ) )
|
||||
return FALSE;
|
||||
|
||||
gtk_widget_set_sensitive( BUTTON_CHILD(m_widget), enable );
|
||||
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
@ -171,12 +171,12 @@ bool wxRadioButton::Enable( bool enable )
|
||||
void wxRadioButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
{
|
||||
gtk_widget_modify_style(m_widget, style);
|
||||
gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
|
||||
gtk_widget_modify_style(GTK_BIN(m_widget)->child, style);
|
||||
}
|
||||
|
||||
bool wxRadioButton::IsOwnGtkWindow( GdkWindow *window )
|
||||
{
|
||||
return window == TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
return window == GTK_BUTTON(m_widget)->event_window;
|
||||
}
|
||||
|
||||
void wxRadioButton::OnInternalIdle()
|
||||
@ -184,7 +184,7 @@ void wxRadioButton::OnInternalIdle()
|
||||
wxCursor cursor = m_cursor;
|
||||
if (g_globalCursor.Ok()) cursor = g_globalCursor;
|
||||
|
||||
GdkWindow *win = TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
GdkWindow *win = GTK_BUTTON(m_widget)->event_window;
|
||||
if ( win && cursor.Ok())
|
||||
{
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
|
@ -42,7 +42,6 @@ static const float sensitivity = 0.02;
|
||||
|
||||
extern "C" {
|
||||
static void gtk_scrollbar_callback( GtkAdjustment *adjust,
|
||||
SCROLLBAR_CBACK_ARG
|
||||
wxScrollBar *win )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
@ -55,7 +54,7 @@ static void gtk_scrollbar_callback( GtkAdjustment *adjust,
|
||||
|
||||
win->m_oldPos = adjust->value;
|
||||
|
||||
wxEventType command = GtkScrollTypeToWx(GET_SCROLL_TYPE(win->m_widget));
|
||||
wxEventType command = GtkScrollTypeToWx(GTK_SCROLL_JUMP);
|
||||
|
||||
double dvalue = adjust->value;
|
||||
int value = (int)(dvalue < 0 ? dvalue - 0.5 : dvalue + 0.5);
|
||||
|
@ -79,7 +79,6 @@ ProcessScrollEvent(wxSlider *win, wxEventType evtType, double dvalue)
|
||||
|
||||
extern "C" {
|
||||
static void gtk_slider_callback( GtkAdjustment *adjust,
|
||||
SCROLLBAR_CBACK_ARG
|
||||
wxSlider *win )
|
||||
{
|
||||
if (g_isIdle) wxapp_install_idle_handler();
|
||||
|
@ -830,7 +830,7 @@ void wxTextCtrl::WriteText( const wxString &text )
|
||||
gtk_editable_delete_selection( GTK_EDITABLE(m_text) );
|
||||
|
||||
// This moves the cursor pos to behind the inserted text.
|
||||
gint len = GET_EDITABLE_POS(m_text);
|
||||
gint len = gtk_editable_get_position(GTK_EDITABLE(m_text));
|
||||
|
||||
#if wxUSE_UNICODE
|
||||
wxCharBuffer buffer( wxConvUTF8.cWX2MB( text ) );
|
||||
@ -977,7 +977,7 @@ void wxTextCtrl::SetInsertionPoint( long pos )
|
||||
gtk_entry_set_position( GTK_ENTRY(m_text), (int)pos );
|
||||
|
||||
// Bring editable's cursor uptodate. Bug in GTK.
|
||||
SET_EDITABLE_POS(m_text, (guint32)pos);
|
||||
gtk_editable_set_position(GTK_EDITABLE(m_text), int(pos));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1191,7 +1191,7 @@ long wxTextCtrl::GetInsertionPoint() const
|
||||
}
|
||||
else
|
||||
{
|
||||
return (long) GET_EDITABLE_POS(m_text);
|
||||
return (long) gtk_editable_get_position(GTK_EDITABLE(m_text));
|
||||
}
|
||||
}
|
||||
|
||||
@ -1252,7 +1252,7 @@ void wxTextCtrl::Cut()
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
g_signal_emit_by_name (m_text, "cut-clipboard");
|
||||
else
|
||||
gtk_editable_cut_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
|
||||
gtk_editable_cut_clipboard(GTK_EDITABLE(m_text));
|
||||
}
|
||||
|
||||
void wxTextCtrl::Copy()
|
||||
@ -1262,7 +1262,7 @@ void wxTextCtrl::Copy()
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
g_signal_emit_by_name (m_text, "copy-clipboard");
|
||||
else
|
||||
gtk_editable_copy_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
|
||||
gtk_editable_copy_clipboard(GTK_EDITABLE(m_text));
|
||||
}
|
||||
|
||||
void wxTextCtrl::Paste()
|
||||
@ -1272,7 +1272,7 @@ void wxTextCtrl::Paste()
|
||||
if (m_windowStyle & wxTE_MULTILINE)
|
||||
g_signal_emit_by_name (m_text, "paste-clipboard");
|
||||
else
|
||||
gtk_editable_paste_clipboard(GTK_EDITABLE(m_text) DUMMY_CLIPBOARD_ARG);
|
||||
gtk_editable_paste_clipboard(GTK_EDITABLE(m_text));
|
||||
}
|
||||
|
||||
// Undo/redo
|
||||
|
@ -136,7 +136,7 @@ void wxToggleBitmapButton::OnSetBitmap()
|
||||
GdkBitmap *mask = (GdkBitmap *) NULL;
|
||||
if (m_bitmap.GetMask()) mask = m_bitmap.GetMask()->GetBitmap();
|
||||
|
||||
GtkWidget *child = BUTTON_CHILD(m_widget);
|
||||
GtkWidget *child = GTK_BIN(m_widget)->child;
|
||||
if (child == NULL)
|
||||
{
|
||||
// initial bitmap
|
||||
@ -156,7 +156,7 @@ bool wxToggleBitmapButton::Enable(bool enable /*=true*/)
|
||||
if (!wxControl::Enable(enable))
|
||||
return false;
|
||||
|
||||
gtk_widget_set_sensitive(BUTTON_CHILD(m_widget), enable);
|
||||
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -164,12 +164,12 @@ bool wxToggleBitmapButton::Enable(bool enable /*=true*/)
|
||||
void wxToggleBitmapButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
{
|
||||
gtk_widget_modify_style(m_widget, style);
|
||||
gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
|
||||
gtk_widget_modify_style(GTK_BIN(m_widget)->child, style);
|
||||
}
|
||||
|
||||
bool wxToggleBitmapButton::IsOwnGtkWindow(GdkWindow *window)
|
||||
{
|
||||
return window == TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
return window == GTK_BUTTON(m_widget)->event_window;
|
||||
}
|
||||
|
||||
void wxToggleBitmapButton::OnInternalIdle()
|
||||
@ -179,7 +179,7 @@ void wxToggleBitmapButton::OnInternalIdle()
|
||||
if (g_globalCursor.Ok())
|
||||
cursor = g_globalCursor;
|
||||
|
||||
GdkWindow *win = TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
GdkWindow *win = GTK_BUTTON(m_widget)->event_window;
|
||||
if ( win && cursor.Ok() )
|
||||
{
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
@ -289,7 +289,7 @@ void wxToggleButton::SetLabel(const wxString& label)
|
||||
|
||||
wxControl::SetLabel(label);
|
||||
|
||||
gtk_label_set(GTK_LABEL(BUTTON_CHILD(m_widget)), wxGTK_CONV( GetLabel() ) );
|
||||
gtk_label_set(GTK_LABEL(GTK_BIN(m_widget)->child), wxGTK_CONV(GetLabel()));
|
||||
}
|
||||
|
||||
bool wxToggleButton::Enable(bool enable /*=true*/)
|
||||
@ -297,7 +297,7 @@ bool wxToggleButton::Enable(bool enable /*=true*/)
|
||||
if (!wxControl::Enable(enable))
|
||||
return false;
|
||||
|
||||
gtk_widget_set_sensitive(BUTTON_CHILD(m_widget), enable);
|
||||
gtk_widget_set_sensitive(GTK_BIN(m_widget)->child, enable);
|
||||
|
||||
return true;
|
||||
}
|
||||
@ -305,12 +305,12 @@ bool wxToggleButton::Enable(bool enable /*=true*/)
|
||||
void wxToggleButton::DoApplyWidgetStyle(GtkRcStyle *style)
|
||||
{
|
||||
gtk_widget_modify_style(m_widget, style);
|
||||
gtk_widget_modify_style(BUTTON_CHILD(m_widget), style);
|
||||
gtk_widget_modify_style(GTK_BIN(m_widget)->child, style);
|
||||
}
|
||||
|
||||
bool wxToggleButton::IsOwnGtkWindow(GdkWindow *window)
|
||||
{
|
||||
return window == TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
return window == GTK_BUTTON(m_widget)->event_window;
|
||||
}
|
||||
|
||||
void wxToggleButton::OnInternalIdle()
|
||||
@ -320,7 +320,7 @@ void wxToggleButton::OnInternalIdle()
|
||||
if (g_globalCursor.Ok())
|
||||
cursor = g_globalCursor;
|
||||
|
||||
GdkWindow *win = TOGGLE_BUTTON_EVENT_WIN(m_widget);
|
||||
GdkWindow *win = GTK_BUTTON(m_widget)->event_window;
|
||||
if ( win && cursor.Ok() )
|
||||
{
|
||||
/* I now set the cursor the anew in every OnInternalIdle call
|
||||
|
@ -2018,7 +2018,6 @@ static gint gtk_window_leave_callback( GtkWidget *widget, GdkEventCrossing *gdk_
|
||||
|
||||
extern "C" {
|
||||
static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
|
||||
SCROLLBAR_CBACK_ARG
|
||||
wxWindowGTK *win )
|
||||
{
|
||||
DEBUG_MAIN_THREAD
|
||||
@ -2035,7 +2034,7 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
|
||||
|
||||
win->m_oldVerticalPos = adjust->value;
|
||||
|
||||
wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->vscrollbar));
|
||||
wxEventType command = GtkScrollWinTypeToWx(GTK_SCROLL_JUMP);
|
||||
|
||||
int value = (int)(adjust->value+0.5);
|
||||
|
||||
@ -2051,7 +2050,6 @@ static void gtk_window_vscroll_callback( GtkAdjustment *adjust,
|
||||
|
||||
extern "C" {
|
||||
static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
|
||||
SCROLLBAR_CBACK_ARG
|
||||
wxWindowGTK *win )
|
||||
{
|
||||
DEBUG_MAIN_THREAD
|
||||
@ -2065,7 +2063,7 @@ static void gtk_window_hscroll_callback( GtkAdjustment *adjust,
|
||||
float diff = adjust->value - win->m_oldHorizontalPos;
|
||||
if (fabs(diff) < 0.2) return;
|
||||
|
||||
wxEventType command = GtkScrollWinTypeToWx(GET_SCROLL_TYPE(sw->hscrollbar));
|
||||
wxEventType command = GtkScrollWinTypeToWx(GTK_SCROLL_JUMP);
|
||||
|
||||
win->m_oldHorizontalPos = adjust->value;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user