[sword-devel] Re: Gnomesword...what am I doing wrong, more info

Jared Johnson sword-devel@crosswire.org
16 Aug 2001 13:56:42 -0500


--=-S0lgcVYeuggGxqlYAWIq
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On 16 Aug 2001 09:44:56 -0400, Terry Biggs wrote:
> Thanks Jared,
> 
> I just heard from the gtkhtml list and have a fix. It is in main.c I'll
> get it fixed soon.

Ah... you probably don't need this then :)

but just in case.

(remember this is derived from the previous version of main.c)

-- 
Jared Johnson
solomon@futureks.net

GPG Key ID: DF 28 CD 64

-----BEGIN GEEK CODE BLOCK-----
Version:  3.12
GCS/C d+(-)>-- s:+ a18 C++++$ UL++++>$ P+>++++ L+++ E--- W+ N+ o? K-
w--- !O
M-- V-- !PS !PE Y PGP- t+ 5-- X R-- tv- b+ DI>+ !D G e>++(>+++) h-- r*
y-(>+++)
------END GEEK CODE BLOCK------

--=-S0lgcVYeuggGxqlYAWIq
Content-Type: text/x-c
Content-Disposition: attachment; filename=main.c.2
Content-ID: <997988198.13302.1.camel@biff>
Content-Transfer-Encoding: 7bit

/* -*- Mode: C; tab-width: 8; indent-tabs-mode: t; c-basic-offset: 8 -*- */
/***************************************************************************
                          main.c  -  description
                             -------------------
    begin                : Mon May 8 2000
    copyright            : (C) 2000 by Terry Biggs
    email                : tbiggs@infinet.com
 ***************************************************************************/
 
/***************************************************************************
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 ***************************************************************************/
 
#ifdef HAVE_CONFIG_H
#  include <config.h>
#endif

#include <gnome.h>
#include <gconf.h>

#include "gs_sword.h"
#include "gs_gnomesword.h"
#include "gs_menu.h"
#include "support.h"
#include "callback.h"
#include "interface.h"
#include "gs_file.h"
#include "gs_html.h"

extern SETTINGS *settings;
SETTINGS myset;	
extern GList 	*biblemods,
	*commentarymods,
	*dictionarymods,
	*percommods;
int
main (int argc, char *argv[])
{
	GtkWidget 
		*mainwindow;
	//	*setup;
	gboolean 		
		newconfigs = FALSE,	
		newbookmarks = FALSE;
	char *gconf_argv[] = { "gnome_sword_preferences", NULL };
                	
	gnome_init("GnomeSword", VERSION, argc, argv);		
	if(argc > 1) {			
		if(!strcmp(argv[1],"newconfigs")) newconfigs = TRUE;
		if(!strcmp(argv[1],"newbookmarks")) newbookmarks = TRUE;
		if(!strcmp(argv[1],"newfiles"))
		{
  			newconfigs = TRUE;
  			newbookmarks = TRUE;
		}
	}		

	gconf_init (1, gconf_argv, NULL);

  	/*
  	setup = create_dialog1();
  	gnome_dialog_set_default(GNOME_DIALOG(setup), 2);
		gnome_dialog_run_and_close(GNOME_DIALOG(setup));
	*/
  	mainwindow = create_mainwindow ();
  	add_gtkhtml_widgets(mainwindow);
  	setDiretory();
  	if(newconfigs)
  	{
  		createsettings();
  	}
  	if(newbookmarks)
  	{
  		createFiles();
  	}
  	/* load settings into structure */
  	myset = readsettings(); 
  	/* set pointer to structure */
  	settings = &myset;       
  	initSWORD(mainwindow);
  	initGnomeSword(mainwindow,settings,biblemods,commentarymods,dictionarymods,percommods);
  	
  	gtk_widget_show(mainwindow);
  	/* set toggle state of buttons and menu items */
  	UpdateChecks(mainwindow);    	
  	gtk_main ();  	
  	return 0;
}


--=-S0lgcVYeuggGxqlYAWIq--