Commit 720befdb authored by Jody Goldberg's avatar Jody Goldberg Committed by Jody Goldberg

Use the extension associated with the default saver as the default


2001-06-04  Jody Goldberg <jgoldberg@home.com>

	* src/workbook.c (workbook_new) : Use the extension associated with
	  the default saver as the default extension.
parent 0b33c6b0
2001-06-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Use the extension associated with
the default saver as the default extension.
2001-06-04 Zbigniew Chyla <cyba@gnome.pl>
* src/func.c (function_def_get_full_info_if_needed): Use fn_type to
......
2001-06-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Use the extension associated with
the default saver as the default extension.
2001-06-04 Zbigniew Chyla <cyba@gnome.pl>
* src/func.c (function_def_get_full_info_if_needed): Use fn_type to
......
2001-06-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Use the extension associated with
the default saver as the default extension.
2001-06-04 Zbigniew Chyla <cyba@gnome.pl>
* src/func.c (function_def_get_full_info_if_needed): Use fn_type to
......
2001-06-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Use the extension associated with
the default saver as the default extension.
2001-06-04 Zbigniew Chyla <cyba@gnome.pl>
* src/func.c (function_def_get_full_info_if_needed): Use fn_type to
......
2001-06-04 Jody Goldberg <jgoldberg@home.com>
* src/workbook.c (workbook_new) : Use the extension associated with
the default saver as the default extension.
2001-06-04 Zbigniew Chyla <cyba@gnome.pl>
* src/func.c (function_def_get_full_info_if_needed): Use fn_type to
......
......@@ -29,7 +29,7 @@
#include "history.h"
#include "commands.h"
#include "main.h"
#include "file.h"
#include "file-priv.h"
#include "io-context.h"
#include "gutils.h"
......@@ -452,12 +452,15 @@ workbook_new (void)
static int count = 0;
gboolean is_unique;
Workbook *wb;
GnumFileSaver *def_save = get_default_file_saver ();
char const *extension = (def_save && def_save->extension)
? def_save->extension : "gnumeric";
wb = gtk_type_new (workbook_get_type ());
/* Assign a default name */
do {
char *name = g_strdup_printf (_("Book%d.gnumeric"), ++count);
char *name = g_strdup_printf (_("Book%d.%s"), ++count, extension);
is_unique = workbook_set_filename (wb, name);
g_free (name);
} while (!is_unique);
......
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