示例#1
0
G_MODULE_EXPORT void on_verse_per_line_activate(GtkCheckMenuItem *
						    menuitem,
						gpointer user_data)
{
	gchar *file = g_strdup_printf("%s/modops.conf",
				      settings.gSwordDir);

	gchar *url = g_strdup_printf("sword://%s/%s",
				     (is_dialog ? dialog->mod_name : settings.MainWindowModule),
				     (is_dialog ? dialog->key : settings.currentverse));

	save_conf_file_item(file, (is_dialog
				       ? dialog->mod_name
				       : settings.MainWindowModule),
			    "style",
			    (gtk_check_menu_item_get_active(menuitem)
				 ? "verse"
				 : "paragraph"));
	if (settings.havebible) {
		if (is_dialog) {
			/* show the change */
			main_dialogs_url_handler(dialog, url, TRUE);
		} else {
			settings.versestyle =
			    gtk_check_menu_item_get_active(menuitem);
			main_url_handler(url, TRUE);
		}
	}
	g_free(url);
	g_free(file);
}
示例#2
0
/******************************************************************************
 * Name
 *   gui_save_treeview_path_string
 *
 * Synopsis
 *   #include "gui/sidebar.h"
 *
 *   void gui_save_treeview_path_string (const gchar * path_str, const gchar * book_name)
 *
 * Description
 *   saves a books's treeview path in .xiphos/book_path.conf
 *
 * Return value
 *   void
 */
void gui_save_treeview_path_string(const gchar *path_str,
				   const gchar *book_name)
{
	gchar *file =
	    g_strdup_printf("%s/book_path.conf", settings.gSwordDir);
	save_conf_file_item(file, book_name, "PATH", path_str);
	XI_message(("book %s, path %s, file %s\n", book_name, path_str,
		    file));
	g_free(file);
}