protected override bool OnExposeEvent (Gdk.EventExpose evnt)
{
if (need_resort) {
need_resort = false;
// Resort the tree store. This is performed in an event handler
// known not to conflict with gtk_tree_view_bin_expose() to prevent
// errors about corrupting the TreeView's internal state.
foreach (Source dsource in ServiceManager.SourceManager.Sources) {
TreeIter iter = store.FindSource (dsource);
if (!TreeIter.Zero.Equals (iter) &&
(int)store.GetValue (iter, (int)SourceModel.Columns.Order) != dsource.Order)
{
store.SetValue (iter, (int)SourceModel.Columns.Order, dsource.Order);
}
}
QueueDraw ();
}
try {
cr = Gdk.CairoHelper.Create (evnt.Window);
base.OnExposeEvent (evnt);
if (Hyena.PlatformDetection.IsMeeGo) {
theme.DrawFrameBorder (cr, new Gdk.Rectangle (0, 0,
Allocation.Width, Allocation.Height));
}
return true;
} finally {
CairoExtensions.DisposeContext (cr);
cr = null;
}
}