2017-03-02 14:37:32 +00:00
|
|
|
using Gtk;
|
|
|
|
|
|
|
|
using Dino.Entities;
|
|
|
|
|
2017-03-10 17:07:28 +00:00
|
|
|
namespace Dino.Ui {
|
|
|
|
|
2017-12-03 18:42:15 +00:00
|
|
|
[GtkTemplate (ui = "/im/dino/Dino/conversation_list_titlebar.ui")]
|
2019-01-27 14:24:58 +00:00
|
|
|
public class ConversationListTitlebar : Gtk.Box {
|
2017-03-02 14:37:32 +00:00
|
|
|
|
2017-03-10 17:07:28 +00:00
|
|
|
[GtkChild] private MenuButton add_button;
|
2019-01-27 14:24:58 +00:00
|
|
|
[GtkChild] private MenuButton menu_button;
|
2017-03-02 14:37:32 +00:00
|
|
|
|
|
|
|
private StreamInteractor stream_interactor;
|
|
|
|
|
2017-05-30 20:47:16 +00:00
|
|
|
public ConversationListTitlebar(StreamInteractor stream_interactor, Window window) {
|
2017-03-02 14:37:32 +00:00
|
|
|
this.stream_interactor = stream_interactor;
|
2017-05-30 20:47:16 +00:00
|
|
|
create_add_menu(window);
|
2017-03-02 14:37:32 +00:00
|
|
|
}
|
|
|
|
|
2017-03-03 18:22:45 +00:00
|
|
|
private void create_add_menu(Window window) {
|
2019-01-27 14:24:58 +00:00
|
|
|
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);
|
2017-03-02 14:37:32 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-05-09 12:53:26 +00:00
|
|
|
}
|