mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Notify the navigation when repository changes
This commit is contained in:
parent
47f6acdd33
commit
01b8ee2ccc
|
@ -93,6 +93,17 @@ namespace GitgHistory
|
|||
populate(d_repository);
|
||||
}
|
||||
|
||||
[Notify]
|
||||
public Gitg.Repository repository
|
||||
{
|
||||
get { return d_repository; }
|
||||
set
|
||||
{
|
||||
d_repository = value;
|
||||
reload();
|
||||
}
|
||||
}
|
||||
|
||||
private static int sort_refs(Gitg.Ref a, Gitg.Ref b)
|
||||
{
|
||||
return a.parsed_name.shortname.ascii_casecmp(b.parsed_name.shortname);
|
||||
|
@ -399,6 +410,12 @@ namespace GitgHistory
|
|||
d_callbacks.length = 0;
|
||||
}
|
||||
|
||||
public void reload()
|
||||
{
|
||||
clear();
|
||||
populate(d_repository);
|
||||
}
|
||||
|
||||
public void activate(Gtk.TreeIter iter, int numclick)
|
||||
{
|
||||
uint oid;
|
||||
|
|
|
@ -186,6 +186,9 @@ namespace GitgHistory
|
|||
d_navigation.model.ref_activated.connect((r) => {
|
||||
on_ref_activated(d_navigation.model, r);
|
||||
});
|
||||
|
||||
application.bind_property("repository", d_navigation.model, "repository", BindingFlags.DEFAULT);
|
||||
|
||||
d_navigation.set_show_expanders(d_navigation.model.show_expanders);
|
||||
if (d_navigation.model.show_expanders)
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue