[gnumeric] Win32: somewhat fix printing.



commit a2373a1485a7c005e0f5dc2b987dbe67cdd4f824
Author: Morten Welinder <terra gnome org>
Date:   Wed Dec 25 23:16:53 2013 -0500

    Win32: somewhat fix printing.
    
    At least it shouldn't crash now, but since clearly no-one has used
    gtk+ 3.x printing _at_ _all_ on win32, there are probably more problems
    lurking.

 NEWS                                              |    1 +
 src/print.c                                       |    6 ++++++
 tools/win32/moduleset.in                          |    1 +
 tools/win32/patches/gtk-gtkwin32embedwidget.patch |   20 ++++++++++++++++++++
 4 files changed, 28 insertions(+), 0 deletions(-)
---
diff --git a/NEWS b/NEWS
index 99d70c4..6eaba2c 100644
--- a/NEWS
+++ b/NEWS
@@ -19,6 +19,7 @@ Morten:
        * Resurrect list of functions on the new Gnumeric wiki.
        * Resurrect support for non-ascii filenames on win32.  [#557815]
        * Fix timeout related critical in ItemGrid.
+       * Fix win32 print crash.  [#719997]
 
 --------------------------------------------------------------------------
 Gnumeric 1.12.9
diff --git a/src/print.c b/src/print.c
index a71e873..ee5672d 100644
--- a/src/print.c
+++ b/src/print.c
@@ -1470,6 +1470,9 @@ gnm_create_widget_cb (GtkPrintOperation *operation, gpointer user_data)
        GtkPrintSettings * settings;
        guint n_sheets = workbook_visible_sheet_count (pi->wb);
 
+       if (gnm_debug_flag ("print"))
+               g_printerr ("Creating custom print widget\n");
+
        grid = gtk_grid_new ();
        g_object_set (grid,
                      "column-spacing", 12,
@@ -1626,6 +1629,9 @@ gnm_create_widget_cb (GtkPrintOperation *operation, gpointer user_data)
        pi->spin_to = spin_to;
        pi->button_ignore_page_breaks = button_ignore_page_breaks;
 
+       if (gnm_debug_flag ("print"))
+               g_printerr ("Done with creating custom print widget\n");
+
        return G_OBJECT (grid);
 }
 
diff --git a/tools/win32/moduleset.in b/tools/win32/moduleset.in
index dec3310..6296202 100644
--- a/tools/win32/moduleset.in
+++ b/tools/win32/moduleset.in
@@ -259,6 +259,7 @@
            <patch file="&patch_dir;gtk-use-wine-to-cross-compile.patch"/>
            <patch file="&patch_dir;gtk-release-flux.patch" strip="1"/>
 <!--       <patch file="&patch_dir;gtk-b705980.patch" strip="1"/> -->
+           <patch file="&patch_dir;gtk-gtkwin32embedwidget.patch" strip="1"/>
        </branch>
        <dependencies>
            <dep package="glib"/>
diff --git a/tools/win32/patches/gtk-gtkwin32embedwidget.patch 
b/tools/win32/patches/gtk-gtkwin32embedwidget.patch
new file mode 100644
index 0000000..767e852
--- /dev/null
+++ b/tools/win32/patches/gtk-gtkwin32embedwidget.patch
@@ -0,0 +1,20 @@
+--- gtk+-3.10.6/gtk/gtkwin32embedwidget.c~     2013-12-25 23:06:48.000000000 -0500
++++ gtk+-3.10.6/gtk/gtkwin32embedwidget.c      2013-12-25 22:53:03.000000000 -0500
+@@ -252,7 +252,7 @@
+ static void
+ gtk_win32_embed_widget_show (GtkWidget *widget)
+ {
+-  gtk_widget_set_visible (widget, TRUE);
++  _gtk_widget_set_visible_flag (widget, TRUE);
+   
+   gtk_widget_realize (widget);
+   gtk_container_check_resize (GTK_CONTAINER (widget));
+@@ -262,7 +262,7 @@
+ static void
+ gtk_win32_embed_widget_hide (GtkWidget *widget)
+ {
+-  gtk_widget_set_visible (widget, FALSE);
++  _gtk_widget_set_visible_flag (widget, FALSE);
+   gtk_widget_unmap (widget);
+ }
+ 


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