コード例 #1
0
ファイル: parallel_dialog.c プロジェクト: crosswire/xiphos
static gboolean on_parallel_configure_event(GtkWidget *widget,
					    GdkEventConfigure *event,
					    gpointer user_data)
{
	gchar layout[10];
	gint x;
	gint y;

	gdk_window_get_root_origin(GDK_WINDOW(gtk_widget_get_window(dialog_parallel)), &x, &y);

	settings.parallel_width = event->width;
	settings.parallel_height = event->height;
	settings.parallel_x = x;
	settings.parallel_y = y;

	sprintf(layout, "%d", settings.parallel_width);
	xml_set_value("Xiphos", "layout", "parallel_width", layout);

	sprintf(layout, "%d", settings.parallel_height);
	xml_set_value("Xiphos", "layout", "parallel_height", layout);

	sprintf(layout, "%d", settings.parallel_x);
	xml_set_value("Xiphos", "layout", "parallel_x", layout);

	sprintf(layout, "%d", settings.parallel_y);
	xml_set_value("Xiphos", "layout", "parallel_y", layout);
	xml_save_settings_doc(settings.fnconfigure);

	return FALSE;
}
コード例 #2
0
ファイル: sidebar.c プロジェクト: crosswire/xiphos
void gui_sidebar_showhide(void)
{
	GtkAllocation allocation;
	if (!settings.docked) {
		gdk_window_raise(gtk_widget_get_window(GTK_WIDGET(widgets.dock_sb)));
		return;
	}

	if (settings.showshortcutbar) {
		xml_set_value("Xiphos", "misc", "show_sidebar", "0");
		settings.showshortcutbar = FALSE;
		gtk_widget_hide(widgets.shortcutbar);
		sync_windows();
		gtk_widget_get_allocation(GTK_WIDGET(widgets.vpaned),
					  &allocation);
		settings.biblepane_width = allocation.width;

	} else {
		xml_set_value("Xiphos", "misc", "show_sidebar", "1");
		settings.showshortcutbar = TRUE;
		gtk_paned_set_position(GTK_PANED(widgets.epaned),
				       settings.sidebar_width);
		gtk_widget_show(widgets.shortcutbar);
		sync_windows();
		gtk_widget_get_allocation(GTK_WIDGET(widgets.vpaned),
					  &allocation);
		settings.biblepane_width = allocation.width;
	}
}
コード例 #3
0
static gboolean on_configure_event(GtkWidget *widget,
				   GdkEventConfigure *event,
				   gpointer user_data)
{
	gchar layout[80];
	gint x;
	gint y;

	gdk_window_get_root_origin(gtk_widget_get_window(widgets.app), &x, &y);

	settings.gs_width = event->width;
	settings.gs_height = event->height;
	settings.app_x = x;
	settings.app_y = y;

#ifdef HAVE_GTK_312
	sprintf(layout, "%d", gtk_window_is_maximized(GTK_WINDOW(widgets.app)));
	xml_set_value("Xiphos", "layout", "maximized", layout);
#endif

	sprintf(layout, "%d", settings.gs_width);
	xml_set_value("Xiphos", "layout", "width", layout);

	sprintf(layout, "%d", settings.gs_height);
	xml_set_value("Xiphos", "layout", "height", layout);

	sprintf(layout, "%d", settings.app_x);
	xml_set_value("Xiphos", "layout", "app_x", layout);

	sprintf(layout, "%d", settings.app_y);
	xml_set_value("Xiphos", "layout", "app_y", layout);
	xml_save_settings_doc(settings.fnconfigure);

	return FALSE;
}
コード例 #4
0
ファイル: webkit_editor.c プロジェクト: elijahdorman/Xiphos
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, "text/html", "utf_8", "file://");

	g_free(text);
	e->is_changed = FALSE;
}
コード例 #5
0
ファイル: slib-editor.c プロジェクト: acli/xiphos
static void _load_file(EDITOR *e, const gchar *filename)
{
	//GtkWidget *choser;
	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);

	char *contents;
	char *etag_out;
	gsize length;
	GFile *file;
	file = g_file_new_for_path(filename);
	gtkhtml_editor_set_filename(GTKHTML_EDITOR(e->window),
				    e->filename);
	if (g_file_load_contents(file, NULL, &contents, &length, &etag_out, NULL))
		gtkhtml_editor_set_text_html(GTKHTML_EDITOR(e->window),
					     contents, length);
	gtkhtml_editor_drop_undo(GTKHTML_EDITOR(e->window));
	gtkhtml_editor_set_changed(GTKHTML_EDITOR(e->window), FALSE);
	return;
}
コード例 #6
0
ファイル: xml_comm.c プロジェクト: jinrenlab/tanlz
/******************************************************************************
 **函数名称: xml_node_creat_ext
 **功    能: 创建XML节点
 **输入参数: 
 **     xml: XML树
 **     type: 节点类型(xml_node_type_e)
 **     name: 节点名
 **     vlaue: 节点值
 **输出参数: NONE
 **返    回: 节点地址
 **实现描述: 
 **注意事项: 
 **作    者: # Qifeng.zou # 2013.06.11 #
 ******************************************************************************/
