Commit 41c10f5e authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

pull down from gnumeric


2005-02-16  Jody Goldberg <jody@gnome.org>

	* utils/go-file.c (go_url_check_extension) : pull down from gnumeric

	* gui-utils/go-gui-utils.c (go_gtk_button_new_with_stock) : renamed
	  from go_gtk_button_new_with_stock_image.
	(go_libglade_new) : use go_sys_data_dir.
	(go_gtk_widget_disable_focus) : renamed from go_widget_disable_focus.
	(go_pango_measure_string) : renamed from go_measure_string.
	(go_gtk_window_set_transient) : renamed from go_window_set_transient.
	(go_gtk_nonmodal_dialog) : renamed from gnumeric_non_modal_dialog.
	(go_gtk_file_sel_dialog) : renamed from gnumeric_dialog_file_selection.
	(go_gtk_select_image) : renamed from gui_image_file_select.
	(gui_get_image_save_info) : pulled in from gnumeric.
	(go_atk_setup_label) : renamed from gnm_setup_label_atk.
	(go_help_display) : pulled down from gnumeric and made generic.
	(go_gtk_help_button_init) : ditto.
	(go_gtk_url_is_writeable) : ditto.
	(go_gtk_dialog_run) : pulled from gnumeric
	(go_gtk_notice_dialog) : ditto.
	(go_gtk_notice_nonmodal_dialog) : ditto.
	(go_gtk_query_yes_no) : ditto.

	* gui-utils/Makefile.am : Add libhtml_stub

	* graph/gog-renderer-pixbuf.c (gog_renderer_pixbuf_init) : init the
	  dpis.
	(gog_renderer_pixbuf_get_pango_context) : use the stored calculated
	  dpi rather than gconf
	(gog_renderer_pixbuf_update) : store the dpi

	* goffice.c (libgoffice_init) : init the paths.  We may want to expand
	  this at some point to allow cmd-line or env-var override.
	(go_sys_data_dir) : new.
	(go_sys_icon_dir) : new.

2005-02-16  Jody Goldberg <jody@gnome.org>

	* src/libgnumeric.c (gnm_pre_parse_init) : set the path for the new
	  gnumeric-functions message catalog

	* src/gnumeric-gconf.c : Add an ifdef to silence the gconf warnings
	* src/io-context.[ch], src/io-context-priv.h : move into goffice/app
parent e51836d3
2005-02-16 Jody Goldberg <jody@gnome.org>
* src/libgnumeric.c (gnm_pre_parse_init) : set the path for the new
gnumeric-functions message catalog
* src/gnumeric-gconf.c : Add an ifdef to silence the gconf warnings
* src/io-context.[ch], src/io-context-priv.h : move into goffice/app
2005-02-15 Morten Welinder <terra@gnome.org>
* src/main-application.c: Typo. [#167495]
......@@ -379,6 +387,12 @@
* Release 1.4.2
2005-01-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=161404
* xmldocs.make : sync doc installation dir with where the code expects
it to live
2005-01-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=158692
......
2005-02-16 Jody Goldberg <jody@gnome.org>
* src/libgnumeric.c (gnm_pre_parse_init) : set the path for the new
gnumeric-functions message catalog
* src/gnumeric-gconf.c : Add an ifdef to silence the gconf warnings
* src/io-context.[ch], src/io-context-priv.h : move into goffice/app
2005-02-15 Morten Welinder <terra@gnome.org>
* src/main-application.c: Typo. [#167495]
......@@ -379,6 +387,12 @@
* Release 1.4.2
2005-01-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=161404
* xmldocs.make : sync doc installation dir with where the code expects
it to live
2005-01-16 Jody Goldberg <jody@gnome.org>
http://bugzilla.gnome.org/show_bug.cgi?id=158692
......
......@@ -48,7 +48,7 @@
#include <selection.h>
#include <position.h>
#include <ranges.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <command-context.h>
#include <workbook-view.h>
#include <workbook.h>
......
......@@ -40,7 +40,7 @@
#include "selection.h"
#include "position.h"
#include "ranges.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include <goffice/app/error-info.h>
......
......@@ -29,7 +29,7 @@
#include <goffice/app/module-plugin-defs.h>
#include <workbook-view.h>
#include <workbook.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-input.h>
#include <string.h>
......
......@@ -30,7 +30,7 @@
#include <workbook-priv.h>
#include <workbook-view.h>
#include <goffice/app/module-plugin-defs.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <command-context.h>
#include <command-context-stderr.h>
#include <glib/gi18n.h>
......
......@@ -14,7 +14,7 @@
#include <cell.h>
#include <sheet.h>
#include <value.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <workbook-view.h>
#include <workbook.h>
#include <goffice/app/module-plugin-defs.h>
......
2005-02-16 Jody Goldberg <jody@gnome.org>
* ms-excel-write.c (excel_write_workbook) : Use count_io_progress_set
so that we can remove workbook_io_progress_set.
2005-02-09 Jody Goldberg <jody@gnome.org>
* ms-excel-read.c (excel_read_BOUNDSHEET) : set the visibility of
......
......@@ -14,7 +14,7 @@
#include <goffice/app/file.h>
#include "libgnumeric.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "command-context.h"
#include "workbook-view.h"
#include "workbook.h"
......
......@@ -24,7 +24,7 @@
#include <gnumeric.h>
#include "excel-xml-read.h"
#include "xml-io-version.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include "sheet-view.h"
......
......@@ -194,7 +194,7 @@ static gboolean
BC_R(3d)(XLChartHandler const *handle,
XLChartReadState *s, BiffQuery *q)
{
d (0, {
d (1, {
guint16 const rotation = GSF_LE_GET_GUINT16 (q->data); /* 0-360 */
guint16 const elevation = GSF_LE_GET_GUINT16 (q->data+2); /* -90 - 90 */
guint16 const distance = GSF_LE_GET_GUINT16 (q->data+4); /* 0 - 100 */
......
......@@ -53,7 +53,7 @@
#include <value.h>
#include <hlink.h>
#include <application.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <command-context.h>
#include <sheet-object-cell-comment.h>
#include <sheet-object-widget.h>
......
......@@ -7,7 +7,7 @@
* Jon K Hellan (hellan@acm.org)
* Jody Goldberg (jody@gnome.org)
*
* (C) 1998-2004 Michael Meeks, Jon K Hellan, Jody Goldberg
* (C) 1998-2005 Michael Meeks, Jon K Hellan, Jody Goldberg
**/
/*
......@@ -52,7 +52,7 @@
#include <print-info.h>
#include <workbook-view.h>
#include <workbook-priv.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <command-context.h>
#include <expr.h>
#include <expr-impl.h>
......@@ -89,7 +89,7 @@
#define RASTER_BLIP_HDR_LEN 25
#define VECTOR_BLIP_HDR_LEN 58
#define N_ELEMENTS_BETWEEN_PROGRESS_UPDATES 20
#define N_CELLS_BETWEEN_UPDATES 100
typedef struct {
char const *type;
......@@ -4000,7 +4000,7 @@ excel_sheet_write_block (ExcelWriteSheet *esheet, guint32 begin, int nrows,
run_size = 0;
}
excel_write_cell (ewb, esheet, cell, xf);
workbook_io_progress_update (esheet->ewb->io_context, 1);
count_io_progress_update (esheet->ewb->io_context, 1);
}
}
if (run_size > 0)
......@@ -4945,8 +4945,12 @@ excel_write_workbook (ExcelWriteState *ewb)
ms_biff_put_empty (ewb->bp, BIFF_EOF);
workbook_io_progress_set (ewb->io_context, ewb->gnum_wb,
N_ELEMENTS_BETWEEN_PROGRESS_UPDATES);
for (i = workbook_sheet_count (ewb->gnum_wb) ; i-- > 0 ;) {
Sheet const *sheet = workbook_sheet_by_index (ewb->gnum_wb, i);
n += g_hash_table_size (sheet->cell_hash);
}
count_io_progress_set (ewb->io_context,
n, N_CELLS_BETWEEN_UPDATES);
for (i = 0; i < ewb->sheets->len; i++)
excel_write_sheet (ewb, g_ptr_array_index (ewb->sheets, i));
io_progress_unset (ewb->io_context);
......
......@@ -8,7 +8,7 @@
* Jody Goldberg (jody@gnome.org)
*
* (C) 1998-2001 Michael Meeks
* 2002 Jody Goldberg
* 2002-2005 Jody Goldberg
*/
#include <gnumeric-config.h>
......@@ -31,7 +31,7 @@
#include <expr-name.h>
#include <str.h>
#include <parse-util.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-utils.h>
#include <glib/gi18n.h>
......
......@@ -21,7 +21,7 @@ view_data_sources (GnmAction const *action, WorkbookControl *wbc)
if (!g_spawn_async (NULL, argv, NULL, G_SPAWN_SEARCH_PATH,
NULL, NULL, NULL, NULL))
gnumeric_notice (wbcg_toplevel (WORKBOOK_CONTROL_GUI (wbc)),
go_gtk_notice_dialog (wbcg_toplevel (WORKBOOK_CONTROL_GUI (wbc)),
GTK_MESSAGE_INFO,
_("Could not run GNOME database configuration tool"));
}
......
......@@ -26,7 +26,7 @@
#include <gnumeric-config.h>
#include <gnumeric.h>
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include "sheet-style.h"
......
......@@ -42,7 +42,7 @@
#include <style.h>
#include <cell.h>
#include <ranges.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/app/error-info.h>
#include <gsf/gsf-input.h>
......
......@@ -40,7 +40,7 @@
#include <gnumeric.h>
#include <gnumeric-gconf.h>
#include "latex.h"
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/app/error-info.h>
#include <workbook-view.h>
#include <workbook.h>
......
......@@ -29,7 +29,7 @@
#include "roff.h"
#include "font.h"
#include "cell.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/error-info.h>
#include "cellspan.h"
......
......@@ -17,7 +17,7 @@
#include <goffice/app/module-plugin-defs.h>
#include <goffice/app/error-info.h>
#include <gutils.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-input.h>
#include <gsf/gsf-utils.h>
......
......@@ -35,7 +35,7 @@
#include "cell.h"
#include "sheet.h"
#include "value.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include <goffice/app/module-plugin-defs.h>
......
......@@ -28,7 +28,7 @@
#include "cell.h"
#include "sheet.h"
#include "value.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include <goffice/app/module-plugin-defs.h>
......
2005-02-16 Jody Goldberg <jody@gnome.org>
* numtheory.c : Fix the help entries for PFACTOR and NT_PI
2005-02-08 Jody Goldberg <jody@gnome.org>
* Release 1.5.0
......
......@@ -449,6 +449,7 @@ static GnmFuncHelp const help_pfactor[] = {
"\n"
"The argument must be at least 2, or else a #VALUE! error is returned.\n"
"\n"
"@EXAMPLES=\n"
"@SEEALSO=ITHPRIME")
},
{ GNM_FUNC_HELP_END }
......@@ -480,6 +481,7 @@ static GnmFuncHelp const help_nt_pi[] = {
"NT_PI function returns the number of primes less than or equal "
"to @n.\n"
"\n"
"@EXAMPLES=\n"
"@SEEALSO=ITHPRIME, NT_PHI, NT_D, NT_SIGMA")
},
{ GNM_FUNC_HELP_END }
......
......@@ -40,7 +40,7 @@
#include <mstyle.h>
#include <gnm-format.h>
#include <command-context.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/utils/go-units.h>
#include <goffice/utils/datetime.h>
......
......@@ -26,7 +26,7 @@
#include <gnumeric.h>
#include <workbook-view.h>
#include <goffice/app/file.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <gnm-format.h>
#include <workbook.h>
#include <workbook-priv.h> /* Workbook::names */
......
......@@ -10,10 +10,11 @@
<services>
<service type="file_opener" id="openoffice" priority="1" probe="FALSE">
<information>
<_description>Open/Star Calc (*.sxc)</_description>
<_description>Open/Star Calc (*.sxc, *.ods)</_description>
</information>
<suffixes>
<suffix>sxc</suffix>
<suffix>ods</suffix>
</suffixes>
</service>
<service type="file_saver" id="openoffice" file_extension="swc"
......
......@@ -18,11 +18,12 @@
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include <sheet.h>
#include <datetime.h>
#include <ranges.h>
#include <mstyle.h>
#include <sheet-style.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/utils/datetime.h>
#include <goffice/app/error-info.h>
GNUMERIC_MODULE_PLUGIN_INFO_DECL;
......
......@@ -20,7 +20,7 @@
#include "value.h"
#include "expr.h"
#include "expr-impl.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/go-plugin-service.h>
#include <goffice/app/go-plugin-loader.h>
......
......@@ -11,7 +11,7 @@
#include <gnumeric.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <sheet.h>
#include <ranges.h>
#include <value.h>
......
......@@ -25,7 +25,7 @@
*/
#include <gnumeric-config.h>
#include <gnumeric.h>
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include "psiconv-plugin.h"
......
......@@ -2,7 +2,7 @@
#define PLUGIN_PSICONV_PLUGIN_H
#include "gnumeric.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <stdio.h>
#include <gsf/gsf-input.h>
......
......@@ -42,7 +42,7 @@
#include "selection.h"
#include "position.h"
#include "ranges.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include <goffice/app/error-info.h>
......
......@@ -24,7 +24,7 @@
#include "expr.h"
#include "expr-impl.h"
#include "func.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "gnm-plugin.h"
#include <goffice/app/go-plugin.h>
......
......@@ -38,7 +38,7 @@
#include <style-color.h>
#include <parse-util.h>
#include <goffice/app/module-plugin-defs.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-utils.h>
#include <gsf/gsf-input.h>
......@@ -397,7 +397,7 @@ qpro_parse_formula (QProReadState *state, int col, int row,
ref.col_relative = (tmp & 0x4000) ? TRUE : FALSE;
ref.row_relative = (tmp & 0x2000) ? TRUE : FALSE;
if (ref.row_relative)
ref.row = ((gint16)(tmp & 0x1fff) << 3) >> 3;
ref.row = (int)(((gint16)((tmp & 0x1fff) << 3)) >> 3);
else
ref.row = tmp & 0x1fff;
expr = gnm_expr_new_cellref (&ref);
......@@ -415,7 +415,7 @@ qpro_parse_formula (QProReadState *state, int col, int row,
a.col_relative = (tmp & 0x4000) ? TRUE : FALSE;
a.row_relative = (tmp & 0x2000) ? TRUE : FALSE;
if (a.row_relative)
a.row = ((gint16)(tmp & 0x1fff) << 3) >> 3;
a.row = (int)(((gint16)((tmp & 0x1fff) << 3)) >> 3);
else
a.row = tmp & 0x1fff;
......@@ -425,7 +425,7 @@ qpro_parse_formula (QProReadState *state, int col, int row,
b.col_relative = (tmp & 0x4000) ? TRUE : FALSE;
b.row_relative = (tmp & 0x2000) ? TRUE : FALSE;
if (b.row_relative)
b.row = ((gint16)(tmp & 0x1fff) << 3) >> 3;
b.row = (int)(((gint16)((tmp & 0x1fff) << 3)) >> 3);
else
b.row = tmp & 0x1fff;
......
......@@ -13,7 +13,7 @@
#include <stdio.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/error-info.h>
#include "workbook-view.h"
#include "workbook.h"
......
......@@ -16,7 +16,7 @@
#include <glib/gi18n.h>
#include <gnumeric.h>
#include <goffice/app/file.h>
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-view.h"
#include "workbook.h"
#include "cell.h"
......
......@@ -22,7 +22,7 @@ hello_message (GnmAction const *action, WorkbookControl *wbc)
char *msg = g_strdup_printf (
_("This is message from the \"%s\" plugin."),
gnm_plugin_get_name (PLUGIN));
gnumeric_notice (wbcg_toplevel (WORKBOOK_CONTROL_GUI (wbc)), GTK_MESSAGE_INFO, msg);
go_gtk_notice_dialog (wbcg_toplevel (WORKBOOK_CONTROL_GUI (wbc)), GTK_MESSAGE_INFO, msg);
g_free (msg);
}
......
......@@ -17,7 +17,7 @@
#include <ranges.h>
#include <mstyle.h>
#include <sheet-style.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/error-info.h>
#include <goffice/app/module-plugin-defs.h>
......
......@@ -6,7 +6,7 @@
#include <gnm-format.h>
#include <gutils.h>
#include <io-context.h>
#include <goffice/app/io-context.h>
#include <goffice/app/error-info.h>
#include <string.h>
......
......@@ -24,7 +24,7 @@
#include <glib/gi18n.h>
#include <gnumeric.h>
#include "xml-io-version.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include <goffice/app/go-plugin.h>
#include <goffice/app/module-plugin-defs.h>
#include "sheet-view.h"
......
......@@ -71,9 +71,6 @@ GNUMERIC_BASE = \
command-context-stderr.h \
consolidate.c \
consolidate.h \
io-context.c \
io-context.h \
io-context-priv.h \
complex.h \
complex.c \
dependent.h \
......@@ -297,12 +294,6 @@ gnumeric_LDADD = \
gnumeric_LDFLAGS = -export-dynamic
if WITH_WIN32
gnumeric_LDFLAGS += -Wl,--export-all-symbols,--output-def,gnumeric.def,--out-implib,gnumeric.exe.a,
lib_LTLIBRARIES += libhtmlhelp-stub.la
libhtmlhelp_stub_la_SOURCES = htmlhelp-stub.c htmlhelp-stub.h
libhtmlhelp_stub_la_LIBADD = -luuid -lhtmlhelp
libhtmlhelp_stub_la_LDFLAGS = -no-undefined -Wl,libhtmlhelp-stub.def
endif
gnumeric_app_libs = \
......@@ -383,6 +374,7 @@ EXTRA_DIST = GNOME_Gnumeric-gtk.xml.in \
main-component.c \
$(GNUMERIC_GNOME) README.gnm_float \
gnumeric-paths.sh.in ssconvert.c ssindex.c gnumeric.rc
DISTCLEANFILES = GNOME_Gnumeric-gtk.xml
#number_match_SOURCES = number-match.c formats.c dates.c number-match-test.c
......
......@@ -12,7 +12,7 @@
#include "bonobo-io.h"
#include "command-context.h"
#include "io-context.h"
#include <goffice/app/io-context.h>
#include "workbook-control-component.h"
#include "workbook-view.h"
#include "workbook.h"
......
2005-02-16 Jody Goldberg <jody@gnome.org>
* utils/go-file.c (go_url_check_extension) : pull down from gnumeric
* gui-utils/go-gui-utils.c (go_gtk_button_new_with_stock) : renamed
from go_gtk_button_new_with_stock_image.
(go_libglade_new) : use go_sys_data_dir.
(go_gtk_widget_disable_focus) : renamed from go_widget_disable_focus.
(go_pango_measure_string) : renamed from go_measure_string.
(go_gtk_window_set_transient) : renamed from go_window_set_transient.
(go_gtk_nonmodal_dialog) : renamed from gnumeric_non_modal_dialog.
(go_gtk_file_sel_dialog) : renamed from gnumeric_dialog_file_selection.
(go_gtk_select_image) : renamed from gui_image_file_select.
(gui_get_image_save_info) : pulled in from gnumeric.
(go_atk_setup_label) : renamed from gnm_setup_label_atk.
(go_help_display) : pulled down from gnumeric and made generic.
(go_gtk_help_button_init) : ditto.
(go_gtk_url_is_writeable) : ditto.
(go_gtk_dialog_run) : pulled from gnumeric
(go_gtk_notice_dialog) : ditto.
(go_gtk_notice_nonmodal_dialog) : ditto.
(go_gtk_query_yes_no) : ditto.
* gui-utils/Makefile.am : Add libhtml_stub
* graph/gog-renderer-pixbuf.c (gog_renderer_pixbuf_init) : init the
dpis.
(gog_renderer_pixbuf_get_pango_context) : use the stored calculated
dpi rather than gconf
(gog_renderer_pixbuf_update) : store the dpi
* goffice.c (libgoffice_init) : init the paths. We may want to expand
this at some point to allow cmd-line or env-var override.
(go_sys_data_dir) : new.
(go_sys_icon_dir) : new.
2005-02-15 Stepan Kasal <kasal@ucw.cz>
* gui-utils/go-marshalers.list: Remove, merge with ...
......
......@@ -14,6 +14,7 @@ libgoffice_la_LIBADD = \
libgoffice_la_SOURCES = \
goffice.c \
goffice.h \
goffice-priv.h \
goffice-config.h
EXTRA_DIST = goffice.mk goffice-plugins.mk
......
......@@ -24,6 +24,9 @@ libgoffice_app_la_SOURCES = \
file.h \
error-info.c \
error-info.h \
io-context.c \
io-context.h \
io-context-priv.h \
go-cmd-context.c \
go-cmd-context.h
......
......@@ -12,6 +12,7 @@
#include <goffice/app/file.h>
#include <goffice/app/file-priv.h>
#include <goffice/app/error-info.h>
#include <goffice/app/io-context.h>
#include <gsf/gsf-input.h>
#include <gsf/gsf-output.h>
......@@ -74,13 +75,13 @@ gnm_file_opener_open_real (GnmFileOpener const *fo, gchar const *opt_enc,
gpointer FIXME_FIXME_workbook_view,
GsfInput *input)
{
if (fo->open_func != NULL)
if (fo->open_func != NULL) {
if (fo->encoding_dependent)
((GnmFileOpenerOpenFuncWithEnc)fo->open_func)
(fo, opt_enc, io_context, FIXME_FIXME_workbook_view, input);
else
fo->open_func (fo, io_context, FIXME_FIXME_workbook_view, input);
else
} else
gnumeric_io_error_unknown (io_context);
}
......@@ -282,21 +283,9 @@ gnm_file_opener_open (GnmFileOpener const *fo, gchar const *opt_enc,
IOContext *io_context,
gpointer FIXME_FIXME_workbook_view, GsfInput *input)
{
const char *input_name;
g_return_if_fail (IS_GNM_FILE_OPENER (fo));
g_return_if_fail (GSF_IS_INPUT (input));
input_name = gsf_input_name (input);
if (input_name) {
/*
* When we open a file, the input get a name that is its
* absolute filename.
*/
char *uri = go_shell_arg_to_uri (input_name);
workbook_set_uri (wb_view_workbook (FIXME_FIXME_workbook_view), uri);
g_free (uri);
}
GNM_FILE_OPENER_METHOD (fo, open) (fo, opt_enc, io_context, FIXME_FIXME_workbook_view, input);
}
......@@ -507,9 +496,7 @@ gnm_file_saver_save (GnmFileSaver const *fs, IOContext *io_context,
file_name = (char *) gsf_output_name (output);
if (file_name == NULL) {
ErrorInfo *save_error;
save_error = error_info_new_str(
ErrorInfo *save_error = error_info_new_str(
_("Not a valid UTF-8 filename."));
gnumeric_io_error_info_set (io_context, save_error);
return;
......@@ -549,48 +536,6 @@ gnm_file_saver_set_overwrite_files (GnmFileSaver *fs, gboolean overwrite)
fs->overwrite_files = overwrite;
}
/**
* gnm_vrfy_uri_ext
* @std_ext : Standard extension for the content type
* @uri : Uri
* @new_uri : New uri
*
* Modifies given @uri by adding the extension @std_ext if needed.
* If no @std_ext is given or @uri already has some extension,
* it just copies @uri.
*
* Value in new_uri: newly allocated string which you should free after
* use, containing (optionally) modified uri.
*
* Return Value: FALSE if the uri has an extension not matching @std_ext
*/
gboolean
gnm_vrfy_uri_ext (gchar const *std_ext,
gchar const *uri,
gchar **new_uri)
{
gchar *base;
gchar *user_ext;
gboolean res;