Nicer app menu
This commit is contained in:
@@ -30,7 +30,7 @@ public class ConversationListView : Adw.Bin
|
||||
var conversation_row = (ConversationRow?) row;
|
||||
if (conversation_row != null) {
|
||||
selected_conversation_guid = conversation_row.conversation.guid;
|
||||
|
||||
|
||||
Conversation conversation = conversation_model.get_conversation(selected_conversation_guid);
|
||||
conversation_selected(conversation);
|
||||
}
|
||||
@@ -42,9 +42,15 @@ public class ConversationListView : Adw.Bin
|
||||
|
||||
// Setup application menu
|
||||
var app_menu = new Menu ();
|
||||
app_menu.append ("Refresh", "list.refresh");
|
||||
app_menu.append ("Settings...", "win.settings");
|
||||
app_menu.append ("Quit", "app.quit");
|
||||
|
||||
var section = new Menu ();
|
||||
section.append ("Refresh", "list.refresh");
|
||||
section.append ("Settings...", "win.settings");
|
||||
app_menu.append_section (null, section);
|
||||
|
||||
section = new Menu ();
|
||||
section.append ("Quit", "app.quit");
|
||||
app_menu.append_section (null, section);
|
||||
|
||||
var refresh_action = new SimpleAction("refresh", null);
|
||||
refresh_action.activate.connect (() => {
|
||||
@@ -59,6 +65,8 @@ public class ConversationListView : Adw.Bin
|
||||
|
||||
var menu_button = new Gtk.MenuButton ();
|
||||
menu_button.menu_model = app_menu;
|
||||
menu_button.primary = true;
|
||||
menu_button.icon_name = "open-menu-symbolic";
|
||||
header_bar.pack_end (menu_button);
|
||||
|
||||
// Set up model and bind to list
|
||||
|
||||
Reference in New Issue
Block a user