Commit 13616d71 authored by Miguel de Icaza's avatar Miguel de Icaza Committed by Arturo Espinosa

Oops. This was not a bug. gc was actually initialized as being

1998-11-27  Miguel de Icaza  <miguel@nuclecu.unam.mx>

	* src/item-grid.c (item_grid_realize): Oops.  This was not a bug.
	gc was actually initialized as being item_grid->grid_gc, it was
	just not obvious.

	* src/main.c (gnumeric_main): Fix the prototype.

	* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.

	* src/dialog-cell-format.c (create_number_format_page): Revert
	const from gtk-clist.

	* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.

	* src/Gnumeric-impl.c: Empty stubs for now.
parent e8452e49
1998-11-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.c (item_grid_realize): Oops. This was not a bug.
gc was actually initialized as being item_grid->grid_gc, it was
just not obvious.
* src/main.c (gnumeric_main): Fix the prototype.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/dialog-cell-format.c (create_number_format_page): Revert
const from gtk-clist.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/Gnumeric-impl.c: Empty stubs for now.
* src/Makefile.am (GNUMERIC_CORBA_SOURCES): Add rules for
......
1998-11-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.c (item_grid_realize): Oops. This was not a bug.
gc was actually initialized as being item_grid->grid_gc, it was
just not obvious.
* src/main.c (gnumeric_main): Fix the prototype.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/dialog-cell-format.c (create_number_format_page): Revert
const from gtk-clist.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/Gnumeric-impl.c: Empty stubs for now.
* src/Makefile.am (GNUMERIC_CORBA_SOURCES): Add rules for
......
1998-11-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.c (item_grid_realize): Oops. This was not a bug.
gc was actually initialized as being item_grid->grid_gc, it was
just not obvious.
* src/main.c (gnumeric_main): Fix the prototype.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/dialog-cell-format.c (create_number_format_page): Revert
const from gtk-clist.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/Gnumeric-impl.c: Empty stubs for now.
* src/Makefile.am (GNUMERIC_CORBA_SOURCES): Add rules for
......
1998-11-27 Miguel de Icaza <miguel@nuclecu.unam.mx>
* src/item-grid.c (item_grid_realize): Oops. This was not a bug.
gc was actually initialized as being item_grid->grid_gc, it was
just not obvious.
* src/main.c (gnumeric_main): Fix the prototype.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/dialog-cell-format.c (create_number_format_page): Revert
const from gtk-clist.
* src/dialog-goto-cell.c (dialog_goto_cell): Revert const from gtk-clist.
* src/Gnumeric-impl.c: Empty stubs for now.
* src/Makefile.am (GNUMERIC_CORBA_SOURCES): Add rules for
......
......@@ -19,27 +19,31 @@ GNOME_X_CHECKS
GNOME_XML_CHECK
GNOME_CHECK_GUILE
dnl
dnl Check for ORBit
dnl
AC_CHECK_PROG(orbit_val, orbit-config, true, false)
AM_CONDITIONAL(WITH_ORBIT, $orbit_val)
if $orbit_val; then
AC_DEFINE(HAVE_ORBIT)
fi
AC_SUBST(CFLAGS)
AC_SUBST(CPPFLAGS)
AC_SUBST(LDFLAGS)
dnl ## internationalization support
dnl ## all 'es_??' only differ from 'es' in number formats
dnl **************************************************
dnl * internationalization support
dnl **************************************************
dnl
dnl
dnl Check doc/translating.sgml for a description of how to translate
dnl and why we have so many translations.
dnl
ALL_LINGUAS="cs es es_DO es_GT es_HN es_MX es_PA es_PE es_SV fr hu it ko no no_NO pt"
AM_GNU_GETTEXT
AC_LINK_FILES($nls_cv_header_libgt, $nls_cv_header_intl)
dnl **************************************************
dnl * ORBit support
dnl **************************************************
GNOMEGNORBA_LIBS="$GNOMEGNORBA_LIBS"
AC_SUBST(GNOMEGNORBA_LIBS)
dnl
dnl Compatibility with old Gtk+ (will be removed when new Gtk+ and gnome-libs go out).
dnl
......@@ -48,8 +52,11 @@ LIBS="$LIBS $GTK_LIBS"
AC_CHECK_FUNC(gtk_selection_add_target, AC_DEFINE(HAVE_GTK_SELECTION_ADD_TARGET))
LIBS="$OLD_LIBS"
dnl
dnl Check for Perl
dnl **************************************************
dnl * Check for Perl
dnl **************************************************
dnl
AC_CHECK_PROG(perl_val, perl, true, false)
if $perl_val; then
......@@ -77,8 +84,9 @@ if $perl_val; then
fi
AM_CONDITIONAL(WITH_PERL, $perl_val)
dnl
dnl Check for Python
dnl **************************************************
dnl * Check for Python
dnl **************************************************
dnl
AC_CHECK_PROG(python_val, python, true, false)
if $python_val; then
......
......@@ -512,12 +512,12 @@ impl_GNOME_GnumericFactory__destroy(impl_POA_GNOME_GnumericFactory * servant, CO
}
CORBA_Object
impl_GNOME_GnumericFactory_new(impl_POA_GNOME_GnumericFactory * servant,
CORBA_Environment * ev)
impl_GNOME_GnumericFactory_new (impl_POA_GNOME_GnumericFactory * servant,
CORBA_Environment * ev)
{
CORBA_Object retval;
CORBA_Object retval;
return retval;
return retval;
}
CORBA_Object
......
......@@ -12,9 +12,11 @@ module GNOME {
};
interface Gnumeric : Spreadsheet {
};
interface GnumericFactory : Factory {
};
};
......@@ -2,7 +2,7 @@
# -Wshadow -Wpointer-arith \
# -Wmissing-prototypes -Wmissing-declarations
bin_PROGRAMS = gnumeric
bin_PROGRAMS = gnumeric gnumeric-corba
#noinst_PROGRAMS = number-match
......@@ -114,10 +114,17 @@ $(GNUMERIC_CORBA_GENERATED): Gnumeric.idl
gnumeric_SOURCES = \
main.c \
normal-args.c \
$(GNUMERIC_BASE_SOURCES)
gnumeric_corba_SOURCES = \
main.c \
corba-args.c \
$(GNUMERIC_CORBA_SOURCES) \
$(GNUMERIC_BASE_SOURCES)
gnumeric_LDFLAGS = -export-dynamic
gnumeric_corba_LDFLAGS = $(gnumeric_LDFLAGS)
gnumeric_LDADD = \
../plugins/excel/libexcel.a \
......@@ -127,6 +134,7 @@ gnumeric_LDADD = \
$(GUILE_LIBS) \
$(INTLLIBS)
gnumeric_corba_LDADD = $(gnumeric_LDADD) $(GNOMEGNORBA_LIBS)
wc:
wc -l $(gnumeric_SOURCES)
......
/*
* corba-args.c: This routine bootstraps Gnumeric with CORBA.
*
* The non-CORBA bootstrap code is found on normal-args.c
*
* Author:
* Miguel de Icaza (miguel@gnu.org)
*/
#include <config.h>
#include <gnome.h>
#include <libgnorba/gnorba.h>
#include "gnumeric.h"
#include "main.h"
#include "main.h"
void
gnumeric_arg_parse (int argc, char *argv [])
{
CORBA_Environment ev;
CORBA_exception_init (&ev);
gnome_CORBA_init_with_popt_table (
"gnumeric", VERSION, &argc, argv, gnumeric_popt_options, 0, &ctx, 0, &ev);
}
......@@ -91,7 +91,7 @@ format_list_fill (int n)
gtk_clist_clear (cl);
for (i = 0; texts [i]; i++){
const gchar *t [1];
gchar *t [1];
t [0] = _(texts [i]);
......@@ -270,7 +270,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells)
/* 1.2 Fill the category list */
gtk_clist_freeze (GTK_CLIST (number_cat_list));
for (i = 0; cell_formats [i].name; i++){
const gchar *text [1] = { _(cell_formats [i].name) };
gchar *text [1] = { _(cell_formats [i].name) };
gtk_clist_append (GTK_CLIST (number_cat_list), text);
}
......
......@@ -37,7 +37,7 @@ dialog_goto_cell (Workbook *wb)
if (!dialog){
GtkWidget *box;
const gchar *titles [2];
gchar *titles [2];
titles [0] = _("Cell");
titles [1] = NULL;
......@@ -84,7 +84,7 @@ dialog_goto_cell (Workbook *wb)
if (*text){
if (workbook_parse_and_jump (wb, text)){
const gchar *texts [1];
gchar *texts [1];
texts [0] = text;
......
......@@ -91,7 +91,7 @@ format_list_fill (int n)
gtk_clist_clear (cl);
for (i = 0; texts [i]; i++){
const gchar *t [1];
gchar *t [1];
t [0] = _(texts [i]);
......@@ -270,7 +270,7 @@ create_number_format_page (GtkWidget *prop_win, CellList *cells)
/* 1.2 Fill the category list */
gtk_clist_freeze (GTK_CLIST (number_cat_list));
for (i = 0; cell_formats [i].name; i++){
const gchar *text [1] = { _(cell_formats [i].name) };
gchar *text [1] = { _(cell_formats [i].name) };
gtk_clist_append (GTK_CLIST (number_cat_list), text);
}
......
......@@ -37,7 +37,7 @@ dialog_goto_cell (Workbook *wb)
if (!dialog){
GtkWidget *box;
const gchar *titles [2];
gchar *titles [2];
titles [0] = _("Cell");
titles [1] = NULL;
......@@ -84,7 +84,7 @@ dialog_goto_cell (Workbook *wb)
if (*text){
if (workbook_parse_and_jump (wb, text)){
const gchar *texts [1];
gchar *texts [1];
texts [0] = text;
......
......@@ -62,6 +62,9 @@ item_grid_realize (GnomeCanvasItem *item)
item_grid->background = gs_white;
item_grid->grid_color = gs_light_gray;
item_grid->default_color = gs_black;
gdk_gc_set_foreground (gc, &item_grid->grid_color);
gdk_gc_set_background (gc, &item_grid->background);
gdk_gc_set_foreground (item_grid->fill_gc, &item_grid->background);
gdk_gc_set_background (item_grid->fill_gc, &item_grid->grid_color);
......
......@@ -7,32 +7,32 @@
#include "cursors.h"
#include "number-match.h"
#include "dump.h"
#include "main.h"
#ifdef HAVE_GUILE
#include <libguile.h>
#endif
static char *dump_file_name = NULL;
static char **startup_files = NULL;
static const struct poptOption options[] = {
{"dump-func-defs", '\0', POPT_ARG_STRING, &dump_file_name, 0, N_("Dumps the function definitions"), N_("FILE")},
{NULL, '\0', 0, NULL, 0}
poptContext ctx;
const struct poptOption gnumeric_popt_options [] = {
{ "dump-func-defs", '\0', POPT_ARG_STRING, &dump_file_name, 0,
N_("Dumps the function definitions"), N_("FILE") },
{ NULL, '\0', 0, NULL, 0 }
};
static int
static void
gnumeric_main (void *closure, int argc, char *argv [])
{
GList *l;
poptContext ctx;
int i;
/* If set, the file to load at startup time */
char **startup_files = NULL;
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
gnome_init_with_popt_table ("gnumeric", VERSION, argc, argv,
options, 0, &ctx);
gnumeric_arg_parse (argc, argv);
string_init ();
format_match_init ();
......@@ -49,15 +49,15 @@ gnumeric_main (void *closure, int argc, char *argv [])
exit (1);
}
startup_files = poptGetArgs(ctx);
if(startup_files)
for(i = 0; startup_files[i]; i++) {
current_workbook = workbook_read (startup_files[i]);
if (current_workbook)
gtk_widget_show (current_workbook->toplevel);
startup_files = poptGetArgs (ctx);
if (startup_files)
for (i = 0; startup_files [i]; i++) {
current_workbook = workbook_read (startup_files [i]);
if (current_workbook)
gtk_widget_show (current_workbook->toplevel);
}
poptFreeContext(ctx);
poptFreeContext (ctx);
if (current_workbook == NULL){
current_workbook = workbook_new_with_sheets (1);
......@@ -71,7 +71,6 @@ gnumeric_main (void *closure, int argc, char *argv [])
format_color_shutdown ();
gnome_config_drop_all ();
return 0;
}
int
......
#ifndef GNUMERIC_MAIN_H
#define GNUMERIC_MAIN_H
extern const struct poptOption gnumeric_popt_options [];
extern poptContext ctx;
void gnumeric_arg_parse (int argc, char *argv []);
#endif
......@@ -7,32 +7,32 @@
#include "cursors.h"
#include "number-match.h"
#include "dump.h"
#include "main.h"
#ifdef HAVE_GUILE
#include <libguile.h>
#endif
static char *dump_file_name = NULL;
static char **startup_files = NULL;
static const struct poptOption options[] = {
{"dump-func-defs", '\0', POPT_ARG_STRING, &dump_file_name, 0, N_("Dumps the function definitions"), N_("FILE")},
{NULL, '\0', 0, NULL, 0}
poptContext ctx;
const struct poptOption gnumeric_popt_options [] = {
{ "dump-func-defs", '\0', POPT_ARG_STRING, &dump_file_name, 0,
N_("Dumps the function definitions"), N_("FILE") },
{ NULL, '\0', 0, NULL, 0 }
};
static int
static void
gnumeric_main (void *closure, int argc, char *argv [])
{
GList *l;
poptContext ctx;
int i;
/* If set, the file to load at startup time */
char **startup_files = NULL;
bindtextdomain (PACKAGE, GNOMELOCALEDIR);
textdomain (PACKAGE);
gnome_init_with_popt_table ("gnumeric", VERSION, argc, argv,
options, 0, &ctx);
gnumeric_arg_parse (argc, argv);
string_init ();
format_match_init ();
......@@ -49,15 +49,15 @@ gnumeric_main (void *closure, int argc, char *argv [])
exit (1);
}
startup_files = poptGetArgs(ctx);
if(startup_files)
for(i = 0; startup_files[i]; i++) {
current_workbook = workbook_read (startup_files[i]);
if (current_workbook)
gtk_widget_show (current_workbook->toplevel);
startup_files = poptGetArgs (ctx);
if (startup_files)
for (i = 0; startup_files [i]; i++) {
current_workbook = workbook_read (startup_files [i]);
if (current_workbook)
gtk_widget_show (current_workbook->toplevel);
}
poptFreeContext(ctx);
poptFreeContext (ctx);
if (current_workbook == NULL){
current_workbook = workbook_new_with_sheets (1);
......@@ -71,7 +71,6 @@ gnumeric_main (void *closure, int argc, char *argv [])
format_color_shutdown ();
gnome_config_drop_all ();
return 0;
}
int
......
#ifndef GNUMERIC_MAIN_H
#define GNUMERIC_MAIN_H
extern const struct poptOption gnumeric_popt_options [];
extern poptContext ctx;
void gnumeric_arg_parse (int argc, char *argv []);
#endif
/*
* normal-args.c: This file calls gnome_init.
*
* The default Gnumeric bootstraps with this file. The
* CORBA version of Gnumeric bootstraps with corba-args.c
*
* Author:
* Miguel de Icaza (miguel@gnu.org).
*/
#include <config.h>
#include <gnome.h>
#include "gnumeric.h"
#include "main.h"
void
gnumeric_arg_parse (int argc, char *argv [])
{
gnome_init_with_popt_table (
"gnumeric", VERSION, argc, argv, gnumeric_popt_options, 0, &ctx);
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment