32 lines
856 B
Vala
32 lines
856 B
Vala
using Adw;
|
|
using Gtk;
|
|
|
|
public class ConversationListView : Adw.Bin
|
|
{
|
|
private Adw.ToolbarView container;
|
|
private ListBox list_box;
|
|
private Adw.HeaderBar header_bar;
|
|
|
|
public ConversationListView () {
|
|
container = new Adw.ToolbarView ();
|
|
set_child (container);
|
|
|
|
list_box = new ListBox ();
|
|
list_box.add_css_class ("boxed-list");
|
|
list_box.set_selection_mode (SelectionMode.SINGLE);
|
|
container.set_content (list_box);
|
|
|
|
header_bar = new Adw.HeaderBar ();
|
|
header_bar.set_title_widget (new Label ("Kordophone"));
|
|
container.add_top_bar (header_bar);
|
|
|
|
// Populate with test data
|
|
for (int i = 0; i < 10; i++) {
|
|
var row = new ActionRow ();
|
|
row.title = "Conversation %d".printf(i);
|
|
list_box.append (row);
|
|
}
|
|
}
|
|
|
|
|
|
} |