[gnumeric] Sheet size: Respect the sheet size prefs for new blank workbooks
- From: Morten Welinder <mortenw src gnome org>
- To: svn-commits-list gnome org
- Subject: [gnumeric] Sheet size: Respect the sheet size prefs for new blank workbooks
- Date: Sat, 9 May 2009 20:44:07 -0400 (EDT)
commit 1ba5117a2345a9183a40cd83f1b211735cfc5511
Author: Morten Welinder <terra gnome org>
Date: Sat May 9 20:43:29 2009 -0400
Sheet size: Respect the sheet size prefs for new blank workbooks
---
ChangeLog | 3 +++
NEWS | 1 +
src/workbook.c | 6 +++++-
3 files changed, 9 insertions(+), 1 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 7d5c0fe..5b81119 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
2009-05-09 Morten Welinder <terra gnome org>
+ * src/workbook.c (workbook_new_with_sheets): Respect the sheet
+ size preferences.
+
* src/gui-clipboard.c (table_cellregion_write): Plug leak.
* src/gnumeric-gconf.c (gnm_gconf_set_workbook_ncols): Set
diff --git a/NEWS b/NEWS
index fe80c6e..880ef51 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Morten:
* Optimize styles on load.
* Prune fn-lookup caches in case someone is being silly.
* Plug leak in HTML paste.
+ * Respect the sheet size prefs for new blank workbooks.
--------------------------------------------------------------------------
Gnumeric 1.9.7
diff --git a/src/workbook.c b/src/workbook.c
index 685030e..b3319c0 100644
--- a/src/workbook.c
+++ b/src/workbook.c
@@ -20,6 +20,7 @@
#include "workbook-control.h"
#include "command-context.h"
#include "application.h"
+#include "gnumeric-gconf.h"
#include "sheet.h"
#include "sheet-view.h"
#include "sheet-control.h"
@@ -360,8 +361,11 @@ Workbook *
workbook_new_with_sheets (int sheet_count)
{
Workbook *wb = workbook_new ();
+ int cols = gnm_app_prefs->col_number;
+ int rows = gnm_app_prefs->row_number;
+ gnm_sheet_suggest_size (&cols, &rows);
while (sheet_count-- > 0)
- workbook_sheet_add (wb, -1, GNM_DEFAULT_COLS, GNM_DEFAULT_ROWS);
+ workbook_sheet_add (wb, -1, cols, rows);
go_doc_set_dirty (GO_DOC (wb), FALSE);
GO_DOC (wb)->pristine = TRUE;
return wb;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]