Delay populating recent info until dash is shown

This commit is contained in:
Jesse van den Kieboom 2015-12-31 01:32:13 +01:00
parent 67e5877849
commit f490f980a4
2 changed files with 12 additions and 7 deletions

View file

@ -249,6 +249,13 @@ class DashView : Gtk.Grid, GitgExt.UIElement, GitgExt.Activity, GitgExt.Selectab
// Translators: the two %s will be used to create a link to the author dialog.
d_label_profile.label = _("In the mean time, you may want to %sset up your git profile%s.").printf("<a href=\"setup-profile\">", "</a>");
update_setup_profile_visibility();
var whenMapped = new Gitg.WhenMapped(this);
whenMapped.update(() => {
d_repository_list_box.populate_recent();
whenMapped = null;
});
}
private void update_setup_profile_visibility()

View file

@ -317,13 +317,6 @@ namespace Gitg
show();
set_selection_mode(Gtk.SelectionMode.NONE);
var whenMapped = new Gitg.WhenMapped(this);
whenMapped.update(() => {
add_recent_info();
whenMapped = null;
});
}
private void update_header(Gtk.ListBoxRow row, Gtk.ListBoxRow? before)
@ -341,6 +334,11 @@ namespace Gitg
return - ((Row)a).time.compare(((Row)b).time);
}
public void populate_recent()
{
add_recent_info();
}
private void add_recent_info()
{
var recent_manager = Gtk.RecentManager.get_default();