no changes, just removed TABs/trailing spaces

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@44657 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2007-03-07 22:56:34 +00:00
parent e4f9c52180
commit f4322df68b
38 changed files with 247 additions and 261 deletions

View File

@ -209,7 +209,7 @@ static gint wxapp_idle_callback( gpointer WXUNUSED(data) )
// Release lock again
gdk_threads_leave();
{
// If another idle source was added, remove it
#if wxUSE_THREADS

View File

@ -349,7 +349,7 @@ bool wxComboBox::Create( wxWindow *parent, wxWindowID id, const wxString& value,
g_signal_connect_after (m_widget, "changed",
G_CALLBACK (gtkcombobox_changed_callback), this);
}
else
#endif

View File

@ -278,7 +278,7 @@ bool wxFileDataObject::SetData(size_t WXUNUSED(size), const void *buf)
// skip the slashes
lenPrefix += 2;
}
// It would probably be nicer to use a GTK or Glib
// function to unescape the 8-bit strings pointed to
// by buf, but this does the same in wx code.

View File

@ -1102,9 +1102,9 @@ void wxDataViewTextRenderer::SetAlignment( int align )
g_value_unset( &gvalue );
}
// ---------------------------------------------------------
// ---------------------------------------------------------
// wxDataViewBitmapRenderer
// ---------------------------------------------------------
// ---------------------------------------------------------
IMPLEMENT_CLASS(wxDataViewBitmapRenderer, wxDataViewRenderer)
@ -1124,38 +1124,38 @@ bool wxDataViewBitmapRenderer::SetValue( const wxVariant &value )
{
wxBitmap bitmap;
bitmap << value;
// This may create a Pixbuf representation in the
// wxBitmap object (and it will stay there)
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_OBJECT );
g_value_set_object( &gvalue, pixbuf );
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
g_value_unset( &gvalue );
return true;
}
if (value.GetType() == wxT("wxIcon"))
{
wxIcon bitmap;
bitmap << value;
// This may create a Pixbuf representation in the
// wxBitmap object (and it will stay there)
GdkPixbuf *pixbuf = bitmap.GetPixbuf();
GValue gvalue = { 0, };
g_value_init( &gvalue, G_TYPE_OBJECT );
g_value_set_object( &gvalue, pixbuf );
g_object_set_property( G_OBJECT(m_renderer), "pixbuf", &gvalue );
g_value_unset( &gvalue );
return true;
}
return false;
}
@ -1163,7 +1163,7 @@ bool wxDataViewBitmapRenderer::GetValue( wxVariant &value ) const
{
return false;
}
// ---------------------------------------------------------
// wxDataViewToggleRenderer
// ---------------------------------------------------------
@ -1540,7 +1540,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
{
if (gdk_event->type != GDK_BUTTON_PRESS)
return TRUE;
if (gdk_event->button == 1)
{
wxDataViewCtrl *dv = column->GetOwner();
@ -1549,7 +1549,7 @@ gtk_dataview_header_button_press_callback( GtkWidget *widget,
event.SetModel( dv->GetModel() );
dv->GetEventHandler()->ProcessEvent( event );
}
return TRUE;
}
@ -1579,8 +1579,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column,
list_store->model->GetValue( value, cell->GetOwner()->GetModelColumn(), model_row );
if (value.GetType() != cell->GetVariantType())
wxLogError( wxT("Wrong type, required: %s but: %s"),
value.GetType().c_str(),
wxLogError( wxT("Wrong type, required: %s but: %s"),
value.GetType().c_str(),
cell->GetVariantType().c_str() );
cell->SetValue( value );
@ -1588,8 +1588,8 @@ static void wxGtkTreeCellDataFunc( GtkTreeViewColumn *column,
IMPLEMENT_CLASS(wxDataViewColumn, wxDataViewColumnBase)
wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell,
unsigned int model_column, int width,
wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *cell,
unsigned int model_column, int width,
wxAlignment align, int flags ) :
wxDataViewColumnBase( title, cell, model_column, width, align, flags )
{
@ -1599,8 +1599,8 @@ wxDataViewColumn::wxDataViewColumn( const wxString &title, wxDataViewRenderer *c
SetTitle( title );
}
wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell,
unsigned int model_column, int width,
wxDataViewColumn::wxDataViewColumn( const wxBitmap &bitmap, wxDataViewRenderer *cell,
unsigned int model_column, int width,
wxAlignment align, int flags ) :
wxDataViewColumnBase( bitmap, cell, model_column, width, align, flags )
{
@ -1643,7 +1643,7 @@ void wxDataViewColumn::OnInternalIdle()
{
if (m_isConnected)
return;
if (GTK_WIDGET_REALIZED(GetOwner()->m_treeview))
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
@ -1651,7 +1651,7 @@ void wxDataViewColumn::OnInternalIdle()
{
g_signal_connect(column->button, "button_press_event",
G_CALLBACK (gtk_dataview_header_button_press_callback), this);
m_isConnected = true;
}
}
@ -1660,22 +1660,22 @@ void wxDataViewColumn::OnInternalIdle()
void wxDataViewColumn::SetOwner( wxDataViewCtrl *owner )
{
wxDataViewColumnBase::SetOwner( owner );
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
gtk_tree_view_column_set_title( column, wxGTK_CONV_FONT(GetTitle(), GetOwner()->GetFont() ) );
}
void wxDataViewColumn::SetTitle( const wxString &title )
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
if (m_isConnected)
{
// disconnect before column->button gets recreated
g_signal_handlers_disconnect_by_func( column->button,
g_signal_handlers_disconnect_by_func( column->button,
(GtkWidget*) gtk_dataview_header_button_press_callback, this);
m_isConnected = false;
}
@ -1701,7 +1701,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
if (bitmap.Ok())
{
GtkImage *gtk_image = GTK_IMAGE( gtk_image_new() );
GdkBitmap *mask = (GdkBitmap *) NULL;
if (bitmap.GetMask())
mask = bitmap.GetMask()->GetBitmap();
@ -1717,7 +1717,7 @@ void wxDataViewColumn::SetBitmap( const wxBitmap &bitmap )
bitmap.GetPixmap(), mask);
}
gtk_widget_show( GTK_WIDGET(gtk_image) );
gtk_tree_view_column_set_widget( column, GTK_WIDGET(gtk_image) );
}
else
@ -1739,14 +1739,14 @@ void wxDataViewColumn::SetResizeable( bool resizeable )
void wxDataViewColumn::SetAlignment( wxAlignment align )
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
gfloat xalign = 0.0;
if (align == wxALIGN_RIGHT)
xalign = 1.0;
if (align == wxALIGN_CENTER_HORIZONTAL ||
align == wxALIGN_CENTER)
xalign = 0.5;
gtk_tree_view_column_set_alignment( column, xalign );
}
@ -1758,7 +1758,7 @@ wxAlignment wxDataViewColumn::GetAlignment() const
return wxALIGN_RIGHT;
if (xalign == 0.5)
return wxALIGN_CENTER_HORIZONTAL;
return wxALIGN_LEFT;
}
@ -1789,7 +1789,7 @@ bool wxDataViewColumn::IsHidden() const
void wxDataViewColumn::SetSortOrder( bool ascending )
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
if (ascending)
gtk_tree_view_column_set_sort_order( column, GTK_SORT_ASCENDING );
else
@ -1799,7 +1799,7 @@ void wxDataViewColumn::SetSortOrder( bool ascending )
bool wxDataViewColumn::IsSortOrderAscending() const
{
GtkTreeViewColumn *column = GTK_TREE_VIEW_COLUMN(m_column);
return (gtk_tree_view_column_get_sort_order( column ) != GTK_SORT_DESCENDING);
}
@ -1833,7 +1833,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt
{
if (!GTK_WIDGET_REALIZED(dv->m_widget))
return;
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_SELECTED, dv->GetId() );
event.SetRow( dv->GetSelection() );
event.SetModel( dv->GetModel() );
@ -1841,7 +1841,7 @@ wxdataview_selection_changed_callback( GtkTreeSelection* selection, wxDataViewCt
}
static void
wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path,
wxdataview_row_activated_callback( GtkTreeView* treeview, GtkTreePath *path,
GtkTreeViewColumn *column, wxDataViewCtrl *dv )
{
wxDataViewEvent event( wxEVT_COMMAND_DATAVIEW_ROW_ACTIVATED, dv->GetId() );
@ -1912,8 +1912,8 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
if (!gtk_check_version(2,10,0))
{
GtkTreeViewGridLines grid = GTK_TREE_VIEW_GRID_LINES_NONE;
if ((style & wxDV_HORIZ_RULES) != 0 &&
if ((style & wxDV_HORIZ_RULES) != 0 &&
(style & wxDV_VERT_RULES) != 0)
grid = GTK_TREE_VIEW_GRID_LINES_BOTH;
else if (style & wxDV_VERT_RULES)
@ -1947,7 +1947,7 @@ bool wxDataViewCtrl::Create(wxWindow *parent, wxWindowID id,
void wxDataViewCtrl::OnInternalIdle()
{
wxWindow::OnInternalIdle();
unsigned int cols = GetColumnCount();
unsigned int i;
for (i = 0; i < cols; i++)
@ -1990,7 +1990,7 @@ bool wxDataViewCtrl::AppendColumn( wxDataViewColumn *col )
void wxDataViewCtrl::SetSelection( int row )
{
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
if (row < 0)
{
gtk_tree_selection_unselect_all( selection );
@ -1999,9 +1999,9 @@ void wxDataViewCtrl::SetSelection( int row )
{
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index( path, row );
gtk_tree_selection_select_path( selection, path );
gtk_tree_path_free( path );
}
}
@ -2009,12 +2009,12 @@ void wxDataViewCtrl::SetSelection( int row )
void wxDataViewCtrl::Unselect( unsigned int row )
{
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index( path, row );
gtk_tree_selection_unselect_path( selection, path );
gtk_tree_path_free( path );
}
@ -2025,18 +2025,18 @@ void wxDataViewCtrl::SetSelectionRange( unsigned int from, unsigned int to )
void wxDataViewCtrl::SetSelections( const wxArrayInt& aSelections)
{
}
bool wxDataViewCtrl::IsSelected( unsigned int row ) const
{
GtkTreeSelection *selection = gtk_tree_view_get_selection( GTK_TREE_VIEW(m_treeview) );
GtkTreePath *path = gtk_tree_path_new ();
gtk_tree_path_append_index( path, row );
gboolean ret = gtk_tree_selection_path_is_selected( selection, path );
gtk_tree_path_free( path );
return ret;
}
@ -2047,25 +2047,25 @@ int wxDataViewCtrl::GetSelection() const
{
GtkTreeModel *model;
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
// do something
if (list)
{
// list = g_list_nth( list, 0 ); should be a noop
GtkTreePath *path = (GtkTreePath*) list->data;
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
// delete list
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
g_list_free( list );
return (int) row;
}
}
else
{
GtkTreeModel *model;
GtkTreeIter iter;
gboolean has_selection = gtk_tree_selection_get_selected( selection, &model, &iter );
@ -2075,7 +2075,7 @@ int wxDataViewCtrl::GetSelection() const
return (int) row;
}
}
return -1;
}
@ -2088,25 +2088,25 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
{
GtkTreeModel *model;
GList *list = gtk_tree_selection_get_selected_rows( selection, &model );
int count = 0;
while (list)
{
// list = g_list_nth( list, 0 ); should be a noop
GtkTreePath *path = (GtkTreePath*) list->data;
unsigned int row = (unsigned int)gtk_tree_path_get_indices (path)[0];
aSelections.Add( (int) row );
list = g_list_next( list );
list = g_list_next( list );
}
// delete list
g_list_foreach( list, (GFunc) gtk_tree_path_free, NULL );
g_list_free( list );
return count;
}
else
@ -2121,7 +2121,7 @@ int wxDataViewCtrl::GetSelections(wxArrayInt& aSelections) const
return 1;
}
}
return 0;
}

View File

@ -324,7 +324,7 @@ wxWindowDC::wxWindowDC( wxWindow *window )
standard (as e.g. wxStatusBar) */
m_owner = window;
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
{
// reverse sense
@ -391,7 +391,7 @@ void wxWindowDC::SetUpDC()
gdk_gc_set_background( m_textGC, m_textBackgroundColour.GetColor() );
gdk_gc_set_fill( m_textGC, GDK_SOLID );
gdk_gc_set_colormap( m_textGC, m_cmap );
/* m_penGC */
@ -862,7 +862,7 @@ void wxWindowDC::DoDrawRectangle( wxCoord x, wxCoord y, wxCoord width, wxCoord h
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx, yy, ww-2, hh-2 );
gdk_draw_rectangle( m_window, m_penGC, FALSE, xx-1, yy-1, ww, hh );
}
// reset
gdk_gc_set_line_attributes( m_penGC, 2, GDK_LINE_SOLID, GDK_CAP_ROUND, GDK_JOIN_ROUND );
}
@ -1083,10 +1083,10 @@ void wxWindowDC::DoDrawBitmap( const wxBitmap &bitmap,
int w = bitmap.GetWidth();
int h = bitmap.GetHeight();
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
xx -= w;
CalcBoundingBox( x, y );
CalcBoundingBox( x + w, y + h );
@ -1219,7 +1219,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
wxMemoryDC *memDC = wxDynamicCast(source, wxMemoryDC);
wxBitmap selected = source->GetSelectedBitmap();
bool use_bitmap_method = false;
bool is_mono = false;
@ -1230,7 +1230,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
}
if (memDC && !selected.Ok()) return false;
if (selected.Ok())
{
is_mono = (selected.GetDepth() == 1);
@ -1428,7 +1428,7 @@ bool wxWindowDC::DoBlit( wxCoord xdest, wxCoord ydest,
GdkWindow* window = source->GetGDKWindow();
if ( !window )
return false;
// copy including child window contents
gdk_gc_set_subwindow( m_penGC, GDK_INCLUDE_INFERIORS );
gdk_draw_drawable( m_window, m_penGC,
@ -1579,7 +1579,7 @@ void wxWindowDC::DoDrawText( const wxString &text, wxCoord x, wxCoord y )
gdk_draw_rectangle(m_window, m_textGC, TRUE, x, y, w, h);
gdk_gc_set_foreground(m_textGC, m_textForegroundColour.GetColor());
}
// Draw layout.
if (m_owner && m_owner->GetLayoutDirection() == wxLayout_RightToLeft)
gdk_draw_layout( m_window, m_textGC, x-w, y, m_layout );
@ -1796,7 +1796,7 @@ bool wxWindowDC::DoGetPartialTextExtents(const wxString& text,
}
pango_layout_set_text( m_layout, dataUTF8, strlen(dataUTF8) );
// Calculate the position of each character based on the widths of
// the previous characters
@ -2368,7 +2368,7 @@ void wxWindowDC::SetDeviceOrigin( wxCoord x, wxCoord y )
{
m_deviceOriginX = x;
m_deviceOriginY = y;
ComputeScaleAndOrigin();
}
@ -2376,10 +2376,10 @@ void wxWindowDC::SetAxisOrientation( bool xLeftRight, bool yBottomUp )
{
m_signX = (xLeftRight ? 1 : -1);
m_signY = (yBottomUp ? -1 : 1);
if (m_owner && m_owner->m_wxwindow && (m_owner->GetLayoutDirection() == wxLayout_RightToLeft))
m_signX = -m_signX;
m_signX = -m_signX;
ComputeScaleAndOrigin();
}

View File

@ -337,7 +337,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned FALSE") );
#endif
/* cancel the whole thing */
gtk_drag_finish( context,
FALSE, /* no success */
@ -349,7 +349,7 @@ static gboolean target_drag_drop( GtkWidget *widget,
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnDrop returned true") );
#endif
#if wxUSE_THREADS
/* disable GUI threads */
#endif
@ -419,7 +419,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: data received event") );
#endif
/* inform the wxDropTarget about the current GtkSelectionData.
this is only valid for the duration of this call */
drop_target->SetDragData( data );
@ -431,7 +431,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned true") );
#endif
/* tell GTK that data transfer was successful */
gtk_drag_finish( context, TRUE, FALSE, time );
}
@ -440,7 +440,7 @@ static void target_drag_data_received( GtkWidget *WXUNUSED(widget),
#ifdef __WXDEBUG__
wxLogTrace(TRACE_DND, wxT( "Drop target: OnData returned FALSE") );
#endif
/* tell GTK that data transfer was not successful */
gtk_drag_finish( context, FALSE, FALSE, time );
}
@ -615,7 +615,7 @@ source_drag_data_get (GtkWidget *WXUNUSED(widget),
wxLogTrace(TRACE_DND, wxT("Drop source: format requested: %s"),
format.GetId().c_str());
#endif
drop_source->m_retValue = wxDragCancel;
wxDataObject *data = drop_source->GetDataObject();
@ -859,7 +859,7 @@ wxDragResult wxDropSource::DoDragDrop(int flags)
// don't start dragging if no button is down
if (g_lastButtonNumber == 0)
return wxDragNone;
// we can only start a drag after a mouse event
if (g_lastMouseEvent == NULL)
return wxDragNone;

View File

@ -232,7 +232,7 @@ void wxFrame::DoGetClientSize( int *width, int *height ) const
#if wxUSE_STATUSBAR
// status bar
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
(*height) -= wxSTATUS_HEIGHT;
#endif // wxUSE_STATUSBAR
@ -288,7 +288,7 @@ void wxFrame::DoSetClientSize( int width, int height )
#if wxUSE_STATUSBAR
// status bar
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
if (m_frameStatusBar && m_frameStatusBar->IsShown() &&
!(m_fsIsShowing && (m_fsSaveFlag & wxFULLSCREEN_NOSTATUSBAR) != 0))
height += wxSTATUS_HEIGHT;
#endif
@ -485,7 +485,7 @@ void wxFrame::GtkOnSize()
{
if (!GTK_WIDGET_VISIBLE(m_frameStatusBar->m_widget))
gtk_widget_show( m_frameStatusBar->m_widget );
int xx = 0 + m_miniEdge;
int yy = m_height - wxSTATUS_HEIGHT - m_miniEdge - client_area_y_offset;
int ww = m_width - 2*m_miniEdge;

View File

@ -857,7 +857,7 @@ wxGnomePrintDC::wxGnomePrintDC( wxGnomePrinter *printer )
m_signX = 1; // default x-axis left to right
m_signY = -1; // default y-axis bottom up -> top down
GetSize( NULL, &m_deviceOffsetY );
}
@ -882,8 +882,8 @@ wxGnomePrintDC::wxGnomePrintDC( const wxPrintData& data )
m_currentGreen = 0;
m_signX = 1; // default x-axis left to right
m_signY = -1; // default y-axis bottom up -> top down
m_signY = -1; // default y-axis bottom up -> top down
GetSize( NULL, &m_deviceOffsetY );
}
@ -1940,7 +1940,7 @@ void wxGnomePrintPreview::DetermineScaling()
m_previewPrintout->SetPPIPrinter(wxGnomePrintDC::GetResolution(), wxGnomePrintDC::GetResolution());
wxSize sizeDevUnits(paper->GetSizeDeviceUnits());
// TODO: get better resolution information from wxGnomePrintDC, if possible.
sizeDevUnits.x = (wxCoord)((float)sizeDevUnits.x * wxGnomePrintDC::GetResolution() / 72.0);

View File

@ -113,7 +113,7 @@ bool wxHyperlinkCtrl::Create(wxWindow *parent, wxWindowID id,
// wxWindowGTK will connect to the enter_notify and leave_notify GTK+ signals
// thus overriding GTK+'s internal signal handlers which set the cursor of
// the widget - thus we need to manually set it here:
// the widget - thus we need to manually set it here:
SetCursor(wxCursor(wxCURSOR_HAND));
}
else

View File

@ -83,7 +83,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview,
if (listbox->IsSelected(sel))
{
GtkTreeEntry* entry = listbox->GtkGetEntry(sel);
if (entry)
{
event.SetInt(sel);
@ -93,7 +93,7 @@ gtk_listbox_row_activated_callback(GtkTreeView *treeview,
event.SetClientObject( (wxClientData*) gtk_tree_entry_get_userdata(entry) );
else if ( listbox->HasClientUntypedData() )
event.SetClientData( gtk_tree_entry_get_userdata(entry) );
g_object_unref (entry);
}
else
@ -148,9 +148,9 @@ static void
gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
{
if (g_blockEventsOnDrag) return;
if (listbox->m_blockEvent) return;
wxCommandEvent event(wxEVT_COMMAND_LISTBOX_SELECTED, listbox->GetId() );
event.SetEventObject( listbox );
@ -158,15 +158,15 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
{
wxArrayInt selections;
listbox->GetSelections( selections );
if (selections.GetCount() == 0)
{
// indicate that this is a deselection
event.SetExtraLong( 0 );
event.SetInt( -1 );
listbox->GetEventHandler()->ProcessEvent( event );
return;
}
else
@ -174,7 +174,7 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
// indicate that this is a selection
event.SetExtraLong( 1 );
event.SetInt( selections[0] );
listbox->GetEventHandler()->ProcessEvent( event );
}
}
@ -186,9 +186,9 @@ gtk_listitem_changed_callback( GtkTreeSelection* selection, wxListBox *listbox )
// indicate that this is a deselection
event.SetExtraLong( 0 );
event.SetInt( -1 );
listbox->GetEventHandler()->ProcessEvent( event );
return;
}
else
@ -406,7 +406,7 @@ bool wxListBox::Create( wxWindow *parent, wxWindowID id,
GtkTreeSelection* selection = gtk_tree_view_get_selection( m_treeview );
g_signal_connect_after (selection, "changed",
G_CALLBACK (gtk_listitem_changed_callback), this);

View File

@ -1,14 +0,0 @@
/////////////////////////////////////////////////////////////////////////////
// Name: main.cpp
// Purpose: Entry point
// Author: Julian Smart
// Modified by:
// Created: 17/09/98
// RCS-ID: $Id$
// Copyright: (c) Julian Smart
// Licence: wxWindows licence
/////////////////////////////////////////////////////////////////////////////
// We don't put main() in the library any more. RR.

View File

@ -250,7 +250,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
gint i = gtk_notebook_get_current_page( notebook );
if (i < 0) return (wxMDIChildFrame*) NULL;
GtkNotebookPage* page = (GtkNotebookPage*) (g_list_nth(notebook->children,i)->data);
if (!page) return (wxMDIChildFrame*) NULL;
@ -259,7 +259,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
{
if ( wxPendingDelete.Member(node->GetData()) )
return (wxMDIChildFrame*) NULL;
wxMDIChildFrame *child_frame = wxDynamicCast( node->GetData(), wxMDIChildFrame );
if (!child_frame)
@ -267,7 +267,7 @@ wxMDIChildFrame *wxMDIParentFrame::GetActiveChild() const
if (child_frame->m_page == page)
return child_frame;
node = node->GetNext();
}

View File

@ -45,10 +45,10 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
if (style & wxYES_NO)
{
if (style & wxCANCEL)
buttons = GTK_BUTTONS_NONE;
else
buttons = GTK_BUTTONS_YES_NO;
if (style & wxCANCEL)
buttons = GTK_BUTTONS_NONE;
else
buttons = GTK_BUTTONS_YES_NO;
}
if (style & wxOK)
@ -84,14 +84,14 @@ wxMessageDialog::wxMessageDialog(wxWindow *parent,
if (style & wxYES_NO)
{
if (style & wxCANCEL)
{
{
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_NO,
GTK_RESPONSE_NO);
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_CANCEL,
GTK_RESPONSE_CANCEL);
gtk_dialog_add_button(GTK_DIALOG(m_widget), GTK_STOCK_YES,
GTK_RESPONSE_YES);
}
}
if (style & wxNO_DEFAULT)
gtk_dialog_set_default_response(GTK_DIALOG(m_widget), GTK_RESPONSE_NO);
else

View File

@ -402,7 +402,7 @@ int wxNotebook::DoSetSelection( size_t page, int flags )
if ( !(flags & SetSelection_SendEvent) )
{
// reconnect to signals
g_signal_connect (m_widget, "switch_page",
G_CALLBACK (gtk_notebook_page_changing_callback), this);
@ -658,7 +658,7 @@ bool wxNotebook::InsertPage( size_t position,
/* show the label */
gtk_widget_show( GTK_WIDGET(nb_page->m_label) );
if (select && (m_pagesData.GetCount() > 1))
{
SetSelection( position );

View File

@ -459,7 +459,7 @@ wxRect wxRegionIterator::GetRect() const
wxRegionIterator& wxRegionIterator::operator=(const wxRegionIterator& ri)
{
wxDELETEA(m_rects);
m_current = ri.m_current;
m_numRects = ri.m_numRects;
if ( m_numRects )

View File

@ -199,7 +199,7 @@ wxRendererGTK::DrawHeaderButton(wxWindow *win,
int x_diff = 0;
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
x_diff = rect.width;
gtk_paint_box
(
button->style,
@ -334,7 +334,7 @@ wxRendererGTK::DrawSplitterSash(wxWindow *win,
rect.height = full_size;
rect.width = w;
}
int x_diff = 0;
if (win->GetLayoutDirection() == wxLayout_RightToLeft)
x_diff = rect.width;
@ -540,7 +540,7 @@ wxRendererGTK::DrawItemSelectionRect(wxWindow *win,
if (flags & wxCONTROL_CURRENT)
{
gtk_paint_focus( win->m_widget->style,
gtk_paint_focus( win->m_widget->style,
gdk_window,
state,
NULL,

View File

@ -516,7 +516,7 @@ int wxSystemSettingsNative::GetMetric( wxSystemMetric index, wxWindow* win )
// since that is what the API wants. But the values
// are much bigger under GNOME than under Windows and
// just seem to much in many cases to be useful.
// drag_threshold *= 2;
// drag_threshold *= 2;
return drag_threshold;

View File

@ -72,15 +72,15 @@ bool wxStaticText::Create(wxWindow *parent,
justify = GTK_JUSTIFY_RIGHT;
else // wxALIGN_LEFT is 0
justify = GTK_JUSTIFY_LEFT;
if (GetLayoutDirection() == wxLayout_RightToLeft)
{
{
if (justify == GTK_JUSTIFY_RIGHT)
justify = GTK_JUSTIFY_LEFT;
if (justify == GTK_JUSTIFY_LEFT)
justify = GTK_JUSTIFY_RIGHT;
}
gtk_label_set_justify(GTK_LABEL(m_widget), justify);
// GTK_JUSTIFY_LEFT is 0, RIGHT 1 and CENTER 2

View File

@ -223,7 +223,7 @@ void gtktoolwidget_size_callback( GtkWidget *widget,
{
// this shouldn't happen...
if (win->GetParent()->m_wxwindow) return;
wxSize size = win->GetEffectiveMinSize();
if (size.y != alloc->height)
{
@ -474,11 +474,11 @@ bool wxToolBar::DoInsertTool(size_t pos, wxToolBarToolBase *toolBase)
(const char *) NULL,
posGtk
);
// connect after in order to correct size_allocate events
g_signal_connect_after (tool->GetControl()->m_widget, "size_allocate",
G_CALLBACK (gtktoolwidget_size_callback), tool->GetControl());
break;
}
@ -606,7 +606,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
tool->SetNormalBitmap(bitmap);
tool->SetImage(tool->GetBitmap());
}
}
}
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
@ -618,7 +618,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
tool->SetDisabledBitmap(bitmap);
tool->SetImage(tool->GetBitmap());
}
}
}
// ----------------------------------------------------------------------------
@ -629,7 +629,7 @@ void wxToolBar::OnInternalIdle()
{
// Check if we have to show window now
if (GtkShowFromOnIdle()) return;
wxCursor cursor = m_cursor;
if (g_globalCursor.Ok()) cursor = g_globalCursor;

View File

@ -258,11 +258,11 @@ gint gtk_pizza_get_rtl_offset (GtkPizza *pizza)
g_return_val_if_fail ( (pizza != NULL), 0 );
g_return_val_if_fail ( (GTK_IS_PIZZA (pizza)), 0 );
if (!pizza->bin_window) return 0;
border = pizza->container.border_width;
return GTK_WIDGET(pizza)->allocation.width - border*2;
}
@ -544,7 +544,7 @@ gtk_pizza_size_allocate (GtkWidget *widget,
widget->allocation = *allocation;
border = pizza->container.border_width;
x = allocation->x + border;
y = allocation->y + border;
w = allocation->width - border*2;
@ -679,15 +679,15 @@ gtk_pizza_allocate_child (GtkPizza *pizza,
if (gtk_widget_get_direction( GTK_WIDGET(pizza) ) == GTK_TEXT_DIR_RTL)
{
/* reverse horizontal placement */
gint offset,border;
gint offset,border;
offset = GTK_WIDGET(pizza)->allocation.width;
border = pizza->container.border_width;
offset -= border*2;
allocation.x = offset - child->x - allocation.width + pizza->m_xoffset;
allocation.x = offset - child->x - allocation.width + pizza->m_xoffset;
}
gtk_widget_size_allocate (child->widget, &allocation);
}

View File

@ -1683,9 +1683,9 @@ gtk_window_button_release_callback( GtkWidget *widget,
event.SetId( win->GetId() );
bool ret = win->GTKProcessEvent(event);
g_lastMouseEvent = NULL;
return ret;
}

View File

@ -1354,7 +1354,7 @@ wxMask::wxMask(const wxMask &mask)
SelectObject(destDC, (HBITMAP) m_maskBitmap);
BitBlt(destDC, 0, 0, w, h, srcDC, 0, 0, SRCCOPY);
SelectObject(srcDC, 0);
DeleteDC(srcDC);
SelectObject(destDC, 0);

View File

@ -506,7 +506,7 @@ void wxChoice::DoSetSize(int x, int y,
int sizeFlags)
{
int heightOrig = height;
// the height which we must pass to Windows should be the total height of
// the control including the drop down list while the height given to us
// is, of course, just the height of the permanently visible part of it

View File

@ -265,7 +265,7 @@ bool wxComboBox::MSWProcessEditMsg(WXUINT msg, WXWPARAM wParam, WXLPARAM lParam)
{
if (SendMessage(GetHwnd(), CB_GETDROPPEDSTATE, 0, 0))
return false;
wxCommandEvent event(wxEVT_COMMAND_TEXT_ENTER, m_windowId);
const int sel = GetSelection();

View File

@ -201,7 +201,7 @@ bool wxCrashReportImpl::Generate(int flags, EXCEPTION_POINTERS *ep)
dumpFlags = (MINIDUMP_TYPE)(MiniDumpScanMemory
#if _MSC_VER > 1300
|MiniDumpWithIndirectlyReferencedMemory
#endif
#endif
);
}

View File

@ -549,9 +549,9 @@ void wxGLCanvas::OnSize(wxSizeEvent& WXUNUSED(event))
void wxGLCanvas::SetCurrent(const wxGLContext& RC) const
{
// although on MSW it works even if the window is still hidden, it doesn't
// under wxGTK and documentation mentions that SetCurrent() can only be
// called for a shown window, so check it
wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") );
// under wxGTK and documentation mentions that SetCurrent() can only be
// called for a shown window, so check it
wxASSERT_MSG( GetParent()->IsShown(), _T("can't make hidden GL canvas current") );
RC.SetCurrent(*this);
}

View File

@ -178,7 +178,7 @@ public :
// gets the component valuess of the matrix
virtual void Get(wxDouble* a=NULL, wxDouble* b=NULL, wxDouble* c=NULL,
wxDouble* d=NULL, wxDouble* tx=NULL, wxDouble* ty=NULL) const;
// makes this the inverse matrix
virtual void Invert();

View File

@ -864,9 +864,9 @@ GSocketEventFlags GSocket::Select(GSocketEventFlags flags)
result |= GSOCK_INPUT_FLAG;
if (m_server && m_stream)
{
/* This is a TCP server socket that detected a connection.
While the INPUT_FLAG is also set, it doesn't matter on
{
/* This is a TCP server socket that detected a connection.
While the INPUT_FLAG is also set, it doesn't matter on
this kind of sockets, as we can only Accept() from them. */
result |= GSOCK_CONNECTION_FLAG;
m_detected |= GSOCK_CONNECTION_FLAG;

View File

@ -1780,10 +1780,10 @@ int WXDLLIMPEXP_CORE wxMSWGetColumnClicked(NMHDR *nmhdr, POINT *ptClick)
// where did the click occur?
#if defined(__WXWINCE__) && !defined(__HANDHELDPC__) && _WIN32_WCE < 400
if (nmhdr->code == GN_CONTEXTMENU)
if (nmhdr->code == GN_CONTEXTMENU)
{
*ptClick = ((NMRGINFO*)nmhdr)->ptAction;
}
}
else
#endif //__WXWINCE__
if ( !::GetCursorPos(ptClick) )

View File

@ -77,7 +77,7 @@ typedef struct tagMENUINFO
} MENUINFO, FAR *LPMENUINFO;
#endif
#if wxUSE_OWNER_DRAWN
#if wxUSE_OWNER_DRAWN
#include "wx/dynlib.h"
#endif
@ -451,14 +451,14 @@ bool wxMenu::DoInsertOrAppend(wxMenuItem *pItem, size_t pos)
!pItem->GetBackgroundColour().Ok() &&
!pItem->GetFont().Ok() )
{
// try to use InsertMenuItem() as it's guaranteed to look correct
// try to use InsertMenuItem() as it's guaranteed to look correct
// while our owner-drawn code is not
#ifndef __DMC__
#ifndef __DMC__
// DMC at march 2007 doesn't have HBITMAP hbmpItem tagMENUITEMINFOA /W
// MIIM_BITMAP only works under WinME/2000+
WinStruct<MENUITEMINFO> mii;
if ( wxGetWinVersion() >= wxWinVersion_98 )
{
{
mii.fMask = MIIM_STRING | MIIM_DATA | MIIM_BITMAP;
if ( pItem->IsCheckable() )
{

View File

@ -42,7 +42,7 @@ int GetScrollPosWX (HWND hWnd, int iSBar)
}
BOOL ScrollWindow(HWND hWnd, int xAmount, int yAmount,
CONST RECT* lpRect, CONST RECT* lpClipRect)
CONST RECT* lpRect, CONST RECT* lpClipRect)
{
/* TODO */
return FALSE;
@ -243,34 +243,34 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
GdGetFontInfo(((MWFONTOBJ*) hFont)->pfont, &fi);
/* FIXME many items are guessed for the time being*/
logFont->lfHeight = fi.height;
/* FIXME many items are guessed for the time being*/
logFont->lfHeight = fi.height;
/* reversed for kaffe port
logFont->tmAscent = fi.height - fi.baseline;
logFont->tmDescent= fi.baseline;
*/
/* reversed for kaffe port
logFont->tmAscent = fi.height - fi.baseline;
logFont->tmDescent= fi.baseline;
*/
logFont->lfWidth = fi.widths['x'];
logFont->lfWeight = FW_NORMAL;
logFont->lfWidth = fi.widths['x'];
logFont->lfWeight = FW_NORMAL;
logFont->lfEscapement = 0;
logFont->lfOrientation = 0;
logFont->lfOutPrecision = OUT_OUTLINE_PRECIS;
logFont->lfClipPrecision = CLIP_DEFAULT_PRECIS;
logFont->lfQuality = DEFAULT_QUALITY;
logFont->lfItalic = 0;
logFont->lfUnderline = 0;
logFont->lfStrikeOut = 0;
/* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/
logFont->lfPitchAndFamily = fi.fixed?
FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH);
logFont->lfCharSet = OEM_CHARSET;
/* TODO I don't know how to get the font name. May
* test for different font classes.
logFont->lfItalic = 0;
logFont->lfUnderline = 0;
logFont->lfStrikeOut = 0;
/* note that win32 has the TMPF_FIXED_PITCH flags REVERSED...*/
logFont->lfPitchAndFamily = fi.fixed?
FF_DONTCARE: (FF_DONTCARE | TMPF_FIXED_PITCH);
logFont->lfCharSet = OEM_CHARSET;
/* TODO I don't know how to get the font name. May
* test for different font classes.
*/
logFont->lfFaceName[0] = 0;
#if 0
strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName));
strncpy(logFont->lfFaceName, ??, sizeof(logFont->lfFaceName));
#endif
return sz;
}
@ -285,36 +285,36 @@ int GetObject(HGDIOBJ hObj, int sz, LPVOID logObj)
HBITMAP WINAPI
CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
{
MWBITMAPOBJ * hbitmap;
int size;
int linelen;
MWBITMAPOBJ *hbitmap;
int size;
int linelen;
if(!hdc)
return NULL;
if(!hdc)
return NULL;
nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1);
nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1);
/* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
return NULL;
/* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hdc->psd, nWidth, nHeight, 0, 0, &size, &linelen))
return NULL;
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap)
return NULL;
hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth;
hbitmap->height = nHeight;
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap)
return NULL;
hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth;
hbitmap->height = nHeight;
/* create compatible with hdc*/
hbitmap->planes = hdc->psd->planes;
hbitmap->bpp = hdc->psd->bpp;
hbitmap->linelen = linelen;
hbitmap->size = size;
/* create compatible with hdc*/
hbitmap->planes = hdc->psd->planes;
hbitmap->bpp = hdc->psd->bpp;
hbitmap->linelen = linelen;
hbitmap->size = size;
return (HBRUSH)hbitmap;
return (HBRUSH)hbitmap;
}
#endif
@ -325,41 +325,41 @@ CreateCompatibleBitmap(HDC hdc, int nWidth, int nHeight)
HBITMAP WINAPI
CreateBitmap( int nWidth, int nHeight, int nPlanes, int bPP, LPCVOID lpData)
{
MWBITMAPOBJ * hbitmap;
int size;
int linelen;
MWBITMAPOBJ *hbitmap;
int size;
int linelen;
HDC hScreenDC;
HDC hScreenDC;
hScreenDC = GetDC(NULL);
hScreenDC = GetDC(NULL);
nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1);
nWidth = MWMAX(nWidth, 1);
nHeight = MWMAX(nHeight, 1);
/* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen))
{
ReleaseDC(NULL, hScreenDC);
return NULL;
}
/* calc memory allocation size and linelen from width and height*/
if(!GdCalcMemGCAlloc(hScreenDC->psd, nWidth, nHeight, nPlanes, bPP, &size, &linelen))
{
ReleaseDC(NULL, hScreenDC);
return NULL;
}
ReleaseDC(NULL, hScreenDC);
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap)
return NULL;
hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth;
hbitmap->height = nHeight;
/* allocate gdi object*/
hbitmap = (MWBITMAPOBJ *)GdItemAlloc(sizeof(MWBITMAPOBJ)-1+size);
if(!hbitmap)
return NULL;
hbitmap->hdr.type = OBJ_BITMAP;
hbitmap->hdr.stockobj = FALSE;
hbitmap->width = nWidth;
hbitmap->height = nHeight;
/* create with specified parameters */
hbitmap->planes = nPlanes;
hbitmap->bpp = bPP;
hbitmap->linelen = linelen;
hbitmap->size = size;
/* create with specified parameters */
hbitmap->planes = nPlanes;
hbitmap->bpp = bPP;
hbitmap->linelen = linelen;
hbitmap->size = size;
/* TODO: copy data */
/* TODO: copy data */
return (HBRUSH)hbitmap;
return (HBRUSH)hbitmap;
}

View File

@ -935,7 +935,7 @@ void wxNotebook::OnPaint(wxPaintEvent& WXUNUSED(event))
MSWDefWindowProc(WM_PAINT, (WPARAM)memdc.GetHDC(), 0);
// For some reason in RTL mode, source offset has to be -1, otherwise the
// For some reason in RTL mode, source offset has to be -1, otherwise the
// right border (physical) remains unpainted.
const wxCoord ofs = dir == wxLayout_RightToLeft ? -1 : 0;
dc.Blit(ofs, 0, rc.right, rc.bottom, &memdc, ofs, 0);

View File

@ -63,7 +63,7 @@ bool wxPalette::FreeResource(bool WXUNUSED(force))
{
DeleteObject((HPALETTE)M_PALETTEDATA->m_hPalette);
}
return true;
}
@ -73,7 +73,7 @@ int wxPalette::GetColoursCount() const
{
return ::GetPaletteEntries((HPALETTE) M_PALETTEDATA->m_hPalette, 0, 0, NULL );
}
return 0;
}

View File

@ -42,7 +42,7 @@
#endif
#include "wx/msw/printwin.h"
#include "wx/msw/printdlg.h" // RJL used Windows dialog?s
#include "wx/msw/printdlg.h"
#include "wx/msw/private.h"
#include <stdlib.h>
@ -368,7 +368,7 @@ void wxWindowsPrintPreview::DetermineScaling()
int logPPIPrinterX;
int logPPIPrinterY;
wxRect paperRect;
wxRect paperRect;
if ( printerDC.Ok() )
{
@ -380,7 +380,7 @@ void wxWindowsPrintPreview::DetermineScaling()
logPPIPrinterX = ::GetDeviceCaps(dc, LOGPIXELSX);
logPPIPrinterY = ::GetDeviceCaps(dc, LOGPIXELSY);
paperRect = printerDC.GetPaperRect();
paperRect = printerDC.GetPaperRect();
if ( logPPIPrinterX == 0 ||
logPPIPrinterY == 0 ||
@ -400,7 +400,7 @@ void wxWindowsPrintPreview::DetermineScaling()
logPPIPrinterX = 600;
logPPIPrinterY = 600;
paperRect = wxRect(0, 0, printerXRes, printerYRes);
paperRect = wxRect(0, 0, printerXRes, printerYRes);
m_isOk = false;
}
m_pageWidth = printerXRes;

View File

@ -125,7 +125,7 @@ public:
wxHeaderSortIconType sortArrow = wxHDR_SORT_ICON_NONE,
wxHeaderButtonParams* params = NULL);
virtual int GetHeaderButtonHeight(wxWindow *win);
virtual void DrawTreeItemButton(wxWindow *win,
wxDC& dc,
const wxRect& rect,
@ -333,7 +333,7 @@ wxRendererXP::DrawHeaderButton(wxWindow *win,
// NOTE: Using the theme to draw HP_HEADERSORTARROW doesn't do anything.
// Why? If this can be fixed then draw the sort arrows using the theme
// and then clear those flags before calling DrawHeaderButtonContents.
// Add any extras that are specified in flags and params
return DrawHeaderButtonContents(win, dc, rect, flags, sortArrow, params);
}
@ -347,10 +347,10 @@ wxRendererXP::GetHeaderButtonHeight(wxWindow *win)
{
return m_rendererNative.GetHeaderButtonHeight(win);
}
HRESULT hr;
int value = -1;
hr = wxUxThemeEngine::Get()->GetThemeMetric( hTheme,
NULL,
HP_HEADERITEM,

View File

@ -257,7 +257,7 @@ void wxSpinButton::SetValue(int val)
}
void wxSpinButton::NormalizeValue()
{
{
SetValue( GetValue() );
}

View File

@ -1073,7 +1073,7 @@ bool wxToolBar::Realize()
{
// if not set yet, have one column
m_maxRows = 1;
SetRows(m_nButtons);
SetRows(m_nButtons);
}
InvalidateBestSize();
@ -1340,7 +1340,7 @@ void wxToolBar::SetToolNormalBitmap( int id, const wxBitmap& bitmap )
tool->SetNormalBitmap(bitmap);
Realize();
}
}
}
void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
@ -1352,7 +1352,7 @@ void wxToolBar::SetToolDisabledBitmap( int id, const wxBitmap& bitmap )
tool->SetDisabledBitmap(bitmap);
Realize();
}
}
}
// ----------------------------------------------------------------------------

View File

@ -5779,7 +5779,7 @@ static inline bool wxIsKeyDown(WXWORD vk)
switch (vk)
{
case VK_LBUTTON:
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON;
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_RBUTTON;
break;
case VK_RBUTTON:
if (GetSystemMetrics(SM_SWAPBUTTON)) vk = VK_LBUTTON;