blob: abce2a6c3806c990ab135a4a02be2b33a8e50c94 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
using Gtk;
using Dino.Entities;
namespace Dino.Ui {
[GtkTemplate (ui = "/im/dino/Dino/conversation_list_titlebar.ui")]
public class ConversationListTitlebar : Gtk.Box {
public signal void conversation_opened(Conversation conversation);
[GtkChild] private MenuButton add_button;
[GtkChild] private MenuButton menu_button;
private StreamInteractor stream_interactor;
public ConversationListTitlebar(StreamInteractor stream_interactor, Window window) {
this.stream_interactor = stream_interactor;
create_add_menu(window);
}
private void create_add_menu(Window window) {
Builder add_builder = new Builder.from_resource("/im/dino/Dino/menu_add.ui");
MenuModel add_menu_model = add_builder.get_object("menu_add") as MenuModel;
add_button.set_menu_model(add_menu_model);
Builder menu_builder = new Builder.from_resource("/im/dino/Dino/menu_app.ui");
MenuModel menu_menu_model = menu_builder.get_object("menu_app") as MenuModel;
menu_button.set_menu_model(menu_menu_model);
}
}
}
|