[gitg] Delay populating recent info until dash is shown
- From: Jesse van den Kieboom <jessevdk src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gitg] Delay populating recent info until dash is shown
- Date: Thu, 31 Dec 2015 00:32:32 +0000 (UTC)
commit f490f980a41ca181b706db41a4afe2c786195a77
Author: Jesse van den Kieboom <jessevdk gnome org>
Date: Thu Dec 31 01:32:13 2015 +0100
Delay populating recent info until dash is shown
gitg/gitg-dash-view.vala | 7 +++++++
libgitg/gitg-repository-list-box.vala | 12 +++++-------
2 files changed, 12 insertions(+), 7 deletions(-)
---
diff --git a/gitg/gitg-dash-view.vala b/gitg/gitg-dash-view.vala
index 18089fb..5a41a67 100644
--- a/gitg/gitg-dash-view.vala
+++ b/gitg/gitg-dash-view.vala
@@ -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()
diff --git a/libgitg/gitg-repository-list-box.vala b/libgitg/gitg-repository-list-box.vala
index 29c1110..30b0fdc 100644
--- a/libgitg/gitg-repository-list-box.vala
+++ b/libgitg/gitg-repository-list-box.vala
@@ -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();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]