Update of /cvsroot/gnomesword/gnomesword1/src/gnome
In directory sc8-pr-cvs1:/tmp/cvs-serv13116/src/gnome
Modified Files:
bibletext.c bibletext_dialog.c bibletext_menu.c
commentary_dialog.c commentary_menu.c dictlex.c
dictlex_dialog.c dictlex_menu.c gbs_menu.c gtkhtml_display.c
interlinear.c search_dialog.c shortcutbar_main.c
Log Message:
updated to use sword cvs - 2003-06-28
Index: bibletext.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/bibletext.c,v
retrieving revision 1.37
retrieving revision 1.38
diff -C2 -d -r1.37 -r1.38
*** bibletext.c 20 Jun 2003 13:29:33 -0000 1.37
--- bibletext.c 28 Jun 2003 19:57:28 -0000 1.38
***************
*** 93,103 ****
gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_t->html, FALSE);
! if (dict_key) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
--- 93,103 ----
gchar * dict_mod_description)
{
! gchar *dict_key = NULL;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_t->html, FALSE);
! if (dict_key && mod_name) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
***************
*** 106,109 ****
--- 106,110 ----
gui_change_module_and_key(mod_name, dict_key);
g_free(dict_key);
+ g_free(mod_name);
}
}
Index: bibletext_dialog.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/bibletext_dialog.c,v
retrieving revision 1.34
retrieving revision 1.35
diff -C2 -d -r1.34 -r1.35
*** bibletext_dialog.c 24 Jun 2003 19:10:52 -0000 1.34
--- bibletext_dialog.c 28 Jun 2003 19:57:28 -0000 1.35
***************
*** 89,99 ****
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_vt->html, FALSE);
! if (dict_key) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
--- 89,99 ----
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key = NULL;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_vt->html, FALSE);
! if (dict_key && mod_name) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
***************
*** 102,105 ****
--- 102,106 ----
gui_change_module_and_key(mod_name, dict_key);
g_free(dict_key);
+ g_free(mod_name);
}
}
Index: bibletext_menu.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/bibletext_menu.c,v
retrieving revision 1.15
retrieving revision 1.16
diff -C2 -d -r1.15 -r1.16
*** bibletext_menu.c 26 Jun 2003 03:42:15 -0000 1.15
--- bibletext_menu.c 28 Jun 2003 19:57:28 -0000 1.16
***************
*** 227,235 ****
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
! gui_change_module_and_key(module_name, settings.currentverse);
}
--- 227,237 ----
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
! if(module_name) {
! gui_change_module_and_key(module_name, settings.currentverse);
! g_free(module_name);
! }
}
***************
*** 746,750 ****
GSList *group = NULL;
! if (check_for_global_option(t->mod_name, "GBFRedLetterWords")) {
t->tgs->words_in_red =
load_module_options(t->mod_name,
--- 748,753 ----
GSList *group = NULL;
! if ((check_for_global_option(t->mod_name, "GBFRedLetterWords"))
! || (check_for_global_option(t->mod_name, "OSISRedLetterWords"))) {
t->tgs->words_in_red =
load_module_options(t->mod_name,
***************
*** 1018,1026 ****
gpointer user_data)
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
! gui_open_bibletext_dialog(module_name);
}
--- 1021,1031 ----
gpointer user_data)
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
! if(module_name) {
! gui_open_bibletext_dialog(module_name);
! g_free(module_name);
! }
}
Index: commentary_dialog.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/commentary_dialog.c,v
retrieving revision 1.24
retrieving revision 1.25
diff -C2 -d -r1.24 -r1.25
*** commentary_dialog.c 20 Jun 2003 13:29:33 -0000 1.24
--- commentary_dialog.c 28 Jun 2003 19:57:28 -0000 1.25
***************
*** 77,87 ****
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_vc->html, FALSE);
! if (dict_key) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
--- 77,87 ----
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key = NULL;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_vc->html, FALSE);
! if (dict_key && mod_name) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
***************
*** 90,93 ****
--- 90,94 ----
gui_change_module_and_key(mod_name, dict_key);
g_free(dict_key);
+ g_free(mod_name);
}
}
Index: commentary_menu.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/commentary_menu.c,v
retrieving revision 1.7
retrieving revision 1.8
diff -C2 -d -r1.7 -r1.8
*** commentary_menu.c 20 Jun 2003 13:29:33 -0000 1.7
--- commentary_menu.c 28 Jun 2003 19:57:28 -0000 1.8
***************
*** 133,143 ****
gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_c->html, FALSE);
! if (dict_key) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
--- 133,143 ----
gchar * dict_mod_description)
{
! gchar *dict_key = NULL;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_c->html, FALSE);
! if (dict_key && mod_name) {
if (settings.inViewer)
gui_display_dictlex_in_viewer(mod_name,
***************
*** 146,149 ****
--- 146,150 ----
gui_change_module_and_key(mod_name, dict_key);
g_free(dict_key);
+ g_free(mod_name);
}
}
***************
*** 202,210 ****
gpointer user_data)
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
! gui_change_module_and_key(module_name, settings.currentverse);
}
--- 203,213 ----
gpointer user_data)
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
! if(module_name) {
! gui_change_module_and_key(module_name, settings.currentverse);
! g_free(module_name);
! }
}
***************
*** 1117,1125 ****
gpointer user_data)
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
gui_open_commentary_dialog(module_name);
}
--- 1120,1128 ----
gpointer user_data)
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
gui_open_commentary_dialog(module_name);
+ if(module_name) g_free(module_name);
}
Index: dictlex.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/dictlex.c,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -d -r1.21 -r1.22
*** dictlex.c 20 Jun 2003 13:29:33 -0000 1.21
--- dictlex.c 28 Jun 2003 19:57:28 -0000 1.22
***************
*** 90,97 ****
gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_d->html, FALSE);
--- 90,97 ----
gchar * dict_mod_description)
{
! gchar *dict_key;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_d->html, FALSE);
***************
*** 104,107 ****
--- 104,108 ----
g_free(dict_key);
}
+ if(mod_name) g_free(mod_name);
}
Index: dictlex_dialog.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/dictlex_dialog.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** dictlex_dialog.c 13 May 2003 16:38:27 -0000 1.18
--- dictlex_dialog.c 28 Jun 2003 19:57:28 -0000 1.19
***************
*** 68,75 ****
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key, mod_name[16];
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, dict_mod_description);
dict_key = gui_get_word_or_selection(cur_dlg->html, FALSE);
--- 68,75 ----
(GtkMenuItem * menuitem, gchar * dict_mod_description)
{
! gchar *dict_key;
! gchar *mod_name = NULL;
! mod_name = module_name_from_description(dict_mod_description);
dict_key = gui_get_word_or_selection(cur_dlg->html, FALSE);
***************
*** 82,85 ****
--- 82,86 ----
g_free(dict_key);
}
+ if(mod_name) g_free(mod_name);
}
Index: dictlex_menu.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/dictlex_menu.c,v
retrieving revision 1.3
retrieving revision 1.4
diff -C2 -d -r1.3 -r1.4
*** dictlex_menu.c 20 Jun 2003 13:29:33 -0000 1.3
--- dictlex_menu.c 28 Jun 2003 19:57:28 -0000 1.4
***************
*** 190,198 ****
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
gui_change_module_and_key(module_name, settings.dictkey);
}
--- 190,198 ----
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
gui_change_module_and_key(module_name, settings.dictkey);
+ if(module_name) g_free(module_name);
}
***************
*** 332,340 ****
gpointer user_data)
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
gui_open_dictlex_dialog(module_name);
}
--- 332,340 ----
gpointer user_data)
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
gui_open_dictlex_dialog(module_name);
+ if(module_name) g_free(module_name);
}
Index: gbs_menu.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/gbs_menu.c,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** gbs_menu.c 20 Jun 2003 13:29:33 -0000 1.2
--- gbs_menu.c 28 Jun 2003 19:57:28 -0000 1.3
***************
*** 237,245 ****
gpointer user_data)
{
!
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
gui_change_module_and_key(module_name, NULL);
}
--- 237,245 ----
gpointer user_data)
{
! gchar *module_name = NULL;
!
! module_name = module_name_from_description((gchar *) user_data);
gui_change_module_and_key(module_name, NULL);
+ if(module_name) g_free(module_name);
}
***************
*** 367,375 ****
gpointer user_data)
{
! gchar module_name[16];
! memset(module_name, 0, 16);
! module_name_from_description(module_name, (gchar *) user_data);
gui_open_gbs_dialog(module_name);
}
--- 367,375 ----
gpointer user_data)
{
! gchar *module_name = NULL;
! module_name = module_name_from_description((gchar *) user_data);
gui_open_gbs_dialog(module_name);
+ if(module_name) g_free(module_name);
}
Index: gtkhtml_display.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/gtkhtml_display.c,v
retrieving revision 1.27
retrieving revision 1.28
diff -C2 -d -r1.27 -r1.28
*** gtkhtml_display.c 20 Jun 2003 13:29:33 -0000 1.27
--- gtkhtml_display.c 28 Jun 2003 19:57:28 -0000 1.28
***************
*** 40,44 ****
#include "main/settings.h"
#include "main/key.h"
!
/******************************************************************************
--- 40,44 ----
#include "main/settings.h"
#include "main/key.h"
!
/******************************************************************************
***************
*** 59,82 ****
static void set_global_options(TEXT_GLOBALS * tgs)
! {
! set_text_module_global_option("Strong's Numbers",tgs->strongs);
! set_text_module_global_option("Morphological Tags",tgs->morphs);
! set_text_module_global_option("Footnotes",tgs->footnotes);
! set_text_module_global_option("Greek Accents",tgs->greekaccents);
! set_text_module_global_option("Lemmas",tgs->lemmas);
! set_text_module_global_option("Scripture Cross-references",tgs->scripturerefs);
! set_text_module_global_option("Hebrew Vowel Points",tgs->hebrewpoints);
! set_text_module_global_option("Hebrew Cantillation",tgs->hebrewcant);
! set_text_module_global_option("Headings",tgs->headings);
! set_text_module_global_option("Words of Christ in Red",tgs->words_in_red);
if (tgs->variants_primary)
! set_text_global_option("Textual Variants",
! "Primary Reading");
else if (tgs->variants_secondary)
! set_text_global_option("Textual Variants",
! "Secondary Reading");
else
set_text_global_option("Textual Variants",
! "All Readings");
}
--- 59,88 ----
static void set_global_options(TEXT_GLOBALS * tgs)
! {
! set_text_module_global_option("Strong's Numbers", tgs->strongs);
! set_text_module_global_option("Morphological Tags",
! tgs->morphs);
! set_text_module_global_option("Footnotes", tgs->footnotes);
! set_text_module_global_option("Greek Accents",
! tgs->greekaccents);
! set_text_module_global_option("Lemmas", tgs->lemmas);
! set_text_module_global_option("Scripture Cross-references",
! tgs->scripturerefs);
! set_text_module_global_option("Hebrew Vowel Points",
! tgs->hebrewpoints);
! set_text_module_global_option("Hebrew Cantillation",
! tgs->hebrewcant);
! set_text_module_global_option("Headings", tgs->headings);
! set_text_module_global_option("Words of Christ in Red",
! tgs->words_in_red);
if (tgs->variants_primary)
! set_text_global_option("Textual Variants",
! "Primary Reading");
else if (tgs->variants_secondary)
! set_text_global_option("Textual Variants",
! "Secondary Reading");
else
set_text_global_option("Textual Variants",
! "All Readings");
}
***************
*** 218,222 ****
gboolean use_gtkhtml_font = FALSE;
gboolean was_editable = FALSE;
! MOD_FONT *mf;
GtkHTMLStreamStatus status1 = 0;
GtkHTML *html;
--- 224,228 ----
gboolean use_gtkhtml_font = FALSE;
gboolean was_editable = FALSE;
! MOD_FONT *mf;
GtkHTMLStreamStatus status1 = 0;
GtkHTML *html;
***************
*** 258,262 ****
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(tmpBuf);
/* show key in html widget */
--- 264,268 ----
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(tmpBuf);
/* show key in html widget */
***************
*** 264,284 ****
if ((settings.displaySearchResults)) {
sprintf(tmpBuf,
! "<A HREF=\"version=%s passage=%s\">"
! "<FONT COLOR=\"%s\">[%s] %s </font></A>",
! mod_name,
! key,
! settings.bible_verse_num_color,
! mod_name, key);
}
else {
sprintf(tmpBuf,
! "<A HREF=\"[%s] %s\">"
! "<FONT COLOR=\"%s\">[%s]</A></font>[%s] ",
! mod_name,
! get_module_description
! (mod_name),
! settings.bible_verse_num_color,
! mod_name, key);
}
str = g_string_append(str, tmpBuf);
--- 270,290 ----
if ((settings.displaySearchResults)) {
sprintf(tmpBuf,
! "<A HREF=\"version=%s passage=%s\">"
! "<FONT COLOR=\"%s\">[%s] %s </font></A>",
! mod_name,
! key,
! settings.bible_verse_num_color,
! mod_name, key);
}
else {
sprintf(tmpBuf,
! "<A HREF=\"[%s] %s\">"
! "<FONT COLOR=\"%s\">[%s]</A></font>[%s] ",
! mod_name,
! get_module_description
! (mod_name),
! settings.bible_verse_num_color,
! mod_name, key);
}
str = g_string_append(str, tmpBuf);
***************
*** 292,307 ****
use_font, use_font_size);
str = g_string_append(str, tmpBuf);
!
if (settings.displaySearchResults) {
search_str = g_string_new(text);
mark_search_words(search_str);
! str = g_string_append(str,search_str->str);
} else {
! str = g_string_append(str,text);
}
!
sprintf(tmpBuf, " %s", "</font></body></html>");
str = g_string_append(str, tmpBuf);
!
if (str->len) {
gtk_html_write(GTK_HTML(html), htmlstream, str->str,
--- 298,313 ----
use_font, use_font_size);
str = g_string_append(str, tmpBuf);
!
if (settings.displaySearchResults) {
search_str = g_string_new(text);
mark_search_words(search_str);
! str = g_string_append(str, search_str->str);
} else {
! str = g_string_append(str, text);
}
!
sprintf(tmpBuf, " %s", "</font></body></html>");
str = g_string_append(str, tmpBuf);
!
if (str->len) {
gtk_html_write(GTK_HTML(html), htmlstream, str->str,
***************
*** 334,338 ****
* Return value
* void
! */
void chapter_display(GtkWidget * html_widget, gchar * mod_name,
--- 340,344 ----
* Return value
* void
! */
void chapter_display(GtkWidget * html_widget, gchar * mod_name,
***************
*** 358,366 ****
GtkHTMLStreamStatus status1 = 0;
GtkHTMLStream *htmlstream;
!
was_editable = gtk_html_get_editable(html);
!
!
!
tmpkey = get_valid_key(key);
--- 364,372 ----
GtkHTMLStreamStatus status1 = 0;
GtkHTMLStream *htmlstream;
!
was_editable = gtk_html_get_editable(html);
!
!
!
tmpkey = get_valid_key(key);
***************
*** 372,376 ****
cur_book = get_book_from_key(tmpkey);
!
mf = get_font(mod_name);
--- 378,382 ----
cur_book = get_book_from_key(tmpkey);
!
mf = get_font(mod_name);
***************
*** 407,415 ****
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(buf);
tmpkey = get_valid_key(key);
! count = verse_count(tmpkey);
! for (i = 1 ;i <= count; i++) {
sprintf(tmpbuf, "%s %d:%d", cur_book, cur_chapter, i);
g_free(tmpkey);
--- 413,421 ----
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(buf);
tmpkey = get_valid_key(key);
! count = verse_count(tmpkey);
! for (i = 1; i <= count; i++) {
sprintf(tmpbuf, "%s %d:%d", cur_book, cur_chapter, i);
g_free(tmpkey);
***************
*** 428,434 ****
settings.verse_num_font_size,
settings.bible_verse_num_color, i);
!
! str = g_string_append(str,buf);
!
if (use_gtkhtml_font) {
sprintf(tmpbuf,
--- 434,440 ----
settings.verse_num_font_size,
settings.bible_verse_num_color, i);
!
! str = g_string_append(str, buf);
!
if (use_gtkhtml_font) {
sprintf(tmpbuf,
***************
*** 437,450 ****
} else {
sprintf(tmpbuf,
! "<font size=\"%s\" color=\"%s\">",
! use_font_size,textColor);
}
! str = g_string_append(str,tmpbuf);
!
!
if (newparagraph && settings.versestyle) {
newparagraph = FALSE;
strcpy(tmpbuf, paragraphMark);
! str = g_string_append(str,tmpbuf);
}
--- 443,456 ----
} else {
sprintf(tmpbuf,
! "<font size=\"%s\" color=\"%s\">",
! use_font_size, textColor);
}
! str = g_string_append(str, tmpbuf);
!
!
if (newparagraph && settings.versestyle) {
newparagraph = FALSE;
strcpy(tmpbuf, paragraphMark);
! str = g_string_append(str, tmpbuf);
}
***************
*** 453,469 ****
str = g_string_append(str, text_str);
/*
! if (settings.displaySearchResults)
! mark_search_words(str);
! utf8str = str->str;
! */
if (settings.versestyle) {
! if ((strstr(text_str, "<BR>") == NULL)
! && (strstr(text_str, "<!P>") == NULL)) {
sprintf(tmpbuf, " %s", "</font><br>");
} else {
sprintf(tmpbuf, " %s", "</font>");
}
! if (strstr(text_str, "<!P>") == NULL) {
newparagraph = FALSE;
} else {
--- 459,479 ----
str = g_string_append(str, text_str);
/*
! if (settings.displaySearchResults)
! mark_search_words(str);
! utf8str = str->str;
! */
if (settings.versestyle) {
! if ((strstr(text_str, "<BR>") == NULL) &&
! (strstr(text_str, "<br />") == NULL) &&
! (strstr(text_str, "<!P>") == NULL) &&
! (strstr(text_str, "<p>") == NULL) &&
! (strstr(text_str, "</p>") == NULL) ) {
sprintf(tmpbuf, " %s", "</font><br>");
} else {
sprintf(tmpbuf, " %s", "</font>");
}
! if ((strstr(text_str, "<!P>") == NULL) &&
! (strstr(text_str, "<p>") == NULL) ) {
newparagraph = FALSE;
} else {
***************
*** 479,487 ****
}
free(text_str);
! str = g_string_append(str,tmpbuf);
}
sprintf(buf, "%s", "</body></html>");
! str = g_string_append(str,buf);
if (str->len) {
gtk_html_write(GTK_HTML(html), htmlstream, str->str,
--- 489,497 ----
}
free(text_str);
! str = g_string_append(str, tmpbuf);
}
sprintf(buf, "%s", "</body></html>");
! str = g_string_append(str, buf);
if (str->len) {
gtk_html_write(GTK_HTML(html), htmlstream, str->str,
***************
*** 493,497 ****
sprintf(buf, "%d", cur_verse);
gtk_html_jump_to_anchor(html, buf);
!
g_string_free(str, TRUE);
if (use_font_size)
--- 503,507 ----
sprintf(buf, "%d", cur_verse);
gtk_html_jump_to_anchor(html, buf);
!
g_string_free(str, TRUE);
if (use_font_size)
***************
*** 523,527 ****
void entry_display_mozilla(GtkWidget * html_widget, gchar * mod_name,
! gchar * text, gchar * key, gboolean show_key)
{
gchar tmpBuf[500];
--- 533,537 ----
void entry_display_mozilla(GtkWidget * html_widget, gchar * mod_name,
! gchar * text, gchar * key, gboolean show_key)
{
gchar tmpBuf[500];
***************
*** 534,540 ****
! gtk_moz_embed_open_stream((GtkMozEmbed *)html_widget,
! "file://", "text/html");
!
mf = get_font(mod_name);
--- 544,550 ----
! gtk_moz_embed_open_stream((GtkMozEmbed *) html_widget,
! "file://", "text/html");
!
mf = get_font(mod_name);
***************
*** 564,568 ****
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(tmpBuf);
/* show key in html widget */
--- 574,578 ----
settings.bible_bg_color, settings.bible_text_color,
settings.link_color);
!
str = g_string_new(tmpBuf);
/* show key in html widget */
***************
*** 570,590 ****
if ((settings.displaySearchResults)) {
sprintf(tmpBuf,
! "<A HREF=\"version=%s passage=%s\">"
! "<FONT COLOR=\"%s\">[%s] %s </font></A>",
! mod_name,
! key,
! settings.bible_verse_num_color,
! mod_name, key);
}
else {
sprintf(tmpBuf,
! "<A HREF=\"[%s] %s\">"
! "<FONT COLOR=\"%s\">[%s]</A></font>[%s] ",
! mod_name,
! get_module_description
! (mod_name),
! settings.bible_verse_num_color,
! mod_name, key);
}
str = g_string_append(str, tmpBuf);
--- 580,600 ----
if ((settings.displaySearchResults)) {
sprintf(tmpBuf,
! "<A HREF=\"version=%s passage=%s\">"
! "<FONT COLOR=\"%s\">[%s] %s </font></A>",
! mod_name,
! key,
! settings.bible_verse_num_color,
! mod_name, key);
}
else {
sprintf(tmpBuf,
! "<A HREF=\"[%s] %s\">"
! "<FONT COLOR=\"%s\">[%s]</A></font>[%s] ",
! mod_name,
! get_module_description
! (mod_name),
! settings.bible_verse_num_color,
! mod_name, key);
}
str = g_string_append(str, tmpBuf);
***************
*** 598,621 ****
use_font, use_font_size);
str = g_string_append(str, tmpBuf);
!
if (settings.displaySearchResults) {
search_str = g_string_new(text);
mark_search_words(search_str);
! str = g_string_append(str,search_str->str);
} else {
! str = g_string_append(str,text);
}
!
sprintf(tmpBuf, " %s", "</font></body></html>");
str = g_string_append(str, tmpBuf);
!
if (str->len) {
! gtk_moz_embed_append_data((GtkMozEmbed *)html_widget,
! str->str,str->len);
!
}
!
! gtk_moz_embed_close_stream((GtkMozEmbed *)html_widget);
!
if (use_font_size)
free(use_font_size);
--- 608,631 ----
use_font, use_font_size);
str = g_string_append(str, tmpBuf);
!
if (settings.displaySearchResults) {
search_str = g_string_new(text);
mark_search_words(search_str);
! str = g_string_append(str, search_str->str);
} else {
! str = g_string_append(str, text);
}
!
sprintf(tmpBuf, " %s", "</font></body></html>");
str = g_string_append(str, tmpBuf);
!
if (str->len) {
! gtk_moz_embed_append_data((GtkMozEmbed *) html_widget,
! str->str, str->len);
!
}
!
! gtk_moz_embed_close_stream((GtkMozEmbed *) html_widget);
!
if (use_font_size)
free(use_font_size);
***************
*** 641,655 ****
* Return value
* void
! */
void chapter_display_mozilla(GtkWidget * html_widget, gchar * mod_name,
! TEXT_GLOBALS * tgs, gchar * key, gboolean use_globals)
{
gchar
! *bgColor,
*textColor,
! buf[500],
! *tmpkey, tmpbuf[256], *use_font, *use_font_size;
gchar *text_str = NULL;
gchar *paragraphMark;
--- 651,665 ----
* Return value
* void
! */
void chapter_display_mozilla(GtkWidget * html_widget, gchar * mod_name,
! TEXT_GLOBALS * tgs, gchar * key,
! gboolean use_globals)
{
gchar
! * bgColor,
*textColor,
! buf[500], *tmpkey, tmpbuf[256], *use_font, *use_font_size;
gchar *text_str = NULL;
gchar *paragraphMark;
***************
*** 664,674 ****
MOD_FONT *mf;
! gtk_moz_embed_open_stream((GtkMozEmbed *)html_widget,
! "file://", "text/html");
!
! if(is_module_rtl(mod_name))
r2l = TRUE;
!
!
tmpkey = get_valid_key(key);
--- 674,684 ----
MOD_FONT *mf;
! gtk_moz_embed_open_stream((GtkMozEmbed *) html_widget,
! "file://", "text/html");
!
! if (is_module_rtl(mod_name))
r2l = TRUE;
!
!
tmpkey = get_valid_key(key);
***************
*** 680,684 ****
cur_book = get_book_from_key(tmpkey);
!
mf = get_font(mod_name);
--- 690,694 ----
cur_book = get_book_from_key(tmpkey);
!
mf = get_font(mod_name);
***************
*** 703,716 ****
use_font_size = g_strdup("+1");
!
if (use_globals)
set_global_options(tgs);
! if(r2l) {
body = "body dir=\"rtl\"";
! }
! else {
body = "body";
!
}
sprintf(buf,
--- 713,725 ----
use_font_size = g_strdup("+1");
!
if (use_globals)
set_global_options(tgs);
! if (r2l) {
body = "body dir=\"rtl\"";
! } else {
body = "body";
!
}
sprintf(buf,
***************
*** 718,729 ****
"<%s bgcolor=\"%s\" text=\"%s\" link=\"%s\">",
body,
! settings.bible_bg_color,
! settings.bible_text_color,
! settings.link_color);
!
str = g_string_new(buf);
tmpkey = get_valid_key(key);
! count = verse_count(tmpkey);
! for (i = 1 ;i <= count; i++) {
sprintf(tmpbuf, "%s %d:%d", cur_book, cur_chapter, i);
g_free(tmpkey);
--- 727,737 ----
"<%s bgcolor=\"%s\" text=\"%s\" link=\"%s\">",
body,
! settings.bible_bg_color,
! settings.bible_text_color, settings.link_color);
!
str = g_string_new(buf);
tmpkey = get_valid_key(key);
! count = verse_count(tmpkey);
! for (i = 1; i <= count; i++) {
sprintf(tmpbuf, "%s %d:%d", cur_book, cur_chapter, i);
g_free(tmpkey);
***************
*** 742,748 ****
settings.verse_num_font_size,
settings.bible_verse_num_color, i);
!
! str = g_string_append(str,buf);
!
if (use_gtkhtml_font) {
sprintf(tmpbuf,
--- 750,756 ----
settings.verse_num_font_size,
settings.bible_verse_num_color, i);
!
! str = g_string_append(str, buf);
!
if (use_gtkhtml_font) {
sprintf(tmpbuf,
***************
*** 751,771 ****
} else {
sprintf(tmpbuf,
! "<font face=\"%s\" size=\"%s\" color=\"%s\">",
use_font, use_font_size, textColor);
}
!
!
! str = g_string_append(str,tmpbuf);
!
!
if (newparagraph && settings.versestyle) {
newparagraph = FALSE;
strcpy(tmpbuf, paragraphMark);
! str = g_string_append(str,tmpbuf);
}
!
text_str = get_module_text(0, mod_name, tmpkey);
!
str = g_string_append(str, text_str);
--- 759,779 ----
} else {
sprintf(tmpbuf,
! "<font face=\"%s\" size=\"%s\" color=\"%s\">",
use_font, use_font_size, textColor);
}
!
!
! str = g_string_append(str, tmpbuf);
!
!
if (newparagraph && settings.versestyle) {
newparagraph = FALSE;
strcpy(tmpbuf, paragraphMark);
! str = g_string_append(str, tmpbuf);
}
!
text_str = get_module_text(0, mod_name, tmpkey);
!
str = g_string_append(str, text_str);
***************
*** 791,808 ****
}
free(text_str);
! str = g_string_append(str,tmpbuf);
}
sprintf(buf, "%s", "</body></html>");
! str = g_string_append(str,buf);
//utf8str = e_utf8_from_gtk_string(html_widget, str->str);
//utf8len = strlen(utf8str);
if (str->len) {
! gtk_moz_embed_append_data((GtkMozEmbed *)html_widget,
! str->str,str->len);
}
!
! gtk_moz_embed_close_stream((GtkMozEmbed *)html_widget);
!
g_string_free(str, TRUE);
if (use_font_size)
--- 799,816 ----
}
free(text_str);
! str = g_string_append(str, tmpbuf);
}
sprintf(buf, "%s", "</body></html>");
! str = g_string_append(str, buf);
//utf8str = e_utf8_from_gtk_string(html_widget, str->str);
//utf8len = strlen(utf8str);
if (str->len) {
! gtk_moz_embed_append_data((GtkMozEmbed *) html_widget,
! str->str, str->len);
}
!
! gtk_moz_embed_close_stream((GtkMozEmbed *) html_widget);
!
g_string_free(str, TRUE);
if (use_font_size)
***************
*** 830,834 ****
* Return value
* void
! */
/*
#ifdef ICU_SWORD
--- 838,842 ----
* Return value
* void
! */
/*
#ifdef ICU_SWORD
Index: interlinear.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/interlinear.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** interlinear.c 20 Jun 2003 13:29:33 -0000 1.18
--- interlinear.c 28 Jun 2003 19:57:28 -0000 1.19
***************
*** 76,105 ****
void gui_check_interlinear_modules(void)
{
! if(strlen(settings.Interlinear1Module) > 1)
! interlinear1 = check_for_module(settings.Interlinear1Module);
else
interlinear1 = FALSE;
!
! if(strlen(settings.Interlinear2Module) > 1)
! interlinear2 = check_for_module(settings.Interlinear2Module);
else
[...1526 lines suppressed...]
! GtkWidget * menu_inter = create_interlinear_popup(bible_description);
/* attach popup menus */
gnome_popup_menu_attach(menu_inter,
! widgets.html_interlinear, (gchar*)"1");
add_items_to_options_menu();
}
--- 1309,1321 ----
*/
! void gui_create_interlinear_popup(GList * bible_description)
{
/* create popup menu for interlinear window */
! GtkWidget *menu_inter =
! create_interlinear_popup(bible_description);
/* attach popup menus */
gnome_popup_menu_attach(menu_inter,
! widgets.html_interlinear,
! (gchar *) "1");
add_items_to_options_menu();
}
Index: search_dialog.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/search_dialog.c,v
retrieving revision 1.18
retrieving revision 1.19
diff -C2 -d -r1.18 -r1.19
*** search_dialog.c 29 Apr 2003 19:19:23 -0000 1.18
--- search_dialog.c 28 Jun 2003 19:57:28 -0000 1.19
***************
*** 1707,1711 ****
gchar *mod_desc = NULL;
gchar *mod_list = NULL;
! gchar mod_name[16];
gchar *text[2];
GtkCTreeNode *selected_node;
--- 1707,1711 ----
gchar *mod_desc = NULL;
gchar *mod_list = NULL;
! gchar *mod_name = NULL;
gchar *text[2];
GtkCTreeNode *selected_node;
***************
*** 1724,1729 ****
if (mod_desc) {
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, mod_desc);
}
if (mod_name) {
--- 1724,1729 ----
if (mod_desc) {
!
! mod_name = module_name_from_description(mod_desc);
}
if (mod_name) {
***************
*** 1754,1757 ****
--- 1754,1758 ----
}
change_mods_select_label(mod_name);
+ g_free(mod_name);
}
Index: shortcutbar_main.c
===================================================================
RCS file: /cvsroot/gnomesword/gnomesword1/src/gnome/shortcutbar_main.c,v
retrieving revision 1.30
retrieving revision 1.31
diff -C2 -d -r1.30 -r1.31
*** shortcutbar_main.c 20 Jun 2003 13:29:33 -0000 1.30
--- shortcutbar_main.c 28 Jun 2003 19:57:28 -0000 1.31
***************
*** 310,314 ****
gchar *item_url;
gchar *item_name;
! gchar mod_name[16];
gchar group_name[256];
gchar icon_size[10];
--- 310,314 ----
gchar *item_url;
gchar *item_name;
! gchar *mod_name = NULL;
gchar group_name[256];
gchar icon_size[10];
***************
*** 333,338 ****
item_url = strdup(token);
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, item_name);
sbtype = 0;
sbtype = get_mod_type(mod_name);
--- 333,338 ----
item_url = strdup(token);
!
! mod_name = module_name_from_description(item_name);
sbtype = 0;
sbtype = get_mod_type(mod_name);
***************
*** 349,352 ****
--- 349,353 ----
g_free(item_url);
g_free(item_name);
+ if(mod_name) g_free(mod_name);
g_free((gchar *) tmp->data);
tmp = g_list_next(tmp);
***************
*** 521,525 ****
gchar *item_url, *item_name;
EShortcutBar *bar1;
! gchar modname[16];
item_num = GPOINTER_TO_INT(data);
--- 522,526 ----
gchar *item_url, *item_name;
EShortcutBar *bar1;
! gchar *mod_name = NULL;
item_num = GPOINTER_TO_INT(data);
***************
*** 531,539 ****
group_num, item_num, &item_url,
&item_name, NULL);
! memset(modname, 0, 16);
! module_name_from_description(modname, item_name);
! gui_display_about_module_dialog(modname, FALSE);
g_free(item_url);
g_free(item_name);
}
--- 532,540 ----
group_num, item_num, &item_url,
&item_name, NULL);
! mod_name = module_name_from_description(item_name);
! gui_display_about_module_dialog(mod_name, FALSE);
g_free(item_url);
g_free(item_name);
+ if(mod_name) g_free(mod_name);
}
***************
*** 669,673 ****
gint group_num, sbtype;
EShortcutBar *bar1;
! gchar *group_name, modName[16];
GdkPixbuf *icon_pixbuf = NULL;
--- 670,675 ----
gint group_num, sbtype;
EShortcutBar *bar1;
! gchar *group_name;
! gchar *mod_name;
GdkPixbuf *icon_pixbuf = NULL;
***************
*** 698,706 ****
remove_all_items(group_num);
! while (glist != NULL) {
! memset(modName, 0, 16);
! module_name_from_description(modName, (gchar *) glist->data);
sbtype = 0;
! sbtype = get_mod_type(modName);
if (sbtype < 0)
--- 700,707 ----
remove_all_items(group_num);
! while (glist != NULL) {
! mod_name = module_name_from_description((gchar *) glist->data);
sbtype = 0;
! sbtype = get_mod_type(mod_name);
if (sbtype < 0)
***************
*** 717,720 ****
--- 718,722 ----
//g_list_free(glist);
savegroup(E_SHORTCUT_BAR(shortcut_bar), group_num);
+ if(mod_name) g_free(mod_name);
}
***************
*** 804,814 ****
EShortcutBar *bar1;
GdkPixbuf *icon_pixbuf = NULL;
! gchar modName[16];
gint sbtype;
! memset(modName, 0, 16);
! module_name_from_description(modName, name);
sbtype = 0;
! sbtype = get_mod_type(modName);
if (sbtype < 0)
--- 806,815 ----
EShortcutBar *bar1;
GdkPixbuf *icon_pixbuf = NULL;
! gchar *mod_name = NULL;
gint sbtype;
! mod_name = module_name_from_description(name);
sbtype = 0;
! sbtype = get_mod_type(mod_name);
if (sbtype < 0)
***************
*** 821,824 ****
--- 822,826 ----
name, icon_pixbuf);
savegroup(bar1, group_num);
+ if(mod_name) g_free(mod_name);
}
***************
*** 1105,1109 ****
{
gchar *item_url, *item_name;
! gchar mod_name[16];
gint remItemNum = 0;
gint sbtype;
--- 1107,1111 ----
{
gchar *item_url, *item_name;
! gchar *mod_name = NULL;
gint remItemNum = 0;
gint sbtype;
***************
*** 1124,1129 ****
&icon_pixbuf);
! memset(mod_name, 0, 16);
! module_name_from_description(mod_name, item_name);
if(!strcmp(item_url,"main")){
--- 1126,1130 ----
&icon_pixbuf);
! mod_name = module_name_from_description(item_name);
if(!strcmp(item_url,"main")){
***************
*** 1209,1213 ****
group_num, item_num);
}
!
}
--- 1210,1214 ----
group_num, item_num);
}
! if(mod_name) g_free(mod_name);
}
|