private void UpdateSources()
{
int count = 0;
foreach (var source in ServiceManager.SourceManager.Sources) {
if (!ShouldShowSource (source)) {
continue;
}
SourceLabel label = null;
if (count < labels.Count) {
label = labels[count];
} else {
labels.Add (label = new SourceLabel ());
PackStart (label, false, false, 0);
label.Show ();
}
label.Source = source;
count++;
}
for (int i = count; i < labels.Count; i++) {
Remove (labels[i]);
}
labels.RemoveRange (count, labels.Count - count);
}