xml_node_t *xml_node_creat_ext(xml_tree_t *xml,
        xml_node_type_e type, const char *name, const char *value)
{
    int size;
    xml_node_t *node;

    /* 1. 创建节点 */
    node = (xml_node_t*)xml->alloc(xml->pool, sizeof(xml_node_t));
    if (NULL == node) {
        return NULL;
    }

    xml_node_init(node, type);

    /* 2. 设置节点名 */
    size = strlen(name) + 1;
    node->name.str = (char *)xml->alloc(xml->pool, size);
    if (NULL == node->name.str) {
        xml_node_free_one(xml, node);
        return NULL;
    }

    node->name.len = snprintf(node->name.str, size, "%s", name);

    /* 3. 设置节点值 */
    if (xml_set_value(xml, node, value)) {
        xml_node_free_one(xml, node);
        return NULL;
    }
    
    return node;
}
コード例 #7
0
void gui_show_hide_dicts(gboolean choice)
{
	settings.showdicts = choice;
	gui_tab_set_showdicts(choice);
	gui_set_tab_label(settings.currentverse, TRUE);
	if (choice == FALSE) {
		if (main_window_created)
			gtk_widget_hide(widgets.box_dict);
		xml_set_value("Xiphos", "misc", "showdicts", "0");
	} else {
		if (main_window_created)
			gtk_widget_show(widgets.box_dict);
		xml_set_value("Xiphos", "misc", "showdicts", "1");
	}
	if (main_window_created)
		gui_set_bible_comm_layout();
}
コード例 #8
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  on_versehighlight_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void on_versehighlight_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle special current verse highlight.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
on_versehighlight_activate(GtkCheckMenuItem *menuitem, gpointer user_data)
{
	settings.versehighlight = gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "versehighlight",
		      (settings.versehighlight ? "1" : "0"));
	main_display_bible(NULL, settings.currentverse);
}
コード例 #9
0
ファイル: tabbed_browser.c プロジェクト: elijahdorman/Xiphos
static void _tabs_on(void)
{
	xml_set_value("Xiphos", "tabs", "browsing", "1");
	settings.browsing = TRUE;
	gui_close_all_tabs();
	gui_load_tabs(default_tab_filename);
	gtk_widget_show(widgets.hboxtb);
	gtk_widget_show(widgets.hpaned);
}
コード例 #10
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  on_side_preview_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void on_side_preview_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle special previewer in sidebar.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
on_side_preview_activate(GtkCheckMenuItem *menuitem, gpointer user_data)
{
	settings.show_previewer_in_sidebar =
	    gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "show_side_preview",
		      (settings.show_previewer_in_sidebar ? "1" : "0"));
	gui_show_previewer_in_sidebar(settings.show_previewer_in_sidebar);
}
コード例 #11
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  on_read_aloud_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void on_read_aloud_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle reading scripture out loud.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
on_read_aloud_activate(GtkCheckMenuItem *menuitem, gpointer user_data)
{
	settings.readaloud = gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "readaloud",
		      (settings.readaloud ? "1" : "0"));
	if (settings.readaloud)
		main_display_bible(NULL, settings.currentverse);
}
コード例 #12
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  on_linked_tabs_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void on_linked_tabs_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle linking tabs together.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
on_linked_tabs_activate(GtkCheckMenuItem *menuitem, gpointer user_data)
{
	settings.linkedtabs = gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "pinnedtabs",
		      (settings.linkedtabs ? "1" : "0"));
	if (settings.showparatab)
		gui_force_parallel_tab_sync();
}
コード例 #13
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  on_show_verse_numbers_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void on_show_verse_numbers_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle showing verse numbers together.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
on_show_verse_numbers_activate(GtkCheckMenuItem *menuitem,
			       gpointer user_data)
{
	settings.showversenum = gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "showversenum",
		      (settings.showversenum ? "1" : "0"));
	main_display_commentary(NULL, settings.currentverse);
	main_display_bible(NULL, settings.currentverse);
}
コード例 #14
0
void gui_show_hide_texts(gboolean choice)
{
	settings.showtexts = choice;
	gui_tab_set_showtexts(choice);
	gui_set_tab_label(settings.currentverse, TRUE);
	if (choice == FALSE) {
		if (main_window_created)
			gtk_widget_hide(widgets.vpaned);
		xml_set_value("Xiphos", "misc", "showtexts", "0");
	} else {
		if (main_window_created) {
			gtk_widget_show(widgets.vpaned);
			gtk_widget_show(nav_toolbar);
		}
		xml_set_value("Xiphos", "misc", "showtexts", "1");
	}
	/*if (main_window_created)
	   gui_set_bible_comm_layout(); */
}
コード例 #15
0
ファイル: main_menu.c プロジェクト: acli/xiphos
/******************************************************************************
 * Name
 *  gui_parallel_tab_activate
 *
 * Synopsis
 *   #include "gui/main_menu.h"
 *
 *   void gui_parallel_tab_activate(GtkMenuItem *menuitem, gpointer user_data)
 *
 * Description
 *   toggle special current verse highlight.
 *
 * Return value
 *   void
 */
