mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-04 21:16:52 +00:00
Add getting references from ref action interface
This commit is contained in:
parent
5145fbc805
commit
80360ef458
3 changed files with 25 additions and 0 deletions
|
@ -35,6 +35,11 @@ class ActionInterface : Object, GitgExt.RefActionInterface
|
|||
d_refs_list = refs_list;
|
||||
}
|
||||
|
||||
public Gee.List<Gitg.Ref> references
|
||||
{
|
||||
owned get { return d_refs_list.references; }
|
||||
}
|
||||
|
||||
public void add_ref(Gitg.Ref reference)
|
||||
{
|
||||
application.repository.clear_refs_cache();
|
||||
|
|
|
@ -555,6 +555,25 @@ public class RefsList : Gtk.ListBox
|
|||
SettingsBindFlags.GET | SettingsBindFlags.SET);
|
||||
}
|
||||
|
||||
public Gee.List<Gitg.Ref> references
|
||||
{
|
||||
owned get
|
||||
{
|
||||
var ret = new Gee.LinkedList<Gitg.Ref>();
|
||||
|
||||
@foreach((child) => {
|
||||
var row = child as RefRow;
|
||||
|
||||
if (row != null && row.reference != null)
|
||||
{
|
||||
ret.add(row.reference);
|
||||
}
|
||||
});
|
||||
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
public string reference_sort_order
|
||||
{
|
||||
get
|
||||
|
|
|
@ -25,6 +25,7 @@ public delegate void RefNameEditingDone(string new_name, bool cancelled);
|
|||
public interface RefActionInterface : Object
|
||||
{
|
||||
public abstract Application application { owned get; construct set; }
|
||||
public abstract Gee.List<Gitg.Ref> references { owned get; }
|
||||
|
||||
public abstract void add_ref(Gitg.Ref reference);
|
||||
public abstract void remove_ref(Gitg.Ref reference);
|
||||
|
|
Loading…
Reference in a new issue