mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-11-04 23:34:39 +00:00
Add string branch_info to Dash View
This commit is contained in:
parent
e5c30050d0
commit
7f57f1dc6d
2 changed files with 30 additions and 1 deletions
|
@ -40,6 +40,8 @@ namespace Gitg
|
|||
[GtkChild]
|
||||
private Gtk.Label d_branch_label;
|
||||
[GtkChild]
|
||||
private Gtk.Label d_branch_info;
|
||||
[GtkChild]
|
||||
private Gtk.Arrow d_arrow;
|
||||
[GtkChild]
|
||||
private Gtk.Spinner d_spinner;
|
||||
|
@ -58,6 +60,7 @@ namespace Gitg
|
|||
{
|
||||
var head = d_repository.get_head();
|
||||
branch_name = head.parsed_name.shortname;
|
||||
branch_info = "Blah!";
|
||||
}
|
||||
catch {}
|
||||
}
|
||||
|
@ -88,6 +91,12 @@ namespace Gitg
|
|||
set { d_branch_label.set_markup("<small>%s</small>".printf(value)); }
|
||||
}
|
||||
|
||||
public string? branch_info
|
||||
{
|
||||
get { return d_branch_info.get_text(); }
|
||||
set { d_branch_info.set_markup("<small>%s</small>".printf(value)); }
|
||||
}
|
||||
|
||||
public bool loading
|
||||
{
|
||||
get { return d_loading; }
|
||||
|
@ -125,7 +134,7 @@ namespace Gitg
|
|||
|
||||
public Row(string name, string branch_name, bool has_remote)
|
||||
{
|
||||
Object(repository_name: name, branch_name: branch_name, has_remote: has_remote);
|
||||
Object(repository_name: name, branch_name: branch_name, branch_info: branch_info, has_remote: has_remote);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -69,6 +69,26 @@
|
|||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkLabel" id="d_branch_info">
|
||||
<property name="visible">True</property>
|
||||
<property name="can_focus">False</property>
|
||||
<property name="has_focus">False</property>
|
||||
<property name="is_focus">False</property>
|
||||
<property name="halign">start</property>
|
||||
<property name="valign">start</property>
|
||||
<property name="ellipsize">end</property>
|
||||
<style>
|
||||
<class name="dim-label"/>
|
||||
</style>
|
||||
</object>
|
||||
<packing>
|
||||
<property name="left_attach">1</property>
|
||||
<property name="top_attach">1</property>
|
||||
<property name="width">1</property>
|
||||
<property name="height">1</property>
|
||||
</packing>
|
||||
</child>
|
||||
<child>
|
||||
<object class="GtkArrow" id="d_arrow">
|
||||
<property name="visible">True</property>
|
||||
|
|
Loading…
Reference in a new issue