G_MODULE_EXPORT void
gui_parallel_tab_activate(GtkCheckMenuItem *menuitem, gpointer user_data)
{
	if (!settings.browsing)
		return;
	if (!settings.showparatab && !gtk_check_menu_item_get_active(menuitem)) {
		xml_set_value("Xiphos", "misc", "showparatab", "0");
		return;
	}

	settings.showparatab = gtk_check_menu_item_get_active(menuitem);
	xml_set_value("Xiphos", "misc", "showparatab",
		      (settings.showparatab ? "1" : "0"));
	if (settings.showparatab) {
		gui_open_parallel_view_in_new_tab();
		gui_force_parallel_tab_sync();
	} else
		gui_close_passage_tab(gtk_notebook_page_num(GTK_NOTEBOOK(widgets.notebook_main),
							    widgets.parallel_tab));
}
コード例 #16
0
void gui_show_hide_preview(gboolean choice)
{
	settings.showpreview = choice;
	gui_tab_set_showpreview(choice);
	if (choice == FALSE) {
		if (main_window_created)
			gtk_widget_hide(widgets.box_side_preview);
		gtk_widget_hide(widgets.vbox_previewer);
		xml_set_value("Xiphos", "misc", "showpreview", "0");
	} else {
		if (main_window_created) {
			if (settings.show_previewer_in_sidebar)
				gtk_widget_show(widgets.box_side_preview);
			else
				gtk_widget_show(widgets.vbox_previewer);
		}

		xml_set_value("Xiphos", "misc", "showpreview", "1");
	}
}
コード例 #17
0
static gboolean epaned_button_release_event(GtkWidget *widget,
					    GdkEventButton *event,
					    gpointer user_data)
{
	gint panesize;
	gchar layout[80];

	panesize = gtk_paned_get_position(GTK_PANED(widget));

	if (panesize > 15) {
		if (!strcmp((gchar *)user_data, "epaned")) {
			settings.sidebar_width = panesize;
			sprintf(layout, "%d", settings.sidebar_width);
			xml_set_value("Xiphos", "layout",
				      "shortcutbar", layout);
		}
		if (!strcmp((gchar *)user_data, "vpaned")) {
			settings.biblepane_height = panesize;
			sprintf(layout, "%d", settings.biblepane_height);
			xml_set_value("Xiphos", "layout",
				      "bibleheight", layout);
		}
		if (!strcmp((gchar *)user_data, "vpaned2")) {
			settings.commpane_height = panesize;
			sprintf(layout, "%d", settings.commpane_height);
			xml_set_value("Xiphos", "layout",
				      "commentaryheight", layout);
		}
		if (!strcmp((gchar *)user_data, "hpaned1")) {
			settings.biblepane_width = panesize;
			sprintf(layout, "%d", settings.biblepane_width);
			xml_set_value("Xiphos", "layout",
				      "textpane", layout);
		}
		return FALSE;
	}
	return TRUE;
}
コード例 #18
0
ファイル: parallel_dialog.c プロジェクト: crosswire/xiphos
static void on_dlgparallel_destroy(GObject *object, gpointer user_data)
{

	gtk_notebook_set_show_tabs(GTK_NOTEBOOK(widgets.notebook_bible_parallel),
				   TRUE);

	gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets.notebook_bible_parallel),
				      1);
	settings.dockedInt = TRUE;
	main_update_parallel_page();

	settings.display_parallel = 0;
	xml_set_value("Xiphos", "layout", "parallelopen", "0");
}
コード例 #19
0
ファイル: webkit_editor.c プロジェクト: elijahdorman/Xiphos
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);
}
コード例 #20
0
ファイル: sidebar.c プロジェクト: crosswire/xiphos
static gboolean paned_button_release_event(GtkWidget *widget,
					   GdkEventButton *event,
					   gpointer user_data)
{
	gint panesize;
	gchar layout[80];

	panesize = gtk_paned_get_position(GTK_PANED(widget));

	if (panesize > 15) {
		settings.sidebar_notebook_height = panesize;
		sprintf(layout, "%d", settings.sidebar_notebook_height);
		xml_set_value("Xiphos", "layout",
			      "sidebar_notebook_height", layout);
	}
	return FALSE;
}
コード例 #21
0
ファイル: tabbed_browser.c プロジェクト: elijahdorman/Xiphos
static void _tabs_off(void)
{
	int page = _is_paratab_showing();
	xml_set_value("Xiphos", "tabs", "browsing", "0");
	gui_save_tabs(default_tab_filename);
	if (settings.showparatab) {
		gui_close_passage_tab(gtk_notebook_page_num(GTK_NOTEBOOK(widgets.notebook_main),
							    widgets.parallel_tab));
		settings.showparatab = FALSE;
	}
	gui_close_all_tabs();
	settings.browsing = FALSE;
	gui_load_tabs(no_tab_filename);
	gtk_widget_hide(widgets.hboxtb);
	gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets.notebook_bible_parallel),
				      page);
}
コード例 #22
0
ファイル: webkit_editor.c プロジェクト: elijahdorman/Xiphos
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;
}
コード例 #23
0
static void new_base_font_size(gboolean up)
{
	if (up) {
		settings.base_font_size++;
		if (settings.base_font_size > 5)
			settings.base_font_size = 5;
	} else {
		settings.base_font_size--;
		if (settings.base_font_size < -2)
			settings.base_font_size = -2;
	}

	if (settings.base_font_size_str)
		g_free(settings.base_font_size_str);
	settings.base_font_size_str =
	    g_strdup_printf("%+d", settings.base_font_size);

	xml_set_value("Xiphos", "fontsize", "basefontsize",
		      settings.base_font_size_str);
	redisplay_to_realign();
}
コード例 #24
0
ファイル: slib-editor.c プロジェクト: acli/xiphos
static void action_new_cb(GtkAction *action, EDITOR *e)
{ /* for studypad only */

	if (editor_is_dirty(e))
		_save_file(e);

	_load_file(e,
		   g_strdup_printf("%s/%s", settings.gSwordDir,
				   "template.pad"));

	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);

	gtkhtml_editor_set_filename(GTKHTML_EDITOR(e->window), NULL);
	gtkhtml_editor_set_changed(GTKHTML_EDITOR(e->window), TRUE);
}
コード例 #25
0
ファイル: slib-editor.c プロジェクト: acli/xiphos
static gint save_dialog(GtkhtmlEditor *editor, EDITOR *e)
{
	GtkWidget *dialog;
	const gchar *filename;
	gint response;

	dialog =
	    gtk_file_chooser_dialog_new(_("Save As"), GTK_WINDOW(editor),
					GTK_FILE_CHOOSER_ACTION_SAVE,
#ifdef HAVE_GTK_310
					"_Cancel", GTK_RESPONSE_CANCEL,
					"_Open", GTK_RESPONSE_ACCEPT,
#else
					GTK_STOCK_CANCEL,
					GTK_RESPONSE_CANCEL,
					GTK_STOCK_SAVE,
					GTK_RESPONSE_ACCEPT,
#endif
					NULL);

	gtk_file_chooser_set_do_overwrite_confirmation(GTK_FILE_CHOOSER(dialog), TRUE);

	filename = gtkhtml_editor_get_filename(editor);

	if (filename != NULL)
		gtk_file_chooser_set_filename(GTK_FILE_CHOOSER(dialog),
					      filename);
	else {
		gtk_file_chooser_set_current_folder(GTK_FILE_CHOOSER(dialog),
						    settings.studypaddir);
		gtk_file_chooser_set_current_name(GTK_FILE_CHOOSER(dialog),
						  _("Untitled document"));
	}

	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));
		gtkhtml_editor_set_filename(editor, new_filename);

		if (e->filename)
			g_free(e->filename);
		e->filename = g_strdup(new_filename);

		xml_set_value("Xiphos", "studypad", "lastfile",
			      e->filename);
		settings.studypadfilename =
		    xml_get_value("studypad", "lastfile");

		change_window_title(e->window, e->filename);

		g_free(new_filename);
	}

	gtk_widget_destroy(dialog);

	return response;
}
コード例 #26
0
ファイル: parallel_dialog.c プロジェクト: crosswire/xiphos
/******************************************************************************
 * Name
 *   create_parallel_dialog
 *
 * Synopsis
 *   #include "parallel_dialog.h"
 *
 *   GtkWidget *create_parallel_dialog(void)
 *
 * Description
 *
 *
 *
 * Return value
 *   GtkWidget *
 */
