mirror of
https://gitlab.gnome.org/GNOME/gitg
synced 2024-08-27 20:09:23 +00:00
Add deselected signal
This commit is contained in:
parent
a3c3b5caed
commit
7c6b1f640e
|
@ -267,6 +267,10 @@ namespace GitgCommit
|
|||
private void build_ui()
|
||||
{
|
||||
d_main = new Paned();
|
||||
|
||||
d_main.sidebar.deselected.connect(() => {
|
||||
d_main.diff_view.diff = null;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -356,6 +356,8 @@ public class Sidebar : Gtk.TreeView
|
|||
[GtkChild (name = "renderer_text")]
|
||||
private SidebarRendererText d_renderer_text;
|
||||
|
||||
public signal void deselected();
|
||||
|
||||
construct
|
||||
{
|
||||
d_column.set_cell_data_func(d_renderer_header, (layout, cell, model, iter) => {
|
||||
|
@ -416,6 +418,10 @@ public class Sidebar : Gtk.TreeView
|
|||
{
|
||||
model.activate(iter, 1);
|
||||
}
|
||||
else
|
||||
{
|
||||
deselected();
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue