Skip to content
  • Jon K Hellan's avatar
    Add "level" parameter. · 16e00012
    Jon K Hellan authored
    2000-03-23  Jon K Hellan  <hellan@acm.org>
    
    	* src/file.[ch] (file_format_register_save): Add "level" parameter.
    
    	* src/file.h: (FileFormatLevel): Add the enum. At the best level,
    	the save command saves to the given name without asking.  At the
    	worst level, no name has been assigned.
    
    	* src/file.c (_FileSaver): Add "level" member.
    	(file_format_unregister_save): Set level to manual for workbooks
    	which had this saver set.
    	(cb_unregister_save): New function. Helper for
    	file_format_unregister_save.
    	(workbook_read): Set save info. Tag as new.
    	(workbook_import): No longer set needs_name - importer will have
    	set file_format_level.
    	(fs_set_filename): New function: Set default filename in the file
    	selection dialog.
    	(workbook_save_as): Use fs_set_filename. Set save info.
    	(workbook_save): Punt to workbook_save_as if file_format_level <
    	AUTO. Save using wb->file_save_fn.
    
    	* src/workbook.[ch] (workbook_set_saveinfo): New function. Set
    	filename, level and save function, but do nothing if we already
    	have info at a higher level.
    
    	* src/workbook.h (struct _Workbook): Replace needs_name with
    	file_format_level. Add file_save_fn member. Include file.h
    	(workbook_set_saveinfo): Add "level" parameter.
    
    	* src/workbook.c (workbook_do_destroy): Insert in history list
    	when file format level > "new". We used to test needs_name.
    	(workbook_is_pristine): Test file_format_level > "new" instead of
    	needs_name true.
    	(workbook_new): Tag workbook as new. Set save function.
    	(workbook_set_filename): needs_name has no longer exists. Don't
    	set it.
    
    	* src/xml-io.c (gnumeric_xml_read_workbook): Set save info. Tag as
    	AUTO.
    	(xml_init): Tag saver as AUTO.
    
    	* src/corba-workbook.c (Workbook_set_filename): Add FIXME comment.
    
    	* src/history.c (history_item_label): Strip extension only when it
    	is ".gnumeric".
    
    	* plugins/dif/dif.c (dif_read_workbook): Set save info, tag as manual.
    	(init_plugin): Tag saver as manual
    
    	* plugins/ecel/boot.c (excel_load): No longer add ".gnumeric"
            to filename. Set save info. Tag filename as MANUAL. We could
            make it AUTO soon.
    	(excel_init): Tag saver as MANUAL.
    
    	* plugins/ff-csv/csv-io.c (csv_read_workbook): Set save info,
            tag as MANUAL.
    	(init_plugin): Tag saver as MANUAL.
    
    	* plugins/html/boot.c (html_init): Tag html savers as AUTO,
            the others as WRITE_ONLY.
    
    	* plugins/lotus-123/boot.c (lotus_load): No longer change
            filename extension to ".gnumeric". Set save info, tag as manual.
    	(LOTUS_TITLE, LOTUS_DESCR): No, we haven't got export.
    
    	* plugins/oleo/boot.c (oleo_load): No longer change filename
            extension to ".gnumeric". Set save info. Tag as MANUAL.
    	(OLEO_DESCR): Fix typo.
    
    	* plugins/plan-perfect/pln.c (pln_read_workbook): Set
            filename, tag it as MANUAL.
    
    	* plugins/sc/sc.c (sc_read_workbook): Set save info, tag as MANUAL.
    
    	* plugins/sylk/sylk.c (sylk_read_workbook): Set save info,
            tag as MANUAL
    
    	* plugins/text/text-io.c (text_read_workbook): Set save info.
            Tag as MANUAL.
    	(text_init): Tag saver as MANUAL.
    
    	* plugins/xbase/boot.c (xbase_load): No longer change filename
            extension to ".gnumeric". Set save info. Tag as MANUAL.
    	(XBASE_TITLE, XBASE_DESCR): No, we haven't got export.
    16e00012