static GtkWidget *create_parallel_dialog(void)
{
	GtkWidget *box_parallel_labels;
	GtkWidget *dialog_vbox25;
	GtkWidget *toolbar29;
	GtkWidget *dialog_action_area25;
	GtkWidget *hbuttonbox4;
	GtkWidget *btnDockInt;
#ifndef USE_WEBKIT2
	GtkWidget *scrolled_window;
#endif
	gchar title[256];

	sprintf(title, "%s - %s", settings.program_title, _("Parallel"));

	dialog_parallel = gtk_dialog_new();
	gtk_window_set_title(GTK_WINDOW(dialog_parallel), title);

	g_object_set_data(G_OBJECT(dialog_parallel),
			  "dialog_parallel", dialog_parallel);
	gtk_window_resize(GTK_WINDOW(dialog_parallel),
			  settings.parallel_width,
			  settings.parallel_height);
	gtk_window_set_resizable(GTK_WINDOW(dialog_parallel), TRUE);

	dialog_vbox25 =
	    gtk_dialog_get_content_area(GTK_DIALOG(dialog_parallel));
	g_object_set_data(G_OBJECT(dialog_parallel), "dialog_vbox25",
			  dialog_vbox25);
	gtk_widget_show(dialog_vbox25);

	UI_VBOX(vboxInt, FALSE, 0);
	gtk_widget_show(vboxInt);
	gtk_box_pack_start(GTK_BOX(dialog_vbox25), vboxInt, TRUE, TRUE, 0);
	toolbar29 = create_nav_toolbar();
	gtk_widget_show(toolbar29);
	gtk_box_pack_start(GTK_BOX(vboxInt), toolbar29, FALSE, FALSE, 0);

	UI_HBOX(box_parallel_labels, TRUE, 2);
	gtk_widget_show(box_parallel_labels);
	gtk_box_pack_start(GTK_BOX(vboxInt), box_parallel_labels, FALSE,
			   TRUE, 0);
	gtk_container_set_border_width(GTK_CONTAINER(box_parallel_labels),
				       2);

#if 0
	if (settings.parallel_list) {
		GtkWidget *plabel;
		gchar *label;
		gint modidx;

		for (modidx = 0; settings.parallel_list[modidx]; ++modidx) {
			plabel = gtk_label_new(NULL);
			gtk_widget_show(plabel);
			gtk_box_pack_start(GTK_BOX(box_parallel_labels),
					   plabel, FALSE, FALSE, 0);
			gtk_label_set_use_markup(GTK_LABEL(plabel), TRUE);

			label =
			    g_strdup_printf
			    ("<span color='%s' weight='bold'>%s</span>",
			     settings.bible_verse_num_color,
			     settings.parallel_list[modidx]);
			gtk_label_set_markup(GTK_LABEL(plabel), label);
			g_free(label);
		}
	}
#endif /* 0 */

#ifndef USE_WEBKIT2
	scrolled_window = gtk_scrolled_window_new(NULL, NULL);
	gtk_widget_show(scrolled_window);
	gtk_box_pack_start(GTK_BOX(vboxInt), scrolled_window, TRUE, TRUE,
			   0);
	gtk_scrolled_window_set_policy(GTK_SCROLLED_WINDOW(scrolled_window),
				       GTK_POLICY_AUTOMATIC,
				       GTK_POLICY_ALWAYS);
	gtk_scrolled_window_set_shadow_type((GtkScrolledWindow *)
					    scrolled_window,
					    settings.shadow_type);
#endif

	widgets.html_parallel_dialog =
	    GTK_WIDGET(XIPHOS_HTML_NEW(NULL, FALSE, PARALLEL_TYPE));
	gtk_widget_show(widgets.html_parallel_dialog);
#ifdef USE_WEBKIT2
	gtk_box_pack_start(GTK_BOX(vboxInt), widgets.html_parallel_dialog, TRUE, TRUE, 0);
#else
	gtk_container_add(GTK_CONTAINER(scrolled_window),
			  widgets.html_parallel_dialog);
#endif

	g_signal_connect((gpointer)widgets.html_parallel_dialog,
			 "popupmenu_requested",
			 G_CALLBACK(_popupmenu_requested_cb), NULL);

	dialog_action_area25 =
#ifdef HAVE_GTK_312
	    gtk_dialog_get_content_area(GTK_DIALOG(dialog_parallel));
#else
	    gtk_dialog_get_action_area(GTK_DIALOG(dialog_parallel));
#endif
	g_object_set_data(G_OBJECT(dialog_parallel),
			  "dialog_action_area25", dialog_action_area25);
	gtk_widget_show(dialog_action_area25);
	gtk_container_set_border_width(GTK_CONTAINER(dialog_action_area25), 10);

#ifdef USE_GTK_3
	hbuttonbox4 = gtk_button_box_new(GTK_ORIENTATION_HORIZONTAL);
#else
	hbuttonbox4 = gtk_hbutton_box_new();
#endif
	gtk_widget_show(hbuttonbox4);

#ifdef HAVE_GTK_312
	gtk_box_pack_start(GTK_BOX(dialog_action_area25), hbuttonbox4,
			   FALSE, TRUE, 3);
#else
	gtk_box_pack_start(GTK_BOX(dialog_action_area25), hbuttonbox4,
			   TRUE, TRUE, 0);
#endif

	gtk_button_box_set_layout(GTK_BUTTON_BOX(hbuttonbox4),
				  GTK_BUTTONBOX_END);
	btnDockInt =
#ifdef HAVE_GTK_310
	    gtk_button_new_from_icon_name("window-close",
					  GTK_ICON_SIZE_BUTTON);
#else
	    gtk_button_new_from_stock(GTK_STOCK_CLOSE);
#endif
	gtk_widget_show(btnDockInt);
	gtk_container_add(GTK_CONTAINER(hbuttonbox4), btnDockInt);
	gtk_widget_set_can_default(btnDockInt, 1);

	g_signal_connect(G_OBJECT(dialog_parallel), "destroy",
			 G_CALLBACK(on_dlgparallel_destroy), NULL);
	g_signal_connect(G_OBJECT(btnDockInt), "clicked",
			 G_CALLBACK(gui_btnDockInt_clicked), NULL);

	g_signal_connect((gpointer)dialog_parallel,
			 "configure_event",
			 G_CALLBACK(on_parallel_configure_event), NULL);

	settings.display_parallel = 1;
	xml_set_value("Xiphos", "layout", "parallelopen", "1");

	set_window_icon(GTK_WINDOW(dialog_parallel));

	/*
	 * (from xiphos.c)
	 * a little paranoia:
	 * clamp geometry values to a reasonable bound.
	 * sometimes xiphos gets insane reconfig events as it dies,
	 * especially if it's due to just shutting linux down.
	 */
	if ((settings.parallel_x < 0) || (settings.parallel_x > 2000))
		settings.parallel_x = 40;
	if ((settings.parallel_y < 0) || (settings.parallel_y > 2000))
		settings.parallel_y = 40;

	gtk_window_move(GTK_WINDOW(dialog_parallel), settings.parallel_x,
			settings.parallel_y);

	return dialog_parallel;
}