pkgsrc-WIP-changes archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
xiphos: got compling and running.
Module Name: pkgsrc-wip
Committed By: Kevin Bloom <kevin.bloom%posteo.net@localhost>
Pushed By: nuclearkev
Date: Tue Mar 11 15:26:22 2025 -0400
Changeset: bd0bdf83e49ea8070b706bdb8d7f39facdf86b54
Added Files:
xiphos/.gt-temp.txt
xiphos/.gt-temp1.txt
xiphos/COMMIT_MSG
xiphos/DESCR
xiphos/Makefile
xiphos/PLIST
xiphos/distinfo
xiphos/patches/patch-CMakeLists.txt
xiphos/patches/patch-cmake_config.h.cmake.in
xiphos/patches/patch-src_backend_module__manager.cc
xiphos/patches/patch-src_editor_editor.c
xiphos/patches/patch-src_editor_webkit__editor.c
Log Message:
xiphos: got compling and running.
As far as I can tell things are working. Going to play with it more
before committing it.
To see a diff of this commit:
https://wip.pkgsrc.org/cgi-bin/gitweb.cgi?p=pkgsrc-wip.git;a=commitdiff;h=bd0bdf83e49ea8070b706bdb8d7f39facdf86b54
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
diffstat:
xiphos/.gt-temp.txt | 8 +
xiphos/.gt-temp1.txt | 8 +
xiphos/COMMIT_MSG | 7 +
xiphos/DESCR | 5 +
xiphos/Makefile | 39 +
xiphos/PLIST | 354 ++++++
xiphos/distinfo | 10 +
xiphos/patches/patch-CMakeLists.txt | 15 +
xiphos/patches/patch-cmake_config.h.cmake.in | 14 +
.../patches/patch-src_backend_module__manager.cc | 24 +
xiphos/patches/patch-src_editor_editor.c | 15 +
xiphos/patches/patch-src_editor_webkit__editor.c | 1313 ++++++++++++++++++++
12 files changed, 1812 insertions(+)
diffs:
diff --git a/xiphos/.gt-temp.txt b/xiphos/.gt-temp.txt
new file mode 100644
index 0000000000..e2c14ad579
--- /dev/null
+++ b/xiphos/.gt-temp.txt
@@ -0,0 +1,8 @@
+On branch master
+Your branch is up to date with 'origin/master'.
+
+Untracked files:
+ (use "git add <file>..." to include in what will be committed)
+ ./
+
+nothing added to commit but untracked files present (use "git add" to track)
diff --git a/xiphos/.gt-temp1.txt b/xiphos/.gt-temp1.txt
new file mode 100644
index 0000000000..a26cb74d44
--- /dev/null
+++ b/xiphos/.gt-temp1.txt
@@ -0,0 +1,8 @@
+On branch master
+Your branch is up to date with 'origin/master'.
+
+Untracked files:
+ (use "git add <file>..." to include in what will be committed)
+1. ./
+
+nothing added to commit but untracked files present (use "git add" to track)
diff --git a/xiphos/COMMIT_MSG b/xiphos/COMMIT_MSG
new file mode 100644
index 0000000000..3ab0c31e03
--- /dev/null
+++ b/xiphos/COMMIT_MSG
@@ -0,0 +1,7 @@
+x11/xiphos: add version 4.2.1
+
+Xiphos is a Bible study application for Linux, UNIX, and Windows
+operating systems. It uses Sword to display Bibles, commentaries,
+dictionary, and other texts and images. Xiphos includes features
+such as, searching, biblesync, bookmarks, parallel study, and
+original language study.
diff --git a/xiphos/DESCR b/xiphos/DESCR
new file mode 100644
index 0000000000..5b7a0b36c9
--- /dev/null
+++ b/xiphos/DESCR
@@ -0,0 +1,5 @@
+Xiphos is a Bible study application for Linux, UNIX, and Windows
+operating systems. It uses Sword to display Bibles, commentaries,
+dictionary, and other texts and images. Xiphos includes features
+such as, searching, biblesync, bookmarks, parallel study, and
+original language study.
diff --git a/xiphos/Makefile b/xiphos/Makefile
new file mode 100644
index 0000000000..657b34c204
--- /dev/null
+++ b/xiphos/Makefile
@@ -0,0 +1,39 @@
+# $NetBSD$
+
+DISTNAME= xiphos-4.2.1
+CATEGORIES= x11
+MASTER_SITES= ${MASTER_SITE_GITHUB:=crosswire/}
+GITHUB_TAG= ${PKGVERSION_NOREV}
+
+MAINTAINER= ktnb%NetBSD.org@localhost
+HOMEPAGE= https://github.com/crosswire/xiphos/
+COMMENT= Bible study tool utilizing the sword framework
+LICENSE= gnu-gpl-v2
+
+USE_PKGLOCALEDIR= yes
+USE_CXX_FEATURES+= c++17
+FORCE_CXX_STD+= c++17
+USE_LANGUAGES= c c++
+
+USE_TOOLS+= pkg-config itstool intltool gettext-tools
+
+CMAKE_ARGS+= -DEPUB=OFF
+CMAKE_ARGS+= -DGTKHTML=ON
+
+.include "../../archivers/minizip/buildlink3.mk"
+.include "../../devel/appstream-glib/buildlink3.mk"
+.include "../../devel/cmake/build.mk"
+.include "../../devel/libuuid/buildlink3.mk"
+.include "../../devel/libgsf/buildlink3.mk"
+.include "../../graphics/hicolor-icon-theme/buildlink3.mk"
+.include "../../net/libsoup/buildlink3.mk"
+.include "../../misc/sword/buildlink3.mk"
+.include "../../textproc/icu/buildlink3.mk"
+.include "../../textproc/enchant2/buildlink3.mk"
+.include "../../textproc/libxml2/buildlink3.mk"
+.include "../../sysutils/desktop-file-utils/buildlink3.mk"
+.include "../../sysutils/dbus-glib/buildlink3.mk"
+.include "../../wip/biblesync/buildlink3.mk"
+.include "../../www/webkit-gtk/buildlink3.mk"
+.include "../../x11/gtk2/buildlink3.mk"
+.include "../../mk/bsd.pkg.mk"
diff --git a/xiphos/PLIST b/xiphos/PLIST
new file mode 100644
index 0000000000..b620c73927
--- /dev/null
+++ b/xiphos/PLIST
@@ -0,0 +1,354 @@
+@comment $NetBSD$
+bin/xiphos
+bin/xiphos-nav
+man/man1/xiphos-nav.1
+man/man1/xiphos.1
+share/appdata/xiphos.appdata.xml
+share/applications/xiphos.desktop
+share/doc/xiphos/AUTHORS
+share/doc/xiphos/COPYING
+share/doc/xiphos/ChangeLog
+share/doc/xiphos/INSTALL.md
+share/doc/xiphos/README.md
+share/doc/xiphos/RELEASE-NOTES
+share/doc/xiphos/TODO
+share/doc/xiphos/Translating-Xiphos.md
+share/doc/xiphos/Writing Xiphos Manual.md
+share/doc/xiphos/Xiphos.ogg
+share/doc/xiphos/i18n reminder for developers.md
+share/doc/xiphos/xiphos-C.epub
+share/doc/xiphos/xiphos-fa.epub
+share/doc/xiphos/xiphos-fr.epub
+share/doc/xiphos/xiphos-it.epub
+share/help/C/xiphos/figures/first_start.png
+share/help/C/xiphos/figures/interface.png
+share/help/C/xiphos/figures/interface_biblepane-options.png
+share/help/C/xiphos/figures/interface_biblepane.png
+share/help/C/xiphos/figures/interface_commentarypane.png
+share/help/C/xiphos/figures/interface_dictionary.png
+share/help/C/xiphos/figures/interface_menubar-view.png
+share/help/C/xiphos/figures/interface_menubar.png
+share/help/C/xiphos/figures/interface_parallel-separate.png
+share/help/C/xiphos/figures/interface_parallel.png
+share/help/C/xiphos/figures/interface_searchpane.png
+share/help/C/xiphos/figures/interface_shortcut.png
+share/help/C/xiphos/figures/interface_sidepane.png
+share/help/C/xiphos/figures/interface_toolbar.png
+share/help/C/xiphos/figures/interface_viewer.png
+share/help/C/xiphos/figures/journal.png
+share/help/C/xiphos/figures/module.png
+share/help/C/xiphos/figures/personal.png
+share/help/C/xiphos/figures/preferences_fonts-color.png
+share/help/C/xiphos/figures/preferences_fonts-misc.png
+share/help/C/xiphos/figures/preferences_general-biblesync.png
+share/help/C/xiphos/figures/preferences_general-misc.png
+share/help/C/xiphos/figures/preferences_modules-misc.png
+share/help/C/xiphos/figures/preferences_modules-parallel.png
+share/help/C/xiphos/figures/search_search.png
+share/help/C/xiphos/figures/studypad.png
+share/help/C/xiphos/figures/sword3.png
+share/help/C/xiphos/figures/sword_config.png
+share/help/C/xiphos/figures/sword_install.png
+share/help/C/xiphos/figures/sword_remove.png
+share/help/C/xiphos/figures/sword_sources.png
+share/help/C/xiphos/figures/xiphos-icon.png
+share/help/C/xiphos/figures/xiphos-trail-icon.png
+share/help/C/xiphos/index.page
+share/help/C/xiphos/legal.xml
+share/help/C/xiphos/xiphos-01-introduction.page
+share/help/C/xiphos/xiphos-02-shortcut-keys.page
+share/help/C/xiphos/xiphos-10-start.page
+share/help/C/xiphos/xiphos-11-interface.page
+share/help/C/xiphos/xiphos-20-modules-introduction.page
+share/help/C/xiphos/xiphos-21-modules-configuration.page
+share/help/C/xiphos/xiphos-22-modules-install.page
+share/help/C/xiphos/xiphos-23-modules-maintenance.page
+share/help/C/xiphos/xiphos-24-modules-third-party.page
+share/help/C/xiphos/xiphos-30-search.page
+share/help/C/xiphos/xiphos-31-advanced-search.page
+share/help/C/xiphos/xiphos-32-search-syntax.page
+share/help/C/xiphos/xiphos-33-original-language.page
+share/help/C/xiphos/xiphos-40-personal-commentary.page
+share/help/C/xiphos/xiphos-41-studypad.page
+share/help/C/xiphos/xiphos-42-journals.page
+share/help/C/xiphos/xiphos-50-preferences-general-settings.page
+share/help/C/xiphos/xiphos-51-preferences-biblesync.page
+share/help/C/xiphos/xiphos-52-preferences-fonts-colors.page
+share/help/C/xiphos/xiphos-53-preferences-modules.page
+share/help/C/xiphos/xiphos-60-online-help.page
+share/help/C/xiphos/xiphos-90-credits.page
+share/help/fa/xiphos/figures/first_start.png
+share/help/fa/xiphos/figures/interface.png
+share/help/fa/xiphos/figures/interface_biblepane-options.png
+share/help/fa/xiphos/figures/interface_biblepane.png
+share/help/fa/xiphos/figures/interface_commentarypane.png
+share/help/fa/xiphos/figures/interface_dictionary.png
+share/help/fa/xiphos/figures/interface_menubar-view.png
+share/help/fa/xiphos/figures/interface_menubar.png
+share/help/fa/xiphos/figures/interface_parallel-separate.png
+share/help/fa/xiphos/figures/interface_parallel.png
+share/help/fa/xiphos/figures/interface_searchpane.png
+share/help/fa/xiphos/figures/interface_shortcut.png
+share/help/fa/xiphos/figures/interface_sidepane.png
+share/help/fa/xiphos/figures/interface_toolbar.png
+share/help/fa/xiphos/figures/interface_viewer.png
+share/help/fa/xiphos/figures/journal.png
+share/help/fa/xiphos/figures/module.png
+share/help/fa/xiphos/figures/personal.png
+share/help/fa/xiphos/figures/preferences_fonts-color.png
+share/help/fa/xiphos/figures/preferences_fonts-misc.png
+share/help/fa/xiphos/figures/preferences_general-biblesync.png
+share/help/fa/xiphos/figures/preferences_general-misc.png
+share/help/fa/xiphos/figures/preferences_modules-misc.png
+share/help/fa/xiphos/figures/preferences_modules-parallel.png
+share/help/fa/xiphos/figures/search_search.png
+share/help/fa/xiphos/figures/studypad.png
+share/help/fa/xiphos/figures/sword3.png
+share/help/fa/xiphos/figures/sword_config.png
+share/help/fa/xiphos/figures/sword_install.png
+share/help/fa/xiphos/figures/sword_remove.png
+share/help/fa/xiphos/figures/sword_sources.png
+share/help/fa/xiphos/figures/xiphos-icon.png
+share/help/fa/xiphos/figures/xiphos-trail-icon.png
+share/help/fa/xiphos/index.page
+share/help/fa/xiphos/legal.xml
+share/help/fa/xiphos/xiphos-01-introduction.page
+share/help/fa/xiphos/xiphos-02-shortcut-keys.page
+share/help/fa/xiphos/xiphos-10-start.page
+share/help/fa/xiphos/xiphos-11-interface.page
+share/help/fa/xiphos/xiphos-20-modules-introduction.page
+share/help/fa/xiphos/xiphos-21-modules-configuration.page
+share/help/fa/xiphos/xiphos-22-modules-install.page
+share/help/fa/xiphos/xiphos-23-modules-maintenance.page
+share/help/fa/xiphos/xiphos-24-modules-third-party.page
+share/help/fa/xiphos/xiphos-30-search.page
+share/help/fa/xiphos/xiphos-31-advanced-search.page
+share/help/fa/xiphos/xiphos-32-search-syntax.page
+share/help/fa/xiphos/xiphos-33-original-language.page
+share/help/fa/xiphos/xiphos-40-personal-commentary.page
+share/help/fa/xiphos/xiphos-41-studypad.page
+share/help/fa/xiphos/xiphos-42-journals.page
+share/help/fa/xiphos/xiphos-50-preferences-general-settings.page
+share/help/fa/xiphos/xiphos-51-preferences-biblesync.page
+share/help/fa/xiphos/xiphos-52-preferences-fonts-colors.page
+share/help/fa/xiphos/xiphos-53-preferences-modules.page
+share/help/fa/xiphos/xiphos-60-online-help.page
+share/help/fa/xiphos/xiphos-90-credits.page
+share/help/fr/xiphos/figures/first_start.png
+share/help/fr/xiphos/figures/interface.png
+share/help/fr/xiphos/figures/interface_biblepane-options.png
+share/help/fr/xiphos/figures/interface_biblepane.png
+share/help/fr/xiphos/figures/interface_commentarypane.png
+share/help/fr/xiphos/figures/interface_dictionary.png
+share/help/fr/xiphos/figures/interface_menubar-view.png
+share/help/fr/xiphos/figures/interface_menubar.png
+share/help/fr/xiphos/figures/interface_parallel-separate.png
+share/help/fr/xiphos/figures/interface_parallel.png
+share/help/fr/xiphos/figures/interface_searchpane.png
+share/help/fr/xiphos/figures/interface_shortcut.png
+share/help/fr/xiphos/figures/interface_sidepane.png
+share/help/fr/xiphos/figures/interface_toolbar.png
+share/help/fr/xiphos/figures/interface_viewer.png
+share/help/fr/xiphos/figures/journal.png
+share/help/fr/xiphos/figures/module.png
+share/help/fr/xiphos/figures/personal.png
+share/help/fr/xiphos/figures/preferences_fonts-color.png
+share/help/fr/xiphos/figures/preferences_fonts-misc.png
+share/help/fr/xiphos/figures/preferences_general-biblesync.png
+share/help/fr/xiphos/figures/preferences_general-misc.png
+share/help/fr/xiphos/figures/preferences_modules-misc.png
+share/help/fr/xiphos/figures/preferences_modules-parallel.png
+share/help/fr/xiphos/figures/search_search.png
+share/help/fr/xiphos/figures/studypad.png
+share/help/fr/xiphos/figures/sword3.png
+share/help/fr/xiphos/figures/sword_config.png
+share/help/fr/xiphos/figures/sword_install.png
+share/help/fr/xiphos/figures/sword_remove.png
+share/help/fr/xiphos/figures/sword_sources.png
+share/help/fr/xiphos/figures/xiphos-icon.png
+share/help/fr/xiphos/figures/xiphos-trail-icon.png
+share/help/fr/xiphos/index.page
+share/help/fr/xiphos/legal.xml
+share/help/fr/xiphos/xiphos-01-introduction.page
+share/help/fr/xiphos/xiphos-02-shortcut-keys.page
+share/help/fr/xiphos/xiphos-10-start.page
+share/help/fr/xiphos/xiphos-11-interface.page
+share/help/fr/xiphos/xiphos-20-modules-introduction.page
+share/help/fr/xiphos/xiphos-21-modules-configuration.page
+share/help/fr/xiphos/xiphos-22-modules-install.page
+share/help/fr/xiphos/xiphos-23-modules-maintenance.page
+share/help/fr/xiphos/xiphos-24-modules-third-party.page
+share/help/fr/xiphos/xiphos-30-search.page
+share/help/fr/xiphos/xiphos-31-advanced-search.page
+share/help/fr/xiphos/xiphos-32-search-syntax.page
+share/help/fr/xiphos/xiphos-33-original-language.page
+share/help/fr/xiphos/xiphos-40-personal-commentary.page
+share/help/fr/xiphos/xiphos-41-studypad.page
+share/help/fr/xiphos/xiphos-42-journals.page
+share/help/fr/xiphos/xiphos-50-preferences-general-settings.page
+share/help/fr/xiphos/xiphos-51-preferences-biblesync.page
+share/help/fr/xiphos/xiphos-52-preferences-fonts-colors.page
+share/help/fr/xiphos/xiphos-53-preferences-modules.page
+share/help/fr/xiphos/xiphos-60-online-help.page
+share/help/fr/xiphos/xiphos-90-credits.page
+share/help/it/xiphos/figures/first_start.png
+share/help/it/xiphos/figures/interface.png
+share/help/it/xiphos/figures/interface_biblepane-options.png
+share/help/it/xiphos/figures/interface_biblepane.png
+share/help/it/xiphos/figures/interface_commentarypane.png
+share/help/it/xiphos/figures/interface_dictionary.png
+share/help/it/xiphos/figures/interface_menubar-view.png
+share/help/it/xiphos/figures/interface_menubar.png
+share/help/it/xiphos/figures/interface_parallel-separate.png
+share/help/it/xiphos/figures/interface_parallel.png
+share/help/it/xiphos/figures/interface_searchpane.png
+share/help/it/xiphos/figures/interface_shortcut.png
+share/help/it/xiphos/figures/interface_sidepane.png
+share/help/it/xiphos/figures/interface_toolbar.png
+share/help/it/xiphos/figures/interface_viewer.png
+share/help/it/xiphos/figures/journal.png
+share/help/it/xiphos/figures/module.png
+share/help/it/xiphos/figures/personal.png
+share/help/it/xiphos/figures/preferences_fonts-color.png
+share/help/it/xiphos/figures/preferences_fonts-misc.png
+share/help/it/xiphos/figures/preferences_general-biblesync.png
+share/help/it/xiphos/figures/preferences_general-misc.png
+share/help/it/xiphos/figures/preferences_modules-misc.png
+share/help/it/xiphos/figures/preferences_modules-parallel.png
+share/help/it/xiphos/figures/search_search.png
+share/help/it/xiphos/figures/studypad.png
+share/help/it/xiphos/figures/sword3.png
+share/help/it/xiphos/figures/sword_config.png
+share/help/it/xiphos/figures/sword_install.png
+share/help/it/xiphos/figures/sword_remove.png
+share/help/it/xiphos/figures/sword_sources.png
+share/help/it/xiphos/figures/xiphos-icon.png
+share/help/it/xiphos/figures/xiphos-trail-icon.png
+share/help/it/xiphos/index.page
+share/help/it/xiphos/legal.xml
+share/help/it/xiphos/xiphos-01-introduction.page
+share/help/it/xiphos/xiphos-02-shortcut-keys.page
+share/help/it/xiphos/xiphos-10-start.page
+share/help/it/xiphos/xiphos-11-interface.page
+share/help/it/xiphos/xiphos-20-modules-introduction.page
+share/help/it/xiphos/xiphos-21-modules-configuration.page
+share/help/it/xiphos/xiphos-22-modules-install.page
+share/help/it/xiphos/xiphos-23-modules-maintenance.page
+share/help/it/xiphos/xiphos-24-modules-third-party.page
+share/help/it/xiphos/xiphos-30-search.page
+share/help/it/xiphos/xiphos-31-advanced-search.page
+share/help/it/xiphos/xiphos-32-search-syntax.page
+share/help/it/xiphos/xiphos-33-original-language.page
+share/help/it/xiphos/xiphos-40-personal-commentary.page
+share/help/it/xiphos/xiphos-41-studypad.page
+share/help/it/xiphos/xiphos-42-journals.page
+share/help/it/xiphos/xiphos-50-preferences-general-settings.page
+share/help/it/xiphos/xiphos-51-preferences-biblesync.page
+share/help/it/xiphos/xiphos-52-preferences-fonts-colors.page
+share/help/it/xiphos/xiphos-53-preferences-modules.page
+share/help/it/xiphos/xiphos-60-online-help.page
+share/help/it/xiphos/xiphos-90-credits.page
+share/icons/hicolor/scalable/apps/xiphos.svg
+share/locale/ar/LC_MESSAGES/xiphos.mo
+share/locale/bg/LC_MESSAGES/xiphos.mo
+share/locale/cs/LC_MESSAGES/xiphos.mo
+share/locale/cy/LC_MESSAGES/xiphos.mo
+share/locale/da/LC_MESSAGES/xiphos.mo
+share/locale/de/LC_MESSAGES/xiphos.mo
+share/locale/en_GB/LC_MESSAGES/xiphos.mo
+share/locale/es/LC_MESSAGES/xiphos.mo
+share/locale/fa/LC_MESSAGES/xiphos.mo
+share/locale/fi/LC_MESSAGES/xiphos.mo
+share/locale/fr/LC_MESSAGES/xiphos.mo
+share/locale/he/LC_MESSAGES/xiphos.mo
+share/locale/hu/LC_MESSAGES/xiphos.mo
+share/locale/it/LC_MESSAGES/xiphos.mo
+share/locale/ja/LC_MESSAGES/xiphos.mo
+share/locale/ko_KR/LC_MESSAGES/xiphos.mo
+share/locale/lt/LC_MESSAGES/xiphos.mo
+share/locale/lv/LC_MESSAGES/xiphos.mo
+share/locale/my/LC_MESSAGES/xiphos.mo
+share/locale/nb/LC_MESSAGES/xiphos.mo
+share/locale/nl/LC_MESSAGES/xiphos.mo
+share/locale/pl/LC_MESSAGES/xiphos.mo
+share/locale/pt/LC_MESSAGES/xiphos.mo
+share/locale/pt_BR/LC_MESSAGES/xiphos.mo
+share/locale/ro/LC_MESSAGES/xiphos.mo
+share/locale/ru/LC_MESSAGES/xiphos.mo
+share/locale/sk/LC_MESSAGES/xiphos.mo
+share/locale/sl/LC_MESSAGES/xiphos.mo
+share/locale/sv/LC_MESSAGES/xiphos.mo
+share/locale/tr/LC_MESSAGES/xiphos.mo
+share/locale/zh_CN/LC_MESSAGES/xiphos.mo
+share/locale/zh_TW/LC_MESSAGES/xiphos.mo
+share/xiphos/about.png
+share/xiphos/arrow_down.png
+share/xiphos/arrow_down_box.png
+share/xiphos/arrow_up.png
+share/xiphos/arrow_up_box.png
+share/xiphos/biblesync-v1-30.png
+share/xiphos/biblesync-v1-50.png
+share/xiphos/biblesync_icon-16.png
+share/xiphos/book_closed.png
+share/xiphos/book_closed_rtol.png
+share/xiphos/book_open.png
+share/xiphos/book_open_rtol.png
+share/xiphos/bookmarks.gtkbuilder
+share/xiphos/bookmarks_old.gtkbuilder
+share/xiphos/chat_icon-16.png
+share/xiphos/dlg-un-16.png
+share/xiphos/dlg-un.png
+share/xiphos/editor_link_dialog.gtkbuilder
+share/xiphos/editor_link_dialog_old.gtkbuilder
+share/xiphos/editor_note.xml
+share/xiphos/editor_studypad.xml
+share/xiphos/epiphany-bookmark-page.png
+share/xiphos/epiphany-bookmarks.png
+share/xiphos/epiphany-secure.png
+share/xiphos/epiphany-unsecure.png
+share/xiphos/export-dialog.gtkbuilder
+share/xiphos/export-dialog_old.gtkbuilder
+share/xiphos/gnome-session.png
+share/xiphos/gnome-sound-properties.png
+share/xiphos/gnome-window-manager.png
+share/xiphos/gnome-windows.png
+share/xiphos/gs2-48x48.ico
+share/xiphos/gs2-48x48.png
+share/xiphos/gs2.xpm
+share/xiphos/indexed-16.png
+share/xiphos/indexed.png
+share/xiphos/init-settings.png
+share/xiphos/languages
+share/xiphos/logo.png
+share/xiphos/mailing_list_icon-16.png
+share/xiphos/markverse.gtkbuilder
+share/xiphos/markverse_old.gtkbuilder
+share/xiphos/module-manager.gtkbuilder
+share/xiphos/module-manager_old.gtkbuilder
+share/xiphos/navbar_versekey.gtkbuilder
+share/xiphos/navbar_versekey_old.gtkbuilder
+share/xiphos/new_tab_button.png
+share/xiphos/prefs.gtkbuilder
+share/xiphos/prefs_old.gtkbuilder
+share/xiphos/search-dialog.gtkbuilder
+share/xiphos/search-dialog_old.gtkbuilder
+share/xiphos/selector-prefs.gtkbuilder
+share/xiphos/selector-prefs_old.gtkbuilder
+share/xiphos/silk-edit-bookmarks.png
+share/xiphos/splash.png
+share/xiphos/sword-big.png
+share/xiphos/sword.png
+share/xiphos/sword3.png
+share/xiphos/sword_icon-16.png
+share/xiphos/translation_icon-16.png
+share/xiphos/tt.png
+share/xiphos/window-close.png
+share/xiphos/xi-menus-popup.gtkbuilder
+share/xiphos/xi-menus-popup_old.gtkbuilder
+share/xiphos/xi-menus.gtkbuilder
+share/xiphos/xi-menus_old.gtkbuilder
+share/xiphos/xi-splash.gtkbuilder
+share/xiphos/xi-splash_old.gtkbuilder
+share/xiphos/xiphos-button-125.png
+share/xiphos/xiphos-x-16.png
+share/xiphos/xiphos.xpm
diff --git a/xiphos/distinfo b/xiphos/distinfo
new file mode 100644
index 0000000000..3bf2bd3d65
--- /dev/null
+++ b/xiphos/distinfo
@@ -0,0 +1,10 @@
+$NetBSD$
+
+BLAKE2s (xiphos-4.2.1.tar.gz) = 544fef5c1324d5296da2ca81b2cfa4bdda41faa6d03660be87382d0c9e3193f1
+SHA512 (xiphos-4.2.1.tar.gz) = 7114a6b953f6f72e03c3e860c7f5b1b505005b95f97456ea9ab3343b559331bd461c6531b9889c372187c7b2089dbdb3ef560eddf1d560b19ace02bd811d7df0
+Size (xiphos-4.2.1.tar.gz) = 28379172 bytes
+SHA1 (patch-CMakeLists.txt) = 91af70f6531b36021fd279ed3befc075716e6f59
+SHA1 (patch-cmake_config.h.cmake.in) = e9628eb343aa9f443b2b4897738decae082849a0
+SHA1 (patch-src_backend_module__manager.cc) = aca4a2153e82a7b0d4de7d554aaa5309d1a586d9
+SHA1 (patch-src_editor_editor.c) = 7eb754d59af682190d2369ca26b4b3ab4cf8a8b5
+SHA1 (patch-src_editor_webkit__editor.c) = 95c2bb3bd3ddd00f411805fe0485c16090678378
diff --git a/xiphos/patches/patch-CMakeLists.txt b/xiphos/patches/patch-CMakeLists.txt
new file mode 100644
index 0000000000..cc49404048
--- /dev/null
+++ b/xiphos/patches/patch-CMakeLists.txt
@@ -0,0 +1,15 @@
+$NetBSD$
+
+cmake can't find the file it's looking for so just ignore it
+
+--- CMakeLists.txt.orig 2020-05-07 12:44:38.000000000 +0000
++++ CMakeLists.txt
+@@ -66,7 +66,7 @@ if(EXISTS "${PROJECT_SOURCE_DIR}/.git")
+ string(REGEX REPLACE "-([0-9]*).*" ".\\1" VERSION "${GIT_VERSION}")
+ file(WRITE ${SOURCE_VERSION_CACHE} "${VERSION}")
+ else()
+- file(STRINGS ${SOURCE_VERSION_CACHE} VERSION)
++# file(STRINGS ${SOURCE_VERSION_CACHE} VERSION)
+ endif()
+
+ # configure project name and version
diff --git a/xiphos/patches/patch-cmake_config.h.cmake.in b/xiphos/patches/patch-cmake_config.h.cmake.in
new file mode 100644
index 0000000000..0000d68ca9
--- /dev/null
+++ b/xiphos/patches/patch-cmake_config.h.cmake.in
@@ -0,0 +1,14 @@
+$NetBSD$
+
+The min requirement for glib is actually 2.26 not what is set
+elsewhere in the project
+
+--- cmake/config.h.cmake.in.orig 2025-03-11 16:54:57.983568227 +0000
++++ cmake/config.h.cmake.in
+@@ -65,3 +65,5 @@
+
+
+ #endif
++
++#define GLIB_VERSION_MIN_REQUIRED (GLIB_VERSION_2_26)
+\ No newline at end of file
diff --git a/xiphos/patches/patch-src_backend_module__manager.cc b/xiphos/patches/patch-src_backend_module__manager.cc
new file mode 100644
index 0000000000..9c011c82f3
--- /dev/null
+++ b/xiphos/patches/patch-src_backend_module__manager.cc
@@ -0,0 +1,24 @@
+$NetBSD$
+
+Force HTTPS to download and query modules
+
+--- src/backend/module_manager.cc.orig 2025-03-11 16:56:46.594281714 +0000
++++ src/backend/module_manager.cc
+@@ -554,13 +554,13 @@ void backend_init_module_mgr_config(void
+
+ SWConfig config(confPath.c_str());
+
+- InstallSource is("FTP");
++ InstallSource is("HTTPS");
+ is.caption = "CrossWire";
+- is.source = "ftp.crosswire.org";
+- is.directory = "/pub/sword/raw";
++ is.source = "www.crosswire.org";
++ is.directory = "/ftpmirror/pub/sword/raw";
+
+ config["General"]["PassiveFTP"] = "true";
+- config["Sources"]["FTPSource"] = is.getConfEnt();
++ config["Sources"]["HTTPSSource"] = is.getConfEnt();
+ config.save();
+
+ InstallSource is_local("DIR");
diff --git a/xiphos/patches/patch-src_editor_editor.c b/xiphos/patches/patch-src_editor_editor.c
new file mode 100644
index 0000000000..446d94b6c2
--- /dev/null
+++ b/xiphos/patches/patch-src_editor_editor.c
@@ -0,0 +1,15 @@
+$NetBSD$
+
+Disable the study pad. It only compiles with webkitgtk 1.x
+
+--- src/editor/editor.c.orig 2025-03-11 17:18:16.782287101 +0000
++++ src/editor/editor.c
+@@ -23,7 +23,7 @@
+ #include <config.h>
+ #endif
+
+-#ifdef USE_WEBKIT_EDITOR
++#ifndef USE_WEBKIT_EDITOR
+
+ /* X keyboard #definitions, to handle shortcuts */
+ /* we must define the categories of #definitions we need. */
diff --git a/xiphos/patches/patch-src_editor_webkit__editor.c b/xiphos/patches/patch-src_editor_webkit__editor.c
new file mode 100644
index 0000000000..de0fcb598b
--- /dev/null
+++ b/xiphos/patches/patch-src_editor_webkit__editor.c
@@ -0,0 +1,1313 @@
+$NetBSD$
+
+Disable the study pad. It only compiles with webkitgtk 1.x. Keep the
+functions so that we can still compile everything else.
+
+--- src/editor/webkit_editor.c.orig 2025-03-11 17:18:34.508841148 +0000
++++ src/editor/webkit_editor.c
+@@ -29,7 +29,6 @@
+ #include <ctype.h>
+
+ #include <glib.h>
+-#include <webkit/webkit.h>
+
+ #include <libintl.h>
+ #include <locale.h>
+@@ -93,7 +92,6 @@ static void
+ on_about_dialog_response(GtkDialog *dialog,
+ gint response_id, gpointer user_data)
+ {
+- gtk_widget_destroy(GTK_WIDGET(dialog));
+ }
+
+ /******************************************************************************
+@@ -115,39 +113,21 @@ on_about_dialog_response(GtkDialog *dialog,
+ G_MODULE_EXPORT void
+ action_about_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- GtkWidget *about;
+- GdkPixbuf *about_logo;
+-
+- about_logo = pixbuf_finder("xiphos-button-125.png", 0, NULL);
+- about = gtk_about_dialog_new();
+-
+- g_signal_connect(about, "response",
+- G_CALLBACK(on_about_dialog_response), NULL);
+- gtk_about_dialog_set_program_name(GTK_ABOUT_DIALOG(about), "WebKit editor, Xiphos");
+- gtk_about_dialog_set_version(GTK_ABOUT_DIALOG(about), (gchar *)VERSION);
+- gtk_about_dialog_set_comments(GTK_ABOUT_DIALOG(about), "Replacement for gtkhtml editor");
+- gtk_about_dialog_set_logo(GTK_ABOUT_DIALOG(about), about_logo);
+- set_window_icon(GTK_WINDOW(about));
+- gtk_widget_show(about);
+ }
+
+ G_MODULE_EXPORT void
+ action_increase_indent_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('Indent', false, false);", e);
+- editor_insert_new_outline_level(e->toolitems.outline_level, e);
+ }
+
+ G_MODULE_EXPORT void
+ action_decrease_indent_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('Outdent', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_insert_rule_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_insert_html("<hr>", e);
+ }
+
+ G_MODULE_EXPORT void
+@@ -158,141 +138,80 @@ action_insert_table_activate_cb(GtkWidget *widget, EDITOR *e)
+ G_MODULE_EXPORT void
+ action_insert_emoticon_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- // This is stupid, if we don't have emoticons working, then we sould
+- // remove the button users see.
+-
+- //script = g_strdup ("document.execCommand('', null, \"\");");
+ }
+
+ G_MODULE_EXPORT void
+ action_insert_image_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- gchar *filename = NULL;
+-
+- GtkWidget *dialog = gtk_file_chooser_dialog_new("Select an image file",
+- NULL,
+- GTK_FILE_CHOOSER_ACTION_OPEN,
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "_Cancel", GTK_RESPONSE_CANCEL,
+- "_OK", GTK_RESPONSE_ACCEPT,
+-#else
+- GTK_STOCK_CANCEL,
+- GTK_RESPONSE_CANCEL,
+- GTK_STOCK_OK, GTK_RESPONSE_ACCEPT,
+-#endif
+- NULL);
+-
+- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
+- filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+- gchar *script = g_strdup_printf("document.execCommand('insertImage', null, '%s');", filename);
+- editor_execute_script(script, e);
+- g_free(script);
+- }
+-
+- if (filename)
+- g_free(filename);
+- gtk_widget_destroy(dialog);
+ }
+
+ G_MODULE_EXPORT void
+ action_insert_outline_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('insertHTML', null, \"<OL CLASS=L1><LI> </LI></OL> \");", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_justify_right_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('justifyright', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_justify_left_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('justifyleft', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_justify_center_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('justifycenter', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_justify_full_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('justifyfull', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_bold_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- if (buttons_state.nochange)
+- return;
+-
+- editor_execute_script("document.execCommand('bold',false,false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_italic_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- //extern BUTTONS_STATE buttons_state;
+- if (buttons_state.nochange)
+- return;
+-
+- editor_execute_script("document.execCommand('italic',false,false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_undo_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('undo',false,false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_redo_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_execute_script("document.execCommand('redo',false,false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_underline_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- //extern BUTTONS_STATE buttons_state;
+- if (buttons_state.nochange)
+- return;
+-
+- editor_execute_script("document.execCommand('underline', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void
+ action_strikethrough_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- //extern BUTTONS_STATE buttons_state;
+- if (buttons_state.nochange)
+- return;
+-
+- editor_execute_script("document.execCommand('strikethrough', false, false);", e);
+ }
+
+ G_MODULE_EXPORT void action_cut_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_cut(e);
+ }
+
+ G_MODULE_EXPORT void
+ action_copy_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- if (editor_copy(e))
+- XI_message(("%s", "copy success"));
+- else
+- XI_message(("%s", "copy failed"));
+ }
+
+ G_MODULE_EXPORT void
+ action_paste_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_paste(e);
+ }
+
+ G_MODULE_EXPORT void
+@@ -303,737 +222,93 @@ action_delete_activate_cb(GtkWidget *widget, EDITOR *e)
+ G_MODULE_EXPORT void
+ action_delete_item_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- if (e->studypad)
+- return;
+-
+- gchar *buf =
+- g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s %s?</span>",
+- _("Are you sure you want to delete the note for"), e->key);
+-
+- if (gui_yes_no_dialog(buf,
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "dialog-warning"
+-#else
+- GTK_STOCK_DIALOG_WARNING
+-#endif
+- )) {
+-
+- main_delete_note(e->module, e->key);
+-
+- /* new empty document from template */
+- gchar *fname = g_build_filename(settings.gSwordDir, "studypad.spt", NULL);
+- XI_message(("action delete item [%s]", fname));
+- gchar *text = inhale_text_from_file(fname);
+- g_free(fname);
+-
+- if (text && strlen(text)) {
+- webkit_web_view_load_string((WebKitWebView *)
+- e->html_widget,
+- text,
+- "application/xhtml+xml", "utf_8",
+- "file://");
+- }
+- if (text)
+- g_free(text);
+- }
+-
+- g_free(buf);
+- e->is_changed = FALSE;
+ }
+
+ void set_button_state(BUTTONS_STATE state, EDITOR *e)
+ {
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- GdkRGBA rgba;
+-#else
+- GdkColor color;
+-#endif
+- gtk_toggle_tool_button_set_active(e->toolitems.bold, state.bold);
+- gtk_toggle_tool_button_set_active(e->toolitems.italic, state.italic);
+- gtk_toggle_tool_button_set_active(e->toolitems.underline, state.underline);
+- gtk_toggle_tool_button_set_active(e->toolitems.strike, state.strike);
+- gtk_combo_box_set_active((GtkComboBox *)e->toolitems.cb, state.style);
+-
+- if (state.color) {
+- XI_message(("state.color: %s", state.color));
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- if (gdk_rgba_parse(&rgba, state.color))
+- gtk_color_chooser_set_rgba((GtkColorChooser *)
+- e->toolitems.color,
+- &rgba);
+-#else
+- if (gdk_color_parse(state.color, &color))
+- gtk_color_button_set_color((GtkColorButton *)
+- e->toolitems.color,
+- &color);
+-#endif
+- }
+ }
+
+ G_MODULE_EXPORT void
+ colorbutton1_color_set_cb(GtkColorButton *widget, EDITOR *e)
+ {
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- GdkRGBA color;
+-#else
+- GdkColor color;
+-#endif
+- gchar *color_str;
+- gchar *forecolor = NULL;
+-
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- gtk_color_chooser_get_rgba((GtkColorChooser *)widget, &color);
+- color_str = gdk_rgba_to_string(&color);
+-#else
+- gtk_color_button_get_color((GtkColorButton *)widget, &color);
+- /* FIXME: ugly need something better */
+- color_str = g_strdup_printf("rgb(%u,%u,%u)", color.red >> 8, color.green >> 8, color.blue >> 8);
+-#endif
+- forecolor = g_strdup_printf("document.execCommand('forecolor', null, '%s');", color_str);
+- editor_execute_script(forecolor, e);
+- g_free(forecolor);
+- g_free(color_str);
+ }
+
+ G_MODULE_EXPORT void
+ colorbutton_highlight_color_set_cb(GtkColorButton *widget, EDITOR *e)
+ {
+-
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- GdkRGBA color;
+-#else
+- GdkColor color;
+-#endif
+- gchar *color_str;
+- gchar *highlightcolor = NULL;
+-
+-#if GTK_CHECK_VERSION(3, 4, 0)
+- gtk_color_chooser_get_rgba((GtkColorChooser *)widget, &color);
+- color_str = gdk_rgba_to_string(&color);
+-#else
+- gtk_color_button_get_color((GtkColorButton *)widget, &color);
+- /* FIXME: ugly need something better */
+- color_str = g_strdup_printf("rgb(%u,%u,%u)", color.red >> 8, color.green >> 8, color.blue >> 8);
+-#endif
+- highlightcolor = g_strdup_printf("document.execCommand('backColor', null, '%s');", color_str);
+- editor_execute_script(highlightcolor, e);
+- g_free(highlightcolor);
+- g_free(color_str);
+-}
+-
+-static gchar *get_font_size_from_name(GString *fontname)
+-{
+- gchar buf[80];
+- gint len, i = 0, j = 0;
+-
+- len = fontname->len;
+- XI_message(("\nlength: %d\n", len));
+- for (i = 0; (i < 79 && i < len); i++) {
+- if (isdigit(fontname->str[i])) {
+- XI_message(("\n\nfontname->str[i]: %c",
+- fontname->str[i]));
+- buf[j] = fontname->str[i];
+- buf[j + 1] = '\0';
+- j++;
+- }
+- }
+- return g_strdup(buf);
+ }
+
+-G_MODULE_EXPORT void
+-action_font_activate_cb(GtkWidget *widget, EDITOR *e)
+-{
+- GtkWidget *dialog;
+- gchar *selected_text = NULL;
+- gchar *size = NULL;
+-#if GTK_CHECK_VERSION(3, 2, 0)
+- dialog = gtk_font_chooser_dialog_new("Select font", NULL);
+- gtk_font_chooser_set_font((GtkFontChooser *)dialog,
+-#else
+- dialog = gtk_font_selection_dialog_new("Select font");
+- gtk_font_selection_dialog_set_font_name((GtkFontSelectionDialog *)
+- dialog,
+-#endif
+- "Droid Sans 14");
+-
+- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
+-#if GTK_CHECK_VERSION(3, 2, 0)
+- const gchar *fontname = gtk_font_chooser_get_font((GtkFontChooser *)dialog);
+-#else
+- const gchar *fontname = gtk_font_selection_dialog_get_font_name((GtkFontSelectionDialog *)dialog);
+-#endif
+- GString *name = g_string_new(fontname);
+- size = get_font_size_from_name(name);
+- g_string_free(name, TRUE);
+-
+- selected_text = editor_get_selected_text(e);
+-#if GTK_CHECK_VERSION(3, 2, 0)
+- PangoFontDescription *font_description =
+- gtk_font_chooser_get_font_desc((GtkFontChooser *)
+- dialog);
+- fontname = pango_font_description_get_family(font_description);
+-#else
+- PangoFontDescription *font_description =
+- pango_font_description_from_string(fontname);
+- fontname = pango_font_description_get_family(font_description);
+-#endif
+-
+- gchar *script = g_strdup_printf("<SPAN STYLE=\"font-family:%s;font-size:%spx;\">%s</SPAN>",
+- fontname, size, selected_text);
+-
+- editor_insert_html(script, e);
+- g_free(script);
+- }
+- if (size)
+- g_free(size);
+- if (selected_text)
+- g_free(selected_text);
+- gtk_widget_destroy(dialog);
+-}
+
+ G_MODULE_EXPORT void
+ find_replace_response_cb(GtkDialog *dialog, gint response_id, EDITOR *e)
+ {
+- switch (response_id) {
+- case GTK_RESPONSE_CANCEL:
+- gtk_widget_hide(find_dialog.window);
+- break;
+- case 1:
+- editor_find_string((gchar *)
+- gtk_entry_get_text(GTK_ENTRY(find_dialog.find_entry)),
+- e);
+- break;
+- case 2:
+- editor_replace_string((gchar *)
+- gtk_entry_get_text(GTK_ENTRY(find_dialog.find_entry)),
+- (gchar *)
+- gtk_entry_get_text(GTK_ENTRY(find_dialog.replace_entry)),
+- e);
+- break;
+- default:
+- gtk_widget_hide(find_dialog.window);
+- break;
+- }
+ }
+
+ G_MODULE_EXPORT void
+ action_find_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- gtk_widget_show(find_dialog.window);
+- gtk_widget_hide(find_dialog.box_replace);
+- gtk_widget_hide(find_dialog.button_replace);
+ }
+
+ G_MODULE_EXPORT void
+ action_replace_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- gtk_widget_show(find_dialog.window);
+- gtk_widget_show(find_dialog.box_replace);
+- gtk_widget_show(find_dialog.button_replace);
+-}
+-
+-static void handle_error(GError **error)
+-{
+- if (*error != NULL) {
+- g_warning("%s", (*error)->message);
+- g_clear_error(error);
+- }
+-}
+-
+-static void do_exit(EDITOR *e)
+-{
+- if (e->filename) {
+- g_free(e->filename);
+- }
+- if (e->module) {
+- g_free(e->module);
+- }
+- if (e->key) {
+- g_free(e->key);
+- }
+- if (e->window)
+- gtk_widget_destroy(e->window);
+- g_free(e);
+-}
+-
+-static void recent_item_cb(GtkRecentChooser *chooser, EDITOR *e)
+-{
+- gchar *file_uri = gtk_recent_chooser_get_current_uri(chooser);
+-
+- XI_message(("file_uri: %s", file_uri));
+- if (e->filename)
+- g_free(e->filename);
+- e->filename = g_strdup(file_uri);
+-
+- //editor_open_recent (file_uri, e);
+- _load_file(e, file_uri);
+- xml_set_value("Xiphos", "studypad", "lastfile", e->filename);
+- settings.studypadfilename = xml_get_value("studypad", "lastfile");
+-
+- change_window_title(e->window, e->filename);
+-}
+-
+-static void change_window_title(GtkWidget *window, const gchar *window_title)
+-{
+- gtk_window_set_title(GTK_WINDOW(window), window_title);
+-}
+-
+-static GtkPrintOperationResult
+-print(WebKitWebView *html, GtkPrintOperationAction action)
+-{
+- GtkPrintOperation *operation;
+- GtkPrintOperationResult result;
+- GError *error = NULL;
+- WebKitWebFrame *frame;
+-
+- frame = webkit_web_view_get_main_frame(html);
+- operation = gtk_print_operation_new();
+-
+- result = webkit_web_frame_print_full(frame, operation, action, &error);
+-
+- g_object_unref(operation);
+- handle_error(&error);
+-
+- return result;
+-}
+-
+-static gint open_dialog(EDITOR *e)
+-{
+- GtkWidget *dialog;
+- gint response;
+-
+- dialog = gtk_file_chooser_dialog_new(_("Open"), GTK_WINDOW(e->window),
+- GTK_FILE_CHOOSER_ACTION_OPEN,
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "_Cancel", GTK_RESPONSE_CANCEL,
+- "_Open", GTK_RESPONSE_ACCEPT,
+-#else
+- GTK_STOCK_CANCEL,
+- GTK_RESPONSE_CANCEL,
+- GTK_STOCK_OPEN,
+- GTK_RESPONSE_ACCEPT,
+-#endif
+- NULL);
+-
+- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog), settings.studypaddir);
+-
+- response = gtk_dialog_run(GTK_DIALOG(dialog));
+-
+- if (response == GTK_RESPONSE_ACCEPT) {
+- gchar *new_filename;
+-
+- new_filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+- _load_file(e, new_filename);
+- g_free(new_filename);
+- }
+-
+- gtk_widget_destroy(dialog);
+-
+- return response;
+ }
+
+ G_MODULE_EXPORT void action_print_cb(GtkAction *action, EDITOR *e)
+ {
+- print(WEBKIT_WEB_VIEW(e->html_widget),
+- GTK_PRINT_OPERATION_ACTION_PRINT_DIALOG);
+ }
+
+ G_MODULE_EXPORT void action_print_preview_cb(GtkAction *action, EDITOR *e)
+ {
+- print(WEBKIT_WEB_VIEW(e->html_widget),
+- GTK_PRINT_OPERATION_ACTION_PREVIEW);
+ }
+
+ G_MODULE_EXPORT void action_quit_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- delete_event(NULL, NULL, e);
+ }
+
+ G_MODULE_EXPORT void action_open_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- open_dialog(e);
+ }
+
+ G_MODULE_EXPORT void action_save_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- switch (e->type) {
+- case STUDYPAD_EDITOR:
+- _save_file(e);
+- break;
+- case NOTE_EDITOR:
+- _save_note(e);
+- break;
+- case BOOK_EDITOR:
+- _save_book(e);
+- break;
+- default:
+- XI_message(("\naction_save_cb oops!\n"));
+- break;
+- }
+ }
+
+ G_MODULE_EXPORT void action_new_activate_cb(GtkWidget *widget, EDITOR *e)
+ { /* for studypad only */
+- gchar *filename = NULL;
+-
+- if (e->is_changed)
+- ask_about_saving(e);
+-
+- filename = g_strdup_printf("%s/%s", settings.gSwordDir, "studypad.spt");
+-
+- _load_file(e, filename);
+-
+- if (e->filename)
+- g_free(e->filename);
+- e->filename = g_strdup(_("Untitled document"));
+-
+- xml_set_value("Xiphos", "studypad", "lastfile", e->filename);
+- settings.studypadfilename = xml_get_value("studypad", "lastfile");
+- change_window_title(e->window, e->filename);
+- e->is_changed = TRUE;
+ }
+
+ G_MODULE_EXPORT void
+ action_insert_sword_link_activate_cb(GtkWidget *widget, gpointer data)
+ {
+- editor_link_dialog(data); //editor_insert_sword_link();
+ }
+
+ G_MODULE_EXPORT void
+ action_insert_link_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- editor_link_dialog(e);
+ }
+
+ G_MODULE_EXPORT void
+ action_save_as_activate_cb(GtkWidget *widget, EDITOR *e)
+ {
+- if (e->filename)
+- g_free(e->filename);
+- e->filename = NULL;
+- _save_file(e);
+ }
+
+ G_MODULE_EXPORT void combo_box_changed_cb(GtkComboBox *widget, EDITOR *e)
+ {
+- gchar *script = NULL;
+- gint choice = gtk_combo_box_get_active(widget);
+- /* we need the line of text where the cursor is */
+- //extern BUTTONS_STATE buttons_state;
+-
+- if (buttons_state.nochange)
+- return;
+-
+- switch (choice) {
+- case 0: /* Normal */
+- script = "document.execCommand('formatBlock', false, \"div\");";
+- break;
+-
+- case 1: /* H1 */
+- script = "document.execCommand('formatBlock', null, \"H1\");";
+- break;
+-
+- case 2: /* H2 */
+- script = "document.execCommand('formatBlock', null, \"H2\");";
+- break;
+-
+- case 3: /* H3 */
+- script = "document.execCommand('formatBlock', null, \"H3\");";
+- break;
+-
+- case 4: /* H4 */
+- script = "document.execCommand('formatBlock', null, \"H4\");";
+- break;
+-
+- case 5: /* H5 */
+- script = "document.execCommand('formatBlock', null, \"H5\");";
+- break;
+-
+- case 6: /* H6 */
+- script = "document.execCommand('formatBlock', null, \"H6\");";
+- break;
+-
+- case 7: /* Address */
+- script = "document.execCommand('formatBlock', null, \"ADDRESS\");";
+- break;
+-
+- case 8: /* Preformatted */
+- script = "document.execCommand('formatBlock', null, \"PRE\");";
+- break;
+-
+- case 9: /* Bulleted List insertUnorderedList */
+- script = "document.execCommand('insertUnorderedList', null, \"\");";
+- break;
+-
+- case 10: /* Roman Numeral List */
+- script = "document.execCommand('insertHTML', null, \"<OL type=I><LI> </LI></OL> \");";
+- break;
+-
+- case 11: /* Numbered List insertOrderedList */
+- script = "document.execCommand('insertOrderedList', null, \"\");";
+- break;
+-
+- case 12: /* Alphabetical List */
+- script = "document.execCommand('insertHTML', null, \"<OL type=A><LI> </LI></OL> \");";
+- break;
+-
+- default:
+- break;
+- }
+-
+- if (script) {
+- XI_message(("%s", script));
+- editor_execute_script(script, e);
+- }
+-}
+-
+-/* need note toolbars when type is note */
+-static GtkWidget *editor_new(const gchar *title, EDITOR *e)
+-{
+- GtkWidget *window;
+- GtkWidget *scrollwindow;
+- GtkWidget *statusbar;
+- GtkBuilder *builder;
+- gchar *gbuilder_file;
+- GError *error = NULL;
+- GtkMenuItem *item;
+- GtkWidget *recent_item;
+-
+- buttons_state.nochange = 1;
+-
+- gbuilder_file = gui_general_user_file(
+-#ifdef USE_GTK_3
+- "gtk_webedit.ui"
+-#else
+- "gtk2_webedit.ui"
+-#endif
+- ,
+- FALSE);
+- builder = gtk_builder_new();
+-
+- if (!gtk_builder_add_from_file(builder, gbuilder_file, &error)) {
+- g_warning("Couldn't load builder file: %s",
+- error->message);
+- g_error_free(error);
+- }
+-
+- window = GTK_WIDGET(gtk_builder_get_object(builder, "window"));
+- e->window = window;
+- gtk_window_set_title(GTK_WINDOW(window), title);
+-
+- statusbar = GTK_WIDGET(gtk_builder_get_object(builder, "statusbar1"));
+- gtk_widget_hide(statusbar);
+-
+- e->toolitems.outline_level = 0;
+- e->toolitems.bold = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_bold"));
+- e->toolitems.italic = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_italic"));
+- e->toolitems.underline = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbuttonunderline"));
+- e->toolitems.strike = GTK_TOGGLE_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_strikethrough"));
+- e->toolitems.open = GTK_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_open"));
+- e->toolitems.newdoc = GTK_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_new"));
+- e->toolitems.deletedoc = GTK_TOOL_BUTTON(gtk_builder_get_object(builder, "toolbutton_delete"));
+- e->toolitems.color = GTK_COLOR_BUTTON(gtk_builder_get_object(builder, "colorbutton1"));
+- e->toolitems.cb = GTK_COMBO_BOX_TEXT(gtk_builder_get_object(builder, "comboboxtext1"));
+-
+- gtk_combo_box_set_active((GtkComboBox *)e->toolitems.cb, 0);
+-
+- item = GTK_MENU_ITEM(gtk_builder_get_object(builder, "menuitem_recent"));
+-
+- switch (e->type) {
+- case STUDYPAD_EDITOR:
+- gtk_widget_hide(GTK_WIDGET(e->toolitems.deletedoc));
+-
+- recent_item = gtk_recent_chooser_menu_new();
+- g_signal_connect(G_OBJECT(recent_item), "item-activated",
+- G_CALLBACK(recent_item_cb), e);
+- gtk_menu_item_set_submenu(item, recent_item);
+- break;
+- case NOTE_EDITOR:
+- gtk_widget_hide(GTK_WIDGET(e->toolitems.open));
+- gtk_widget_hide(GTK_WIDGET(e->toolitems.newdoc));
+- gtk_widget_hide(GTK_WIDGET(item));
+- break;
+- case BOOK_EDITOR:
+- gtk_widget_hide(GTK_WIDGET(e->toolitems.open));
+- gtk_widget_hide(GTK_WIDGET(e->toolitems.newdoc));
+- gtk_widget_hide(GTK_WIDGET(item));
+- break;
+- }
+-
+- e->navbar_box = GTK_WIDGET(gtk_builder_get_object(builder, "box_navbar"));
+- e->box = GTK_WIDGET(gtk_builder_get_object(builder, "vbox1"));
+-
+- scrollwindow = GTK_WIDGET(gtk_builder_get_object(builder, "scrolledwindow1"));
+- create_editor_window(scrollwindow, e);
+- e->is_changed = FALSE;
+-
+- /* This is important */
+- gtk_builder_connect_signals(builder, (EDITOR *)e);
+-
+- find_dialog.window = GTK_WIDGET(gtk_builder_get_object(builder, "dialog_find_replace"));
+- find_dialog.find_entry = GTK_WIDGET(gtk_builder_get_object(builder, "entry1"));
+- find_dialog.replace_entry = GTK_WIDGET(gtk_builder_get_object(builder, "entry2"));
+- find_dialog.box_replace = GTK_WIDGET(gtk_builder_get_object(builder, "box4"));
+- find_dialog.button_replace = GTK_WIDGET(gtk_builder_get_object(builder, "button_replace"));
+-
+- g_object_unref(builder);
+-
+- return window;
+-}
+-
+-static void _save_note(EDITOR *e)
+-{
+- GString *data = g_string_new("");
+-
+- editor_get_document_content(data, e);
+- main_save_note(e->module, e->key, data->str);
+- e->is_changed = FALSE;
+- g_string_free(data, TRUE);
+-}
+-
+-static void _save_book(EDITOR *e)
+-{
+- GString *data = g_string_new("");
+-
+- editor_get_document_content(data, e);
+- main_treekey_save_book_text(e->module, e->key, data->str);
+- e->is_changed = FALSE;
+- g_string_free(data, TRUE);
+-}
+-
+-static void _save_file(EDITOR *e)
+-{
+- GtkRecentManager *rm = NULL;
+- GString *data = g_string_new("");
+-
+- editor_get_document_content(data, e);
+- XI_message(("%s", data->str));
+-
+- if (!e->filename || (0 == g_strcmp0("Untitled document", e->filename)) || g_strrstr(e->filename, ".spt")) {
+- GtkWidget *dialog = gtk_file_chooser_dialog_new("Save as", //const gchar *title,
+- NULL, //GtkWindow *parent,
+- GTK_FILE_CHOOSER_ACTION_SAVE, //GtkFileChooserAction action,
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "_OK",
+- GTK_RESPONSE_OK,
+- "_Cancel",
+- GTK_RESPONSE_CANCEL,
+-#else
+- GTK_STOCK_OK,
+- GTK_RESPONSE_OK,
+- GTK_STOCK_CANCEL,
+- GTK_RESPONSE_CANCEL,
+-#endif
+- NULL);
+- gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);
+-
+- gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
+- settings.studypaddir);
+- if (gtk_dialog_run(GTK_DIALOG(dialog)) == GTK_RESPONSE_OK) {
+- gchar *filename = gtk_file_chooser_get_filename(GTK_FILE_CHOOSER(dialog));
+- e->filename = g_strdup(filename);
+- GFile *gfile = g_file_parse_name(filename);
+- g_file_replace_contents(gfile, data->str, data->len, NULL, TRUE, G_FILE_CREATE_NONE, NULL, NULL, NULL); //GError **error
+- }
+- change_window_title(e->window, e->filename);
+- gtk_widget_destroy(dialog);
+-
+- } else {
+-
+- GFile *gfile = g_file_parse_name(e->filename);
+- g_file_replace_contents(gfile, data->str, data->len, NULL, TRUE, G_FILE_CREATE_NONE, NULL, NULL, NULL); //GError **error
+- }
+-
+- rm = gtk_recent_manager_get_default();
+- gtk_recent_manager_add_item(rm, e->filename);
+-
+- e->is_changed = FALSE;
+- g_string_free(data, TRUE);
+-}
+-
+-static void _load_file(EDITOR *e, const gchar *filename)
+-{
+- char *text = NULL;
+- GtkRecentManager *rm = NULL;
+-
+- rm = gtk_recent_manager_get_default();
+- gtk_recent_manager_add_item(rm, filename);
+-
+- if (e->filename)
+- g_free(e->filename);
+- e->filename = g_strdup(filename);
+-
+- XI_message(("_load_file filename: %s", filename));
+-
+- xml_set_value("Xiphos", "studypad", "lastfile", e->filename);
+- settings.studypadfilename = xml_get_value("studypad", "lastfile");
+-
+- change_window_title(e->window, e->filename);
+- text = inhale_text_from_file(!strncmp(filename, "file:", 5)
+- ? filename + 5
+- : filename);
+-
+- XI_message(("web view load string [%s]", text));
+- webkit_web_view_load_string(WEBKIT_WEB_VIEW(e->html_widget),
+- text, "application/xhtml+xml", "utf_8", "file://");
+-
+- g_free(text);
+- e->is_changed = FALSE;
+ }
+
+ gboolean editor_is_dirty(EDITOR *e)
+ {
+- return e->is_changed;
++ return FALSE;
+ }
+
+ void editor_save_book(EDITOR *e)
+ {
+- if (editor_is_dirty(e))
+- _save_book(e);
+ }
+
+ /* save if needed is done in treeky-editor.c before calling editor_load_book() */
+ void editor_load_book(EDITOR *e)
+ {
+- gchar *title = NULL, *text = NULL;
+-
+- if (!g_ascii_isdigit(e->key[0]))
+- return; /* make sure is a number (offset) */
+-
+- XI_message(("book: %s\noffset :%s", e->module, e->key));
+-
+- if (atol(e->key) != 0)
+- text = main_get_book_raw_text(e->module, e->key);
+- else
+- text = g_strdup(e->module);
+-
+- if ((text == NULL) || strlen(text) == 0) {
+- if (text)
+- g_free(text);
+-
+- /* new empty document from template */
+- gchar *fname = g_build_filename(settings.gSwordDir, "studypad.spt", NULL);
+- XI_message(("editor load BOOK [%s]", fname));
+- text = inhale_text_from_file(fname);
+- g_free(fname);
+- }
+-
+- if (text && strlen(text)) {
+- webkit_web_view_load_string((WebKitWebView *)
+- e->html_widget,
+- text,
+- "application/xhtml+xml", "utf_8",
+- "file://");
+- }
+-
+- if (text)
+- g_free(text);
+-
+- title = g_strdup_printf("%s", e->module);
+- change_window_title(e->window, title);
+- g_free(title);
+-
+- e->is_changed = FALSE;
+ }
+
+ /******************************************************************************
+@@ -1054,281 +329,19 @@ void editor_load_book(EDITOR *e)
+
+ void editor_sync_with_main(void)
+ {
+- GList *tmp = NULL;
+-
+- tmp = g_list_first(editors_all);
+- while (tmp != NULL) {
+- EDITOR *e = (EDITOR *)tmp->data;
+-
+- switch (e->type) {
+- case STUDYPAD_EDITOR:
+- case BOOK_EDITOR:
+- break;
+- case NOTE_EDITOR:
+- if (e->sync)
+- editor_load_note(e, NULL,
+- settings.currentverse);
+- break;
+- }
+- tmp = g_list_next(tmp);
+- }
+ }
+
+ void
+ editor_load_note(EDITOR *e, const gchar *module_name, const gchar *key)
+ {
+- gchar *title = NULL, *text = NULL;
+-
+- if (e->is_changed)
+- _save_note(e);
+-
+- if (module_name) {
+- if (e->module)
+- g_free(e->module);
+- e->module = g_strdup(module_name);
+- }
+- if (key) {
+- if (e->key)
+- g_free(e->key);
+- e->key = g_strdup(key);
+- }
+-
+- text = main_get_raw_text((gchar *)e->module, (gchar *)e->key);
+-
+- if ((text == NULL) || strlen(text) == 0) {
+- if (text)
+- g_free(text);
+-
+- /* new empty document from template */
+- gchar *fname = g_build_filename(settings.gSwordDir, "studypad.spt", NULL);
+- XI_message(("editor load NOTE [%s]", fname));
+- text = inhale_text_from_file(fname);
+- g_free(fname);
+- }
+-
+- if (text && strlen(text)) {
+- webkit_web_view_load_string((WebKitWebView *)
+- e->html_widget,
+- text,
+- "application/xhtml+xml", "utf_8",
+- "file://");
+- }
+-
+- e->is_changed = FALSE;
+- if (e->type == NOTE_EDITOR) {
+- e->navbar.valid_key = TRUE;
+- main_navbar_versekey_set(e->navbar, e->key);
+- }
+-
+- if (text)
+- g_free(text);
+-
+- title = g_strdup_printf("%s - %s", e->module, e->key);
+- change_window_title(e->window, title);
+- g_free(title);
+ }
+
+ G_MODULE_EXPORT int
+ delete_event(GtkWidget *widget, GdkEvent *event, EDITOR *e)
+ {
+- if (e->is_changed) {
+- switch (ask_about_saving(e)) {
+- case GS_YES: /* exit saving */
+- break;
+-
+- case GS_NO: /* exit without saving */
+- break;
+-
+- case GS_CANCEL:
+- return TRUE;
+- }
+- }
+- editors_all = g_list_remove(editors_all, e);
+- do_exit(e);
+ return FALSE;
+ }
+
+-gint ask_about_saving(EDITOR *e)
+-{
+- gint test;
+- GS_DIALOG *info;
+- gchar *buf = NULL;
+- gchar *buf1 = NULL;
+- gchar *buf2 = NULL;
+- gchar *buf3 = NULL;
+- gint retval = FALSE;
+-
+- switch (e->type) {
+- case BOOK_EDITOR:
+- case NOTE_EDITOR:
+- info = gui_new_dialog();
+- info->stock_icon =
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "dialog-warning";
+-#else
+- GTK_STOCK_DIALOG_WARNING;
+-#endif
+-
+- buf = g_strdup_printf("%s: %s", e->module, e->key);
+- buf1 = _("Save the changes to document");
+- buf2 = _("before closing?");
+- buf3 = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s %s %s</span>",
+- buf1, buf, buf2);
+- info->label_top = buf3;
+- info->label2 = _("If you don't save, changes will be permanently lost.");
+- info->save = TRUE;
+- info->cancel = TRUE;
+- info->no_save = TRUE;
+-
+- test = gui_alert_dialog(info);
+- retval = test;
+-
+- if (test == GS_YES) {
+- if (e->type == NOTE_EDITOR) {
+- /* save notes and prayer lists */
+- _save_note(e);
+-
+- } else {
+- /* save notes and prayer lists */
+- _save_book(e);
+- }
+- }
+- g_free(info);
+- g_free(buf);
+- g_free(buf3);
+- break;
+-
+- case STUDYPAD_EDITOR:
+- info = gui_new_dialog();
+- info->stock_icon =
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- "dialog-warning";
+-#else
+- GTK_STOCK_DIALOG_WARNING;
+-#endif
+- if (settings.studypadfilename)
+- buf = settings.studypadfilename;
+- else
+- buf = N_("File");
+- buf1 = _("Save the changes to document");
+- buf2 = _("before closing?");
+- buf3 = g_strdup_printf("<span weight=\"bold\" size=\"larger\">%s %s %s</span>",
+- buf1, buf, buf2);
+- info->label_top = buf3;
+- info->label2 = _("If you don't save, changes will be permanently lost.");
+- info->save = TRUE;
+- info->cancel = TRUE;
+- info->no_save = TRUE;
+-
+- test = gui_alert_dialog(info);
+- retval = test;
+- if (test == GS_YES) {
+- _save_file(e);
+- }
+- g_free(info);
+- g_free(buf3);
+- break;
+- }
+- sync_windows();
+- return retval;
+-}
+-
+-static gint _create_new(const gchar *filename, const gchar *key,
+- gint editor_type)
+-{
+- EDITOR *editor;
+- GtkWidget *toolbar_nav = NULL;
+-
+- editor = g_new(EDITOR, 1);
+- editor->html_widget = NULL;
+- editor->sync = FALSE;
+- editor->type = editor_type;
+-
+- switch (editor_type) {
+- case STUDYPAD_EDITOR:
+- editor->studypad = TRUE;
+- editor->bookeditor = FALSE;
+- editor->noteeditor = FALSE;
+- editor->module = NULL;
+- editor->key = NULL;
+- editor->filename = NULL;
+- widgets.studypad_dialog = editor_new(_("StudyPad"), editor);
+-
+- if (filename) {
+- editor->filename = g_strdup(filename);
+- _load_file(editor, g_strdup(filename));
+- }
+- break;
+- case NOTE_EDITOR:
+- editor->noteeditor = TRUE;
+- editor->bookeditor = FALSE;
+- editor->studypad = FALSE;
+- editor->filename = NULL;
+- editor->module = g_strdup(filename);
+- editor->key = g_strdup(key);
+- editor->navbar.key = NULL;
+- editor_new(_("Note Editor"), editor);
+-
+- toolbar_nav = gui_navbar_versekey_editor_new(editor);
+- gtk_widget_show(toolbar_nav);
+- gtk_box_pack_start(GTK_BOX(editor->navbar_box),
+- GTK_WIDGET(toolbar_nav), FALSE, TRUE,
+- 0);
+-
+- editor_load_note(editor, NULL, NULL);
+- break;
+- case BOOK_EDITOR:
+- editor->bookeditor = TRUE;
+- editor->noteeditor = FALSE;
+- editor->studypad = FALSE;
+- editor->filename = NULL;
+- editor->module = g_strdup(filename);
+- editor->key = g_strdup(key);
+- editor_new(_("Prayer List/Journal Editor"), editor);
+-
+- GtkWidget *box;
+- UI_VBOX(box, FALSE, 0);
+- gtk_widget_show(box);
+- GtkWidget *hpaned1 = UI_HPANE();
+- gtk_widget_show(hpaned1);
+- gtk_paned_pack2(GTK_PANED(hpaned1), box, TRUE, TRUE);
+-
+- GtkWidget *scrollbar = gtk_scrolled_window_new(NULL, NULL);
+- gtk_widget_show(scrollbar);
+- gtk_paned_pack1(GTK_PANED(hpaned1), GTK_WIDGET(scrollbar),
+- TRUE, TRUE);
+- gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrollbar),
+- GTK_POLICY_AUTOMATIC,
+- GTK_POLICY_AUTOMATIC);
+- gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)
+- scrollbar,
+- settings.shadow_type);
+-
+- editor->treeview = gui_create_editor_tree(editor);
+- gtk_widget_show(editor->treeview);
+- gtk_container_add(GTK_CONTAINER(scrollbar),
+- editor->treeview);
+- gtk_paned_set_position(GTK_PANED(hpaned1), 125);
+- gtk_tree_view_expand_all((GtkTreeView *)editor->treeview);
+-// then we should expand on the item to which we've opened for edit.
+-
+-#if GTK_CHECK_VERSION(3, 10, 0)
+- gtk_container_add(GTK_CONTAINER(box), editor->box);
+-#else
+- gtk_widget_reparent(editor->box, box);
+-#endif
+-
+- gtk_container_add(GTK_CONTAINER(editor->window), hpaned1);
+-
+- editor_load_book(editor);
+-
+- break;
+- }
+- editor->is_changed = FALSE;
+- editors_all = g_list_append(editors_all, (EDITOR *)editor);
+- return 1;
+-}
+-
+ /******************************************************************************
+ * Name
+ * editor_create_new
+@@ -1348,85 +361,11 @@ static gint _create_new(const gchar *filename, const gchar *key,
+ gint editor_create_new(const gchar *filename, const gchar *key,
+ gint editor_type)
+ {
+- GList *tmp = NULL;
+-
+- tmp = g_list_first(editors_all);
+- while (tmp != NULL) {
+- EDITOR *e = (EDITOR *)tmp->data;
+- switch (editor_type) {
+- case STUDYPAD_EDITOR:
+- if (e->studypad) {
+- if (editor_is_dirty(e))
+- _save_file(e);
+- if (e->filename)
+- g_free(e->filename);
+- e->filename = g_strdup(filename);
+- gtk_widget_show(e->window);
+- gdk_window_raise(gtk_widget_get_parent_window(GTK_WIDGET(e->window)));
+-
+- _load_file(e, g_strdup(filename));
+- return 1;
+- }
+- break;
+- case NOTE_EDITOR:
+- if (!e->noteeditor)
+- break;
+- if (editor_is_dirty(e))
+- _save_note(e);
+- if (e->module)
+- g_free(e->module);
+- e->module = g_strdup(filename);
+- if (e->key)
+- g_free(e->key);
+- e->key = g_strdup(key);
+- gtk_widget_show(e->window);
+- gdk_window_raise(gtk_widget_get_parent_window(GTK_WIDGET(e->window)));
+-
+- editor_load_note(e, NULL, NULL);
+-
+- return 1;
+- break;
+- case BOOK_EDITOR:
+- if (!e->bookeditor)
+- break;
+- if (editor_is_dirty(e))
+- _save_book(e);
+- if (e->module)
+- g_free(e->module);
+- e->module = g_strdup(filename);
+- if (e->key)
+- g_free(e->key);
+- e->key = g_strdup(key);
+- gtk_widget_show(e->window);
+- gdk_window_raise(gtk_widget_get_parent_window(GTK_WIDGET(e->window)));
+- main_load_book_tree_in_editor(GTK_TREE_VIEW(e->treeview),
+- e->module);
+- editor_load_book(e);
+-
+- return 1;
+- break;
+- }
+- tmp = g_list_next(tmp);
+- }
+- XI_message(("filename %s, key %s",
+- (filename ? filename : "-null-"),
+- (key ? key : "-null-")));
+- return _create_new(filename, key, editor_type);
++ return 1;
+ }
+
+ void editor_maybe_save_all(void)
+ {
+- GList *tmp, *tmp2;
+-
+- tmp = g_list_first(editors_all);
+- while (tmp != NULL) {
+- /* 2ndary list chaser:
+- elements will be removed by the saver. */
+- tmp2 = g_list_next(tmp);
+-
+- delete_event(NULL, NULL, (EDITOR *)tmp->data);
+- tmp = tmp2;
+- }
+ }
+
+ #endif /* USE_WEBKIT_EDITOR */
Home |
Main Index |
Thread Index |
Old Index