[1231183] 'cleanup: mismatched indentation' and other cleanings.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34917 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Włodzimierz Skiba
2005-07-22 18:01:46 +00:00
parent bfd84575a2
commit 0a164d4c4e
18 changed files with 456 additions and 468 deletions

View File

@@ -229,7 +229,7 @@ static GdkGC *g_eraseGC = NULL;
// mouse capture state: the window which has it and if the mouse is currently
// inside it
static wxWindowGTK *g_captureWindow = (wxWindowGTK*) NULL;
static bool g_captureWindowHasMouse = FALSE;
static bool g_captureWindowHasMouse = false;
wxWindowGTK *g_focusWindow = (wxWindowGTK*) NULL;
@@ -244,7 +244,7 @@ wxWindowGTK *g_delayedFocus = (wxWindowGTK*) NULL;
// hack: we need something to pass to gtk_menu_popup, so we store the time of
// the last click here
static guint32 gs_timeLastClick = 0;
static guint32 gs_timeLastClick = 0;
extern bool g_mainThreadLocked;
@@ -490,7 +490,7 @@ void wxgtk_combo_size_request_callback(GtkWidget *widget,
{
// This callback is actually hooked into the text entry
// of the combo box, not the GtkHBox.
int w, h;
win->GetSize( &w, &h );
if (w < 2)
@@ -499,13 +499,13 @@ void wxgtk_combo_size_request_callback(GtkWidget *widget,
h = 2;
GtkCombo *gcombo = GTK_COMBO(win->m_widget);
GtkRequisition entry_req;
entry_req.width = 2;
entry_req.height = 2;
(* GTK_WIDGET_CLASS( GTK_OBJECT_GET_CLASS(gcombo->button) )->size_request )
(gcombo->button, &entry_req );
requisition->width = w - entry_req.width;
requisition->height = entry_req.height;
}
@@ -544,7 +544,7 @@ static int gtk_window_expose_callback( GtkWidget *widget,
(int)gdk_event->area.width,
(int)gdk_event->area.height );
}
gtk_paint_box
(
win->m_wxwindow->style,
@@ -1048,7 +1048,7 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
: _T("press"),
keysym);
long key_code = wxTranslateKeySymToWXKey(keysym, FALSE /* !isChar */);
long key_code = wxTranslateKeySymToWXKey(keysym, false /* !isChar */);
if ( !key_code )
{
@@ -1117,14 +1117,14 @@ wxTranslateGTKKeyEventToWx(wxKeyEvent& event,
// sending unknown key events doesn't really make sense
if ( !key_code )
return FALSE;
return false;
// now fill all the other fields
wxFillOtherKeyEventFields(event, win, gdk_event);
event.m_keyCode = key_code;
return TRUE;
return true;
}
@@ -1171,7 +1171,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
// Emit KEY_DOWN event
ret = win->GetEventHandler()->ProcessEvent( event );
}
else
else
{
// Return after IM processing as we cannot do
// anything with it anyhow.
@@ -1182,19 +1182,19 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
// 2005.01.26 modified by Hong Jen Yee (hzysoft@sina.com.tw):
// When we get a key_press event here, it could be originate
// from the current widget or its child widgets. However, only the widget
// with the INPUT FOCUS can generate the INITIAL key_press event. That is,
// with the INPUT FOCUS can generate the INITIAL key_press event. That is,
// if the CURRENT widget doesn't have the FOCUS at all, this event definitely
// originated from its child widgets and shouldn't be passed to IM context.
// In fact, what a GTK+ IM should do is filtering keyEvents and convert them
// into text input ONLY WHEN THE WIDGET HAS INPUT FOCUS. Besides, when current
// widgets has both IM context and input focus, the event should be filtered
// widgets has both IM context and input focus, the event should be filtered
// by gtk_im_context_filter_keypress().
// Then, we should, according to GTK+ 2.0 API doc, return whatever it returns.
if ((!ret) && (win->m_imData != NULL) && ( wxWindow::FindFocus() == win ))
{
// We should let GTK+ IM filter key event first. According to GTK+ 2.0 API
// docs, if IM filter returns true, no further processing should be done.
// we should send the key_down event anyway.
// we should send the key_down event anyway.
bool intercepted_by_IM = gtk_im_context_filter_keypress(win->m_imData->context, gdk_event);
win->m_imData->lastKeyEvent = NULL;
if (intercepted_by_IM)
@@ -1207,16 +1207,16 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
if (return_after_IM)
return false;
#ifndef __WXGTK20__
#ifndef __WXGTK20__
// This is for GTK+ 1.2 only. The char event generatation for GTK+ 2.0 is done
// in the "commit" handler.
// 2005.02.02 modified by Hong Jen Yee (hzysoft@sina.com.tw).
// In GTK+ 1.2, strings sent by IMs are also regarded as key_press events whose
// keyCodes cannot be recognized by wxWidgets. These MBCS strings, however, are
// composed of more than one character, which means gdk_event->length will always
// In GTK+ 1.2, strings sent by IMs are also regarded as key_press events whose
// keyCodes cannot be recognized by wxWidgets. These MBCS strings, however, are
// composed of more than one character, which means gdk_event->length will always
// greater than one. When gtk_event->length == 1, this may be an ASCII character
// and can be translated by wx. However, when MBCS characters are sent by IM,
// and can be translated by wx. However, when MBCS characters are sent by IM,
// gdk_event->length will >= 2. So neither should we pass it to accelerator table,
// nor should we pass it to controls. The following explanation was excerpted
// from GDK documentation.
@@ -1265,7 +1265,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
}
return true;
}
#endif // #ifndef __WXGTK20__
#if wxUSE_ACCEL
@@ -1295,7 +1295,7 @@ static gint gtk_window_key_press_callback( GtkWidget *widget,
long key_code;
KeySym keysym = gdk_event->keyval;
// Find key code for EVT_CHAR and EVT_CHAR_HOOK events
key_code = wxTranslateKeySymToWXKey(keysym, TRUE /* isChar */);
key_code = wxTranslateKeySymToWXKey(keysym, true /* isChar */);
if ( !key_code )
{
if ( wxIsAsciiKeysym(keysym) )
@@ -2007,7 +2007,7 @@ static gint gtk_window_wheel_callback (GtkWidget * widget,
event_type = wxEVT_MOUSEWHEEL;
else
return FALSE;
wxMouseEvent event( event_type );
// Can't use InitMouse macro because scroll events don't have button
event.SetTimestamp( gdk_event->time );
@@ -2032,7 +2032,7 @@ static gint gtk_window_wheel_callback (GtkWidget * widget,
event.SetEventObject( win );
event.SetId( win->GetId() );
event.SetTimestamp( gdk_event->time );
if (win->GetEventHandler()->ProcessEvent( event ))
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "scroll_event" );
@@ -2084,7 +2084,7 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
wxWindow *win )
{
DEBUG_MAIN_THREAD
if (g_isIdle)
wxapp_install_idle_handler();
@@ -2117,8 +2117,8 @@ static gint gtk_window_focus_in_callback( GtkWidget *widget,
if ( !win->m_hasFocus )
{
// not yet, notify it
win->m_hasFocus = TRUE;
win->m_hasFocus = true;
if ( DoSendFocusEvents(win) )
{
gtk_signal_emit_stop_by_name( GTK_OBJECT(widget), "focus_in_event" );
@@ -2175,7 +2175,7 @@ static gint gtk_window_focus_out_callback( GtkWidget *widget, GdkEventFocus *gdk
// have focus already
if ( win->m_hasFocus )
{
win->m_hasFocus = FALSE;
win->m_hasFocus = false;
wxFocusEvent event( wxEVT_KILL_FOCUS, win->GetId() );
event.SetEventObject( win );
@@ -2374,7 +2374,7 @@ static gint gtk_scrollbar_button_press_callback( GtkRange *widget,
wxapp_install_idle_handler();
g_blockEventsOnScroll = TRUE;
g_blockEventsOnScroll = true;
// FIXME: there is no 'slider' field in GTK+ 2.0 any more
#ifndef __WXGTK20__
@@ -2401,7 +2401,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
//
// if (gdk_event->window != widget->slider) return FALSE;
g_blockEventsOnScroll = FALSE;
g_blockEventsOnScroll = false;
if (win->m_isScrolling)
{
@@ -2426,7 +2426,7 @@ static gint gtk_scrollbar_button_release_callback( GtkRange *widget,
win->GetEventHandler()->ProcessEvent( event );
}
win->m_isScrolling = FALSE;
win->m_isScrolling = false;
return FALSE;
}
@@ -2458,7 +2458,7 @@ gtk_window_realized_callback( GtkWidget *m_widget, wxWindow *win )
if (g_isIdle)
wxapp_install_idle_handler();
#ifdef __WXGTK20__
if (win->m_imData)
{
@@ -2700,16 +2700,16 @@ void wxWindowGTK::Init()
m_width = 0;
m_height = 0;
m_sizeSet = FALSE;
m_hasVMT = FALSE;
m_needParent = TRUE;
m_isBeingDeleted = FALSE;
m_sizeSet = false;
m_hasVMT = false;
m_needParent = true;
m_isBeingDeleted = false;
m_noExpose = FALSE;
m_nativeSizeEvent = FALSE;
m_noExpose = false;
m_nativeSizeEvent = false;
m_hasScrolling = FALSE;
m_isScrolling = FALSE;
m_hasScrolling = false;
m_isScrolling = false;
m_hAdjust = (GtkAdjustment*) NULL;
m_vAdjust = (GtkAdjustment*) NULL;
@@ -2718,14 +2718,14 @@ void wxWindowGTK::Init()
m_oldClientWidth =
m_oldClientHeight = 0;
m_resizing = FALSE;
m_resizing = false;
m_insertCallback = (wxInsertChildFunction) NULL;
m_acceptsFocus = FALSE;
m_hasFocus = FALSE;
m_acceptsFocus = false;
m_hasFocus = false;
m_clipPaintRegion = FALSE;
m_clipPaintRegion = false;
m_needsStyleChange = false;
@@ -2771,7 +2771,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
!CreateBase( parent, id, pos, size, style, wxDefaultValidator, name ))
{
wxFAIL_MSG( wxT("wxWindowGTK creation failed") );
return FALSE;
return false;
}
m_insertCallback = wxInsertChildInWindow;
@@ -2815,7 +2815,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
gtk_container_add( GTK_CONTAINER(m_widget), m_wxwindow );
GTK_WIDGET_SET_FLAGS( m_wxwindow, GTK_CAN_FOCUS );
m_acceptsFocus = TRUE;
m_acceptsFocus = true;
// I _really_ don't want scrollbars in the beginning
m_vAdjust->lower = 0.0;
@@ -2867,7 +2867,7 @@ bool wxWindowGTK::Create( wxWindow *parent,
PostCreation();
return TRUE;
return true;
}
wxWindowGTK::~wxWindowGTK()
@@ -2880,11 +2880,11 @@ wxWindowGTK::~wxWindowGTK()
if ( g_delayedFocus == this )
g_delayedFocus = NULL;
m_isBeingDeleted = TRUE;
m_hasVMT = FALSE;
m_isBeingDeleted = true;
m_hasVMT = false;
if (m_widget)
Show( FALSE );
Show( false );
DestroyChildren();
@@ -2914,7 +2914,7 @@ wxWindowGTK::~wxWindowGTK()
bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const wxSize &size )
{
wxCHECK_MSG( !m_needParent || parent, FALSE, wxT("Need complete parent.") );
wxCHECK_MSG( !m_needParent || parent, false, wxT("Need complete parent.") );
// Use either the given size, or the default if -1 is given.
// See wxWindowBase for these functions.
@@ -2924,7 +2924,7 @@ bool wxWindowGTK::PreCreation( wxWindowGTK *parent, const wxPoint &pos, const w
m_x = (int)pos.x;
m_y = (int)pos.y;
return TRUE;
return true;
}
void wxWindowGTK::PostCreation()
@@ -2983,7 +2983,7 @@ void wxWindowGTK::PostCreation()
{
if (m_focusWidget == NULL)
m_focusWidget = m_widget;
gtk_signal_connect( GTK_OBJECT(m_focusWidget), "focus_in_event",
GTK_SIGNAL_FUNC(gtk_window_focus_in_callback), (gpointer)this );
@@ -3020,7 +3020,7 @@ void wxWindowGTK::PostCreation()
if (GTK_IS_COMBO(m_widget))
{
GtkCombo *gcombo = GTK_COMBO(m_widget);
gtk_signal_connect( GTK_OBJECT(gcombo->entry), "size_request",
GTK_SIGNAL_FUNC(wxgtk_combo_size_request_callback),
(gpointer) this );
@@ -3038,7 +3038,7 @@ void wxWindowGTK::PostCreation()
InheritAttributes();
m_hasVMT = TRUE;
m_hasVMT = true;
// unless the window was created initially hidden (i.e. Hide() had been
// called before Create()), we should show it at GTK+ level as well
@@ -3081,7 +3081,7 @@ bool wxWindowGTK::Destroy()
{
wxASSERT_MSG( (m_widget != NULL), wxT("invalid window") );
m_hasVMT = FALSE;
m_hasVMT = false;
return wxWindowBase::Destroy();
}
@@ -3101,7 +3101,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
*/
if (m_resizing) return; /* I don't like recursions */
m_resizing = TRUE;
m_resizing = true;
int currentX, currentY;
GetPosition(&currentX, &currentY);
@@ -3217,7 +3217,7 @@ void wxWindowGTK::DoSetSize( int x, int y, int width, int height, int sizeFlags
GetEventHandler()->ProcessEvent( event );
}
m_resizing = FALSE;
m_resizing = false;
}
void wxWindowGTK::OnInternalIdle()
@@ -3495,12 +3495,12 @@ void wxWindowGTK::DoScreenToClient( int *x, int *y ) const
bool wxWindowGTK::Show( bool show )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
if (!wxWindowBase::Show(show))
{
// nothing to do
return FALSE;
return false;
}
if (show)
@@ -3513,7 +3513,7 @@ bool wxWindowGTK::Show( bool show )
GetEventHandler()->ProcessEvent(eventShow);
return TRUE;
return true;
}
static void wxWindowNotifyEnable(wxWindowGTK* win, bool enable)
@@ -3535,12 +3535,12 @@ static void wxWindowNotifyEnable(wxWindowGTK* win, bool enable)
bool wxWindowGTK::Enable( bool enable )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
if (!wxWindowBase::Enable(enable))
{
// nothing to do
return FALSE;
return false;
}
gtk_widget_set_sensitive( m_widget, enable );
@@ -3549,7 +3549,7 @@ bool wxWindowGTK::Enable( bool enable )
wxWindowNotifyEnable(this, enable);
return TRUE;
return true;
}
int wxWindowGTK::GetCharHeight() const
@@ -3621,17 +3621,17 @@ int wxWindowGTK::GetCharWidth() const
}
void wxWindowGTK::GetTextExtent( const wxString& string,
int *x,
int *y,
int *descent,
int *externalLeading,
const wxFont *theFont ) const
int *x,
int *y,
int *descent,
int *externalLeading,
const wxFont *theFont ) const
{
wxFont fontToUse = theFont ? *theFont : GetFont();
wxCHECK_RET( fontToUse.Ok(), wxT("invalid font") );
if (string.IsEmpty())
if (string.empty())
{
if (x) (*x) = 0;
if (y) (*y) = 0;
@@ -3715,7 +3715,7 @@ void wxWindowGTK::SetFocus()
#endif
if (GTK_WIDGET_CAN_FOCUS(m_widget) && !GTK_WIDGET_HAS_FOCUS (m_widget) )
{
if (!GTK_WIDGET_REALIZED(m_widget))
{
// we can't set the focus to the widget now so we remember that
@@ -3736,7 +3736,7 @@ void wxWindowGTK::SetFocus()
gtk_widget_grab_focus (m_widget);
}
}
else
else
#ifndef __WXGTK20__
if (GTK_IS_CONTAINER(m_widget))
{
@@ -3759,7 +3759,7 @@ bool wxWindowGTK::AcceptsFocus() const
bool wxWindowGTK::Reparent( wxWindowBase *newParentBase )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
wxWindowGTK *oldParent = m_parent,
*newParent = (wxWindowGTK *)newParentBase;
@@ -3767,7 +3767,7 @@ bool wxWindowGTK::Reparent( wxWindowBase *newParentBase )
wxASSERT( GTK_IS_WIDGET(m_widget) );
if ( !wxWindowBase::Reparent(newParent) )
return FALSE;
return false;
wxASSERT( GTK_IS_WIDGET(m_widget) );
@@ -3790,7 +3790,7 @@ bool wxWindowGTK::Reparent( wxWindowBase *newParentBase )
/* reverse: prevent GTK from deleting the widget arbitrarily */
gtk_widget_unref( m_widget );
return TRUE;
return true;
}
void wxWindowGTK::DoAddChild(wxWindowGTK *child)
@@ -3825,7 +3825,7 @@ void wxWindowGTK::RemoveChild(wxWindowBase *child)
if (g_isIdle)
wxapp_install_idle_handler();
}
void wxWindowGTK::DoMoveInTabOrder(wxWindow *win, MoveKind move)
{
wxWindowBase::DoMoveInTabOrder(win, move);
@@ -3841,15 +3841,15 @@ void wxWindowGTK::RealizeTabOrder()
if (m_children.size() > 0)
{
GList *chain = NULL;
for (wxWindowList::const_iterator i = m_children.begin();
i != m_children.end(); ++i)
{
chain = g_list_prepend(chain, (*i)->m_widget);
}
chain = g_list_reverse(chain);
gtk_container_set_focus_chain(GTK_CONTAINER(m_wxwindow), chain);
g_list_free(chain);
}
@@ -3858,7 +3858,7 @@ void wxWindowGTK::RealizeTabOrder()
gtk_container_unset_focus_chain(GTK_CONTAINER(m_wxwindow));
}
}
m_dirtyTabOrder = false;
}
@@ -3872,7 +3872,7 @@ void wxWindowGTK::Raise()
{
gdk_window_raise( m_wxwindow->window );
}
else if (m_widget->window)
else if (m_widget->window)
{
gdk_window_raise( m_widget->window );
}
@@ -3886,7 +3886,7 @@ void wxWindowGTK::Lower()
{
gdk_window_lower( m_wxwindow->window );
}
else if (m_widget->window)
else if (m_widget->window)
{
gdk_window_lower( m_widget->window );
}
@@ -3894,10 +3894,10 @@ void wxWindowGTK::Lower()
bool wxWindowGTK::SetCursor( const wxCursor &cursor )
{
wxCHECK_MSG( (m_widget != NULL), FALSE, wxT("invalid window") );
wxCHECK_MSG( (m_widget != NULL), false, wxT("invalid window") );
if (cursor == m_cursor)
return FALSE;
return false;
if (g_isIdle)
wxapp_install_idle_handler();
@@ -4060,7 +4060,7 @@ void wxWindowGTK::GtkSendPaintEvents()
}
// Clip to paint region in wxClientDC
m_clipPaintRegion = TRUE;
m_clipPaintRegion = true;
// widget to draw on
GtkPizza *pizza = GTK_PIZZA (m_wxwindow);
@@ -4149,7 +4149,7 @@ void wxWindowGTK::GtkSendPaintEvents()
paint_event.SetEventObject( this );
GetEventHandler()->ProcessEvent( paint_event );
m_clipPaintRegion = FALSE;
m_clipPaintRegion = false;
#ifndef __WXUNIVERSAL__
#ifndef __WXGTK20__
@@ -4233,7 +4233,7 @@ void wxWindowGTK::ApplyToolTip( GtkTooltips *tips, const wxChar *tip )
bool wxWindowGTK::SetBackgroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( m_widget != NULL, false, wxT("invalid window") );
if (!wxWindowBase::SetBackgroundColour(colour))
return false;
@@ -4254,13 +4254,13 @@ bool wxWindowGTK::SetBackgroundColour( const wxColour &colour )
bool wxWindowGTK::SetForegroundColour( const wxColour &colour )
{
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( m_widget != NULL, false, wxT("invalid window") );
if (!wxWindowBase::SetForegroundColour(colour))
{
return false;
}
if (colour.Ok())
{
// We need the pixel value e.g. for background clearing.
@@ -4288,7 +4288,7 @@ PangoContext *wxWindowGTK::GtkGetPangoX11Context()
return m_x11Context;
}
#endif
GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
{
// do we need to apply any changes at all?
@@ -4304,7 +4304,7 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
if ( m_font.Ok() )
{
#ifdef __WXGTK20__
style->font_desc =
style->font_desc =
pango_font_description_copy( m_font.GetNativeFontInfo()->description );
#else
wxString xfontname = m_font.GetNativeFontInfo()->GetXFontName();
@@ -4315,13 +4315,13 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
if ( m_foregroundColour.Ok() )
{
GdkColor *fg = m_foregroundColour.GetColor();
style->fg[GTK_STATE_NORMAL] = *fg;
style->color_flags[GTK_STATE_NORMAL] = GTK_RC_FG;
style->fg[GTK_STATE_PRELIGHT] = *fg;
style->color_flags[GTK_STATE_PRELIGHT] = GTK_RC_FG;
style->fg[GTK_STATE_ACTIVE] = *fg;
style->color_flags[GTK_STATE_ACTIVE] = GTK_RC_FG;
}
@@ -4334,23 +4334,23 @@ GtkRcStyle *wxWindowGTK::CreateWidgetStyle(bool forceStyle)
style->base[GTK_STATE_NORMAL] = *bg;
style->color_flags[GTK_STATE_NORMAL] = (GtkRcFlags)
(style->color_flags[GTK_STATE_NORMAL] | GTK_RC_BG | GTK_RC_BASE);
style->bg[GTK_STATE_PRELIGHT] = *bg;
style->base[GTK_STATE_PRELIGHT] = *bg;
style->color_flags[GTK_STATE_PRELIGHT] = (GtkRcFlags)
(style->color_flags[GTK_STATE_PRELIGHT] | GTK_RC_BG | GTK_RC_BASE);
style->bg[GTK_STATE_ACTIVE] = *bg;
style->base[GTK_STATE_ACTIVE] = *bg;
style->color_flags[GTK_STATE_ACTIVE] = (GtkRcFlags)
(style->color_flags[GTK_STATE_ACTIVE] | GTK_RC_BG | GTK_RC_BASE);
style->bg[GTK_STATE_INSENSITIVE] = *bg;
style->base[GTK_STATE_INSENSITIVE] = *bg;
style->color_flags[GTK_STATE_INSENSITIVE] = (GtkRcFlags)
(style->color_flags[GTK_STATE_INSENSITIVE] | GTK_RC_BG | GTK_RC_BASE);
}
return style;
}
@@ -4378,7 +4378,7 @@ void wxWindowGTK::DoApplyWidgetStyle(GtkRcStyle *style)
bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style)
{
wxWindowBase::SetBackgroundStyle(style);
if (style == wxBG_STYLE_CUSTOM)
{
GdkWindow *window = (GdkWindow*) NULL;
@@ -4401,7 +4401,7 @@ bool wxWindowGTK::SetBackgroundStyle(wxBackgroundStyle style)
else
// Do in OnIdle, because the window is not yet available
m_needsStyleChange = true;
// Don't apply widget style, or we get a grey background
}
else
@@ -4428,7 +4428,7 @@ void gtk_pop_hide_callback( GtkWidget *WXUNUSED(widget), bool* is_waiting )
void SetInvokingWindow( wxMenu *menu, wxWindow* win )
{
menu->SetInvokingWindow( win );
wxMenuItemList::compatibility_iterator node = menu->GetMenuItems().GetFirst();
while (node)
{
@@ -4562,14 +4562,14 @@ bool wxWindowGTK::IsOwnGtkWindow( GdkWindow *window )
bool wxWindowGTK::SetFont( const wxFont &font )
{
wxCHECK_MSG( m_widget != NULL, FALSE, wxT("invalid window") );
wxCHECK_MSG( m_widget != NULL, false, wxT("invalid window") );
if (!wxWindowBase::SetFont(font))
return false;
// apply style change (forceStyle=true so that new style is applied
// even if the font changed from valid to wxNullFont):
ApplyWidgetStyle(true);
ApplyWidgetStyle(true);
return true;
}
@@ -4600,7 +4600,7 @@ void wxWindowGTK::DoCaptureMouse()
cursor->GetCursor(),
(guint32)GDK_CURRENT_TIME );
g_captureWindow = this;
g_captureWindowHasMouse = TRUE;
g_captureWindowHasMouse = true;
}
void wxWindowGTK::DoReleaseMouse()
@@ -4631,7 +4631,7 @@ wxWindow *wxWindowBase::GetCapture()
bool wxWindowGTK::IsRetained() const
{
return FALSE;
return false;
}
void wxWindowGTK::SetScrollbar( int orient, int pos, int thumbVisible,
@@ -4641,7 +4641,7 @@ void wxWindowGTK::SetScrollbar( int orient, int pos, int thumbVisible,
wxCHECK_RET( m_wxwindow != NULL, wxT("window needs client area for scrolling") );
m_hasScrolling = TRUE;
m_hasScrolling = true;
if (orient == wxHORIZONTAL)
{
@@ -4817,11 +4817,11 @@ void wxWindowGTK::ScrollWindow( int dx, int dy, const wxRect* WXUNUSED(rect) )
}
#endif
m_clipPaintRegion = TRUE;
m_clipPaintRegion = true;
gtk_pizza_scroll( GTK_PIZZA(m_wxwindow), -dx, -dy );
m_clipPaintRegion = FALSE;
m_clipPaintRegion = false;
}
@@ -4885,7 +4885,7 @@ bool wxWinModule::OnInit()
// g_eraseGC = gdk_gc_new( GDK_ROOT_PARENT() );
// gdk_gc_set_fill( g_eraseGC, GDK_SOLID );
return TRUE;
return true;
}
void wxWinModule::OnExit()