From 5a7ffbc1870aeee52fed3c457817010b608e1e52 Mon Sep 17 00:00:00 2001 From: fiaxh Date: Sun, 27 Jan 2019 15:24:58 +0100 Subject: [PATCH] Move app menu into window, make conversation details dialog directly accessible, no-CSD option for main window --- libdino/src/plugin/registry.vala | 4 +- main/CMakeLists.txt | 4 + main/data/conversation_list_titlebar.ui | 43 +++- main/data/conversation_list_titlebar_csd.ui | 43 ++++ main/data/menu_app.ui | 6 - main/data/theme.css | 8 + main/src/ui/application.vala | 58 +++-- main/src/ui/conversation_list_titlebar.vala | 35 +-- .../ui/conversation_list_titlebar_csd.vala | 37 +++ .../ui/conversation_titlebar/menu_entry.vala | 16 +- .../occupants_entry.vala | 16 +- .../conversation_titlebar/search_entry.vala | 6 +- main/src/ui/conversation_titlebar/view.vala | 100 +++----- .../ui/conversation_titlebar/view_csd.vala | 38 +++ main/src/ui/global_search.vala | 2 +- main/src/ui/occupant_menu/view.vala | 4 +- main/src/ui/unified_window.vala | 242 ++++++------------ main/src/ui/unified_window_controller.vala | 204 +++++++++++++++ main/src/ui/util/helper.vala | 4 + 19 files changed, 565 insertions(+), 305 deletions(-) create mode 100644 main/data/conversation_list_titlebar_csd.ui create mode 100644 main/src/ui/conversation_list_titlebar_csd.vala create mode 100644 main/src/ui/conversation_titlebar/view_csd.vala create mode 100644 main/src/ui/unified_window_controller.vala diff --git a/libdino/src/plugin/registry.vala b/libdino/src/plugin/registry.vala index 9c211a6d..73c28a02 100644 --- a/libdino/src/plugin/registry.vala +++ b/libdino/src/plugin/registry.vala @@ -11,9 +11,9 @@ public class Registry { internal Gee.List notification_populators = new ArrayList(); internal Gee.Collection conversation_titlebar_entries = new Gee.TreeSet((a, b) => { if (a.order < b.order) { - return -1; - } else if (a.order > b.order) { return 1; + } else if (a.order > b.order) { + return -1; } else { return 0; } diff --git a/main/CMakeLists.txt b/main/CMakeLists.txt index 0a21d1f0..a0996093 100644 --- a/main/CMakeLists.txt +++ b/main/CMakeLists.txt @@ -32,6 +32,7 @@ set(RESOURCE_LIST chat_input.ui contact_details_dialog.ui conversation_list_titlebar.ui + conversation_list_titlebar_csd.ui global_search.ui conversation_selector/view.ui conversation_selector/chat_row_tooltip.ui @@ -100,6 +101,7 @@ SOURCES src/ui/contact_details/dialog.vala src/ui/contact_details/muc_config_form_provider.vala src/ui/conversation_list_titlebar.vala + src/ui/conversation_list_titlebar_csd.vala src/ui/global_search.vala src/ui/conversation_selector/conversation_row.vala src/ui/conversation_selector/list.vala @@ -115,6 +117,7 @@ SOURCES src/ui/conversation_titlebar/occupants_entry.vala src/ui/conversation_titlebar/search_entry.vala src/ui/conversation_titlebar/view.vala + src/ui/conversation_titlebar/view_csd.vala src/ui/manage_accounts/account_row.vala src/ui/manage_accounts/add_account_dialog.vala src/ui/manage_accounts/dialog.vala @@ -124,6 +127,7 @@ SOURCES src/ui/occupant_menu/view.vala src/ui/settings_dialog.vala src/ui/unified_window.vala + src/ui/unified_window_controller.vala src/ui/util/accounts_combo_box.vala src/ui/util/data_forms.vala src/ui/util/helper.vala diff --git a/main/data/conversation_list_titlebar.ui b/main/data/conversation_list_titlebar.ui index 6c5d2d0a..bc490e4b 100644 --- a/main/data/conversation_list_titlebar.ui +++ b/main/data/conversation_list_titlebar.ui @@ -1,26 +1,49 @@ -