From b5eecbdec17b7f50586fcc74f319d5605ca0bbbf Mon Sep 17 00:00:00 2001 From: yggverse Date: Wed, 14 Aug 2024 14:59:36 +0300 Subject: [PATCH] refresh navbar elements after init --- src/app/browser/main/tab/data.cpp | 30 +++++++++++-------- .../browser/main/tab/data/navbar/update.cpp | 4 --- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/app/browser/main/tab/data.cpp b/src/app/browser/main/tab/data.cpp index 2564d1c8..3460da95 100644 --- a/src/app/browser/main/tab/data.cpp +++ b/src/app/browser/main/tab/data.cpp @@ -11,19 +11,6 @@ Data::Data() Gtk::Orientation::VERTICAL ); - // Init components - navbar = new data::Navbar(); - - append( - * navbar - ); - - content = new data::Content(); - - append( - * content - ); - // Init actions group action_group = Gio::SimpleActionGroup::create(); @@ -40,6 +27,23 @@ Data::Data() "data", action_group ); + + // Init components + navbar = new data::Navbar(); + + append( + * navbar + ); + + // Refresh children elements view (e.g. buttons sensitivity) + // because of insert_action_group + append here @TODO + navbar->refresh(); + + content = new data::Content(); + + append( + * content + ); } Data::~Data() = default; diff --git a/src/app/browser/main/tab/data/navbar/update.cpp b/src/app/browser/main/tab/data/navbar/update.cpp index 26e36392..73f6973e 100644 --- a/src/app/browser/main/tab/data/navbar/update.cpp +++ b/src/app/browser/main/tab/data/navbar/update.cpp @@ -15,10 +15,6 @@ Update::Update() set_tooltip_text( _("Update") ); - - set_sensitive( - false - ); } Update::~Update() = default;