From 6c9e0d2cd48f37b10bbc0d00a47f1fe5e2089f8d Mon Sep 17 00:00:00 2001 From: VKamyshniy Date: Fri, 13 Feb 2015 03:18:49 +0200 Subject: [PATCH] [Summary] Extending XMLing of UI --- gtk2_ardour/waves_dialog.cc | 11 ++++++++++- gtk2_ardour/waves_ui.cc | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/gtk2_ardour/waves_dialog.cc b/gtk2_ardour/waves_dialog.cc index 0aa038801a..d90caa2e87 100644 --- a/gtk2_ardour/waves_dialog.cc +++ b/gtk2_ardour/waves_dialog.cc @@ -103,6 +103,7 @@ WavesDialog::WavesDialog (const std::string& layout_script_file, bool modal, boo double opacity = xml_property (*xml_tree ()->root (), "ui.opacity", 1.0); set_opacity (opacity); + set_modal (xml_property (*xml_tree ()->root (), "ui.dialog.modal", true)); } WavesDialog::~WavesDialog () @@ -121,7 +122,15 @@ void WavesDialog::on_realize () { Gtk::Dialog::on_realize(); - get_window()->set_decorations (Gdk::WMDecoration (Gdk::DECOR_BORDER|Gdk::DECOR_TITLE)); + Gdk::WMDecoration decoration (Gdk::DECOR_BORDER|Gdk::DECOR_TITLE); + if (xml_property (*xml_tree ()->root (), "ui.decor.menu", false)) { + decoration |= Gdk::DECOR_MENU; + } + if (xml_property (*xml_tree ()->root (), "ui.decor.resize", false)) { + decoration |= Gdk::DECOR_RESIZEH; + } + + get_window()->set_decorations (decoration); } bool diff --git a/gtk2_ardour/waves_ui.cc b/gtk2_ardour/waves_ui.cc index 043fdb949e..8134e4fefe 100644 --- a/gtk2_ardour/waves_ui.cc +++ b/gtk2_ardour/waves_ui.cc @@ -1009,7 +1009,7 @@ WavesUI::set_attributes (Gtk::Widget& widget, const XMLNode& definition, const X Gtk::TreeView* tree_view = dynamic_cast (&widget); if (tree_view) { - if (xml_property (definition, "hscroll", styles, false)) { + if (xml_property (definition, "headersvisible", styles, false)) { tree_view->set_headers_visible (true); } }