Commit d6271c90 authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg
Browse files

Add GnmHLink.


2002-07-07  Jody Goldberg <jody@gnome.org>

	* src/gnumeric.h : Add GnmHLink.

	* src/item-grid.c : include hlink.h
	(item_grid_event) : a button release on an h-link activates it.

	* src/Makefile.am : Add hlink.[ch]

	* src/sheet.h : Lets take a break from architecture and add something
	  simple like hyper-links.
parent aa4bea61
2002-07-07 Jody Goldberg <jody@gnome.org>
* src/gnumeric.h : Add GnmHLink.
* src/item-grid.c : include hlink.h
(item_grid_event) : a button release on an h-link activates it.
* src/Makefile.am : Add hlink.[ch]
* src/sheet.h : Lets take a break from architecture and add something
simple like hyper-links.
2002-07-07 Jon K Hellan <hellan@acm.org>
* src/datetime.c (date_init, datetime_g_to_serial,
......
......@@ -24,6 +24,7 @@ Jody:
* Read edit_pos from xls for multi-selection case.
* Save selection correctly for xls.
* Move freeze state to SheetView.
* Decrease dependence on gal in favour of libgsf.
Jukka:
* More solver enhancements:
......
2002-07-07 Jody Goldberg <jody@gnome.org>
* src/gnumeric.h : Add GnmHLink.
* src/item-grid.c : include hlink.h
(item_grid_event) : a button release on an h-link activates it.
* src/Makefile.am : Add hlink.[ch]
* src/sheet.h : Lets take a break from architecture and add something
simple like hyper-links.
2002-07-07 Jon K Hellan <hellan@acm.org>
* src/datetime.c (date_init, datetime_g_to_serial,
......
2002-07-07 Jody Goldberg <jody@gnome.org>
* src/gnumeric.h : Add GnmHLink.
* src/item-grid.c : include hlink.h
(item_grid_event) : a button release on an h-link activates it.
* src/Makefile.am : Add hlink.[ch]
* src/sheet.h : Lets take a break from architecture and add something
simple like hyper-links.
2002-07-07 Jon K Hellan <hellan@acm.org>
* src/datetime.c (date_init, datetime_g_to_serial,
......
2002-07-07 Jody Goldberg <jody@gnome.org>
* sc-fin.c (GetDiffParam) : avoid compiler warnings.
* functions.c (gnumeric_amordegrc) : ditto.
2002-07-07 Jukka Pekka <jiivonen@hutcs.cs.hut.fi>
* functions.c (gnumeric_yield): Fixed.
......
......@@ -3009,7 +3009,7 @@ gnumeric_amordegrc (FunctionEvalInfo *ei, Value **argv)
{
GDate *nDate, *nFirstPer;
gnum_float fRestVal, fRate, fCost;
gint n, nBase, nPer;
gint nBase, nPer;
Value *result;
fCost = value_get_as_float (argv[0]);
......
......@@ -78,8 +78,8 @@ GetDiffParam (GDate *nStartDate, GDate *nEndDate, gint nMode, gint *rYears,
gint nDay1, nDay2;
gint nMonth1, nMonth2;
gint nYear1, nYear2;
gint nYears;
gint nDayDiff, nDaysInYear;
gint nYears = 0;
gint nDayDiff = 0, nDaysInYear = 0;
if ( g_date_compare (nStartDate, nEndDate) == 1 ) {
GDate *tmp = nEndDate;
......
2002-07-07 Jody Goldberg <jody@gnome.org>
* plugin-gda.c (display_recordset) : add some safety checking.
2002-05-29 Jody Goldberg <jody@gnome.org>
* Release 1.1.4
......
......@@ -51,27 +51,29 @@ display_recordset (GdaDataModel *recset)
rowcount = gda_data_model_get_n_rows (GDA_DATA_MODEL (recset));
/* convert the GdaDataModel in an array */
if (rowcount > 0) {
array = value_new_array_empty (fieldcount, rowcount);
for (row = 0; row < rowcount; row++) {
for (col = 0; col < fieldcount; col++) {
gchar *str;
const GdaValue *value;
value = gda_data_model_get_value_at (GDA_DATA_MODEL (recset),
col, row);
str = gda_value_stringify ((GdaValue *) value);
value_array_set (array,
col,
row,
value_new_string(str));
g_free (str);
}
if (rowcount <= 0)
return value_new_empty ();
if (rowcount >= SHEET_MAX_ROWS)
return value_new_error (ei->pos, _("Too much data returned"));
array = value_new_array_empty (fieldcount, rowcount);
for (row = 0; row < rowcount; row++) {
for (col = 0; col < fieldcount; col++) {
gchar *str;
const GdaValue *value;
value = gda_data_model_get_value_at (GDA_DATA_MODEL (recset),
col, row);
str = gda_value_stringify ((GdaValue *) value);
value_array_set (array,
col,
row,
value_new_string(str));
g_free (str);
}
}
else
array = value_new_array_empty (1, 1);
return array;
}
......@@ -138,8 +140,7 @@ gnumeric_execSQL (FunctionEvalInfo *ei, Value **args)
g_list_foreach (recset_list, (GFunc) g_object_unref, NULL);
g_list_free (recset_list);
}
else
} else
ret = value_new_empty ();
return ret;
......
2002-07-07 Jody Goldberg <jody@gnome.org>
* parser.c (mps_parse_ranges) : avoid warnings.
2002-07-03 Jukka Pekka <jiivonen@hutcs.cs.hut.fi>
* mps.c (mps_prepare): Added support for FX bounds.
......
......@@ -483,13 +483,15 @@ mps_add_bound (MpsInputContext *ctxt, MpsBoundType type, gchar *bound_name,
static gboolean
mps_parse_ranges (MpsInputContext *ctxt)
{
gchar type[3], n1[10], n2[10], v1[20], n3[10], v2[20];
/* gchar type[3], n1[10], n2[10], v1[20], n3[10], v2[20]; */
if (strncmp (ctxt->line, "ENDATA", 6) == 0)
return TRUE;
if (strncmp (ctxt->line, "RANGES", 6) != 0 || ctxt->line[6] != '\0')
return TRUE;
return FALSE;
}
/*
......
......@@ -13,7 +13,7 @@
#include <glib.h>
#include <libgnome/libgnome.h>
#include <gal/util/e-xml-utils.h>
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <libxml/parser.h>
#include <libxml/parserInternals.h>
#include <libxml/xmlmemory.h>
......@@ -290,8 +290,9 @@ gnumeric_plugin_loader_python_class_init (GnumericPluginLoaderPythonClass *klass
gtk_object_class->destroy = gnumeric_plugin_loader_python_destroy;
}
E_MAKE_TYPE (gnumeric_plugin_loader_python, "GnumericPluginLoaderPython", GnumericPluginLoaderPython,
&gnumeric_plugin_loader_python_class_init, gnumeric_plugin_loader_python_init, PARENT_TYPE)
GSF_CLASS (GnumericPluginLoaderPython, gnumeric_plugin_loader_python,
gnumeric_plugin_loader_python_class_init,
gnumeric_plugin_loader_python_init, PARENT_TYPE)
/*
* Service - file_opener
......
......@@ -953,7 +953,7 @@ plugin_init_general (ErrorInfo **ret_error)
/* Add gnumeric python directory to sys.path, so that we can
* import modules from there */
dir = gnumeric_sys_data_dir ("python");
name = g_concat_dir_and_file (dir, "gnumeric_startup.py");
name = g_build_filename (dir, "gnumeric_startup.py", NULL);
ret = PyRun_SimpleString ((char *) "import sys");
if (ret == 0) {
......
......@@ -115,6 +115,8 @@ GNUMERIC_BASE = \
gui-gnumeric.h \
gutils.c \
gutils.h \
hlink.c \
hlink.h \
history.c \
history.h \
item-acetate.c \
......
......@@ -21,9 +21,10 @@
#include "pixmaps/gnumeric-stock-pixbufs.h"
#include "gnm-marshalers.h"
#include <gtk/gtk.h>
#include <gnumeric-gconf.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-util.h>
#include <gtk/gtk.h>
/* Signals */
enum {
......@@ -628,6 +629,6 @@ gnumeric_application_init (GObject *obj)
app = gnm_app;
}
E_MAKE_TYPE (gnumeric_application, "GnumericApplication", GnumericApplication,
gnumeric_application_class_init, gnumeric_application_init,
G_TYPE_OBJECT);
GSF_CLASS (GnumericApplication, gnumeric_application,
gnumeric_application_class_init, gnumeric_application_init,
G_TYPE_OBJECT);
......@@ -279,8 +279,7 @@ clipboard_paste_region (WorkbookControl *wbc,
/* If the source is a single cell */
/* Treat a target of a single merge specially, don't split the merge */
if (src_cols == 1 && src_rows == 1)
{
if (src_cols == 1 && src_rows == 1) {
Range const *merge = sheet_merge_is_corner (pt->sheet, &r->start);
if (merge != NULL && range_equal (r, merge)) {
dst_cols = dst_rows = 1;
......
......@@ -11,7 +11,7 @@
#include "gnumeric.h"
#include "command-context-stderr.h"
#include "command-context-priv.h"
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <libgnome/gnome-i18n.h>
#include "error-info.h"
#include "ranges.h"
......@@ -144,6 +144,5 @@ ccs_class_init (GObjectClass *object_class)
cc_class->error.error_info = ccs_error_info;
}
E_MAKE_TYPE (command_context_stderr, "CommandContextStderr",
CommandContextStderr, ccs_class_init, ccs_init,
COMMAND_CONTEXT_TYPE);
GSF_CLASS (CommandContextStderr, command_context_stderr,
ccs_class_init, ccs_init, COMMAND_CONTEXT_TYPE);
......@@ -10,7 +10,7 @@
#include "gnumeric.h"
#include "command-context-priv.h"
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <libgnome/gnome-i18n.h>
#define CC_CLASS(o) COMMAND_CONTEXT_CLASS (G_OBJECT_GET_CLASS (o))
......@@ -159,5 +159,5 @@ command_context_pop_err_template (CommandContext *context)
}
}
E_MAKE_TYPE (command_context, "CommandContext", CommandContext,
NULL, NULL, G_TYPE_OBJECT)
GSF_CLASS (CommandContext, command_context,
NULL, NULL, G_TYPE_OBJECT)
......@@ -2,7 +2,6 @@
#define GNUMERIC_COMMAND_CONTEXT_H
#include "gnumeric.h"
#include "error-info.h"
#include <glib-object.h>
#define COMMAND_CONTEXT_TYPE (command_context_get_type ())
......
......@@ -65,8 +65,9 @@
#include "tools/dao.h"
#include "gnumeric-gconf.h"
#include <libgnome/gnome-i18n.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-util.h>
#include <libgnome/gnome-i18n.h>
#include <ctype.h>
/*
......@@ -131,8 +132,8 @@ typedef struct {
RedoCmd redo_cmd;
} GnumericCommandClass;
static E_MAKE_TYPE (gnumeric_command, "GnumericCommand", GnumericCommand,
NULL, NULL, G_TYPE_OBJECT);
GSF_CLASS (GnumericCommand, gnumeric_command,
NULL, NULL, G_TYPE_OBJECT);
/* Store the real GObject dtor pointer */
static void (* g_object_dtor) (GObject *object) = NULL;
......@@ -171,8 +172,8 @@ func ## _class_init (GnumericCommandClass * const parent) \
typedef struct { \
GnumericCommandClass cmd; \
} type ## Class; \
static E_MAKE_TYPE (func, #type, type, \
func ## _class_init, NULL, GNUMERIC_COMMAND_TYPE);
static GSF_CLASS (type, func, \
func ## _class_init, NULL, GNUMERIC_COMMAND_TYPE);
/******************************************************************/
......
......@@ -19,7 +19,7 @@
#include "str.h"
#include "value.h"
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <string.h>
#define SEARCH_STEPS 50
......@@ -142,4 +142,5 @@ complete_sheet_new (Sheet *sheet, int col, int row, CompleteMatchNotifyFn notify
return COMPLETE (cs);
}
E_MAKE_TYPE(complete_sheet, "CompleteSheet", CompleteSheet, complete_sheet_class_init, NULL, PARENT_TYPE);
GSF_CLASS (CompleteSheet, complete_sheet,
complete_sheet_class_init, NULL, PARENT_TYPE);
......@@ -23,7 +23,7 @@
#include "gnumeric.h"
#include "complete.h"
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <gtk/gtkmain.h>
#include <stdio.h>
#include <stdlib.h>
......@@ -113,4 +113,5 @@ complete_class_init (GObjectClass *object_class)
complete_class->search_iteration = default_search_iteration;
}
E_MAKE_TYPE(complete, "Complete", Complete, &complete_class_init, NULL, PARENT_TYPE);
GSF_CLASS (Complete, complete,
&complete_class_init, NULL, PARENT_TYPE);
......@@ -40,6 +40,7 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-util.h>
typedef struct {
......
......@@ -45,6 +45,7 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-util.h>
#include <math.h>
#include <stdlib.h>
......
......@@ -44,7 +44,7 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <ctype.h>
#include <stdio.h>
......
......@@ -35,10 +35,11 @@
#include <application.h>
#include <gnumeric-gconf.h>
#include <ctype.h>
#include <gsf/gsf-impl-utils.h>
#include <glade/glade.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include <libgnome/gnome-i18n.h>
#include <ctype.h>
#define GLADE_FILE "function-select.glade"
......@@ -428,4 +429,3 @@ dialog_function_select (WorkbookControlGUI *wbcg, char const *key)
return;
}
......@@ -37,11 +37,12 @@
#include <gnumeric-gconf.h>
#include <application.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-util.h>
#include <stdio.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
typedef struct {
WorkbookControlGUI *wbcg;
......
......@@ -43,6 +43,7 @@
#include <libgnome/gnome-i18n.h>
#include <glade/glade.h>
#include <gal/widgets/widget-color-combo.h>
#include <gal/util/e-util.h>
typedef struct {
WorkbookControlGUI *wbcg;
......
......@@ -39,9 +39,10 @@
#include <ranges.h>
#include <widgets/gnumeric-expr-entry.h>
#include <glade/glade.h>
#include <gal/util/e-util.h>
#include <libgnome/gnome-i18n.h>
#include <string.h>
#include <glade/glade.h>
#define SOLVER_KEY "solver-dialog"
......
......@@ -30,16 +30,16 @@
#include "format-template.h"
#include "gnumeric-gconf.h"
#include <gsf/gsf-impl-utils.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <unistd.h>
#include <dirent.h>
#include <string.h>
#include <errno.h>
#include <libgnome/gnome-util.h>
#include <libgnome/gnome-i18n.h>
#include <gal/util/e-util.h>
#define TEMPLATE_FILE_EXT ".xml"
......@@ -99,7 +99,7 @@ category_get_templates_list (FormatTemplateCategory *category,
gchar *full_entry_name;
FormatTemplate *ft;
full_entry_name = g_concat_dir_and_file (category->directory, entry->d_name);
full_entry_name = g_build_filename (category->directory, entry->d_name, NULL);
ft = format_template_new_from_file (full_entry_name, cc);
if (ft == NULL) {
g_warning (_("Invalid template file: %s"), full_entry_name);
......@@ -145,7 +145,7 @@ category_list_get_from_dir_list (GSList *dir_list)
gchar *full_entry_name;
struct stat entry_info;
full_entry_name = g_concat_dir_and_file (dir_name, entry->d_name);
full_entry_name = g_build_filename (dir_name, entry->d_name, NULL);
if (entry->d_name[0] != '.' && stat (full_entry_name, &entry_info) == 0 && S_ISDIR(entry_info.st_mode)) {
FormatTemplateCategory *category;
......
......@@ -26,9 +26,10 @@
#include "workbook-view.h"
#include "workbook.h"
#include "gutils.h"
#include "error-info.h"
#include <gsf/gsf-input.h>
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <string.h>
#include <libgnome/gnome-i18n.h>
......@@ -83,9 +84,9 @@ gnum_file_opener_class_init (GnumFileOpenerClass *klass)
klass->open = gnum_file_opener_open_real;
}
E_MAKE_TYPE (gnum_file_opener, "GnumFileOpener", GnumFileOpener,
gnum_file_opener_class_init, gnum_file_opener_init,
G_TYPE_OBJECT)
GSF_CLASS (GnumFileOpener, gnum_file_opener,
gnum_file_opener_class_init, gnum_file_opener_init,
G_TYPE_OBJECT)
/**
* gnum_file_opener_setup:
......@@ -256,7 +257,7 @@ gnum_file_saver_save_to_stream_real (GnumFileSaver const *fs,
gint old_umask;
gint fd;
tmp_name = g_concat_dir_and_file (g_get_tmp_dir (), "gnumeric-file-XXXXXX");
tmp_name = g_build_filename (g_get_tmp_dir (), "gnumeric-file-XXXXXX", NULL);
old_umask = umask (0077);
fd = mkstemp (tmp_name);
if (fd == -1) {
......@@ -332,9 +333,9 @@ gnum_file_saver_class_init (GnumFileSaverClass *klass)
klass->save = gnum_file_saver_save_real;
}
E_MAKE_TYPE (gnum_file_saver, "GnumFileSaver", GnumFileSaver,
gnum_file_saver_class_init, gnum_file_saver_init,
G_TYPE_OBJECT)
GSF_CLASS (GnumFileSaver, gnum_file_saver,
gnum_file_saver_class_init, gnum_file_saver_init,
G_TYPE_OBJECT)
/**
* gnum_file_saver_setup:
......
......@@ -33,7 +33,7 @@
# include "sheet-object-container.h"
#endif
#include <gal/widgets/e-cursors.h>
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
static GnomeCanvasClass *gcanvas_parent_class;
......@@ -612,9 +612,9 @@ gnm_canvas_init (GnumericCanvas *gcanvas)
GTK_WIDGET_SET_FLAGS (canvas, GTK_CAN_DEFAULT);
}
E_MAKE_TYPE (gnumeric_canvas, "GnumericCanvas", GnumericCanvas,
gnm_canvas_class_init, gnm_canvas_init,
GNM_SIMPLE_CANVAS_TYPE);
GSF_CLASS (GnumericCanvas, gnumeric_canvas,
gnm_canvas_class_init, gnm_canvas_init,
GNM_SIMPLE_CANVAS_TYPE);
GnumericCanvas *
gnumeric_canvas_new (SheetControlGUI *scg, GnumericPane *pane)
......
......@@ -46,7 +46,7 @@
#include <idl/GNOME_Gnumeric_Graph.h>
#include <bonobo.h>
#include <gal/util/e-util.h>
#include <gsf/gsf-impl-utils.h>
#include <gal/util/e-xml-utils.h>
#include <libxml/parser.h>
......@@ -548,9 +548,9 @@ gnm_graph_vector_init (GtkObject *obj)
vector->initialized = FALSE;
}
E_MAKE_TYPE (gnm_graph_vector,"GnmGraphVector",GnmGraphVector,
gnm_graph_vector_class_init, gnm_graph_vector_init, GTK_TYPE_OBJECT)
GSF_CLASS (GraphVector, gnm_graph_vector,
gnm_graph_vector_class_init, gnm_graph_vector_init,
GTK_TYPE_OBJECT);
/***************************************************************************/
......@@ -1183,11 +1183,11 @@ gnm_graph_class_init (GtkObjectClass *object_class)
}
#ifdef GNOME2_CONVERSION_COMPLETE
E_MAKE_TYPE (gnm_graph, "GnmGraph", GnmGraph,
gnm_graph_class_init, gnm_graph_init, SHEET_OBJECT_CONTAINER_TYPE)
GSF_CLASS (gnm_graph, GnmGraph,
gnm_graph_class_init, gnm_graph_init, SHEET_OBJECT_CONTAINER_TYPE)
#else
E_MAKE_TYPE (gnm_graph, "GnmGraph", GnmGraph,
gnm_graph_class_init, gnm_graph_init, 42)
GSF_CLASS (gnm_graph, GnmGraph,
gnm_graph_class_init, gnm_graph_init, 42)
#endif
/*****************************************************************************/
......
......@@ -4,7 +4,7 @@
#include "gnumeric-simple-canvas.h"
#include "sheet-control-gui-priv.h"