fixed to correctly use #if wxUSE_SPINCTRL
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@4710 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
|
|
||||||
#ifdef wxUSE_SPINBTN
|
#if wxUSE_SPINCTRL
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
@@ -67,7 +67,7 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
|
|||||||
event.SetPosition( value );
|
event.SetPosition( value );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( event );
|
win->GetEventHandler()->ProcessEvent( event );
|
||||||
|
|
||||||
/* always send a thumbtrack event */
|
/* always send a thumbtrack event */
|
||||||
if (command != wxEVT_SCROLL_THUMBTRACK)
|
if (command != wxEVT_SCROLL_THUMBTRACK)
|
||||||
{
|
{
|
||||||
@@ -205,7 +205,7 @@ void wxSpinCtrl::SetRange(int minVal, int maxVal)
|
|||||||
m_adjust->upper = fmax;
|
m_adjust->upper = fmax;
|
||||||
|
|
||||||
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
|
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
|
||||||
|
|
||||||
// these two calls are required due to some bug in GTK
|
// these two calls are required due to some bug in GTK
|
||||||
Refresh();
|
Refresh();
|
||||||
SetFocus();
|
SetFocus();
|
||||||
@@ -221,7 +221,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
|
|||||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||||
top_frame = top_frame->GetParent();
|
top_frame = top_frame->GetParent();
|
||||||
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
||||||
|
|
||||||
if (window->default_widget)
|
if (window->default_widget)
|
||||||
{
|
{
|
||||||
gtk_widget_activate (window->default_widget);
|
gtk_widget_activate (window->default_widget);
|
||||||
|
@@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
#include "wx/spinctrl.h"
|
#include "wx/spinctrl.h"
|
||||||
|
|
||||||
#ifdef wxUSE_SPINBTN
|
#if wxUSE_SPINCTRL
|
||||||
|
|
||||||
#include "wx/utils.h"
|
#include "wx/utils.h"
|
||||||
#include "wx/spinbutt.h"
|
#include "wx/spinbutt.h"
|
||||||
@@ -67,7 +67,7 @@ static void gtk_spinctrl_callback( GtkWidget *WXUNUSED(widget), wxSpinCtrl *win
|
|||||||
event.SetPosition( value );
|
event.SetPosition( value );
|
||||||
event.SetEventObject( win );
|
event.SetEventObject( win );
|
||||||
win->GetEventHandler()->ProcessEvent( event );
|
win->GetEventHandler()->ProcessEvent( event );
|
||||||
|
|
||||||
/* always send a thumbtrack event */
|
/* always send a thumbtrack event */
|
||||||
if (command != wxEVT_SCROLL_THUMBTRACK)
|
if (command != wxEVT_SCROLL_THUMBTRACK)
|
||||||
{
|
{
|
||||||
@@ -205,7 +205,7 @@ void wxSpinCtrl::SetRange(int minVal, int maxVal)
|
|||||||
m_adjust->upper = fmax;
|
m_adjust->upper = fmax;
|
||||||
|
|
||||||
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
|
gtk_signal_emit_by_name( GTK_OBJECT(m_adjust), "changed" );
|
||||||
|
|
||||||
// these two calls are required due to some bug in GTK
|
// these two calls are required due to some bug in GTK
|
||||||
Refresh();
|
Refresh();
|
||||||
SetFocus();
|
SetFocus();
|
||||||
@@ -221,7 +221,7 @@ void wxSpinCtrl::OnChar( wxKeyEvent &event )
|
|||||||
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
while (top_frame->GetParent() && !(top_frame->GetParent()->m_isFrame))
|
||||||
top_frame = top_frame->GetParent();
|
top_frame = top_frame->GetParent();
|
||||||
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
GtkWindow *window = GTK_WINDOW(top_frame->m_widget);
|
||||||
|
|
||||||
if (window->default_widget)
|
if (window->default_widget)
|
||||||
{
|
{
|
||||||
gtk_widget_activate (window->default_widget);
|
gtk_widget_activate (window->default_widget);
|
||||||
|
Reference in New Issue
Block a user