- added support for GNU/Hurd in configure
- wxLocale::Init now tries to set .utf8 locale in Unicode mode (Andreas Pflug)
+Generic controls:
+
+- implemented wxListCtrl::Refresh() (Norbert Berzen)
+- support adding/removing columns dynamically (Donald C. Taylor)
+
wxGTK:
- added support for label mnemonics to GTK+2 build (Michael Moss)
- added wxTextCtrl::SetSelection implementation for GTK+ 2
- fixed wxTextCtrl::IsEditable() for GTK+ 2
- don't consume 100% CPU when showing a poup menu
-- implemented wxListCtrl::Refresh() (Norbert Berzen)
wxMac:
m_dirty = TRUE;
m_columns.DeleteNode( node );
+ if ( !IsVirtual() )
+ {
+ // update all the items
+ for ( size_t i = 0; i < m_lines.GetCount(); i++ )
+ {
+ wxListLineData * const line = GetLine(i);
+ wxListItemDataList::Node *n = line->m_items.Item( col );
+ line->m_items.DeleteNode(n);
+ }
+ }
+
// invalidate it as it has to be recalculated
m_headerWidth = 0;
}
{
if (item.m_width == wxLIST_AUTOSIZE_USEHEADER)
item.m_width = GetTextLength( item.m_text );
+
wxListHeaderData *column = new wxListHeaderData( item );
- if ((col >= 0) && (col < (int)m_columns.GetCount()))
+ bool insert = (col >= 0) && ((size_t)col < m_columns.GetCount());
+ if ( insert )
{
wxListHeaderDataList::Node *node = m_columns.Item( col );
m_columns.Insert( node, column );
m_columns.Append( column );
}
+ if ( !IsVirtual() )
+ {
+ // update all the items
+ for ( size_t i = 0; i < m_lines.GetCount(); i++ )
+ {
+ wxListLineData * const line = GetLine(i);
+ wxListItemData * const data = new wxListItemData(this);
+ if ( insert )
+ line->m_items.Insert(col, data);
+ else
+ line->m_items.Append(data);
+ }
+ }
+
// invalidate it as it has to be recalculated
m_headerWidth = 0;
}