implement refresh method for update

This commit is contained in:
yggverse 2024-09-08 04:24:21 +03:00
parent d869b4b3e7
commit fac8c14cbd
3 changed files with 18 additions and 3 deletions

View File

@ -107,7 +107,7 @@ void Navigation::refresh(
navigationHistory->refresh();
// Toggle update button sensibility
navigationUpdate->set_sensitive(
navigationUpdate->refresh(
navigationRequest->get_text_length() > 0
);

View File

@ -17,10 +17,9 @@ Update::Update(
_("Update")
);
/* @TODO
set_sensitive(
false
); */
);
signal_clicked().connect(
[this]
@ -28,4 +27,16 @@ Update::Update(
action__update->activate();
}
);
}
void Update::refresh(
const bool & ENABLED
) {
set_sensitive(
ENABLED
);
action__update->set_enabled(
ENABLED
);
}

View File

@ -17,6 +17,10 @@ namespace app::browser::main::tab::page::navigation
Update(
const Glib::RefPtr<Gio::SimpleAction> & ACTION__UPDATE
);
void refresh(
const bool & ENABLED
);
};
}