Skip to content

Commit 0dc77a6

Browse files
#1261 confine display chapter N to bibles; set option for it correctly.
1 parent 8cfcda2 commit 0dc77a6

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

src/gtk/menu_popup.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1760,7 +1760,8 @@ G_MODULE_EXPORT void _add_and_check_global_opts(GladeXML *gxml,
17601760

17611761
item = UI_GET_ITEM(gxml, "chapter_N");
17621762

1763-
if (ops->display_chapter_N != -1) {
1763+
if ((main_get_mod_type(mod_name) == TEXT_TYPE) &&
1764+
(ops->display_chapter_N != -1)) {
17641765
gtk_widget_show(item);
17651766
gtk_check_menu_item_set_active(GTK_CHECK_MENU_ITEM(item),
17661767
ops->display_chapter_N);

src/main/global_ops.cc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,8 @@ GLOBAL_OPS *main_new_globals(const gchar *mod_name)
237237
(module_options[mod_name]["Cross-references"] != "Off");
238238
ops->xrefnotenumbers =
239239
(module_options[mod_name]["XrefNoteNumbers"] != "Off");
240+
ops->display_chapter_N =
241+
(module_options[mod_name]["Display Chapter N"] != "Off");
240242

241243
// more special case default on: heb/grk support.
242244
ops->greekaccents =
@@ -273,11 +275,6 @@ GLOBAL_OPS *main_new_globals(const gchar *mod_name)
273275
? -1 // "unknown"; otherwise, it's like the others.
274276
: gui_of2tf(module_options[mod_name]["Respect Font Faces"].c_str());
275277

276-
ops->display_chapter_N =
277-
(*(module_options[mod_name]["Display Chapter N"].c_str()) == '\0')
278-
? 1 // unspecified means "on"
279-
: gui_of2tf(module_options[mod_name]["Display Chapter N"].c_str());
280-
281278
// special case, xiphos-specific feature: commentary whole chapter.
282279
ops->commentary_by_chapter =
283280
((backend->module_type(mod_name) == COMMENTARY_TYPE) &&

0 commit comments

Comments
 (0)