Commit caa620c4 authored by Jon K Hellan's avatar Jon K Hellan Committed by Jon Kåre Hellan

Add level FILE_FL_MANUAL_REMEMBER. Fix typos: FILE_SAVER_ID_INVAID ->

2001-02-19  Jon K Hellan  <hellan@acm.org>

	* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
	FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.

	* src/file.c (file_format_register_open): Fix typo:
	FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
	(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.
	(cb_unregister_save, workbook_save): Fix
	typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.

	* src/workbook.c (workbook_destroy): Only include in history is
	file_format_level >= FILE_FL_MANUAL_REMEMBER.
	(workbook_new, workbook_set_saveinfo): Fix typo:
	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.

	* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
	FILE_OPENER_ID_INVALID.


	* plugins/applix/boot.c (applix_load): Change file format level to
	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.


	* plugins/excel/boot.c (excel_load, excel_init): Change file
	format level to FILE_FL_MANUAL_REMEMBER.


	* plugins/lotus/boot.c (lotus_load): Change file format level to
	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.

	* plugins/oleo/boot.c (oleo_load): Change file format level to
	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.

	* plugins/plan-perfect/pln.c (pln_read_workbook): Fix typo:
	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.

	* plugins/sc/sc.c (sc_read_workbook): Fix typo:
	FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.

	* plugins/sylk/sylk.c (sylk_read_workbook): Change file format
	level to FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID
	-> FILE_SAVER_ID_INVALID.

	* plugins/xbase/boot.c (xbase_load): Change file format level to
	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.

	* plugins/xml2/xml2.c (xml2_open): Change file format level to
	FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
	FILE_SAVER_ID_INVALID.
parent c7e7c66b
2001-02-19 Jon K Hellan <hellan@acm.org>
* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
* src/file.c (file_format_register_open): Fix typo:
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
(cb_unregister_save, workbook_save): Fix
typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/workbook.c (workbook_destroy): Only include in history is
file_format_level >= FILE_FL_MANUAL_REMEMBER.
(workbook_new, workbook_set_saveinfo): Fix typo:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
FILE_OPENER_ID_INVALID.
2001-02-19 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_format) : Optionally supply a name.
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
* src/file.c (file_format_register_open): Fix typo:
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
(cb_unregister_save, workbook_save): Fix
typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/workbook.c (workbook_destroy): Only include in history is
file_format_level >= FILE_FL_MANUAL_REMEMBER.
(workbook_new, workbook_set_saveinfo): Fix typo:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
FILE_OPENER_ID_INVALID.
2001-02-19 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_format) : Optionally supply a name.
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
* src/file.c (file_format_register_open): Fix typo:
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
(cb_unregister_save, workbook_save): Fix
typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/workbook.c (workbook_destroy): Only include in history is
file_format_level >= FILE_FL_MANUAL_REMEMBER.
(workbook_new, workbook_set_saveinfo): Fix typo:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
FILE_OPENER_ID_INVALID.
2001-02-19 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_format) : Optionally supply a name.
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
* src/file.c (file_format_register_open): Fix typo:
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
(cb_unregister_save, workbook_save): Fix
typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/workbook.c (workbook_destroy): Only include in history is
file_format_level >= FILE_FL_MANUAL_REMEMBER.
(workbook_new, workbook_set_saveinfo): Fix typo:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
FILE_OPENER_ID_INVALID.
2001-02-19 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_format) : Optionally supply a name.
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* src/file.h: Add level FILE_FL_MANUAL_REMEMBER. Fix typos:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID,
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
* src/file.c (file_format_register_open): Fix typo:
FILE_OPENER_ID_INVAID -> FILE_OPENER_ID_INVALID.
(file_format_register_save): Fix typo: FILE_OPENER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
(cb_unregister_save, workbook_save): Fix
typo: FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/workbook.c (workbook_destroy): Only include in history is
file_format_level >= FILE_FL_MANUAL_REMEMBER.
(workbook_new, workbook_set_saveinfo): Fix typo:
FILE_SAVER_ID_INVAID -> FILE_SAVER_ID_INVALID.
* src/xml-io.c: Fix typos: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID, FILE_OPENER_ID_INVAID ->
FILE_OPENER_ID_INVALID.
2001-02-19 Jody Goldberg <jgoldberg@home.com>
* src/commands.c (cmd_format) : Optionally supply a name.
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* boot.c (applix_load): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -76,7 +76,8 @@ applix_load (IOContext *context, WorkbookView *wb_view,
if (res == 0)
workbook_set_saveinfo (wb_view_workbook (wb_view),
filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
filename, FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
return res;
}
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* boot.c (excel_load, excel_init): Change file format level to
FILE_FL_MANUAL_REMEMBER.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* ms-formula-write.c (write_node) : Use some code from expr.c
......
......@@ -100,7 +100,8 @@ excel_load (IOContext *context, WorkbookView *new_wb_view,
g_warning ("Failed to read Basic scripts");
}
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL, excel95_saver_id);
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL_REMEMBER,
excel95_saver_id);
}
ms_ole_destroy (&f);
......@@ -187,11 +188,12 @@ excel_init (void)
if (gnumeric_debugging > 0) {
excel98_saver_id = file_format_register_save (
".xls", _("Excel(R) 97 file format"),
FILE_FL_MANUAL, &excel_save_98, NULL);
FILE_FL_MANUAL_REMEMBER, &excel_save_98,
NULL);
}
excel95_saver_id = file_format_register_save (
".xls", _("Excel(R) 95 file format"),
FILE_FL_MANUAL, &excel_save_95, NULL);
FILE_FL_MANUAL_REMEMBER, &excel_save_95, NULL);
}
void
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* boot.c (lotus_load): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -75,7 +75,8 @@ lotus_load (IOContext *context, WorkbookView *wb_view,
ret = lotus_read (context, wb, filename);
if (ret == 0)
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
return ret;
}
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* boot.c (oleo_load): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -50,7 +50,8 @@ oleo_load (IOContext *context, WorkbookView *wb_view,
ret = oleo_read (context, wb, filename);
if (ret == 0)
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
return ret;
}
......
2001-02-18 Jon K Hellan <hellan@acm.org>
* pln.c (pln_read_workbook): Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -922,7 +922,7 @@ pln_read_workbook (IOContext *context, WorkbookView *view,
if (result != 0)
workbook_sheet_detach (book, src.sheet);
else
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVALID);
munmap((char *)data, len);
} else {
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* sc.c (sc_read_workbook): Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -422,7 +422,7 @@ sc_read_workbook (IOContext *context, WorkbookView *wb_view,
src.sheet = sheet_new (book, name);
workbook_sheet_attach (book, src.sheet, NULL);
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVALID);
g_free (name);
result = sc_parse_sheet (context, &src);
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* sylk.c (sylk_read_workbook): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -457,7 +457,8 @@ sylk_read_workbook (IOContext *context, WorkbookView *wb_view,
workbook_sheet_attach (book, src.sheet, NULL);
g_free (name);
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (book, filename, FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
result = sylk_parse_sheet (context, &src);
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* boot.c (xbase_load): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-16 Jody Goldberg <jgoldberg@home.com>
* Release 0.62
......
......@@ -172,7 +172,8 @@ xbase_load (IOContext *context, WorkbookView *wb_view,
sheet = sheet_new (wb, g_basename (name));
g_free (name);
workbook_sheet_attach (wb, sheet, NULL);
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
workbook_set_saveinfo (wb, filename, FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
field = 0;
while (field < file->fields) {
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* xml2.c (xml2_open): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-17 Jody Goldberg <jgoldberg@home.com>
* xml2.c (xml2ParseSheet) : Support the new sheet attributes.
......
......@@ -1569,7 +1569,8 @@ xml2_open (IOContext *context, WorkbookView *wb_view,
int res = xml2_read (context, wb_view, filename);
if (res == 0) {
workbook_set_saveinfo (wb_view_workbook (wb_view), filename,
FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
}
return res;
}
......
2001-02-19 Jon K Hellan <hellan@acm.org>
* xml2.c (xml2_open): Change file format level to
FILE_FL_MANUAL_REMEMBER. Fix typo: FILE_SAVER_ID_INVAID ->
FILE_SAVER_ID_INVALID.
2001-02-17 Jody Goldberg <jgoldberg@home.com>
* xml2.c (xml2ParseSheet) : Support the new sheet attributes.
......
......@@ -1569,7 +1569,8 @@ xml2_open (IOContext *context, WorkbookView *wb_view,
int res = xml2_read (context, wb_view, filename);
if (res == 0) {
workbook_set_saveinfo (wb_view_workbook (wb_view), filename,
FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
}
return res;
}
......
......@@ -55,7 +55,7 @@ file_format_register_open (int priority, const char *desc,
static FileOpenerId last_opener_id = 0;
FileOpener *fo = g_new (FileOpener, 1);
g_return_val_if_fail (open_fn != NULL, FILE_OPENER_ID_INVAID);
g_return_val_if_fail (open_fn != NULL, FILE_OPENER_ID_INVALID);
last_opener_id++;
fo->priority = priority;
......@@ -113,7 +113,7 @@ file_format_register_save (char *extension, const char *format_description,
static FileSaverId last_saver_id = 0;
FileSaver *fs = g_new (FileSaver, 1);
g_return_val_if_fail (save_fn != NULL, FILE_OPENER_ID_INVAID);
g_return_val_if_fail (save_fn != NULL, FILE_SAVER_ID_INVALID);
last_saver_id++;
fs->extension = extension;
......@@ -141,7 +141,7 @@ cb_unregister_save (Workbook *wb, FileSaverId *file_saver_id)
{
if (wb->file_saver_id == *file_saver_id) {
wb->file_format_level = FILE_FL_MANUAL;
wb->file_saver_id = FILE_SAVER_ID_INVAID;
wb->file_saver_id = FILE_SAVER_ID_INVALID;
}
}
......@@ -447,7 +447,7 @@ workbook_save (WorkbookControl *wbc, WorkbookView *wb_view)
template = g_strdup_printf (_("Could not save to file %s\n%%s"),
wb->filename);
command_context_push_err_template (COMMAND_CONTEXT (wbc), template);
if (wb->file_saver_id != FILE_SAVER_ID_INVAID) {
if (wb->file_saver_id != FILE_SAVER_ID_INVALID) {
file_saver = get_file_saver_by_id (wb->file_saver_id);
} else {
file_saver = get_file_saver_by_id (gnumeric_xml_get_saver_id ());
......
......@@ -13,6 +13,7 @@ typedef enum {
FILE_FL_WRITE_ONLY, /* Postscript etc, won't be remembered */
FILE_FL_NEW, /* Wb just created */
FILE_FL_MANUAL, /* Save gets punted to save as */
FILE_FL_MANUAL_REMEMBER, /* Ditto, but remember in history */
FILE_FL_AUTO /* Save will save to this filename */
} FileFormatLevel;
......@@ -34,8 +35,8 @@ typedef gint (*FileFormatSave) (IOContext *context,
typedef gulong FileSaverId;
#endif
#define FILE_OPENER_ID_INVAID 0
#define FILE_SAVER_ID_INVAID 0
#define FILE_OPENER_ID_INVALID 0
#define FILE_SAVER_ID_INVALID 0
typedef struct _FileOpener FileOpener;
typedef struct _FileSaver FileSaver;
......
......@@ -185,7 +185,7 @@ workbook_destroy (GtkObject *wb_object)
workbook_private_delete (wb->priv);
if (wb->file_format_level > FILE_FL_NEW)
if (wb->file_format_level >= FILE_FL_MANUAL_REMEMBER)
workbook_history_update (application_workbook_list (), wb->filename);
if (wb->filename)
......@@ -499,7 +499,7 @@ workbook_new (void)
g_free (name);
} while (!is_unique);
wb->file_format_level = FILE_FL_NEW;
wb->file_saver_id = FILE_SAVER_ID_INVAID;
wb->file_saver_id = FILE_SAVER_ID_INVALID;
wb->priv->during_destruction = FALSE;
......@@ -617,7 +617,7 @@ workbook_set_saveinfo (Workbook *wb, const gchar *name,
if (!workbook_set_filename (wb, name))
return FALSE;
wb->file_format_level = level;
if (file_saver_id != FILE_SAVER_ID_INVAID) {
if (file_saver_id != FILE_SAVER_ID_INVALID) {
wb->file_saver_id = file_saver_id;
} else {
wb->file_saver_id = gnumeric_xml_get_saver_id ();
......
......@@ -44,8 +44,8 @@
/* Precision to use when saving point measures. */
#define POINT_SIZE_PRECISION 3
static FileOpenerId xml_opener_id = FILE_OPENER_ID_INVAID;
static FileSaverId xml_saver_id = FILE_SAVER_ID_INVAID;
static FileOpenerId xml_opener_id = FILE_OPENER_ID_INVALID;
static FileSaverId xml_saver_id = FILE_SAVER_ID_INVALID;
FileOpenerId
gnumeric_xml_get_opener_id (void)
......
......@@ -1569,7 +1569,8 @@ xml2_open (IOContext *context, WorkbookView *wb_view,
int res = xml2_read (context, wb_view, filename);
if (res == 0) {
workbook_set_saveinfo (wb_view_workbook (wb_view), filename,
FILE_FL_MANUAL, FILE_SAVER_ID_INVAID);
FILE_FL_MANUAL_REMEMBER,
FILE_SAVER_ID_INVALID);
}
return res;
}
......
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