[gnumeric] Fix warnings. [Part of #705313]



commit d0824c1ac54ad16c209e87330a4837c83a2447f8
Author: Andreas J Guelzow <aguelzow pyrshep ca>
Date:   Sat Aug 3 12:15:13 2013 -0600

    Fix warnings. [Part of #705313]
    
    2013-08-03  Andreas J. Guelzow <aguelzow pyrshep ca>
    
        * src/workbook-view.c (wb_view_preferred_size): interpret 0 as
        'default'

 ChangeLog           |    5 +++++
 NEWS                |    1 +
 src/workbook-view.c |    5 +++++
 3 files changed, 11 insertions(+), 0 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index c971df5..662f533 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-08-03  Andreas J. Guelzow <aguelzow pyrshep ca>
+
+       * src/workbook-view.c (wb_view_preferred_size): interpret 0 as
+       'default'
+
 2013-08-02  Andreas J. Guelzow <aguelzow pyrshep ca>
 
        * src/sheet-control-gui.c (context_menu_handler): add argument to
diff --git a/NEWS b/NEWS
index 0991139..110323e 100644
--- a/NEWS
+++ b/NEWS
@@ -14,6 +14,7 @@ Andreas:
        * Fix ODF export of charts with series consisting of multiple ranges.
        * Implement input message editing. [Part of #705310]
        * Fix export of input-message only validations. [#705384]
+       * Fix warnings. [Part of #705313]
 
 Jean:
        * Fix text wrap inside sheet objects. [#704417]
diff --git a/src/workbook-view.c b/src/workbook-view.c
index af5370a..8ad1fd1 100644
--- a/src/workbook-view.c
+++ b/src/workbook-view.c
@@ -258,6 +258,11 @@ wb_view_preferred_size (WorkbookView *wbv, int w, int h)
 {
        g_return_if_fail (IS_WORKBOOK_VIEW (wbv));
 
+       if (w <= 0)
+               w = 768; /* use default */
+       if (h <= 0)
+               h = 768; /* use default */
+
        g_object_set (G_OBJECT (wbv),
                      "preferred-width", w,
                      "preferred-height", h,


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]