diff options
author | Your Name <you@example.com> | 2022-04-19 17:29:34 -0400 |
---|---|---|
committer | Your Name <you@example.com> | 2022-04-19 17:29:34 -0400 |
commit | 7fc9d0c19efb22cb02af7f34c8473c960ec2d02e (patch) | |
tree | f681ac174f584996734f0c97acca25cdf4b925d5 /src/header.cc | |
parent | ff7307324ce69f3d55aa935db5aa0f1802785115 (diff) | |
download | biblereader-7fc9d0c19efb22cb02af7f34c8473c960ec2d02e.tar.gz biblereader-7fc9d0c19efb22cb02af7f34c8473c960ec2d02e.tar.bz2 biblereader-7fc9d0c19efb22cb02af7f34c8473c960ec2d02e.zip |
Code refactoring
Diffstat (limited to 'src/header.cc')
-rw-r--r-- | src/header.cc | 10 |
1 files changed, 5 insertions, 5 deletions
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<string> versions = reader->getAllVersions(); + vector<string> 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<std::string> 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(); } |