|
From: <kr_...@us...> - 2003-07-04 15:24:00
|
Update of /cvsroot/htoolkit/port/src/cbits/GTK
In directory sc8-pr-cvs1:/tmp/cvs-serv9885/src/cbits/GTK
Modified Files:
Internals.h Util.c
Log Message:
Store the GnomeProgram object returned from gnome_program_init function for future usage. The bInitialized variable from Util.c is removed. The condition gProgram is used to determine whether the program is initialized.
Index: Internals.h
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Internals.h,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -d -r1.2 -r1.3
*** Internals.h 1 May 2003 19:35:36 -0000 1.2
--- Internals.h 4 Jul 2003 15:23:57 -0000 1.3
***************
*** 7,10 ****
--- 7,12 ----
extern int gCurChar;
+ extern GnomeProgram *gProgram;
+
extern int gDocumentInterface;
extern char *gAppName, *gAppVersion, *gWindowName;
Index: Util.c
===================================================================
RCS file: /cvsroot/htoolkit/port/src/cbits/GTK/Util.c,v
retrieving revision 1.17
retrieving revision 1.18
diff -C2 -d -r1.17 -r1.18
*** Util.c 1 May 2003 20:45:32 -0000 1.17
--- Util.c 4 Jul 2003 15:23:57 -0000 1.18
***************
*** 5,9 ****
#include "Handlers_stub.h"
! BOOL bInitialized = FALSE;
int gDocumentInterface;
--- 5,9 ----
#include "Handlers_stub.h"
! GnomeProgram *gProgram = NULL;
int gDocumentInterface;
***************
*** 28,32 ****
void osInit(char *appName, char *appVersion, int DocumentInterface)
{
! if (!bInitialized)
{
int margc;
--- 28,32 ----
void osInit(char *appName, char *appVersion, int DocumentInterface)
{
! if (!gProgram)
{
int margc;
***************
*** 35,41 ****
gtk_set_locale();
getProgArgv(&margc, &margv);
! gnome_program_init(appName, appVersion, LIBGNOMEUI_MODULE,
margc, margv, GNOME_PARAM_POPT_TABLE, GNOME_PARAM_NONE);
- bInitialized = TRUE;
gAppName = strdup(appName);
--- 35,40 ----
gtk_set_locale();
getProgArgv(&margc, &margv);
! gProgram = gnome_program_init(appName, appVersion, LIBGNOMEUI_MODULE,
margc, margv, GNOME_PARAM_POPT_TABLE, GNOME_PARAM_NONE);
gAppName = strdup(appName);
***************
*** 65,68 ****
--- 64,68 ----
gtk_widget_destroy(gFrameWidget);
gtk_main_quit();
+ gProgram = NULL;
}
|