From 7fc9d0c19efb22cb02af7f34c8473c960ec2d02e Mon Sep 17 00:00:00 2001 From: Your Name Date: Tue, 19 Apr 2022 17:29:34 -0400 Subject: Code refactoring --- src/header.cc | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src/header.cc') diff --git a/src/header.cc b/src/header.cc index c40e44e..69e0742 100644 --- a/src/header.cc +++ b/src/header.cc @@ -10,7 +10,7 @@ Header::Header(ReaderView *reader, Gtk::Window *window) this->reader = reader; this->window = window; set_show_close_button(true); - set_title ("Bible Reader"); + set_title("Bible Reader"); set_has_subtitle(false); //this->override_background_color(*(new Gdk::RGBA("#1d1f21"))); //this->override_color(*(new Gdk::RGBA("#c5c8c6"))); @@ -143,7 +143,7 @@ void Header::updateMenus() { }); versionBox->add(*scale); - vector versions = reader->getAllVersions(); + vector versions = libbible::getModuleNames(); if(versions.size() > 8) { Gtk::ScrolledWindow *sw = Gtk::manage(new Gtk::ScrolledWindow); sw->set_propagate_natural_width(true); @@ -158,7 +158,8 @@ void Header::updateMenus() { item->set_relief(Gtk::ReliefStyle::RELIEF_NONE); item->signal_clicked().connect([version, this]() { menuMenu.popdown(); - this->reader->setVersion(version); + libbible::settingsWrite("biblereader::currMod", version); + this->reader->refresh(); updateButtons(); updateMenus(); showText(); @@ -170,7 +171,7 @@ void Header::updateMenus() { menuMenu.popdown(); std::vector toDel {version}; this->mods->uninstallMods(toDel); - reader->modsUpdated(); + reader->refresh(); updateButtons(); updateMenus(); }); @@ -205,6 +206,5 @@ void Header::showMods() { void Header::showText() { window->remove(); window->add(*this->reader); - //this->reader->setChapter(1); window->show_all_children(); } -- cgit v1.2.3