1392
1388
* GtkWidget * _add_global_opts(const gcahr * module_name)
1401
1397
G_MODULE_EXPORT void _add_and_check_global_opts (GladeXML *gxml,
1402
const gchar * mod_name,
1403
GtkWidget * submenu,
1398
const gchar * mod_name,
1399
GtkWidget * submenu,
1404
1400
DIALOG_DATA * d)
1407
1403
GLOBAL_OPS *ops = NULL;
1410
1406
ops = main_new_globals((gchar*) mod_name, 1);
1412
1408
ops = main_new_globals((gchar*) mod_name, 0);
1415
1411
item = glade_xml_get_widget (gxml, "words_of_christ_in_red");
1416
1412
gtk_widget_hide (item);
1418
1414
if ((main_check_for_global_option ((gchar*) mod_name, "GBFRedLetterWords")) ||
1419
(main_check_for_global_option ((gchar*) mod_name, "OSISRedLetterWords"))) {
1415
(main_check_for_global_option ((gchar*) mod_name, "OSISRedLetterWords"))) {
1420
1416
gtk_widget_show(item);
1421
1417
GTK_CHECK_MENU_ITEM(item)->active = ops->words_in_red;
1424
1420
item = glade_xml_get_widget (gxml, "strong's_numbers");
1425
1421
gtk_widget_hide (item);
1427
1423
if ((main_check_for_global_option((gchar*) mod_name, "GBFStrongs")) ||
1428
1424
(main_check_for_global_option((gchar*) mod_name, "ThMLStrongs")) ||
1429
(main_check_for_global_option((gchar*) mod_name, "OSISStrongs"))) {
1425
(main_check_for_global_option((gchar*) mod_name, "OSISStrongs"))) {
1430
1426
gtk_widget_show(item);
1431
1427
GTK_CHECK_MENU_ITEM(item)->active = ops->strongs;
1434
1430
item = glade_xml_get_widget (gxml, "morphological_tags");
1435
1431
gtk_widget_hide (item);
1437
1433
if (main_check_for_global_option((gchar*) mod_name, "GBFMorph") ||
1438
1434
main_check_for_global_option((gchar*) mod_name, "ThMLMorph") ||
1439
main_check_for_global_option((gchar*) mod_name, "OSISMorph")) {
1435
main_check_for_global_option((gchar*) mod_name, "OSISMorph")) {
1440
1436
gtk_widget_show(item);
1441
1437
GTK_CHECK_MENU_ITEM(item)->active = ops->morphs;
1444
1440
item = glade_xml_get_widget (gxml, "footnotes");
1445
1441
gtk_widget_hide (item);
1447
1443
if (main_check_for_global_option((gchar*) mod_name, "GBFFootnotes") ||
1448
1444
main_check_for_global_option((gchar*) mod_name, "ThMLFootnotes") ||
1449
main_check_for_global_option((gchar*) mod_name, "OSISFootnotes")) {
1445
main_check_for_global_option((gchar*) mod_name, "OSISFootnotes")) {
1450
1446
gtk_widget_show(item);
1451
1447
GTK_CHECK_MENU_ITEM(item)->active = ops->footnotes;
1454
1450
item = glade_xml_get_widget (gxml, "greek_accents");
1455
1451
gtk_widget_hide (item);
1457
if (main_check_for_global_option((gchar*) mod_name, "UTF8GreekAccents")) {
1453
if (main_check_for_global_option((gchar*) mod_name, "UTF8GreekAccents")) {
1458
1454
gtk_widget_show(item);
1459
1455
GTK_CHECK_MENU_ITEM(item)->active = ops->greekaccents;
1462
1458
item = glade_xml_get_widget (gxml, "lemmas");
1463
1459
gtk_widget_hide (item);
1465
1461
if (main_check_for_global_option((gchar*) mod_name, "ThMLLemma") ||
1466
main_check_for_global_option((gchar*) mod_name, "OSISLemma")) {
1462
main_check_for_global_option((gchar*) mod_name, "OSISLemma")) {
1467
1463
gtk_widget_show(item);
1468
1464
GTK_CHECK_MENU_ITEM(item)->active = ops->lemmas;
1471
1467
item = glade_xml_get_widget (gxml, "scripture_cross-references");
1472
1468
gtk_widget_hide (item);
1474
1470
if (main_check_for_global_option((gchar*) mod_name, "ThMLScripref") ||
1475
main_check_for_global_option((gchar*) mod_name, "OSISScripref")) {
1471
main_check_for_global_option((gchar*) mod_name, "OSISScripref")) {
1476
1472
gtk_widget_show(item);
1477
1473
GTK_CHECK_MENU_ITEM(item)->active = ops->scripturerefs;
1480
1476
item = glade_xml_get_widget (gxml, "hebrew_vowel_points");
1481
1477
gtk_widget_hide (item);
1483
if (main_check_for_global_option((gchar*) mod_name, "UTF8HebrewPoints")) {
1479
if (main_check_for_global_option((gchar*) mod_name, "UTF8HebrewPoints")) {
1484
1480
gtk_widget_show(item);
1485
1481
GTK_CHECK_MENU_ITEM(item)->active = ops->hebrewpoints;
1488
1484
item = glade_xml_get_widget (gxml, "hebrew_cantillation");
1489
1485
gtk_widget_hide (item);
1491
if (main_check_for_global_option ((gchar*) mod_name, "UTF8Cantillation")) {
1487
if (main_check_for_global_option ((gchar*) mod_name, "UTF8Cantillation")) {
1492
1488
gtk_widget_show (item);
1493
1489
GTK_CHECK_MENU_ITEM (item)->active = ops->hebrewcant;
1496
1492
item = glade_xml_get_widget (gxml, "headings");
1497
1493
gtk_widget_hide (item);
1499
1495
if (main_check_for_global_option ((gchar*) mod_name, "ThMLHeadings") ||
1500
main_check_for_global_option ((gchar*) mod_name, "OSISHeadings")) {
1496
main_check_for_global_option ((gchar*) mod_name, "OSISHeadings")) {
1501
1497
gtk_widget_show (item);
1502
1498
GTK_CHECK_MENU_ITEM (item)->active = ops->headings;
1505
1501
item = glade_xml_get_widget (gxml, "transliteration");
1506
1502
GTK_CHECK_MENU_ITEM (item)->active = ops->transliteration;
1508
1504
item = glade_xml_get_widget (gxml, "variants");
1509
1505
gtk_widget_hide (item);
1511
if (main_check_for_global_option ((gchar*) mod_name, "ThMLVariants")) {
1507
if (main_check_for_global_option ((gchar*) mod_name, "ThMLVariants")) {
1512
1508
gtk_widget_show (item);
1513
1509
item = glade_xml_get_widget (gxml, "primary_reading");
1514
1510
GTK_CHECK_MENU_ITEM(item)->active = ops->variants_primary;
1517
1513
item = glade_xml_get_widget (gxml, "all_readings");
1518
1514
GTK_CHECK_MENU_ITEM (item)->active = ops->variants_all;
1521
1517
item = glade_xml_get_widget (gxml, "image_content");
1522
1518
gtk_widget_hide (item);
1524
if (ops->image_content != -1) {
1520
if (ops->image_content != -1) {
1525
1521
gtk_widget_show (item);
1526
1522
GTK_CHECK_MENU_ITEM (item)->active = ops->image_content;
1529
1525
item = glade_xml_get_widget (gxml, "respect_font_faces");
1530
1526
gtk_widget_hide (item);
1532
if (ops->respect_font_faces != -1) {
1528
if (ops->respect_font_faces != -1) {
1533
1529
gtk_widget_show(item);
1534
1530
GTK_CHECK_MENU_ITEM (item)->active = ops->respect_font_faces;
1537
1533
item = glade_xml_get_widget (gxml, "commentary_by_chapter");
1538
1534
gtk_widget_hide (item);
1540
1536
if (main_get_mod_type((gchar*) (is_dialog ? d->mod_name : mod_name)) == COMMENTARY_TYPE) {
1541
1537
gtk_widget_show (item);
1542
GTK_CHECK_MENU_ITEM (item)->active = ops->commentary_by_chapter;
1538
GTK_CHECK_MENU_ITEM (item)->active = ops->commentary_by_chapter;
1549
1545
/******************************************************************************
1650
1646
GtkWidget * _create_popup_menu ( const gchar * mod_name, DIALOG_DATA * d)
1652
1648
gchar *glade_file;
1653
1649
GladeXML *gxml;
1654
1650
const gchar *mname = NULL;
1656
1652
glade_file = gui_general_user_file ("xi-menus.glade", FALSE);
1657
1653
g_return_val_if_fail ((glade_file != NULL), NULL);
1659
1655
gxml = glade_xml_new (glade_file, "menu_popup", NULL);
1661
1657
g_free (glade_file);
1662
1658
g_return_val_if_fail ((gxml != NULL), NULL);
1664
1660
GtkWidget *menu = glade_xml_get_widget (gxml, "menu_popup");
1666
1662
GtkWidget *bookmark = glade_xml_get_widget (gxml, "bookmark");
1667
1663
GtkWidget *open = glade_xml_get_widget (gxml, "open_module2"); /* */
1668
1664
GtkWidget *export_ = glade_xml_get_widget (gxml, "export_passage");
1670
1666
GtkWidget *note = glade_xml_get_widget (gxml, "note"); /* */
1671
1667
GtkWidget *mark_verse = glade_xml_get_widget (gxml, "mark_verse"); /* */
1672
1668
GtkWidget *open_edit = glade_xml_get_widget (gxml, "open_in_editor");
1674
1670
GtkWidget *mod_opt_sub = GTK_WIDGET (glade_xml_get_widget (gxml, "module_options1_menu")); /* */
1676
1672
GtkWidget *lookup = glade_xml_get_widget (gxml, "lookup_selection1"); /* */
1677
1673
GtkWidget *lookup_sub = glade_xml_get_widget (gxml, "lookup_selection1_menu");
1678
GtkWidget *unlock = glade_xml_get_widget (gxml, "unlock_this_module");
1674
GtkWidget *unlock = glade_xml_get_widget (gxml, "unlock_this_module");
1679
1675
GtkWidget *book_heading = glade_xml_get_widget (gxml, "display_book_heading");
1680
1676
GtkWidget *chapter_heading = glade_xml_get_widget (gxml, "display_chapter_heading");
1681
1677
GtkWidget *rename_percomm = glade_xml_get_widget (gxml, "rename_perscomm");
1682
1678
GtkWidget *dump_percomm = glade_xml_get_widget (gxml, "dump_perscomm");
1684
1680
GtkWidget *open_sub = gtk_menu_new ();
1685
1681
GtkWidget *note_sub = gtk_menu_new ();
1687
1683
gtk_widget_hide (unlock);
1688
1684
gtk_widget_hide (book_heading);
1689
1685
gtk_widget_hide (export_);
1722
1718
gui_add_mods_2_gtk_menu (PERCOMM_LIST, note_sub,
1723
1719
(GCallback) on_edit_percomm_activate);
1725
case COMMENTARY_TYPE:
1721
case COMMENTARY_TYPE:
1726
1722
gtk_widget_show(book_heading);
1727
gtk_widget_show(chapter_heading);
1723
gtk_widget_show(chapter_heading);
1729
1725
case PERCOM_TYPE:
1730
1726
gtk_widget_show (open_edit);
1731
1727
g_signal_connect (GTK_OBJECT(open_edit),
1733
1729
G_CALLBACK (on_edit_percomm_activate),
1734
(gchar*) (is_dialog ? d->mod_name : mod_name));
1736
gtk_widget_show (rename_percomm);
1737
gtk_widget_show (dump_percomm);
1739
case DICTIONARY_TYPE:
1730
(gchar*) (is_dialog ? d->mod_name : mod_name));
1732
gtk_widget_show (rename_percomm);
1733
gtk_widget_show (dump_percomm);
1735
case DICTIONARY_TYPE:
1745
1741
case PRAYERLIST_TYPE:
1746
1742
gtk_widget_show (open_edit);
1747
1743
g_signal_connect (GTK_OBJECT(open_edit),
1749
1745
G_CALLBACK (on_edit_prayerlist_activate),
1750
(gchar*) (is_dialog ? d->mod_name : mod_name));
1746
(gchar*) (is_dialog ? d->mod_name : mod_name));
1755
1751
gtk_menu_item_set_submenu (GTK_MENU_ITEM (lookup),
1758
1754
gui_add_mods_2_gtk_menu (DICT_DESC_LIST, lookup_sub,
1759
1755
(GCallback) _lookup_selection);
1761
1757
/* = glade_xml_get_widget (gxml, ""); */
1762
1758
_add_and_check_global_opts (gxml,
1763
(char*)(is_dialog ? d->mod_name : mod_name),
1759
(char*)(is_dialog ? d->mod_name : mod_name),
1766
1762
/* connect signals and data */
1767
1763
glade_xml_signal_autoconnect_full