aboutsummaryrefslogtreecommitdiff
path: root/src/header.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/header.cc')
-rw-r--r--src/header.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/header.cc b/src/header.cc
index d018ad5..b05e0dd 100644
--- a/src/header.cc
+++ b/src/header.cc
@@ -44,6 +44,7 @@ Header::Header(ReaderView *reader, Gtk::Window *window)
Header::~Header() {}
void Header::updateButtons() {
+ reader->refresh();
back.set_sensitive(reader->getChapter() > 1);
forward.set_sensitive(reader->getChapter() < reader->getChapterMax());
if(reader->getBook() == "") {
@@ -96,7 +97,7 @@ void Header::updateMenus() {
swr->add(*boxr);
swr->set_propagate_natural_width(true);
swr->set_min_content_height(300);
- for(int chapter = 1; chapter <= reader->getChapterMax(); chapter++) {
+ for(unsigned int chapter = 1; chapter <= reader->getChapterMax(); chapter++) {
Gtk::Button *item = Gtk::manage(new Gtk::Button(std::to_string(chapter)));
item->set_relief(Gtk::ReliefStyle::RELIEF_NONE);
item->signal_clicked().connect([chapter, this]() {
@@ -159,7 +160,6 @@ void Header::updateMenus() {
item->signal_clicked().connect([version, this]() {
menuMenu.popdown();
libbible::settingsWrite("biblereader::currMod", version);
- this->reader->refresh();
updateButtons();
updateMenus();
showText();
@@ -170,7 +170,6 @@ void Header::updateMenus() {
delVersion->signal_clicked().connect([version, this]() {
menuMenu.popdown();
libbible::uninstallMod(version);
- reader->refresh();
updateButtons();
updateMenus();
});
@@ -180,7 +179,7 @@ void Header::updateMenus() {
hbox->add(*item);
hbox->add(*delVersion);
versionBox->add(*hbox);
- item->set_sensitive(version != reader->getVersion());
+ item->set_sensitive(version != libbible::settingsRead("biblereader::currMod"));
}
Gtk::Button *add = Gtk::manage(new Gtk::Button);
add->set_image_from_icon_name("list-add-symbolic");